jinzd-ai-cli 0.4.141 → 0.4.143
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/README.md +2 -2
- package/README.zh-CN.md +1 -1
- package/dist/{batch-MRHLSY5I.js → batch-FTCB7YHA.js} +2 -2
- package/dist/{chunk-4OKDU4U6.js → chunk-2JLVHUMU.js} +1 -1
- package/dist/{chunk-KQTMR64X.js → chunk-2YEBAHAB.js} +1 -1
- package/dist/{chunk-4EUYGWBJ.js → chunk-CSWA553M.js} +1 -1
- package/dist/{chunk-BJAT4GNC.js → chunk-DQ2OHJNF.js} +15 -0
- package/dist/{chunk-TQVNVZU6.js → chunk-DX5JYNVN.js} +1 -1
- package/dist/{chunk-QIWXLD4S.js → chunk-GDCLDXEC.js} +2 -2
- package/dist/{chunk-EMG2MOZU.js → chunk-IMYOBDJG.js} +1 -1
- package/dist/{chunk-MO7MWNWC.js → chunk-NKR53CPL.js} +1 -1
- package/dist/{chunk-6VRJGH25.js → chunk-OVWE4E46.js} +15 -0
- package/dist/{chunk-RFQVUMDB.js → chunk-SEFOKYYP.js} +276 -5
- package/dist/{chunk-3BICTI5M.js → chunk-UQQJWHRV.js} +1 -1
- package/dist/{chunk-NHNWUBXB.js → chunk-VNNYHW6N.js} +276 -5
- package/dist/{chunk-WLS4PIFK.js → chunk-VXFBUMWG.js} +1 -1
- package/dist/{chunk-QICXUOA4.js → chunk-YCIJZ2XS.js} +10 -8
- package/dist/{chunk-GJJFXCV2.js → chunk-YPFCJ5KC.js} +7 -7
- package/dist/{constants-E3TCQFXP.js → constants-YVTEGGKB.js} +1 -1
- package/dist/{doctor-cli-6EM7NIRC.js → doctor-cli-EGD6OLJO.js} +5 -5
- package/dist/electron-server.js +18 -16
- package/dist/{hub-3T6VKVP2.js → hub-YNT2PVCA.js} +1 -1
- package/dist/index.js +30 -28
- package/dist/{indexer-Z6AQTGBK.js → indexer-ISSNIFQY.js} +2 -2
- package/dist/{indexer-XGY7XGJM.js → indexer-S6UMGQKA.js} +2 -2
- package/dist/{run-tests-IU25LZDJ.js → run-tests-3KUDRXXZ.js} +2 -2
- package/dist/{run-tests-JIJQPL6S.js → run-tests-VK2S7V3X.js} +1 -1
- package/dist/{semantic-FR2ZSQLY.js → semantic-IJKF5ZZC.js} +2 -2
- package/dist/{semantic-UFKVYKFE.js → semantic-V37U4MCW.js} +2 -2
- package/dist/{server-V7RE3N57.js → server-7UH5SJSC.js} +7 -7
- package/dist/{server-CMNFI42C.js → server-KZOHU7OE.js} +14 -14
- package/dist/{store-Q7NMUCPP.js → store-A3TZM6PS.js} +1 -1
- package/dist/{store-JDEW743P.js → store-VMK543OQ.js} +1 -1
- package/dist/{task-orchestrator-Y3EKYGZF.js → task-orchestrator-E46H7NUK.js} +7 -7
- package/dist/wasm/tree-sitter-cpp.wasm +0 -0
- package/dist/wasm/tree-sitter-go.wasm +0 -0
- package/dist/wasm/tree-sitter-java.wasm +0 -0
- package/dist/wasm/tree-sitter-rust.wasm +0 -0
- package/package.json +6 -2
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
removeFile,
|
|
7
7
|
saveIndex,
|
|
8
8
|
upsertFileSymbols
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OVWE4E46.js";
|
|
10
10
|
|
|
11
11
|
// src/symbols/indexer.ts
|
|
12
12
|
import fs2 from "fs";
|
|
@@ -30,7 +30,11 @@ var GRAMMAR_FILE = {
|
|
|
30
30
|
typescript: "tree-sitter-typescript.wasm",
|
|
31
31
|
tsx: "tree-sitter-tsx.wasm",
|
|
32
32
|
javascript: "tree-sitter-javascript.wasm",
|
|
33
|
-
python: "tree-sitter-python.wasm"
|
|
33
|
+
python: "tree-sitter-python.wasm",
|
|
34
|
+
go: "tree-sitter-go.wasm",
|
|
35
|
+
rust: "tree-sitter-rust.wasm",
|
|
36
|
+
java: "tree-sitter-java.wasm",
|
|
37
|
+
cpp: "tree-sitter-cpp.wasm"
|
|
34
38
|
};
|
|
35
39
|
var RUNTIME_WASM = "web-tree-sitter.wasm";
|
|
36
40
|
var parserInitPromise = null;
|
|
@@ -271,6 +275,253 @@ function extractPython(root, file) {
|
|
|
271
275
|
visit(root, void 0, true);
|
|
272
276
|
return out;
|
|
273
277
|
}
|
|
278
|
+
function extractGo(root, file) {
|
|
279
|
+
const out = [];
|
|
280
|
+
const isExported = (name) => /^[A-Z]/.test(name);
|
|
281
|
+
const pushTypeSpec = (spec) => {
|
|
282
|
+
const name = nameOf(spec);
|
|
283
|
+
if (!name) return;
|
|
284
|
+
const typeNode = childByFieldName(spec, "type");
|
|
285
|
+
let kind = "type";
|
|
286
|
+
if (typeNode?.type === "struct_type") kind = "class";
|
|
287
|
+
else if (typeNode?.type === "interface_type") kind = "interface";
|
|
288
|
+
out.push({
|
|
289
|
+
name,
|
|
290
|
+
kind,
|
|
291
|
+
language: "go",
|
|
292
|
+
location: locationOf(file, spec),
|
|
293
|
+
signature: firstLine(spec.text),
|
|
294
|
+
exported: isExported(name)
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
for (const child of root.children) {
|
|
298
|
+
if (!child) continue;
|
|
299
|
+
if (child.type === "function_declaration") {
|
|
300
|
+
const name = nameOf(child);
|
|
301
|
+
if (name) out.push({ name, kind: "function", language: "go", location: locationOf(file, child), signature: firstLine(child.text), exported: isExported(name) });
|
|
302
|
+
} else if (child.type === "method_declaration") {
|
|
303
|
+
const name = nameOf(child);
|
|
304
|
+
if (!name) continue;
|
|
305
|
+
const receiver = childByFieldName(child, "receiver");
|
|
306
|
+
let container;
|
|
307
|
+
if (receiver) {
|
|
308
|
+
const paramDecl = receiver.children.find((c) => c?.type === "parameter_declaration");
|
|
309
|
+
const typeNode = paramDecl ? childByFieldName(paramDecl, "type") : null;
|
|
310
|
+
if (typeNode) {
|
|
311
|
+
container = typeNode.text.replace(/^\*/, "").trim();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
out.push({ name, kind: "method", language: "go", location: locationOf(file, child), signature: firstLine(child.text), container, exported: isExported(name) });
|
|
315
|
+
} else if (child.type === "type_declaration") {
|
|
316
|
+
for (const spec of child.children) {
|
|
317
|
+
if (spec?.type === "type_spec" || spec?.type === "type_alias") pushTypeSpec(spec);
|
|
318
|
+
}
|
|
319
|
+
} else if (child.type === "const_declaration" || child.type === "var_declaration") {
|
|
320
|
+
for (const spec of child.children) {
|
|
321
|
+
if (spec?.type !== "const_spec" && spec?.type !== "var_spec") continue;
|
|
322
|
+
for (const id of spec.children) {
|
|
323
|
+
if (id?.type !== "identifier") continue;
|
|
324
|
+
out.push({ name: id.text, kind: "variable", language: "go", location: locationOf(file, spec), signature: firstLine(spec.text), exported: isExported(id.text) });
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return out;
|
|
330
|
+
}
|
|
331
|
+
function extractRust(root, file) {
|
|
332
|
+
const out = [];
|
|
333
|
+
const isPub = (node) => node.children.some((c) => c?.type === "visibility_modifier" && c.text.startsWith("pub"));
|
|
334
|
+
const visit = (node, container) => {
|
|
335
|
+
const kindMap = {
|
|
336
|
+
function_item: container ? "method" : "function",
|
|
337
|
+
struct_item: "class",
|
|
338
|
+
union_item: "class",
|
|
339
|
+
enum_item: "enum",
|
|
340
|
+
trait_item: "interface",
|
|
341
|
+
type_item: "type",
|
|
342
|
+
const_item: "variable",
|
|
343
|
+
static_item: "variable",
|
|
344
|
+
macro_definition: "function",
|
|
345
|
+
mod_item: "module"
|
|
346
|
+
};
|
|
347
|
+
const kind = kindMap[node.type];
|
|
348
|
+
if (kind) {
|
|
349
|
+
const name = nameOf(node);
|
|
350
|
+
if (name) {
|
|
351
|
+
out.push({ name, kind, language: "rust", location: locationOf(file, node), signature: firstLine(node.text), container, exported: isPub(node) });
|
|
352
|
+
if (node.type === "mod_item") {
|
|
353
|
+
const body = childByFieldName(node, "body");
|
|
354
|
+
if (body) for (const c of body.children) {
|
|
355
|
+
if (c) visit(c, name);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
if (node.type === "impl_item") {
|
|
362
|
+
const typeNode = childByFieldName(node, "type");
|
|
363
|
+
const implContainer = typeNode?.text.trim();
|
|
364
|
+
const body = childByFieldName(node, "body");
|
|
365
|
+
if (body) for (const c of body.children) {
|
|
366
|
+
if (c) visit(c, implContainer);
|
|
367
|
+
}
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
if (node.type === "source_file" || node.type === "declaration_list") {
|
|
371
|
+
for (const c of node.children) {
|
|
372
|
+
if (c) visit(c, container);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
visit(root, void 0);
|
|
377
|
+
return out;
|
|
378
|
+
}
|
|
379
|
+
function extractJava(root, file) {
|
|
380
|
+
const out = [];
|
|
381
|
+
const isPublic = (node) => {
|
|
382
|
+
const mods = node.children.find((c) => c?.type === "modifiers");
|
|
383
|
+
return !!mods && mods.children.some((c) => c?.type === "public" || c?.text === "public");
|
|
384
|
+
};
|
|
385
|
+
const visit = (node, container) => {
|
|
386
|
+
const containerKindMap = {
|
|
387
|
+
class_declaration: "class",
|
|
388
|
+
interface_declaration: "interface",
|
|
389
|
+
enum_declaration: "enum",
|
|
390
|
+
record_declaration: "class",
|
|
391
|
+
annotation_type_declaration: "interface"
|
|
392
|
+
};
|
|
393
|
+
const containerKind = containerKindMap[node.type];
|
|
394
|
+
if (containerKind) {
|
|
395
|
+
const name = nameOf(node);
|
|
396
|
+
if (name) {
|
|
397
|
+
out.push({ name, kind: containerKind, language: "java", location: locationOf(file, node), signature: firstLine(node.text), container, exported: isPublic(node) });
|
|
398
|
+
const body = node.children.find((c) => c?.type === "class_body" || c?.type === "interface_body" || c?.type === "enum_body" || c?.type === "record_body" || c?.type === "annotation_type_body");
|
|
399
|
+
if (body) for (const c of body.children) {
|
|
400
|
+
if (c) visit(c, name);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
if (node.type === "method_declaration" || node.type === "constructor_declaration" || node.type === "compact_constructor_declaration") {
|
|
406
|
+
const name = nameOf(node);
|
|
407
|
+
if (name) out.push({ name, kind: "method", language: "java", location: locationOf(file, node), signature: firstLine(node.text), container, exported: isPublic(node) });
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
if (node.type === "field_declaration") {
|
|
411
|
+
const exported = isPublic(node);
|
|
412
|
+
for (const c of node.children) {
|
|
413
|
+
if (c?.type !== "variable_declarator") continue;
|
|
414
|
+
const id = childByFieldName(c, "name");
|
|
415
|
+
if (id?.type === "identifier") out.push({ name: id.text, kind: "property", language: "java", location: locationOf(file, c), signature: firstLine(node.text), container, exported });
|
|
416
|
+
}
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
if (node.type === "program") {
|
|
420
|
+
for (const c of node.children) {
|
|
421
|
+
if (c) visit(c, container);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
visit(root, void 0);
|
|
426
|
+
return out;
|
|
427
|
+
}
|
|
428
|
+
function extractCpp(root, file) {
|
|
429
|
+
const out = [];
|
|
430
|
+
const declaratorName = (decl) => {
|
|
431
|
+
if (!decl) return null;
|
|
432
|
+
if (decl.type === "identifier" || decl.type === "field_identifier" || decl.type === "type_identifier") {
|
|
433
|
+
return { name: decl.text };
|
|
434
|
+
}
|
|
435
|
+
if (decl.type === "qualified_identifier") {
|
|
436
|
+
const text = decl.text;
|
|
437
|
+
const idx = text.lastIndexOf("::");
|
|
438
|
+
if (idx >= 0) return { name: text.slice(idx + 2), container: text.slice(0, idx) };
|
|
439
|
+
return { name: text };
|
|
440
|
+
}
|
|
441
|
+
if (decl.type === "destructor_name" || decl.type === "operator_name") {
|
|
442
|
+
return { name: decl.text };
|
|
443
|
+
}
|
|
444
|
+
const inner = childByFieldName(decl, "declarator");
|
|
445
|
+
if (inner) return declaratorName(inner);
|
|
446
|
+
return null;
|
|
447
|
+
};
|
|
448
|
+
const visit = (node, container) => {
|
|
449
|
+
if (node.type === "template_declaration") {
|
|
450
|
+
for (const c of node.children) {
|
|
451
|
+
if (c && (c.type === "function_definition" || c.type === "class_specifier" || c.type === "struct_specifier" || c.type === "declaration")) {
|
|
452
|
+
visit(c, container);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
if (node.type === "function_definition") {
|
|
458
|
+
const decl = childByFieldName(node, "declarator");
|
|
459
|
+
const info = declaratorName(decl);
|
|
460
|
+
if (info) {
|
|
461
|
+
const finalContainer = info.container ?? container;
|
|
462
|
+
out.push({
|
|
463
|
+
name: info.name,
|
|
464
|
+
kind: finalContainer ? "method" : "function",
|
|
465
|
+
language: "cpp",
|
|
466
|
+
location: locationOf(file, node),
|
|
467
|
+
signature: firstLine(node.text),
|
|
468
|
+
container: finalContainer
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
const specMap = {
|
|
474
|
+
class_specifier: "class",
|
|
475
|
+
struct_specifier: "class",
|
|
476
|
+
union_specifier: "class",
|
|
477
|
+
enum_specifier: "enum"
|
|
478
|
+
};
|
|
479
|
+
const specKind = specMap[node.type];
|
|
480
|
+
if (specKind) {
|
|
481
|
+
const name = nameOf(node);
|
|
482
|
+
if (name) {
|
|
483
|
+
out.push({ name, kind: specKind, language: "cpp", location: locationOf(file, node), signature: firstLine(node.text), container });
|
|
484
|
+
const body = node.children.find((c) => c?.type === "field_declaration_list" || c?.type === "enumerator_list");
|
|
485
|
+
if (body) for (const c of body.children) {
|
|
486
|
+
if (c) visit(c, name);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
if (node.type === "namespace_definition") {
|
|
492
|
+
const name = nameOf(node) ?? "<anonymous>";
|
|
493
|
+
out.push({ name, kind: "module", language: "cpp", location: locationOf(file, node), signature: firstLine(node.text), container });
|
|
494
|
+
const body = childByFieldName(node, "body");
|
|
495
|
+
if (body) for (const c of body.children) {
|
|
496
|
+
if (c) visit(c, name);
|
|
497
|
+
}
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
if (node.type === "type_definition" || node.type === "alias_declaration") {
|
|
501
|
+
const decl = node.children[node.children.length - 1];
|
|
502
|
+
const info = decl ? declaratorName(decl) : null;
|
|
503
|
+
if (info) out.push({ name: info.name, kind: "type", language: "cpp", location: locationOf(file, node), signature: firstLine(node.text), container });
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
if (node.type === "field_declaration" && container) {
|
|
507
|
+
const hasFn = node.children.some((c) => c?.type === "function_declarator" || c?.type === "pointer_declarator" && c.children.some((x) => x?.type === "function_declarator"));
|
|
508
|
+
if (hasFn) return;
|
|
509
|
+
for (const c of node.children) {
|
|
510
|
+
if (c?.type === "field_identifier") {
|
|
511
|
+
out.push({ name: c.text, kind: "property", language: "cpp", location: locationOf(file, node), signature: firstLine(node.text), container });
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (node.type === "translation_unit" || node.type === "declaration_list" || node.type === "linkage_specification") {
|
|
517
|
+
for (const c of node.children) {
|
|
518
|
+
if (c) visit(c, container);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
visit(root, void 0);
|
|
523
|
+
return out;
|
|
524
|
+
}
|
|
274
525
|
async function parseSource(file, source, language) {
|
|
275
526
|
const lang = language ?? detectLanguage(path2.extname(file).slice(1));
|
|
276
527
|
if (!lang) return [];
|
|
@@ -279,8 +530,20 @@ async function parseSource(file, source, language) {
|
|
|
279
530
|
const tree = parser.parse(source);
|
|
280
531
|
if (!tree) return [];
|
|
281
532
|
const root = tree.rootNode;
|
|
282
|
-
|
|
283
|
-
|
|
533
|
+
switch (lang) {
|
|
534
|
+
case "python":
|
|
535
|
+
return extractPython(root, file);
|
|
536
|
+
case "go":
|
|
537
|
+
return extractGo(root, file);
|
|
538
|
+
case "rust":
|
|
539
|
+
return extractRust(root, file);
|
|
540
|
+
case "java":
|
|
541
|
+
return extractJava(root, file);
|
|
542
|
+
case "cpp":
|
|
543
|
+
return extractCpp(root, file);
|
|
544
|
+
default:
|
|
545
|
+
return extractTsJs(root, file, lang);
|
|
546
|
+
}
|
|
284
547
|
} catch (err) {
|
|
285
548
|
return [];
|
|
286
549
|
}
|
|
@@ -304,7 +567,15 @@ var SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
|
304
567
|
"venv",
|
|
305
568
|
".idea",
|
|
306
569
|
".vscode",
|
|
307
|
-
"release"
|
|
570
|
+
"release",
|
|
571
|
+
"target",
|
|
572
|
+
// Rust (cargo build) + Java (Maven)
|
|
573
|
+
"vendor",
|
|
574
|
+
// Go (vendored deps)
|
|
575
|
+
".gradle",
|
|
576
|
+
// Java (Gradle)
|
|
577
|
+
"cmake-build-debug",
|
|
578
|
+
"cmake-build-release"
|
|
308
579
|
]);
|
|
309
580
|
var MAX_FILE_BYTES = 2 * 1024 * 1024;
|
|
310
581
|
function collectFiles(root, maxFiles) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
schemaToJsonSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2JLVHUMU.js";
|
|
5
5
|
import {
|
|
6
6
|
AuthError,
|
|
7
7
|
ProviderError,
|
|
@@ -1275,19 +1275,21 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1275
1275
|
if (delta?.tool_calls) {
|
|
1276
1276
|
for (const tc of delta.tool_calls) {
|
|
1277
1277
|
const idx = tc.index;
|
|
1278
|
-
|
|
1278
|
+
const existing = toolCallAccumulators.get(idx);
|
|
1279
|
+
if (!existing && tc.id && tc.function?.name) {
|
|
1280
|
+
const initialArgs = tc.function.arguments ?? "";
|
|
1279
1281
|
toolCallAccumulators.set(idx, {
|
|
1280
1282
|
id: tc.id,
|
|
1281
1283
|
name: tc.function.name,
|
|
1282
|
-
arguments:
|
|
1284
|
+
arguments: initialArgs
|
|
1283
1285
|
});
|
|
1284
1286
|
yield { type: "tool_call_start", index: idx, id: tc.id, name: tc.function.name };
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
if (acc) {
|
|
1288
|
-
acc.arguments += tc.function.arguments;
|
|
1289
|
-
yield { type: "tool_call_delta", index: idx, argumentsDelta: tc.function.arguments };
|
|
1287
|
+
if (initialArgs) {
|
|
1288
|
+
yield { type: "tool_call_delta", index: idx, argumentsDelta: initialArgs };
|
|
1290
1289
|
}
|
|
1290
|
+
} else if (existing && tc.function?.arguments) {
|
|
1291
|
+
existing.arguments += tc.function.arguments;
|
|
1292
|
+
yield { type: "tool_call_delta", index: idx, argumentsDelta: tc.function.arguments };
|
|
1291
1293
|
}
|
|
1292
1294
|
}
|
|
1293
1295
|
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
hasSemanticIndex,
|
|
4
4
|
semanticSearch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UQQJWHRV.js";
|
|
6
6
|
import {
|
|
7
7
|
runTestsTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IMYOBDJG.js";
|
|
9
9
|
import {
|
|
10
10
|
getDangerLevel,
|
|
11
11
|
isFileWriteTool,
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2JLVHUMU.js";
|
|
14
14
|
import {
|
|
15
15
|
EnvLoader,
|
|
16
16
|
NetworkError,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
SUBAGENT_ALLOWED_TOOLS,
|
|
24
24
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
25
25
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VXFBUMWG.js";
|
|
27
27
|
import {
|
|
28
28
|
fileCheckpoints
|
|
29
29
|
} from "./chunk-4BKXL7SM.js";
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
} from "./chunk-7ZJN4KLV.js";
|
|
34
34
|
import {
|
|
35
35
|
indexProject
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-VNNYHW6N.js";
|
|
37
37
|
import {
|
|
38
38
|
loadIndex
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-OVWE4E46.js";
|
|
40
40
|
|
|
41
41
|
// src/tools/builtin/bash.ts
|
|
42
42
|
import { spawn } from "child_process";
|
|
@@ -2056,7 +2056,7 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
|
|
|
2056
2056
|
const mode = appendMode ? "appended" : "written";
|
|
2057
2057
|
void (async () => {
|
|
2058
2058
|
try {
|
|
2059
|
-
const { updateFile } = await import("./indexer-
|
|
2059
|
+
const { updateFile } = await import("./indexer-S6UMGQKA.js");
|
|
2060
2060
|
await updateFile(process.cwd(), filePath);
|
|
2061
2061
|
} catch {
|
|
2062
2062
|
}
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getConfigDirUsage,
|
|
4
4
|
listRecentCrashes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CSWA553M.js";
|
|
6
6
|
import {
|
|
7
7
|
ProviderRegistry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YCIJZ2XS.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DX5JYNVN.js";
|
|
12
12
|
import {
|
|
13
13
|
getStatsSnapshot,
|
|
14
14
|
getTopFailingTools,
|
|
15
15
|
getTopUsedTools,
|
|
16
16
|
resetStats
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2JLVHUMU.js";
|
|
18
18
|
import "./chunk-2ZD3YTVM.js";
|
|
19
19
|
import {
|
|
20
20
|
DEV_STATE_FILE_NAME,
|
|
21
21
|
MEMORY_FILE_NAME,
|
|
22
22
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VXFBUMWG.js";
|
|
24
24
|
import "./chunk-PDX44BCA.js";
|
|
25
25
|
|
|
26
26
|
// src/diagnostics/doctor-cli.ts
|
package/dist/electron-server.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-SKET65WZ.js";
|
|
4
4
|
import {
|
|
5
5
|
indexProject
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SEFOKYYP.js";
|
|
7
7
|
import {
|
|
8
8
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
9
9
|
APP_NAME,
|
|
@@ -36,14 +36,14 @@ import {
|
|
|
36
36
|
VERSION,
|
|
37
37
|
buildUserIdentityPrompt,
|
|
38
38
|
runTestsTool
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-2YEBAHAB.js";
|
|
40
40
|
import {
|
|
41
41
|
hasSemanticIndex,
|
|
42
42
|
semanticSearch
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-NKR53CPL.js";
|
|
44
44
|
import {
|
|
45
45
|
loadIndex
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-DQ2OHJNF.js";
|
|
47
47
|
import "./chunk-PASCDYMH.js";
|
|
48
48
|
import {
|
|
49
49
|
loadChatIndex,
|
|
@@ -1884,19 +1884,21 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1884
1884
|
if (delta?.tool_calls) {
|
|
1885
1885
|
for (const tc of delta.tool_calls) {
|
|
1886
1886
|
const idx = tc.index;
|
|
1887
|
-
|
|
1887
|
+
const existing = toolCallAccumulators.get(idx);
|
|
1888
|
+
if (!existing && tc.id && tc.function?.name) {
|
|
1889
|
+
const initialArgs = tc.function.arguments ?? "";
|
|
1888
1890
|
toolCallAccumulators.set(idx, {
|
|
1889
1891
|
id: tc.id,
|
|
1890
1892
|
name: tc.function.name,
|
|
1891
|
-
arguments:
|
|
1893
|
+
arguments: initialArgs
|
|
1892
1894
|
});
|
|
1893
1895
|
yield { type: "tool_call_start", index: idx, id: tc.id, name: tc.function.name };
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
if (acc) {
|
|
1897
|
-
acc.arguments += tc.function.arguments;
|
|
1898
|
-
yield { type: "tool_call_delta", index: idx, argumentsDelta: tc.function.arguments };
|
|
1896
|
+
if (initialArgs) {
|
|
1897
|
+
yield { type: "tool_call_delta", index: idx, argumentsDelta: initialArgs };
|
|
1899
1898
|
}
|
|
1899
|
+
} else if (existing && tc.function?.arguments) {
|
|
1900
|
+
existing.arguments += tc.function.arguments;
|
|
1901
|
+
yield { type: "tool_call_delta", index: idx, argumentsDelta: tc.function.arguments };
|
|
1900
1902
|
}
|
|
1901
1903
|
}
|
|
1902
1904
|
}
|
|
@@ -5787,7 +5789,7 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
|
|
|
5787
5789
|
const mode = appendMode ? "appended" : "written";
|
|
5788
5790
|
void (async () => {
|
|
5789
5791
|
try {
|
|
5790
|
-
const { updateFile } = await import("./indexer-
|
|
5792
|
+
const { updateFile } = await import("./indexer-ISSNIFQY.js");
|
|
5791
5793
|
await updateFile(process.cwd(), filePath);
|
|
5792
5794
|
} catch {
|
|
5793
5795
|
}
|
|
@@ -12308,8 +12310,8 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
12308
12310
|
case "index": {
|
|
12309
12311
|
const sub = (args[0] ?? "status").toLowerCase();
|
|
12310
12312
|
const root = process.cwd();
|
|
12311
|
-
const { loadIndex: loadIndex2, clearIndex } = await import("./store-
|
|
12312
|
-
const { indexProject: indexProject2 } = await import("./indexer-
|
|
12313
|
+
const { loadIndex: loadIndex2, clearIndex } = await import("./store-A3TZM6PS.js");
|
|
12314
|
+
const { indexProject: indexProject2 } = await import("./indexer-ISSNIFQY.js");
|
|
12313
12315
|
const { loadVectorStore, clearVectorStore } = await import("./vector-store-AK6J3RIA.js");
|
|
12314
12316
|
if (sub === "status") {
|
|
12315
12317
|
const idx = loadIndex2(root);
|
|
@@ -12359,7 +12361,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
12359
12361
|
message: `Building semantic index for ${idx.symbolCount} symbols\u2026 (first run downloads ~117 MB model)`
|
|
12360
12362
|
});
|
|
12361
12363
|
try {
|
|
12362
|
-
const { rebuildSemanticIndex } = await import("./semantic-
|
|
12364
|
+
const { rebuildSemanticIndex } = await import("./semantic-IJKF5ZZC.js");
|
|
12363
12365
|
const stats = await rebuildSemanticIndex(root);
|
|
12364
12366
|
const first = stats.modelFirstLoadMs ? ` (model load+first batch ${stats.modelFirstLoadMs}ms)` : "";
|
|
12365
12367
|
this.send({
|
|
@@ -12546,7 +12548,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
12546
12548
|
case "test": {
|
|
12547
12549
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
12548
12550
|
try {
|
|
12549
|
-
const { executeTests } = await import("./run-tests-
|
|
12551
|
+
const { executeTests } = await import("./run-tests-VK2S7V3X.js");
|
|
12550
12552
|
const argStr = args.join(" ").trim();
|
|
12551
12553
|
let testArgs = {};
|
|
12552
12554
|
if (argStr) {
|
|
@@ -386,7 +386,7 @@ ${content}`);
|
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
389
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
389
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-E46H7NUK.js");
|
|
390
390
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
391
391
|
let interrupted = false;
|
|
392
392
|
const onSigint = () => {
|