Skip to content
Draft
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
8 changes: 4 additions & 4 deletions src/components/convert-chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ export function ConvertChip() {
const { run, cancel } = useConvert();
const t = useT();

// Only show in split mode — when only one pane is visible there's no
// divider to hang off, and the toolbar button is already obvious.
if (layoutMode !== "split") return null;

const agentInfo = agents.find((a) => a.id === agent);
const model = agent ? agentModels[agent] ?? "default" : "default";
const canConvert =
Expand Down Expand Up @@ -66,6 +62,10 @@ export function ConvertChip() {
return () => window.removeEventListener("keydown", onKey);
}, [onClick, isRunning, canConvert]);

// Only show in split mode — when only one pane is visible there's no
// divider to hang off, and the toolbar button is already obvious.
if (layoutMode !== "split") return null;

return (
<div
className="pointer-events-none absolute inset-y-0 left-1/2 z-30 flex items-center"
Expand Down
9 changes: 6 additions & 3 deletions src/lib/agents/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,11 @@ function parseLineWithState(agent: string, line: string, state: ParseState): Age

if (agent === "codex") {
if (obj.type === "item.completed" && obj.item && typeof obj.item === "object") {
const item = obj.item as { item_type?: string; text?: string };
if (item.item_type === "assistant_message" && typeof item.text === "string") {
const item = obj.item as { item_type?: string; type?: string; text?: string };
if (
(item.item_type === "assistant_message" || item.type === "agent_message") &&
typeof item.text === "string"
) {
out.push({ kind: "delta", text: item.text });
}
}
Expand All @@ -313,7 +316,7 @@ function parseLineWithState(agent: string, line: string, state: ParseState): Age
out.push({ kind: "delta", text: msg.message });
}
}
if (obj.type === "task_complete" && obj.usage) {
if ((obj.type === "task_complete" || obj.type === "turn.completed") && obj.usage) {
out.push({ kind: "meta", key: "usage", value: obj.usage });
}
}
Expand Down