Commit graph

7 commits

Author SHA1 Message Date
Andrew Beal
2c7e5b41b6 Add provider-specific retry delay extraction for rate limits
Implement extractRetryDelay methods in Claude, Gemini, and OpenAI classes to parse provider-specific retry delay headers/responses. Update StreamingService to use these delays when available, falling back to exponential backoff. Enhance ApiError to include response headers and body for retry delay extraction.
2025-12-31 14:19:42 +00:00
Andrew Beal
1b20533da9 refactor: return structured next step data instead of embedding in message
Previously the next step description was embedded in the completion message string.
Now return it as a separate structured object with step number, description,
instruction, and optional context for better programmatic access.
2025-12-30 22:42:23 +00:00
Andrew Beal
2de8109a74 refactor: restructure AI prompt and agent architecture for multi-agent planning support
- Move prompts from AIClasses to AIPrompts directory
- Replace centralized IPrompt injection with direct property setters on IAIClass
- Remove allowDestructiveActions parameter from streamRequest methods
- Add toolDefinitions, systemPrompt, and userInstruction properties to IAIClass
- Refactor AIFunctionDefinitions to static methods with agent-specific tool sets
- Add planning agent function definitions (CreatePlan, Replan, CompleteStep, SubmitPlan)
- Create AIControllerService to handle agent orchestration
- Add execution plan related copy strings and replacement utility
- Update all AI providers (Claude, Gemini, OpenAI) to use new architecture
2025-12-30 19:07:00 +00:00
Andrew Beal
e4f56e3877 refactor: improve type safety in file service and error handling
- Change listFiles() to synchronous method returning cached IDs
- Add type predicate to ApiError.isApiError() for better type narrowing
- Remove redundant ApiError union type in retry error handling
2025-12-19 12:36:28 +00:00
Andrew Beal
d36815c214 feat: add Gemini thought signature support and OpenAI Responses API migration
Implement thought signature tracking for Gemini function calls to support Gemini 3 requirements. Migrate OpenAI integration from Chat Completions to Responses API with proper input/output item handling. Add cross-provider compatibility via legacy text format fallback for conversations without thought signatures or tool IDs. Improve chat auto-scroll behavior and conversation validation. Add and update AI class and conversation tests.
2025-12-10 21:27:58 +00:00
Andrew Beal
33440d17bf refactor: standardize error handling and logging across codebase
Replace console.error/log with Exception.log helper, improve OpenAI error handling with retryable errors, add type-safe model validation, and add new AI models (Claude Opus 4.5, Gemini 3 Pro Preview, GPT-5.1)
2025-12-06 14:09:46 +00:00
Andrew Beal
18372ce01b refactor: improve error handling with structured API errors and retry logic
Replace console.error calls with Exception.log, implement typed API errors with automatic retry for transient failures (rate limits, server errors), add error state tracking to conversation content, and enhance system prompt with action-first operating principle, update unit tests
2025-11-19 20:30:53 +00:00