fix(ui): stream phase progress without gates
This commit is contained in:
@@ -42,6 +42,29 @@ test("real Pi thinking_delta becomes a dedicated activity_delta to the FE", () =
|
||||
expect(seen).toEqual([{ type: "activity_delta", text: "Valuto le ambiguità" }]);
|
||||
});
|
||||
|
||||
test("a reserved phase notification becomes a structured phase_started event", () => {
|
||||
const { rpc, fire } = fakeRpc();
|
||||
const bridge = new SessionBridge(rpc);
|
||||
const seen: any[] = [];
|
||||
bridge.onClientEvent((event) => seen.push(event));
|
||||
|
||||
fire({
|
||||
type: "extension_ui_request",
|
||||
method: "notify",
|
||||
notifyType: "info",
|
||||
message: "__tht_phase_started__:F2",
|
||||
});
|
||||
fire({
|
||||
type: "extension_ui_request",
|
||||
method: "notify",
|
||||
notifyType: "info",
|
||||
message: "__tht_phase_started__:F9_DO_NOT_FORWARD",
|
||||
});
|
||||
|
||||
expect(seen).toEqual([{ type: "system_event", event: "phase_started", phase: "F2" }]);
|
||||
expect(JSON.stringify(seen)).not.toContain("DO_NOT_FORWARD");
|
||||
});
|
||||
|
||||
test("assistant message_end exposes sanitized token usage with the configured context window", () => {
|
||||
const { rpc, fire } = fakeRpc();
|
||||
const bridge = new SessionBridge(rpc);
|
||||
|
||||
Reference in New Issue
Block a user