mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
* feat: add Claude API provider profiles for alternative endpoints Add support for managing multiple Claude-compatible API endpoints (z.AI GLM, AWS Bedrock, etc.) through provider profiles in settings. Features: - New ClaudeApiProfile type with base URL, API key, model mappings - Pre-configured z.AI GLM template with correct model names - Profile selector in Settings > Claude > API Profiles - Clean switching between profiles and direct Anthropic API - Immediate persistence to prevent data loss on restart Profile support added to all execution paths: - Agent service (chat) - Ideation service - Auto-mode service (feature agents, enhancements) - Simple query service (title generation, descriptions, etc.) - Backlog planning, commit messages, spec generation - GitHub issue validation, suggestions Environment variables set when profile is active: - ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN/API_KEY - ANTHROPIC_DEFAULT_HAIKU/SONNET/OPUS_MODEL - API_TIMEOUT_MS, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC
23 lines
580 B
TypeScript
23 lines
580 B
TypeScript
import { useState, useCallback } from 'react';
|
|
|
|
export type ProjectSettingsViewId = 'identity' | 'theme' | 'worktrees' | 'claude' | 'danger';
|
|
|
|
interface UseProjectSettingsViewOptions {
|
|
initialView?: ProjectSettingsViewId;
|
|
}
|
|
|
|
export function useProjectSettingsView({
|
|
initialView = 'identity',
|
|
}: UseProjectSettingsViewOptions = {}) {
|
|
const [activeView, setActiveView] = useState<ProjectSettingsViewId>(initialView);
|
|
|
|
const navigateTo = useCallback((viewId: ProjectSettingsViewId) => {
|
|
setActiveView(viewId);
|
|
}, []);
|
|
|
|
return {
|
|
activeView,
|
|
navigateTo,
|
|
};
|
|
}
|