mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
fix: reconcile confirmed prompt on message fetch to clear stale send errors (#296)
* fix: reconcile confirmed prompt on message fetch to clear stale send errors * refactor: extract reconcileConfirmedPrompt into dedicated module
This commit is contained in:
1 parent
07140870c3
commit
6c13d78563
3 files changed
+116
-1
No files matched your search
@@ -14,6 +14,7 @@ import { showToast } from "../lib/toast";
|
||||
import { useSendErrorStore } from "../stores/sendErrorStore";
|
||||
import { useSessionStatus } from "../stores/sessionStatusStore";
|
||||
import { invalidateSessionListCaches, messagesQueryKey } from "../lib/queryInvalidation";
|
||||
import { reconcileConfirmedPrompt } from "../lib/sendErrorReconcile";
|
||||
|
||||
type AssistantMessage = components["schemas"]["AssistantMessage"];
|
||||
|
||||
@@ -143,6 +144,7 @@ export const useMessages = (opcodeUrl: string | null | undefined, sessionID: str
|
||||
queryKey: messagesQueryKey(opcodeUrl, sessionID, directory),
|
||||
queryFn: async () => {
|
||||
const response = await client!.listMessages(sessionID!)
|
||||
reconcileConfirmedPrompt(sessionID!, response as MessageWithParts[])
|
||||
return response as MessageWithParts[]
|
||||
},
|
||||
enabled: !!client && !!sessionID,
|
||||
|
||||
Reference in new issue
Block a user