fix(coding-agent): discovered ollama models at runtime

This commit is contained in:
can1357
2026-02-13 12:56:22 +01:00
parent ae90d80cfe
commit 733a46c226
11 changed files with 283 additions and 27 deletions
@@ -32,6 +32,7 @@ export async function runAgenticCommit(args: CommitCommandArgs): Promise<void> {
writeStdout("● Resolving model...");
const modelRegistry = new ModelRegistry(authStorage);
await modelRegistry.refresh();
const stagedFilesPromise = (async () => {
let stagedFiles = await git.getStagedFiles();
if (stagedFiles.length === 0) {
@@ -43,6 +43,7 @@ async function runLegacyCommitCommand(args: CommitCommandArgs): Promise<void> {
const commitSettings = settings.getGroup("commit");
const authStorage = await discoverAuthStorage();
const modelRegistry = new ModelRegistry(authStorage);
await modelRegistry.refresh();
const { model: primaryModel, apiKey: primaryApiKey } = await resolvePrimaryModel(
args.model,