refactor: improve error handling and code formatting
- Enhanced error messages in Rust backend to include file paths - Improved provider switching error handling with detailed messages - Added MCP button placeholder in UI (functionality TODO) - Applied code formatting across frontend components - Extended error notification duration to 6s for better readability
This commit is contained in:
@@ -53,7 +53,8 @@ const JsonEditor: React.FC<JsonEditorProps> = ({
|
||||
}
|
||||
} catch (e) {
|
||||
// 简单处理JSON解析错误
|
||||
const message = e instanceof SyntaxError ? e.message : t("jsonEditor.invalidJson");
|
||||
const message =
|
||||
e instanceof SyntaxError ? e.message : t("jsonEditor.invalidJson");
|
||||
diagnostics.push({
|
||||
from: 0,
|
||||
to: doc.length,
|
||||
|
||||
Reference in New Issue
Block a user