Skip to content

The open source coding agent.

TypeScript

tui: fix prompt text aggregation to exclude synthetic content

Dax Raad10a4455c6fd2
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
index 78b1ed4aba5..dac9fd9af73 100644
--- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
@@ -241,7 +241,9 @@ export function Session() {
prompt.set(
parts.reduce(
(agg, part) => {
- if (part.type === "text") agg.input += part.text
+ if (part.type === "text") {
+ if (!part.synthetic) agg.input += part.text
+ }
if (part.type === "file") agg.parts.push(part)
return agg
},