feat: integrate settings service for auto-load CLAUDE.md functionality

- Updated API routes to accept an optional settings service for loading the autoLoadClaudeMd setting.
- Introduced a new settings helper utility for retrieving project-specific settings.
- Enhanced feature generation and spec generation processes to utilize the autoLoadClaudeMd setting.
- Refactored relevant route handlers to support the new settings integration across various endpoints.
This commit is contained in:
Kacper
2025-12-24 22:34:22 +01:00
parent 07bcb6b767
commit 3154121840
17 changed files with 212 additions and 39 deletions

View File

@@ -19,6 +19,15 @@ export interface ConversationMessage {
content: string | Array<{ type: string; text?: string; source?: object }>;
}
/**
* System prompt preset configuration for CLAUDE.md auto-loading
*/
export interface SystemPromptPreset {
type: 'preset';
preset: 'claude_code';
append?: string;
}
/**
* Options for executing a query via a provider
*/
@@ -26,13 +35,14 @@ export interface ExecuteOptions {
prompt: string | Array<{ type: string; text?: string; source?: object }>;
model: string;
cwd: string;
systemPrompt?: string;
systemPrompt?: string | SystemPromptPreset;
maxTurns?: number;
allowedTools?: string[];
mcpServers?: Record<string, unknown>;
abortController?: AbortController;
conversationHistory?: ConversationMessage[]; // Previous messages for context
sdkSessionId?: string; // Claude SDK session ID for resuming conversations
settingSources?: Array<'user' | 'project' | 'local'>; // Sources for CLAUDE.md loading
}
/**