add agentic thinking to chat

This commit is contained in:
perf3ct
2025-03-19 18:49:14 +00:00
parent 492c05bad4
commit 352204bf78
9 changed files with 488 additions and 176 deletions

View File

@@ -1,5 +1,5 @@
import options from '../options.js';
import type { AIService, ChatCompletionOptions, ChatResponse, Message } from './ai_interface.js';
import type { AIService, ChatCompletionOptions, ChatResponse, Message, SemanticContextService } from './ai_interface.js';
import { OpenAIService } from './providers/openai_service.js';
import { AnthropicService } from './providers/anthropic_service.js';
import { OllamaService } from './providers/ollama_service.js';
@@ -271,8 +271,8 @@ export class AIServiceManager {
* Get the semantic context service for advanced context handling
* @returns The semantic context service instance
*/
getSemanticContextService() {
return semanticContextService;
getSemanticContextService(): SemanticContextService {
return semanticContextService as unknown as SemanticContextService;
}
/**
@@ -439,7 +439,7 @@ export default {
getContextExtractor() {
return getInstance().getContextExtractor();
},
getSemanticContextService() {
getSemanticContextService(): SemanticContextService {
return getInstance().getSemanticContextService();
},
getIndexService() {