mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Fix TTS sanitization and message handling bugs
- Add duplicate config validation to backend - Fix TTS button comparison using original text - Track original vs sanitized text in TTS context - Update toast import in message hooks - Add type safety for error handling
This commit is contained in:
1 parent
698ad7b020
commit
44240f0aab
9 files changed
+23
-10
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { createOpenCodeClient } from '@/api/opencode'
|
||||
import { toast } from '@/lib/toast'
|
||||
import { showToast } from '@/lib/toast'
|
||||
import type { MessageListResponse } from '@/api/types'
|
||||
|
||||
interface UseRemoveMessageOptions {
|
||||
@@ -46,7 +46,7 @@ export function useRemoveMessage({ opcodeUrl, sessionId, directory }: UseRemoveM
|
||||
)
|
||||
}
|
||||
|
||||
toast.error('Failed to remove message')
|
||||
showToast.error('Failed to remove message')
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
@@ -117,7 +117,7 @@ export function useRefreshMessage({ opcodeUrl, sessionId, directory }: UseRefres
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error('Failed to refresh message:', error)
|
||||
toast.error('Failed to refresh message')
|
||||
showToast.error('Failed to refresh message')
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user