mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
- Rename ClaudeApiProfile to ClaudeCompatibleProvider with models[] array - Each ProviderModel has mapsToClaudeModel field for Claude tier mapping - Add providerType field for provider-specific icons (glm, minimax, openrouter) - Add thinking level support for provider models in phase selectors - Show all mapped Claude models per provider model (e.g., "Maps to Haiku, Sonnet, Opus") - Add Bulk Replace feature to switch all phases to a provider at once - Hide Bulk Replace button when no providers are enabled - Fix project-level phaseModelOverrides not persisting after refresh - Fix deleting last provider not persisting (remove empty array guard) - Add getProviderByModelId() helper for all SDK routes - Update all routes to pass provider config for provider models - Update terminology from "profiles" to "providers" throughout UI - Update documentation to reflect new provider system
70 lines
2.5 KiB
TypeScript
70 lines
2.5 KiB
TypeScript
// @ts-nocheck
|
|
import { useAppStore } from '@/store/app-store';
|
|
import { useSetupStore } from '@/store/setup-store';
|
|
import { useCliStatus } from '../hooks/use-cli-status';
|
|
import { ClaudeCliStatus } from '../cli-status/claude-cli-status';
|
|
import { ClaudeMdSettings } from '../claude/claude-md-settings';
|
|
import { ClaudeUsageSection } from '../api-keys/claude-usage-section';
|
|
import { SkillsSection } from './claude-settings-tab/skills-section';
|
|
import { SubagentsSection } from './claude-settings-tab/subagents-section';
|
|
import { ApiProfilesSection } from './claude-settings-tab/api-profiles-section';
|
|
import { ProviderToggle } from './provider-toggle';
|
|
import { Info } from 'lucide-react';
|
|
|
|
export function ClaudeSettingsTab() {
|
|
const { apiKeys, autoLoadClaudeMd, setAutoLoadClaudeMd } = useAppStore();
|
|
const { claudeAuthStatus } = useSetupStore();
|
|
|
|
// Use CLI status hook
|
|
const { claudeCliStatus, isCheckingClaudeCli, handleRefreshClaudeCli } = useCliStatus();
|
|
|
|
// Hide usage tracking when using API key (only show for Claude Code CLI users)
|
|
// Also hide on Windows for now (CLI usage command not supported)
|
|
const isWindows =
|
|
typeof navigator !== 'undefined' && navigator.platform?.toLowerCase().includes('win');
|
|
const showUsageTracking = !apiKeys.anthropic && !isWindows;
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
{/* Provider Visibility Toggle */}
|
|
<ProviderToggle provider="claude" providerLabel="Claude" />
|
|
|
|
{/* Usage Info */}
|
|
<div className="flex items-start gap-3 p-4 rounded-xl bg-blue-500/10 border border-blue-500/20">
|
|
<Info className="w-5 h-5 text-blue-400 shrink-0 mt-0.5" />
|
|
<div className="text-sm text-blue-400/90">
|
|
<span className="font-medium">Primary Provider</span>
|
|
<p className="text-xs text-blue-400/70 mt-1">
|
|
Claude is used throughout the app including chat, analysis, and agent tasks.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<ClaudeCliStatus
|
|
status={claudeCliStatus}
|
|
authStatus={claudeAuthStatus}
|
|
isChecking={isCheckingClaudeCli}
|
|
onRefresh={handleRefreshClaudeCli}
|
|
/>
|
|
|
|
{/* Claude-compatible providers */}
|
|
<ApiProfilesSection />
|
|
|
|
<ClaudeMdSettings
|
|
autoLoadClaudeMd={autoLoadClaudeMd}
|
|
onAutoLoadClaudeMdChange={setAutoLoadClaudeMd}
|
|
/>
|
|
|
|
{/* Skills Configuration */}
|
|
<SkillsSection />
|
|
|
|
{/* Custom Subagents */}
|
|
<SubagentsSection />
|
|
|
|
{showUsageTracking && <ClaudeUsageSection />}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default ClaudeSettingsTab;
|