mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-31 19:22:15 +08:00
feat: add Tool Search domain restriction bypass with active-installation patching
Resolve the active `claude` command from PATH and apply an equal-length byte patch to remove the domain whitelist check. Backups are stored in ~/.cc-switch/toolsearch-backups/ (SHA-256 of path) so they survive Claude Code version upgrades. The patch auto-reapplies on app startup when the setting is enabled. Frontend checks PatchResult.success and rolls back the setting on failure.
This commit is contained in:
@@ -86,6 +86,18 @@ export const settingsApi = {
|
||||
return await invoke("clear_claude_onboarding_skip");
|
||||
},
|
||||
|
||||
async applyToolSearchPatch(): Promise<
|
||||
Array<{ path: string; success: boolean; error?: string }>
|
||||
> {
|
||||
return await invoke("apply_toolsearch_patch");
|
||||
},
|
||||
|
||||
async restoreToolSearchPatch(): Promise<
|
||||
Array<{ path: string; success: boolean; error?: string }>
|
||||
> {
|
||||
return await invoke("restore_toolsearch_patch");
|
||||
},
|
||||
|
||||
async saveFileDialog(defaultName: string): Promise<string | null> {
|
||||
return await invoke("save_file_dialog", { defaultName });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user