Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/mobile/src/features/threads/thread-work-log.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ const ThreadWorkLogRow = function ThreadWorkLogRow(
<WorkLogLabel
tone={isUsageLimit ? "warning" : iconIsDestructive ? "danger" : "default"}
>
{isSystemNotice ? row.summary : displayText}
{displayText}
{answerPreview ? (
<Text
className={
Expand Down
18 changes: 13 additions & 5 deletions packages/provider-pi/src/server/adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1111,10 +1111,7 @@ describe("PiAdapterV2", () => {
message: "Ordering barrier",
});
yield* takeEvent(
(event) =>
event.type === "turn_item.updated" &&
event.turnItem.type === "dynamic_tool" &&
event.turnItem.toolName === "notify",
(event) => event.type === "turn_item.updated" && event.turnItem.type === "system_notice",
);
assert.equal(runtime.providerSession.status, "running");
fake.queueState({ isStreaming: true });
Expand Down Expand Up @@ -2668,10 +2665,21 @@ describe("PiAdapterV2", () => {
type: "extension_ui_request",
id: "ui-cmd",
method: "notify",
message: "done",
message: "Command finished\nwith details",
notifyType: "info",
});
yield* fake.emit({ type: "response", command: "prompt", success: true });
const notice = yield* takeEvent(
(event) =>
(event.type === "turn_item.updated" && event.turnItem.type === "system_notice") ||
event.type === "turn.terminal",
);
assert.isTrue(
notice.type === "turn_item.updated" &&
notice.turnItem.type === "system_notice" &&
notice.turnItem.status === "completed" &&
notice.turnItem.message === "Command finished\nwith details",
);
const terminal = yield* takeEvent((event) => event.type === "turn.terminal");
assert.isTrue(terminal.type === "turn.terminal" && terminal.status === "completed");
}).pipe(Effect.scoped, Effect.provide(layerTest)),
Expand Down
10 changes: 3 additions & 7 deletions packages/provider-pi/src/server/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1225,13 +1225,9 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* (
...baseItemFields(turn, nativeItemId, emittedAt, emittedAt),
status: "completed",
completedAt: emittedAt,
title: "notify",
type: "dynamic_tool",
toolName: "notify",
input: {
message,
notifyType: recordString(event, "notifyType") ?? "info",
},
title: message,
type: "system_notice",
message,
},
});
return;
Expand Down
Loading