feat: add opencode support

This commit is contained in:
Haileyesus
2026-05-13 17:43:10 +03:00
parent 10f721cf14
commit 421bdd2f0f
53 changed files with 2691 additions and 130 deletions

View File

@@ -136,6 +136,13 @@ function buildShellCommand(
return command;
}
if (provider === 'opencode') {
if (hasSession && sessionId) {
return `opencode --session "${sessionId}"`;
}
return initialCommand || 'opencode';
}
const command = initialCommand || 'claude';
if (hasSession && sessionId) {
if (os.platform() === 'win32') {
@@ -389,6 +396,8 @@ export function handleShellConnection(
? 'Codex'
: provider === 'gemini'
? 'Gemini'
: provider === 'opencode'
? 'OpenCode'
: 'Claude';
welcomeMsg = hasSession
? `\x1b[36mResuming ${providerName} session ${sessionId} in: ${projectPath}\x1b[0m\r\n`