import { ChatAgentService } from './chat-agent-service'; import { ChatAgentLocation } from './chat-agents'; import { ChatContext, ChatRequest } from './chat-model'; import { ParsedChatRequestVariablePart, ParsedChatRequest, ParsedChatRequestPart } from './parsed-chat-request'; import { AIVariable, AIVariableService, PromptService, ToolInvocationRegistry, ToolRequest } from '@theia/ai-core'; import { ILogger } from '@theia/core'; export declare const ChatRequestParser: unique symbol; export interface ChatRequestParser { parseChatRequest(request: ChatRequest, location: ChatAgentLocation, context: ChatContext): Promise; } export declare class ChatRequestParserImpl implements ChatRequestParser { private readonly agentService; private readonly variableService; private readonly toolInvocationRegistry; protected readonly logger: ILogger; protected readonly promptService: PromptService; constructor(agentService: ChatAgentService, variableService: AIVariableService, toolInvocationRegistry: ToolInvocationRegistry, logger: ILogger); parseChatRequest(request: ChatRequest, location: ChatAgentLocation, context: ChatContext): Promise; protected parseParts(request: ChatRequest, location: ChatAgentLocation): { parts: ParsedChatRequestPart[]; toolRequests: Map; deferredToolIds: Set; variables: Map; }; /** * Parse text for tool requests and add them to the given map */ private parseFunctionsFromVariableText; private tryToParseAgent; private tryToParseVariable; /** * Try to parse a command at the start of the given message. * * Commands are syntactic sugar for `#prompt:commandName|args`. * The prompt variable resolver will handle the actual resolution. */ protected tryToParseCommand(message: string, offset: number, _parts: ReadonlyArray): ParsedChatRequestVariablePart | undefined; private findNextCommandOffset; /** * Whether a `/name` token should be treated as a command. Only names that actually resolve to a * command or prompt fragment are accepted, which keeps unknown `/word` tokens (e.g. `/tmp`, * `/path/to/file`) as plain text. */ protected isCommandCandidate(commandName: string): boolean; private tryToParseFunction; } //# sourceMappingURL=chat-request-parser.d.ts.map