mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Reduce toast notification duration to 2500ms and suppress MessageAbortedError toasts
This commit is contained in:
1 parent
b022b0a2c5
commit
82ccacb7be
2 files changed
+6
-2
No files matched your search
@@ -47,6 +47,7 @@ function RouterContent() {
|
||||
expand={false}
|
||||
richColors
|
||||
closeButton
|
||||
duration={2500}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -292,11 +292,14 @@ export const useSSE = (opcodeUrl: string | null | undefined, directory?: string,
|
||||
if (!('error' in event.properties)) break
|
||||
if ('sessionID' in event.properties && event.properties.sessionID === currentSessionId) break
|
||||
|
||||
const parsed = parseOpenCodeError(event.properties.error)
|
||||
const error = event.properties.error
|
||||
if (error?.name === 'MessageAbortedError') break
|
||||
|
||||
const parsed = parseOpenCodeError(error)
|
||||
if (parsed) {
|
||||
showToast.error(parsed.title, {
|
||||
description: parsed.message,
|
||||
duration: 6000,
|
||||
duration: 2500,
|
||||
})
|
||||
}
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user