u-foo 2.3.20 → 2.3.21
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
CHANGED
|
@@ -306,14 +306,15 @@ function createAgentViewController(options = {}) {
|
|
|
306
306
|
const product = "ClaudeCode";
|
|
307
307
|
const detail = label ? `${label} · managed headless` : "managed headless";
|
|
308
308
|
const iconWidth = 9;
|
|
309
|
+
const iconGap = " ";
|
|
309
310
|
const iconLine = (icon = "", text = "") => {
|
|
310
311
|
const pad = " ".repeat(Math.max(0, iconWidth - displayWidth(icon)));
|
|
311
|
-
return `${CLAUDE_ORANGE}${icon}${ANSI_RESET}${pad}${text}`;
|
|
312
|
+
return `${CLAUDE_ORANGE}${icon}${ANSI_RESET}${pad}${iconGap}${text}`;
|
|
312
313
|
};
|
|
313
314
|
const lines = [
|
|
314
|
-
iconLine("▐▛███▜▌", `${product}v${packageVersion}`),
|
|
315
|
+
iconLine(" ▐▛███▜▌", `${product}v${packageVersion}`),
|
|
315
316
|
iconLine("▝▜█████▛▘", detail),
|
|
316
|
-
iconLine("
|
|
317
|
+
iconLine(" ▘▘ ▝▝ ", projectPath),
|
|
317
318
|
"",
|
|
318
319
|
];
|
|
319
320
|
if (width < 44) return lines;
|
|
@@ -354,19 +354,6 @@ function createDaemonMessageRouter(options = {}) {
|
|
|
354
354
|
function handleBusMessage(msg) {
|
|
355
355
|
const data = msg.data || {};
|
|
356
356
|
if (data.event === "activity_state_changed") {
|
|
357
|
-
const publisher = data.publisher && data.publisher !== "unknown"
|
|
358
|
-
? data.publisher
|
|
359
|
-
: (data.subscriber || "bus");
|
|
360
|
-
const viewingAgent = getViewingAgent();
|
|
361
|
-
if (
|
|
362
|
-
getCurrentView() === "agent" &&
|
|
363
|
-
isAgentViewUsesBus() &&
|
|
364
|
-
viewingAgent &&
|
|
365
|
-
isAgentEventForViewingAgent(data, viewingAgent, publisher)
|
|
366
|
-
) {
|
|
367
|
-
const state = data.state || (data.data && data.data.state) || "";
|
|
368
|
-
if (state) writeToAgentTerm(`[state] ${state}\r\n`);
|
|
369
|
-
}
|
|
370
357
|
requestStatus();
|
|
371
358
|
return true;
|
|
372
359
|
}
|
|
@@ -391,6 +378,18 @@ function createDaemonMessageRouter(options = {}) {
|
|
|
391
378
|
if (!displayMessage && !streamPayload) return true;
|
|
392
379
|
|
|
393
380
|
const viewingAgent = getViewingAgent();
|
|
381
|
+
const isOwnInternalPrompt =
|
|
382
|
+
data.source === "chat-internal-agent-view" &&
|
|
383
|
+
viewingAgent &&
|
|
384
|
+
data.target === viewingAgent &&
|
|
385
|
+
publisher !== viewingAgent;
|
|
386
|
+
if (
|
|
387
|
+
getCurrentView() === "agent" &&
|
|
388
|
+
isAgentViewUsesBus() &&
|
|
389
|
+
isOwnInternalPrompt
|
|
390
|
+
) {
|
|
391
|
+
return true;
|
|
392
|
+
}
|
|
394
393
|
const isAgentViewTarget =
|
|
395
394
|
getCurrentView() === "agent" &&
|
|
396
395
|
isAgentViewUsesBus() &&
|
package/src/chat/index.js
CHANGED
|
@@ -1062,11 +1062,12 @@ async function runChat(projectRoot, options = {}) {
|
|
|
1062
1062
|
: `${prefix}>`;
|
|
1063
1063
|
|
|
1064
1064
|
promptBox.setContent(content);
|
|
1065
|
+
if (!input.parent || !promptBox.parent) return;
|
|
1066
|
+
|
|
1065
1067
|
promptBox.width = content.length + 1; // content + spacer
|
|
1066
1068
|
input.left = promptBox.width;
|
|
1067
1069
|
input.width = `100%-${promptBox.width}`;
|
|
1068
1070
|
|
|
1069
|
-
if (!input.parent || !promptBox.parent) return;
|
|
1070
1071
|
resizeInput();
|
|
1071
1072
|
if (typeof input._updateCursor === "function") {
|
|
1072
1073
|
input._updateCursor();
|
package/src/daemon/index.js
CHANGED
|
@@ -889,22 +889,6 @@ function startBusBridge(projectRoot, provider, onEvent, onStatus, shouldDrain) {
|
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
|
|
892
|
-
function emitRecentWatchedEvents(agentId, limit = 80) {
|
|
893
|
-
if (!agentId) return;
|
|
894
|
-
const previous = new Set(state.watchedAgents);
|
|
895
|
-
state.watchedAgents.add(agentId);
|
|
896
|
-
const aliases = buildWatchedAliases();
|
|
897
|
-
state.watchedAgents = previous;
|
|
898
|
-
const matches = [];
|
|
899
|
-
const files = getEventFiles().slice(-3);
|
|
900
|
-
for (const file of files) {
|
|
901
|
-
for (const evt of readEventFile(file)) {
|
|
902
|
-
if (isWatchedEvent(evt, aliases)) matches.push(evt);
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
for (const evt of matches.slice(-limit)) emitBusEvent(evt);
|
|
906
|
-
}
|
|
907
|
-
|
|
908
892
|
function pollWatchedEvents() {
|
|
909
893
|
if (state.watchedAgents.size === 0) {
|
|
910
894
|
state.lastEventSeq = readCurrentSeq();
|
|
@@ -1032,7 +1016,6 @@ function startBusBridge(projectRoot, provider, onEvent, onStatus, shouldDrain) {
|
|
|
1032
1016
|
watchAgent(agentId, enabled = true) {
|
|
1033
1017
|
if (!agentId) return;
|
|
1034
1018
|
if (enabled) {
|
|
1035
|
-
emitRecentWatchedEvents(agentId);
|
|
1036
1019
|
state.watchedAgents.add(agentId);
|
|
1037
1020
|
state.lastEventSeq = Math.max(state.lastEventSeq, readCurrentSeq());
|
|
1038
1021
|
} else {
|