Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
4 changes: 2 additions & 2 deletions apps/server/integration/fixtures/providerRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const codexTurnToolFixture = [
turnId: TURN_ID,
payload: {
itemType: "command_execution",
title: "Command run",
title: "Ran command",
detail: "echo integration",
},
},
Expand All @@ -85,7 +85,7 @@ export const codexTurnToolFixture = [
payload: {
itemType: "command_execution",
status: "completed",
title: "Command run",
title: "Ran command",
detail: "echo integration",
},
},
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/Layers/CodexAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function itemTitle(itemType: CanonicalItemType): string | undefined {
case "plan":
return "Plan";
case "command_execution":
return "Command run";
return "Ran command";
case "file_change":
return "File change";
case "mcp_tool_call":
Expand Down
6 changes: 3 additions & 3 deletions apps/server/src/provider/Layers/ProviderService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ fanout.layer("ProviderServiceLive fanout", (it) => {
threadId: session.threadId,
turnId: asTurnId("turn-1"),
toolKind: "command",
title: "Command run",
title: "Ran command",
});
fanout.codex.emit({
type: "tool.completed",
Expand All @@ -713,7 +713,7 @@ fanout.layer("ProviderServiceLive fanout", (it) => {
threadId: session.threadId,
turnId: asTurnId("turn-1"),
toolKind: "command",
title: "Command run",
title: "Ran command",
});
fanout.codex.emit({
type: "turn.completed",
Expand Down Expand Up @@ -768,7 +768,7 @@ fanout.layer("ProviderServiceLive fanout", (it) => {
threadId: session.threadId,
turnId: asTurnId("turn-1"),
toolKind: "command",
title: "Command run",
title: "Ran command",
detail: "echo one",
},
{
Expand Down
4 changes: 4 additions & 0 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3278,6 +3278,10 @@ export default function ChatView({ threadId }: ChatViewProps) {
completionSummary={completionSummary}
turnDiffSummaryByAssistantMessageId={turnDiffSummaryByAssistantMessageId}
nowIso={nowIso}
enableCodexToolCallUi={
sessionProvider === "codex" ||
(sessionProvider === null && selectedProvider === "codex")
}
expandedWorkGroups={expandedWorkGroups}
onToggleWorkGroup={onToggleWorkGroup}
onOpenTurnDiff={onOpenTurnDiff}
Expand Down
12 changes: 11 additions & 1 deletion apps/web/src/components/chat/MessagesTimeline.logic.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { computeMessageDurationStart } from "./MessagesTimeline.logic";
import { computeMessageDurationStart, normalizeCompactToolLabel } from "./MessagesTimeline.logic";

describe("computeMessageDurationStart", () => {
it("returns message createdAt when there is no preceding user message", () => {
Expand Down Expand Up @@ -133,3 +133,13 @@ describe("computeMessageDurationStart", () => {
expect(computeMessageDurationStart([])).toEqual(new Map());
});
});

describe("normalizeCompactToolLabel", () => {
it("removes trailing completion wording from command labels", () => {
expect(normalizeCompactToolLabel("Ran command complete")).toBe("Ran command");
});

it("removes trailing completion wording from other labels", () => {
expect(normalizeCompactToolLabel("Read file completed")).toBe("Read file");
});
});
4 changes: 4 additions & 0 deletions apps/web/src/components/chat/MessagesTimeline.logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ export function computeMessageDurationStart(

return result;
}

export function normalizeCompactToolLabel(value: string): string {
return value.replace(/\s+(?:complete|completed)\s*$/i, "").trim();
}
Loading