Skip to content

Commit 00d7aed

Browse files
fix: prompt submit error with opencode -c (#4496)
Co-authored-by: Aiden Cline <[email protected]>
1 parent 4477132 commit 00d7aed

File tree

1 file changed

+6
-9
lines changed
  • packages/opencode/src/cli/cmd/tui

1 file changed

+6
-9
lines changed

packages/opencode/src/cli/cmd/tui/app.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,13 @@ function App() {
186186
})
187187
})
188188

189+
let continued = false
189190
createEffect(() => {
190-
if (sync.status !== "complete") return
191-
if (args.continue) {
192-
const match = sync.data.session.at(0)?.id
193-
if (match) {
194-
route.navigate({
195-
type: "session",
196-
sessionID: match,
197-
})
198-
}
191+
if (continued || sync.status !== "complete" || !args.continue) return
192+
const match = sync.data.session.at(0)?.id
193+
if (match) {
194+
continued = true
195+
route.navigate({ type: "session", sessionID: match })
199196
}
200197
})
201198

0 commit comments

Comments
 (0)