Browse Source

tui: fix prompt text aggregation to exclude synthetic content

Dax Raad 3 months ago
parent
commit
10a4455c6f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

+ 3 - 1
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -241,7 +241,9 @@ export function Session() {
         prompt.set(
         prompt.set(
           parts.reduce(
           parts.reduce(
             (agg, part) => {
             (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)
               if (part.type === "file") agg.parts.push(part)
               return agg
               return agg
             },
             },