feat(settings): add MCP server status check
This commit is contained in:
1 parent
088eaccecc
commit
17504be027
11 files changed
+422
-1
No files matched your search
@@ -227,6 +227,7 @@ export const clearHistory = forward("clearHistory");
|
||||
export const deleteHistoryEntry = forward("deleteHistoryEntry");
|
||||
|
||||
// Updates
|
||||
export const checkMcpServerStatus = forward("checkMcpServerStatus");
|
||||
export const checkForUpdates = forward("checkForUpdates");
|
||||
export const getSystemProxyUrl = forward("getSystemProxyUrl");
|
||||
export const getAppVersion = forward("getAppVersion");
|
||||
@@ -256,6 +257,7 @@ export type {
|
||||
WebDavPasswordStatus,
|
||||
WebDavSyncSummary,
|
||||
WebDavDownloadResult,
|
||||
McpServerStatus,
|
||||
UpdateInfo,
|
||||
RedisDatabaseInfo,
|
||||
RedisKeyInfo,
|
||||
|
||||
@@ -1381,6 +1381,21 @@ export async function checkForUpdates(): Promise<UpdateInfo> {
|
||||
return get("/api/update/check");
|
||||
}
|
||||
|
||||
export async function checkMcpServerStatus(): Promise<import("./tauri").McpServerStatus> {
|
||||
return {
|
||||
installed: false,
|
||||
npm_available: false,
|
||||
node_version: null,
|
||||
current_version: null,
|
||||
latest_version: null,
|
||||
update_available: false,
|
||||
bin_path: null,
|
||||
install_command: "npm install -g @dbx-app/mcp-server@latest",
|
||||
update_command: "npm install -g @dbx-app/mcp-server@latest",
|
||||
error: "MCP Server status is only available in the desktop app.",
|
||||
};
|
||||
}
|
||||
|
||||
export async function getSystemProxyUrl(): Promise<string | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -915,6 +915,23 @@ export interface UpdateInfo {
|
||||
release_notes: string;
|
||||
}
|
||||
|
||||
export interface McpServerStatus {
|
||||
installed: boolean;
|
||||
npm_available: boolean;
|
||||
node_version: string | null;
|
||||
current_version: string | null;
|
||||
latest_version: string | null;
|
||||
update_available: boolean;
|
||||
bin_path: string | null;
|
||||
install_command: string;
|
||||
update_command: string;
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
export async function checkMcpServerStatus(): Promise<McpServerStatus> {
|
||||
return invoke("check_mcp_server_status");
|
||||
}
|
||||
|
||||
export async function checkForUpdates(): Promise<UpdateInfo> {
|
||||
return invoke("check_for_updates");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user