merge: resolve conflicts with upstream OpenCode support

- Combined CLI disconnection markers with OpenCode support
- Added OpenCode auth/deauth routes and API methods
- Resolved merge conflicts between feature branch and upstream v0.9.0rc
This commit is contained in:
DhanushSantosh
2026-01-09 22:25:46 +05:30
45 changed files with 6975 additions and 958 deletions

View File

@@ -1163,6 +1163,24 @@ export class HttpApiClient implements ElectronAPI {
error?: string;
}> => this.post('/api/setup/deauth-cursor'),
authOpencode: (): Promise<{
success: boolean;
token?: string;
requiresManualAuth?: boolean;
terminalOpened?: boolean;
command?: string;
message?: string;
output?: string;
}> => this.post('/api/setup/auth-opencode'),
deauthOpencode: (): Promise<{
success: boolean;
requiresManualDeauth?: boolean;
command?: string;
message?: string;
error?: string;
}> => this.post('/api/setup/deauth-opencode'),
getCursorConfig: (
projectPath: string
): Promise<{
@@ -1322,6 +1340,32 @@ export class HttpApiClient implements ElectronAPI {
error?: string;
}> => this.post('/api/setup/verify-codex-auth', { authMethod, apiKey }),
// OpenCode CLI methods
getOpencodeStatus: (): Promise<{
success: boolean;
status?: string;
installed?: boolean;
method?: string;
version?: string;
path?: string;
recommendation?: string;
installCommands?: {
macos?: string;
linux?: string;
npm?: string;
};
auth?: {
authenticated: boolean;
method: string;
hasAuthFile?: boolean;
hasOAuthToken?: boolean;
hasApiKey?: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}> => this.get('/api/setup/opencode-status'),
onInstallProgress: (callback: (progress: unknown) => void) => {
return this.subscribeToEvent('agent:stream', callback);
},