Skip to content

Commit 1982fa1

Browse files
committed
Update CST CLI version, clean old versions, and remove deprecated model
1 parent 74ec264 commit 1982fa1

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

src/cst-manager.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import AdmZip from "adm-zip";
66
import * as tar from "tar";
77
import { pipeline } from "stream/promises";
88

9-
const MINIMUM_CST_VERSION = "0.1.3";
9+
const MINIMUM_CST_VERSION = "0.1.6";
1010

1111
interface Asset {
1212
name: string;
@@ -190,6 +190,25 @@ export class CstManager {
190190
// Cleanup download
191191
fs.unlinkSync(downloadPath);
192192

193+
// Cleanup old versions
194+
try {
195+
const dirs = fs.readdirSync(this.storageUri.fsPath);
196+
for (const d of dirs) {
197+
const dirPath = path.join(this.storageUri.fsPath, d);
198+
if (
199+
fs.statSync(dirPath).isDirectory() &&
200+
d.startsWith("v") &&
201+
semver.valid(d.substring(1)) &&
202+
d !== latestRelease.tag_name &&
203+
d !== `v${latestRelease.tag_name}`
204+
) {
205+
fs.rmSync(dirPath, { recursive: true, force: true });
206+
}
207+
}
208+
} catch (err) {
209+
console.error("Failed to cleanup old versions:", err);
210+
}
211+
193212
return this.getLocalExePath();
194213
}
195214

webview-ui/src/lib/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export const PROVIDER_MODELS: Record<string, string[]> = {
9090
],
9191
lmstudio: [],
9292
cerebras: [
93-
"llama-3.3-70b",
9493
"llama3.1-8b",
9594
"zai-glm-4.6",
9695
"qwen3-32b",

0 commit comments

Comments
 (0)