mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
feat: implement OpenCode authentication and provider setup
- Added OpenCode authentication status check to the OpencodeProvider class. - Introduced OpenCodeAuthStatus interface to manage authentication states. - Updated detectInstallation method to include authentication status in the response. - Created ProvidersSetupStep component to consolidate provider setup UI, including Claude, Cursor, Codex, and OpenCode. - Refactored setup view to streamline navigation and improve user experience. - Enhanced OpenCode CLI integration with updated installation paths and authentication checks. This commit enhances the setup process by allowing users to configure and authenticate multiple AI providers, improving overall functionality and user experience.
This commit is contained in:
@@ -38,6 +38,11 @@ interface ClaudeSetupStepProps {
|
||||
onSkip: () => void;
|
||||
}
|
||||
|
||||
interface ClaudeSetupContentProps {
|
||||
/** Hide header and navigation for embedded use */
|
||||
embedded?: boolean;
|
||||
}
|
||||
|
||||
type VerificationStatus = 'idle' | 'verifying' | 'verified' | 'error';
|
||||
|
||||
// Claude Setup Step
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
export { WelcomeStep } from './welcome-step';
|
||||
export { ThemeStep } from './theme-step';
|
||||
export { CompleteStep } from './complete-step';
|
||||
export { ProvidersSetupStep } from './providers-setup-step';
|
||||
export { GitHubSetupStep } from './github-setup-step';
|
||||
|
||||
// Legacy individual step exports (kept for backwards compatibility)
|
||||
export { ClaudeSetupStep } from './claude-setup-step';
|
||||
export { CursorSetupStep } from './cursor-setup-step';
|
||||
export { CodexSetupStep } from './codex-setup-step';
|
||||
export { OpencodeSetupStep } from './opencode-setup-step';
|
||||
export { GitHubSetupStep } from './github-setup-step';
|
||||
|
||||
@@ -96,7 +96,7 @@ export function OpencodeSetupStep({ onNext, onBack, onSkip }: OpencodeSetupStepP
|
||||
|
||||
try {
|
||||
// Copy login command to clipboard and show instructions
|
||||
const loginCommand = opencodeCliStatus?.loginCommand || 'opencode login';
|
||||
const loginCommand = opencodeCliStatus?.loginCommand || 'opencode auth login';
|
||||
await navigator.clipboard.writeText(loginCommand);
|
||||
toast.info('Login command copied! Paste in terminal to authenticate.');
|
||||
|
||||
@@ -297,13 +297,13 @@ export function OpencodeSetupStep({ onNext, onBack, onSkip }: OpencodeSetupStepP
|
||||
</p>
|
||||
<div className="flex items-center gap-2">
|
||||
<code className="flex-1 bg-muted px-3 py-2 rounded text-sm font-mono text-foreground">
|
||||
{opencodeCliStatus?.loginCommand || 'opencode login'}
|
||||
{opencodeCliStatus?.loginCommand || 'opencode auth login'}
|
||||
</code>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() =>
|
||||
copyCommand(opencodeCliStatus?.loginCommand || 'opencode login')
|
||||
copyCommand(opencodeCliStatus?.loginCommand || 'opencode auth login')
|
||||
}
|
||||
>
|
||||
<Copy className="w-4 h-4" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user