feat(ai): improve runtime capability reporting and context settings

Add explicit chat capability tracking, expose formatted runtime capabilities
in the info command, and support a max context size option for user AI settings.

Also update Ollama base URL resolution to use OLLAMA_ADDRESS and simplify
provider chat command execution.
This commit is contained in:
2026-05-11 02:01:44 +03:00
parent d2464b9b21
commit 3848dd82d9
15 changed files with 850 additions and 336 deletions
+7 -5
View File
@@ -16,10 +16,12 @@ export class OllamaChat extends ChatCommand {
description = Environment.commandDescriptions.ollamaChat;
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
return this.executeOllama(msg, match?.[3] || "", match?.[1]?.toLowerCase()?.startsWith("think"));
}
async executeOllama(msg: Message, text: string, think: boolean = false): Promise<void> {
await runUnifiedAi({provider: AiProvider.OLLAMA, msg, text, stream: true, think: think});
await runUnifiedAi({
provider: AiProvider.OLLAMA,
msg: msg,
text: match?.[3] ?? "",
stream: true,
think: match?.[1]?.toLowerCase()?.startsWith("think")
});
}
}