@tritard/waterbrother 0.15.6 → 0.15.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/package.json +1 -1
- package/src/cli.js +23 -7
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -5325,12 +5325,6 @@ async function readInteractiveLine(options = {}) {
|
|
|
5325
5325
|
cursorPos += str.length;
|
|
5326
5326
|
selectedIndex = 0;
|
|
5327
5327
|
render();
|
|
5328
|
-
|
|
5329
|
-
// Terminal-specific raw mode can occasionally miss Enter; make exit commands fail-safe.
|
|
5330
|
-
const normalizedBuffer = normalizeInteractiveInput(buffer).toLowerCase();
|
|
5331
|
-
if (normalizedBuffer === "/exit" || normalizedBuffer === "/quit") {
|
|
5332
|
-
handleSubmit();
|
|
5333
|
-
}
|
|
5334
5328
|
}
|
|
5335
5329
|
}
|
|
5336
5330
|
|
|
@@ -5357,8 +5351,10 @@ async function readInteractiveLine(options = {}) {
|
|
|
5357
5351
|
// Keypress didn't fire — handle raw data as fallback
|
|
5358
5352
|
const normalized = normalizePastedChunk(text);
|
|
5359
5353
|
const looksLikeBracketedPaste = text.includes("\x1b[200~") || text.includes("\x1b[201~");
|
|
5354
|
+
const looksLikeMultiCharPaste = normalized.length > 1 || text.length > 1;
|
|
5360
5355
|
const looksLikePastedBlock =
|
|
5361
5356
|
looksLikeBracketedPaste ||
|
|
5357
|
+
looksLikeMultiCharPaste ||
|
|
5362
5358
|
(normalized.length > 1 && normalized.includes("\n") && /[^\n]/.test(normalized));
|
|
5363
5359
|
|
|
5364
5360
|
if (looksLikePastedBlock) {
|
|
@@ -5374,7 +5370,8 @@ async function readInteractiveLine(options = {}) {
|
|
|
5374
5370
|
return;
|
|
5375
5371
|
}
|
|
5376
5372
|
|
|
5377
|
-
// Single
|
|
5373
|
+
// Single-character fallback — only manual keypress equivalents should submit.
|
|
5374
|
+
// Multi-character raw chunks are always treated as pasted text and never auto-submit.
|
|
5378
5375
|
for (const ch of text) {
|
|
5379
5376
|
if (ch === "\r" || ch === "\n") {
|
|
5380
5377
|
handleSubmit();
|
|
@@ -6252,6 +6249,20 @@ Be concrete about surfaces — name actual pages/flows. Choose the best stack fo
|
|
|
6252
6249
|
continue;
|
|
6253
6250
|
}
|
|
6254
6251
|
|
|
6252
|
+
if (/^waterbrother\s+/i.test(line)) {
|
|
6253
|
+
console.log("That is a shell command. Run it in your terminal, not at the you> prompt.");
|
|
6254
|
+
if (/^waterbrother\s+gateway\b/i.test(line)) {
|
|
6255
|
+
console.log(dim("inside Waterbrother use /gateway; from your shell use `waterbrother gateway ...`"));
|
|
6256
|
+
} else if (/^waterbrother\s+channels\b/i.test(line)) {
|
|
6257
|
+
console.log(dim("inside Waterbrother use /channels; from your shell use `waterbrother channels ...`"));
|
|
6258
|
+
} else if (/^waterbrother\s+onboarding\b/i.test(line)) {
|
|
6259
|
+
console.log(dim("inside Waterbrother use `/onboarding <service>`; from your shell use `waterbrother onboarding <service>`"));
|
|
6260
|
+
} else {
|
|
6261
|
+
console.log(dim("use slash commands here, or run the full `waterbrother ...` command in your shell"));
|
|
6262
|
+
}
|
|
6263
|
+
continue;
|
|
6264
|
+
}
|
|
6265
|
+
|
|
6255
6266
|
const lowerLine = line.toLowerCase();
|
|
6256
6267
|
if (lowerLine === "/exit" || lowerLine === "/quit" || lowerLine.startsWith("/exit ") || lowerLine.startsWith("/quit ")) {
|
|
6257
6268
|
break;
|
|
@@ -8341,6 +8352,11 @@ Be concrete about surfaces — name actual pages/flows. Choose the best stack fo
|
|
|
8341
8352
|
|
|
8342
8353
|
// Fallback: no active task = CC mode (tools on), active task = chat (tools off for safety)
|
|
8343
8354
|
const hasTask = Boolean(context.runtime.activeTask);
|
|
8355
|
+
const trivialAck = /^(k|kk|ok|okay|cool|nice|sure|yep|yeah|yup|thx|thanks|thank you|got it|sounds good)$/i.test(line.trim());
|
|
8356
|
+
if (trivialAck) {
|
|
8357
|
+
console.log(dim("acknowledged"));
|
|
8358
|
+
continue;
|
|
8359
|
+
}
|
|
8344
8360
|
const isCasual = /^(hey|hi|hello|sup|yo|what'?s ?up|thanks|thank you|thx|bye|goodbye|lol|haha|ok|okay|sure|nah|nope|yep|cool|nice|bruh|dude|how are you|good morning|good night|i feel|i think|i like|i love|i hate|i want|i need|i wish|that'?s? (great|cool|nice|interesting|funny|weird|sad|good|bad|awesome))\b/i.test(line.trim());
|
|
8345
8361
|
if (isCasual) {
|
|
8346
8362
|
const prevTools = agent.enableTools;
|