@brainervirus/opencode-commandcode 0.7.4 → 0.7.5
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/CHANGELOG.md +2 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/src/catalog-break.ts +2 -1
- package/src/catalog.ts +4 -2
package/CHANGELOG.md
CHANGED
package/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"generatedAt": "2026-09-01T18:01:30.152Z",
|
|
4
|
-
"pluginVersion": "0.7.
|
|
4
|
+
"pluginVersion": "0.7.4",
|
|
5
5
|
"commandCodeVersion": "1.39.3",
|
|
6
6
|
"commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.39.3.tgz",
|
|
7
7
|
"modelCount": 66,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/opencode-commandcode",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "Command Code API provider for opencode — use Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, and Step models via Command Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
package/src/catalog-break.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export function catalogBreakTitle(commandCodeVersion: string): string {
|
|
2
|
-
|
|
2
|
+
const version = commandCodeVersion.trim().replace(/^v/, "");
|
|
3
|
+
return `[catalog-break] command-code@${version} — model extraction failed`;
|
|
3
4
|
}
|
|
4
5
|
|
|
5
6
|
export function renderCatalogBreakBody(input: {
|
package/src/catalog.ts
CHANGED
|
@@ -279,7 +279,9 @@ export function extractStringBindings(
|
|
|
279
279
|
): Record<string, string> {
|
|
280
280
|
const before = source.slice(Math.max(0, endIdx - window), endIdx);
|
|
281
281
|
const bindings: Record<string, string> = {};
|
|
282
|
-
|
|
282
|
+
// \b does not fire before "$" (not a word char); minified bundles use names like
|
|
283
|
+
// $R="vercel-ai-gateway". A lookbehind boundary handles both $ and letter names.
|
|
284
|
+
const strRe = /(?<![A-Za-z0-9_$])([A-Za-z_$][\w$]*)="([^"]*)"/g;
|
|
283
285
|
let m: RegExpExecArray | null;
|
|
284
286
|
while ((m = strRe.exec(before))) {
|
|
285
287
|
const name = m[1];
|
|
@@ -287,7 +289,7 @@ export function extractStringBindings(
|
|
|
287
289
|
if (name !== undefined && value !== undefined) bindings[name] = value;
|
|
288
290
|
}
|
|
289
291
|
for (let pass = 0; pass < 4; pass++) {
|
|
290
|
-
const aliasRe =
|
|
292
|
+
const aliasRe = /(?<![A-Za-z0-9_$])([A-Za-z_$][\w$]*)=([A-Za-z_$][\w$]*)(?![A-Za-z0-9_$])/g;
|
|
291
293
|
while ((m = aliasRe.exec(before))) {
|
|
292
294
|
const alias = m[1];
|
|
293
295
|
const target = m[2];
|