opencode support

This commit is contained in:
webdevcody
2026-01-08 15:30:20 -05:00
parent d1bd131cab
commit 5fbc7dd13e
26 changed files with 3723 additions and 26 deletions

View File

@@ -48,6 +48,20 @@ export interface CodexCliStatus {
error?: string;
}
// OpenCode CLI Status
export interface OpencodeCliStatus {
installed: boolean;
version?: string | null;
path?: string | null;
auth?: {
authenticated: boolean;
method: string;
};
installCommand?: string;
loginCommand?: string;
error?: string;
}
// Codex Auth Method
export type CodexAuthMethod =
| 'api_key_env' // OPENAI_API_KEY environment variable
@@ -103,6 +117,7 @@ export type SetupStep =
| 'claude_auth'
| 'cursor'
| 'codex'
| 'opencode'
| 'github'
| 'complete';
@@ -128,6 +143,9 @@ export interface SetupState {
codexAuthStatus: CodexAuthStatus | null;
codexInstallProgress: InstallProgress;
// OpenCode CLI state
opencodeCliStatus: OpencodeCliStatus | null;
// Setup preferences
skipClaudeSetup: boolean;
}
@@ -158,6 +176,9 @@ export interface SetupActions {
setCodexInstallProgress: (progress: Partial<InstallProgress>) => void;
resetCodexInstallProgress: () => void;
// OpenCode CLI
setOpencodeCliStatus: (status: OpencodeCliStatus | null) => void;
// Preferences
setSkipClaudeSetup: (skip: boolean) => void;
}
@@ -188,6 +209,8 @@ const initialState: SetupState = {
codexAuthStatus: null,
codexInstallProgress: { ...initialInstallProgress },
opencodeCliStatus: null,
skipClaudeSetup: shouldSkipSetup,
};
@@ -255,6 +278,9 @@ export const useSetupStore = create<SetupState & SetupActions>()((set, get) => (
codexInstallProgress: { ...initialInstallProgress },
}),
// OpenCode CLI
setOpencodeCliStatus: (status) => set({ opencodeCliStatus: status }),
// Preferences
setSkipClaudeSetup: (skip) => set({ skipClaudeSetup: skip }),
}));