Skip to content
Open
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
6 changes: 6 additions & 0 deletions providers/opencode-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,12 @@ export function OpencodeProvider({ children }: PropsWithChildren) {
await clearPendingTaskFinishedNotification(sessionId);
await client.session.abort({ sessionID: sessionId });

// Reset prompt guards immediately so the user can submit again without
// waiting for the in-flight promptAsync to settle. sendPrompt's finally
// block sets the same values; both writes compose to the same state.
promptSubmissionRef.current = { active: false, sessionId: undefined };
setSendingState((prev) => (prev.active ? { active: false, sessionId: undefined } : prev));

await Promise.all([
refreshSessions(true),
refreshMessages(sessionId, true),
Expand Down