From ee11fd0709b685d1d7f59c4db0f3d5c4dc32c9db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Jun 2025 22:44:32 +0000 Subject: [PATCH 1/3] Initial plan for issue From 9cc3833e89a8a798409fe8c2faa76df206363f3e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Jun 2025 22:48:09 +0000 Subject: [PATCH 2/3] Initial analysis and SDK version fix Co-authored-by: StevenBucher98 <20605456+StevenBucher98@users.noreply.github.com> --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 67c8b3bd..f61fa353 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.409" + "version": "8.0.116" } } From 8d3d064cc025314e2112e1bbf586580a04af8a2c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Jun 2025 22:50:18 +0000 Subject: [PATCH 3/3] Remove AddCompletions calls to clean up help text for model and preset commands Co-authored-by: StevenBucher98 <20605456+StevenBucher98@users.noreply.github.com> --- shell/agents/AIShell.Ollama.Agent/Command.cs | 23 ++++---------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/shell/agents/AIShell.Ollama.Agent/Command.cs b/shell/agents/AIShell.Ollama.Agent/Command.cs index dbc66422..d0b00a66 100644 --- a/shell/agents/AIShell.Ollama.Agent/Command.cs +++ b/shell/agents/AIShell.Ollama.Agent/Command.cs @@ -18,7 +18,7 @@ public PresetCommand(OllamaAgent agent) var usePreset = new Argument( name: "Preset", getDefaultValue: () => null, - description: "Name of a preset.").AddCompletions(PresetNameCompleter); + description: "Name of a preset."); use.AddArgument(usePreset); use.SetHandler(UsePresetAction, usePreset); @@ -26,7 +26,7 @@ public PresetCommand(OllamaAgent agent) var listPreset = new Argument( name: "Preset", getDefaultValue: () => null, - description: "Name of a preset.").AddCompletions(PresetNameCompleter); + description: "Name of a preset."); list.AddArgument(listPreset); list.SetHandler(ListPresetAction, listPreset); @@ -199,7 +199,7 @@ public ModelCommand(OllamaAgent agent) var useModel = new Argument( name: "Model", getDefaultValue: () => null, - description: "Name of a model.").AddCompletions(ModelNameCompleter); + description: "Name of a model."); use.AddArgument(useModel); use.SetHandler(UseModelAction, useModel); @@ -207,7 +207,7 @@ public ModelCommand(OllamaAgent agent) var listModel = new Argument( name: "Model", getDefaultValue: () => null, - description: "Name of a model.").AddCompletions(ModelNameCompleter); + description: "Name of a model."); list.AddArgument(listModel); list.SetHandler(ListModelAction, listModel); @@ -291,19 +291,4 @@ private async Task UseModelAction(string name) } } - private IEnumerable ModelNameCompleter(CompletionContext context) - { - try - { - // Model retrieval may throw. - var results = _agnet.Settings?.GetAllModels().Result; - if (results is not null) - { - return results; - } - } - catch (Exception) { } - - return []; - } }