@co0ontty/wand 4.19.0 → 4.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +3 -3
- package/dist/models.d.ts +8 -1
- package/dist/models.js +31 -7
- package/dist/web-ui/content/scripts.js +47 -47
- package/dist/web-ui/content/styles.css +1 -1
- package/dist/web-ui/embedded-assets.d.ts +1 -1
- package/dist/web-ui/embedded-assets.js +3 -3
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
3
|
-
"builtAt": "2026-07-
|
|
4
|
-
"version": "4.
|
|
2
|
+
"commit": "21ce9fc5eba74a26ce11a25d5542fb0339957cf7",
|
|
3
|
+
"builtAt": "2026-07-21T00:47:10.060Z",
|
|
4
|
+
"version": "4.20.0",
|
|
5
5
|
"channel": "stable"
|
|
6
6
|
}
|
package/dist/models.d.ts
CHANGED
|
@@ -48,7 +48,14 @@ export interface ModelCache {
|
|
|
48
48
|
* * grok-4.5 (default)
|
|
49
49
|
*/
|
|
50
50
|
export declare function parseGrokModels(stdout: string): ClaudeModelInfo[];
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Parse `qodercli --list-models`.
|
|
53
|
+
*
|
|
54
|
+
* Qoder has used both provider-qualified custom IDs (`zhipu/glm5.2-cp`) and
|
|
55
|
+
* plain tier/frontier IDs (`glm51`). The CLI's human-readable rows put the
|
|
56
|
+
* selectable value in the final parentheses; some versions also emit a bare
|
|
57
|
+
* safe ID below the `MODEL` header.
|
|
58
|
+
*/
|
|
52
59
|
export declare function parseQoderModels(stdout: string): ClaudeModelInfo[];
|
|
53
60
|
/** Parse `opencode models`, whose stable machine-friendly output is one provider/model id per line. */
|
|
54
61
|
export declare function parseOpenCodeModels(stdout: string): ClaudeModelInfo[];
|
package/dist/models.js
CHANGED
|
@@ -10,6 +10,10 @@ const CLAUDE_PROBE_TIMEOUT_MS = 15_000;
|
|
|
10
10
|
const MAX_CLAUDE_MODEL_PROBES = 12;
|
|
11
11
|
const CLAUDE_PROBE_CONCURRENCY = 3;
|
|
12
12
|
const MODEL_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
|
|
13
|
+
// Qoder returns both tier/frontier IDs (for example `glm51`) and custom
|
|
14
|
+
// provider IDs (for example `zhipu/glm5.2-cp`). Keep this intentionally
|
|
15
|
+
// conservative because these values are later forwarded to `--model`.
|
|
16
|
+
const QODER_MODEL_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/;
|
|
13
17
|
const CLAUDE_BUILTIN_MODELS = [
|
|
14
18
|
{
|
|
15
19
|
id: "default",
|
|
@@ -392,20 +396,40 @@ export function parseGrokModels(stdout) {
|
|
|
392
396
|
...unique.map((id) => ({ id, label: id })),
|
|
393
397
|
];
|
|
394
398
|
}
|
|
395
|
-
/**
|
|
399
|
+
/**
|
|
400
|
+
* Parse `qodercli --list-models`.
|
|
401
|
+
*
|
|
402
|
+
* Qoder has used both provider-qualified custom IDs (`zhipu/glm5.2-cp`) and
|
|
403
|
+
* plain tier/frontier IDs (`glm51`). The CLI's human-readable rows put the
|
|
404
|
+
* selectable value in the final parentheses; some versions also emit a bare
|
|
405
|
+
* safe ID below the `MODEL` header.
|
|
406
|
+
*/
|
|
396
407
|
export function parseQoderModels(stdout) {
|
|
397
408
|
const discovered = [];
|
|
398
409
|
const seen = new Set(QODER_FALLBACK_MODELS.map((model) => model.id));
|
|
410
|
+
let inModelList = false;
|
|
411
|
+
const add = (id, label) => {
|
|
412
|
+
if (!QODER_MODEL_ID_PATTERN.test(id) || seen.has(id))
|
|
413
|
+
return;
|
|
414
|
+
seen.add(id);
|
|
415
|
+
discovered.push({ id, label: label || id });
|
|
416
|
+
};
|
|
399
417
|
for (const rawLine of stdout.split(/\r?\n/)) {
|
|
400
418
|
const line = rawLine.replace(/\x1b\[[0-?]*[ -\/]*[@-~]/g, "").trim();
|
|
401
|
-
|
|
402
|
-
|
|
419
|
+
if (/^models?\s*:?$/i.test(line)) {
|
|
420
|
+
inModelList = true;
|
|
403
421
|
continue;
|
|
404
|
-
|
|
405
|
-
|
|
422
|
+
}
|
|
423
|
+
const match = line.match(/^(.+?)\s+\(([^()]+)\)\s*$/);
|
|
424
|
+
if (match) {
|
|
425
|
+
const displayName = match[1].trim();
|
|
426
|
+
const id = match[2].trim();
|
|
427
|
+
if (displayName)
|
|
428
|
+
add(id, displayName);
|
|
406
429
|
continue;
|
|
407
|
-
|
|
408
|
-
|
|
430
|
+
}
|
|
431
|
+
if (inModelList && QODER_MODEL_ID_PATTERN.test(line))
|
|
432
|
+
add(line, line);
|
|
409
433
|
}
|
|
410
434
|
return [...cloneModels(QODER_FALLBACK_MODELS), ...discovered];
|
|
411
435
|
}
|