统一错误处理

This commit is contained in:
xintaofei
2026-03-07 16:40:59 +08:00
parent 100ce01fe1
commit dbcac80712
7 changed files with 243 additions and 187 deletions

View File

@@ -56,6 +56,8 @@ function mapCommonCodeToKey(code: string): WelcomeErrorKey {
return "errors.externalCommandFailed"
case "window_operation_failed":
return "errors.windowOperationFailed"
case "task_execution_failed":
return "errors.unknown"
default:
return "errors.unknown"
}

View File

@@ -35,6 +35,7 @@ export type AppErrorCode =
| "io_error"
| "external_command_failed"
| "window_operation_failed"
| "task_execution_failed"
| (string & {})
export interface AppCommandError {