tensor-cli 0.3.7 → 0.3.8
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/cli.js +34 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -291942,8 +291942,14 @@ async function copyText(text2, options2 = {}) {
|
|
|
291942
291942
|
return false;
|
|
291943
291943
|
}
|
|
291944
291944
|
};
|
|
291945
|
-
if (tryOsc52(true))
|
|
291945
|
+
if (tryOsc52(true)) {
|
|
291946
|
+
if (fallback) {
|
|
291947
|
+
try {
|
|
291948
|
+
await fallback(text2);
|
|
291949
|
+
} catch {}
|
|
291950
|
+
}
|
|
291946
291951
|
return "osc52";
|
|
291952
|
+
}
|
|
291947
291953
|
if (fallback) {
|
|
291948
291954
|
try {
|
|
291949
291955
|
await fallback(text2);
|
|
@@ -313590,9 +313596,9 @@ var init_harness_core = __esm(() => {
|
|
|
313590
313596
|
DECISION_JSON_PREFIX_RE = /^\{\s*(?:"[a-z_]{0,24}"?\s*:?)?$/;
|
|
313591
313597
|
DECISION_JSON_FENCE_TAIL_RE = /```(?:json)?\s*$/i;
|
|
313592
313598
|
DECISION_JSON_PARTIAL_FENCE_RE = /(?:`{1,2}|```(?:j(?:s(?:o(?:n)?)?)?)?\s*)$/i;
|
|
313593
|
-
DECISION_XML_START_RE = /<\s
|
|
313594
|
-
DECISION_XML_END_RE = /<\s*\/\s
|
|
313595
|
-
DECISION_XML_PARTIAL_RE = /<\s*(
|
|
313599
|
+
DECISION_XML_START_RE = /<\s*[|\uFF5C][ \t|\uFF5C]*DSM?L[ \t|\uFF5C]*calls\b[^>]*>|<\s*function_calls\b[^>]*>|<\s*tool_call\b[^>]*>/i;
|
|
313600
|
+
DECISION_XML_END_RE = /<\s*\/\s*[|\uFF5C][ \t|\uFF5C]*DSM?L[ \t|\uFF5C]*calls\b[^>]*>|<\s*\/\s*function_calls\b[^>]*>|<\s*\/\s*tool_call\b[^>]*>/i;
|
|
313601
|
+
DECISION_XML_PARTIAL_RE = /<\s*(?:[|\uFF5C][ \t|\uFF5C]*[A-Za-z]{0,8}(?:[ \t|\uFF5C]+[A-Za-z]{0,8})?[ \t|\uFF5C]*)?$/i;
|
|
313596
313602
|
GIT_INTENT = /\b(git|commit|committed|merge|push|pull|rebase|branch|branches|checkout|stash|tag|cherry-?pick|reset|revert|amend)\b/i;
|
|
313597
313603
|
NO_INLINE_CONTENT_RULE = {
|
|
313598
313604
|
role: "system",
|
|
@@ -513227,7 +513233,7 @@ var BATCHABLE_CALL_TOOLS, READ_ONLY_MCP_CALL_OPS, pseudoName = (name) => name.re
|
|
|
513227
513233
|
if (!match)
|
|
513228
513234
|
return null;
|
|
513229
513235
|
return decodeXmlEntities(match[1] ?? match[2] ?? match[3] ?? "").trim();
|
|
513230
|
-
}, normalizeXmlToolTags = (raw) => raw.replace(/<\s*(\/?)\s
|
|
513236
|
+
}, normalizeXmlToolTags = (raw) => raw.replace(/<\s*(\/?)\s*[|\uFF5C][ \t|\uFF5C]*DSM?L[ \t|\uFF5C]*[|\uFF5C][ \t|\uFF5C]*(calls|invoke|parameter)\b/gi, "<$1$2"), resolveXmlToolName = (name) => {
|
|
513231
513237
|
const cleaned = name.trim().replace(/^(?:functions?|tools?)\./i, "");
|
|
513232
513238
|
if (!cleaned)
|
|
513233
513239
|
return null;
|
|
@@ -523651,7 +523657,7 @@ function parseTextToolCall(text2) {
|
|
|
523651
523657
|
}
|
|
523652
523658
|
function proseBeforeToolCall(text2) {
|
|
523653
523659
|
const json2 = text2.indexOf("{");
|
|
523654
|
-
const xml = text2.search(/<\s
|
|
523660
|
+
const xml = text2.search(/<\s*[|\uFF5C][ \t|\uFF5C]*DSM?L\b|<\s*function_calls\b|<\s*tool_call\b/i);
|
|
523655
523661
|
const cuts = [json2, xml].filter((index2) => index2 >= 0);
|
|
523656
523662
|
if (cuts.length === 0)
|
|
523657
523663
|
return text2.trim();
|
|
@@ -565349,7 +565355,7 @@ ${ctx2.dump.trim().replace(/^```(?:json)?\s*/i, "").replace(/```\s*$/, "").trim(
|
|
|
565349
565355
|
parentPlan: inv.plan && inv.plan.length > 0 ? inv.plan : ctx.plan,
|
|
565350
565356
|
modelId: ctx.modelId,
|
|
565351
565357
|
decisionModelId,
|
|
565352
|
-
plan:
|
|
565358
|
+
plan: this.isPlanMode(),
|
|
565353
565359
|
yes: this.autoApprove,
|
|
565354
565360
|
noWeb: this.noWeb,
|
|
565355
565361
|
background: true
|
|
@@ -568519,7 +568525,7 @@ var import_react45, openProject = (dir) => {
|
|
|
568519
568525
|
}, undefined, false, undefined, this),
|
|
568520
568526
|
/* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
|
|
568521
568527
|
fg: t2.inkFaint,
|
|
568522
|
-
children: "v0.3.
|
|
568528
|
+
children: "v0.3.8"
|
|
568523
568529
|
}, undefined, false, undefined, this)
|
|
568524
568530
|
]
|
|
568525
568531
|
}, undefined, true, undefined, this),
|
|
@@ -571087,7 +571093,24 @@ var import_react61, compact2, parseDroppedPath = (raw2) => {
|
|
|
571087
571093
|
}
|
|
571088
571094
|
},
|
|
571089
571095
|
{ name: "undo", run: () => textareaInputRef.current?.undo() },
|
|
571090
|
-
{ name: "redo", run: () => textareaInputRef.current?.redo() }
|
|
571096
|
+
{ name: "redo", run: () => textareaInputRef.current?.redo() },
|
|
571097
|
+
{
|
|
571098
|
+
name: "paste_clipboard",
|
|
571099
|
+
async run() {
|
|
571100
|
+
try {
|
|
571101
|
+
const text2 = await clipboardy_default.read();
|
|
571102
|
+
const ta = textareaInputRef.current;
|
|
571103
|
+
if (!text2 || !ta)
|
|
571104
|
+
return;
|
|
571105
|
+
if (!ta.focused)
|
|
571106
|
+
ta.focus();
|
|
571107
|
+
ta.insertText(text2);
|
|
571108
|
+
orchestrator.addPastedContent(text2);
|
|
571109
|
+
} catch {
|
|
571110
|
+
toast?.show("Could not read the clipboard", "error");
|
|
571111
|
+
}
|
|
571112
|
+
}
|
|
571113
|
+
}
|
|
571091
571114
|
],
|
|
571092
571115
|
bindings: [
|
|
571093
571116
|
{ key: "ctrl+q", cmd: "quit" },
|
|
@@ -571096,7 +571119,7 @@ var import_react61, compact2, parseDroppedPath = (raw2) => {
|
|
|
571096
571119
|
{ key: "ctrl+x", cmd: "interrupt_or_remove_attachment" },
|
|
571097
571120
|
{ key: "ctrl+z", cmd: "undo" },
|
|
571098
571121
|
{ key: "ctrl+y", cmd: "redo" },
|
|
571099
|
-
{ key: "ctrl+v", cmd: "
|
|
571122
|
+
{ key: "ctrl+v", cmd: "paste_clipboard" }
|
|
571100
571123
|
]
|
|
571101
571124
|
}), [currentDialog, isPlanMode, attachments, respLoading, cancelTurn]);
|
|
571102
571125
|
const handleSubmit = async () => {
|
|
@@ -571319,6 +571342,7 @@ var import_react61, compact2, parseDroppedPath = (raw2) => {
|
|
|
571319
571342
|
}, InputBar_default;
|
|
571320
571343
|
var init_InputBar = __esm(async () => {
|
|
571321
571344
|
init_react3();
|
|
571345
|
+
init_clipboardy();
|
|
571322
571346
|
init_useAuthStatus();
|
|
571323
571347
|
init_LspProvider();
|
|
571324
571348
|
init_MinimalistProvider();
|
|
@@ -572035,7 +572059,6 @@ var init_src2 = __esm(async () => {
|
|
|
572035
572059
|
return;
|
|
572036
572060
|
if (ta.focused)
|
|
572037
572061
|
return;
|
|
572038
|
-
event.preventDefault();
|
|
572039
572062
|
ta.focus();
|
|
572040
572063
|
});
|
|
572041
572064
|
createRoot(renderer).render(/* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(RouterProvider, {
|