devez-vibe 1.2.32 → 1.2.34
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/bin/dvz.exe +0 -0
- package/bridge/claude-agent-sdk-bridge.mjs +33 -14
- package/package.json +1 -1
package/bin/dvz.exe
CHANGED
|
Binary file
|
|
@@ -1541,24 +1541,43 @@ function isCompactSummary(message, text) {
|
|
|
1541
1541
|
|| /^(this session is being continued from|caveat: the messages below were generated)/i.test(text.trim());
|
|
1542
1542
|
}
|
|
1543
1543
|
|
|
1544
|
+
// Tags the runtime wraps around text it feeds itself. They ride along inside
|
|
1545
|
+
// ordinary user messages, so matching only the leading tag let the rest through.
|
|
1546
|
+
const INTERNAL_TAGS = [
|
|
1547
|
+
"bash-input",
|
|
1548
|
+
"bash-stdout",
|
|
1549
|
+
"bash-stderr",
|
|
1550
|
+
"command-message",
|
|
1551
|
+
"command-name",
|
|
1552
|
+
"command-args",
|
|
1553
|
+
"local-command-caveat",
|
|
1554
|
+
"local-command-stdout",
|
|
1555
|
+
"local-command-stderr",
|
|
1556
|
+
"task-notification",
|
|
1557
|
+
"system-reminder",
|
|
1558
|
+
"user-prompt-submit-hook",
|
|
1559
|
+
"session-start-hook",
|
|
1560
|
+
"ide_selection",
|
|
1561
|
+
"ide_opened_file",
|
|
1562
|
+
];
|
|
1563
|
+
|
|
1564
|
+
/** Drops every internal block, leaving only what the user actually typed. */
|
|
1565
|
+
function stripInternalTags(text) {
|
|
1566
|
+
let rest = text;
|
|
1567
|
+
for (const tag of INTERNAL_TAGS) {
|
|
1568
|
+
rest = rest.replace(new RegExp(`<${tag}>[\\s\\S]*?</${tag}>`, "gi"), "");
|
|
1569
|
+
// An unterminated opener means the rest of the message is internal too.
|
|
1570
|
+
rest = rest.replace(new RegExp(`<${tag}>[\\s\\S]*$`, "i"), "");
|
|
1571
|
+
}
|
|
1572
|
+
return rest.trim();
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1544
1575
|
function isInternalHistoryText(message, text) {
|
|
1545
1576
|
if (message.isMeta || message.subtype === "local_command") return true;
|
|
1546
1577
|
if (isCompactSummary(message, text)) return true;
|
|
1547
|
-
const trimmed = text.trim();
|
|
1548
|
-
const tag = trimmed.match(/^<([a-z0-9-]+)>/i)?.[1]?.toLowerCase();
|
|
1549
1578
|
// The interruption marker carries a reason ("… for tool use"), so it has to be
|
|
1550
1579
|
// matched by prefix rather than by the bare sentence.
|
|
1551
|
-
return
|
|
1552
|
-
|| [
|
|
1553
|
-
"bash-input",
|
|
1554
|
-
"bash-stdout",
|
|
1555
|
-
"bash-stderr",
|
|
1556
|
-
"command-name",
|
|
1557
|
-
"local-command-caveat",
|
|
1558
|
-
"local-command-stdout",
|
|
1559
|
-
"local-command-stderr",
|
|
1560
|
-
"task-notification",
|
|
1561
|
-
].includes(tag);
|
|
1580
|
+
return text.trim().startsWith("[Request interrupted by user");
|
|
1562
1581
|
}
|
|
1563
1582
|
|
|
1564
1583
|
function historyState(messages) {
|
|
@@ -1569,7 +1588,7 @@ function historyState(messages) {
|
|
|
1569
1588
|
for (const message of messages) {
|
|
1570
1589
|
const blocks = contentBlocks(message.message);
|
|
1571
1590
|
const userText = message.type === "user"
|
|
1572
|
-
? stripHandoff(blocks.filter((block) => block.type === "text").map((block) => block.text || "").join("\n"))
|
|
1591
|
+
? stripInternalTags(stripHandoff(blocks.filter((block) => block.type === "text").map((block) => block.text || "").join("\n")))
|
|
1573
1592
|
: "";
|
|
1574
1593
|
if (userText
|
|
1575
1594
|
&& !blocks.some((block) => block.type === "tool_result")
|