feat: fetch ollama models to display in the model selector (#2287)

This commit is contained in:
Karl Bowden
2025-06-22 18:36:28 +10:00
committed by GitHub
parent 7b36aa828b
commit ce9f6a8ec1
3 changed files with 72 additions and 0 deletions

View File

@@ -75,6 +75,9 @@ function M.open()
::continue::
end
-- Sort models by name for stable display
table.sort(models, function(a, b) return (a.name or "") < (b.name or "") end)
if #models == 0 then
Utils.warn("No models available in config")
return