Bump version to v1.0.5 with Ollama models fetch fix
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "connect-ai-lab",
|
||||
"displayName": "Connect AI LAB",
|
||||
"description": "100% 로컬 AI 코딩 에이전트 — 파일 생성, 코드 편집, 터미널 실행을 오프라인으로. Ollama + Gemma/Llama/DeepSeek 지원.",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"publisher": "connectailab",
|
||||
"license": "MIT",
|
||||
"icon": "assets/icon.png",
|
||||
|
||||
+7
-2
@@ -236,8 +236,13 @@ class SidebarChatProvider implements vscode.WebviewViewProvider {
|
||||
if (!this._view) { return; }
|
||||
const { ollamaBase, defaultModel } = getConfig();
|
||||
try {
|
||||
const res = await axios.get(`${ollamaBase}/api/tags`);
|
||||
const models: string[] = res.data.models.map((m: any) => m.name);
|
||||
const res = await axios.get(`${ollamaBase}/api/tags`, { timeout: 3000 });
|
||||
let models: string[] = res.data.models.map((m: any) => m.name);
|
||||
if (models.length === 0) {
|
||||
models = [defaultModel];
|
||||
} else if (!models.includes(defaultModel)) {
|
||||
models.unshift(defaultModel);
|
||||
}
|
||||
this._view.webview.postMessage({ type: 'modelsList', value: models });
|
||||
} catch {
|
||||
this._view.webview.postMessage({ type: 'modelsList', value: [defaultModel] });
|
||||
|
||||
Reference in New Issue
Block a user