feat(ui): enhance provider switch error notification with copy action
- Split error message into title and description for better UX - Add one-click copy button to easily share error details - Extend toast duration to 6s for improved readability - Use extractErrorMessage utility for consistent error handling - Add i18n keys: common.copy, notifications.switchFailedTitle This improves debugging experience when provider switching fails, allowing users to quickly copy and share error messages.
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
"toggleTheme": "Toggle theme",
|
||||
"format": "Format",
|
||||
"formatSuccess": "Formatted successfully",
|
||||
"formatError": "Format failed: {{error}}"
|
||||
"formatError": "Format failed: {{error}}",
|
||||
"copy": "Copy"
|
||||
},
|
||||
"apiKeyInput": {
|
||||
"placeholder": "Enter API Key",
|
||||
@@ -97,7 +98,8 @@
|
||||
"providerSaved": "Provider configuration saved",
|
||||
"providerDeleted": "Provider deleted successfully",
|
||||
"switchSuccess": "Switch successful! Please restart {{appName}} terminal to take effect",
|
||||
"switchFailed": "Switch failed, please check configuration",
|
||||
"switchFailedTitle": "Switch failed",
|
||||
"switchFailed": "Switch failed: {{error}}",
|
||||
"autoImported": "Default provider created from existing configuration",
|
||||
"addFailed": "Failed to add provider: {{error}}",
|
||||
"saveFailed": "Save failed: {{error}}",
|
||||
|
||||
Reference in New Issue
Block a user