重构git凭证托管,改为操作系统托管

This commit is contained in:
xintaofei
2026-03-21 18:00:05 +08:00
parent 44f812c8d2
commit 450b081e88
13 changed files with 180 additions and 19 deletions

View File

@@ -344,6 +344,25 @@ export async function updateGitHubAccounts(
return invoke("update_github_accounts", { settings })
}
export async function saveAccountToken(
accountId: string,
token: string
): Promise<void> {
return invoke("save_account_token", { accountId, token })
}
export async function getAccountToken(
accountId: string
): Promise<string | null> {
return invoke("get_account_token", { accountId })
}
export async function deleteAccountToken(
accountId: string
): Promise<void> {
return invoke("delete_account_token", { accountId })
}
export async function mcpScanLocal(): Promise<LocalMcpServer[]> {
return invoke("mcp_scan_local")
}

View File

@@ -544,7 +544,6 @@ export interface GitHubAccount {
id: string
server_url: string
username: string
token: string
scopes: string[]
avatar_url: string | null
is_default: boolean