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:
22
src/vite-env.d.ts
vendored
22
src/vite-env.d.ts
vendored
@@ -64,31 +64,33 @@ declare global {
|
||||
testApiEndpoints: (
|
||||
urls: string[],
|
||||
options?: { timeoutSecs?: number },
|
||||
) => Promise<Array<{
|
||||
url: string;
|
||||
latency: number | null;
|
||||
status?: number;
|
||||
error?: string;
|
||||
}>>;
|
||||
) => Promise<
|
||||
Array<{
|
||||
url: string;
|
||||
latency: number | null;
|
||||
status?: number;
|
||||
error?: string;
|
||||
}>
|
||||
>;
|
||||
// 自定义端点管理
|
||||
getCustomEndpoints: (
|
||||
appType: AppType,
|
||||
providerId: string
|
||||
providerId: string,
|
||||
) => Promise<CustomEndpoint[]>;
|
||||
addCustomEndpoint: (
|
||||
appType: AppType,
|
||||
providerId: string,
|
||||
url: string
|
||||
url: string,
|
||||
) => Promise<void>;
|
||||
removeCustomEndpoint: (
|
||||
appType: AppType,
|
||||
providerId: string,
|
||||
url: string
|
||||
url: string,
|
||||
) => Promise<void>;
|
||||
updateEndpointLastUsed: (
|
||||
appType: AppType,
|
||||
providerId: string,
|
||||
url: string
|
||||
url: string,
|
||||
) => Promise<void>;
|
||||
};
|
||||
platform: {
|
||||
|
||||
Reference in New Issue
Block a user