设置界面支持版本控制和github账号管理

This commit is contained in:
itpkcn@gmail.com
2026-03-21 11:33:48 +08:00
parent e801f041a0
commit 62fab2c3f2
22 changed files with 1595 additions and 4 deletions

View File

@@ -41,6 +41,10 @@ import type {
GitLogEntry,
SystemLanguageSettings,
SystemProxySettings,
GitDetectResult,
GitSettings,
GitHubAccountsSettings,
GitHubTokenValidation,
McpAppType,
LocalMcpServer,
McpMarketplaceProvider,
@@ -302,6 +306,43 @@ export async function updateSystemLanguageSettings(
return invoke("update_system_language_settings", { settings })
}
// --- Version Control ---
export async function detectGit(): Promise<GitDetectResult> {
return invoke("detect_git")
}
export async function testGitPath(path: string): Promise<GitDetectResult> {
return invoke("test_git_path", { path })
}
export async function getGitSettings(): Promise<GitSettings> {
return invoke("get_git_settings")
}
export async function updateGitSettings(
settings: GitSettings
): Promise<GitSettings> {
return invoke("update_git_settings", { settings })
}
export async function getGitHubAccounts(): Promise<GitHubAccountsSettings> {
return invoke("get_github_accounts")
}
export async function validateGitHubToken(
serverUrl: string,
token: string
): Promise<GitHubTokenValidation> {
return invoke("validate_github_token", { serverUrl, token })
}
export async function updateGitHubAccounts(
settings: GitHubAccountsSettings
): Promise<GitHubAccountsSettings> {
return invoke("update_github_accounts", { settings })
}
export async function mcpScanLocal(): Promise<LocalMcpServer[]> {
return invoke("mcp_scan_local")
}