u-foo 1.8.0 → 1.8.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "u-foo",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Multi-Agent Workspace Protocol. Just add u. claude → uclaude, codex → ucodex.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://ufoo.dev",
@@ -36,7 +36,6 @@ function buildSummaryLine(options = {}) {
36
36
  launchMode = "terminal",
37
37
  agentProvider = "codex-cli",
38
38
  cronTasks = [],
39
- pendingReports = 0,
40
39
  } = options;
41
40
  const agents = activeAgents.length > 0
42
41
  ? activeAgents.slice(0, 3)
@@ -47,7 +46,6 @@ function buildSummaryLine(options = {}) {
47
46
  return `{gray-fg}Agents:{/gray-fg} {cyan-fg}${agents}{/cyan-fg}`
48
47
  + ` {gray-fg}Mode:{/gray-fg} {cyan-fg}${launchMode}{/cyan-fg}`
49
48
  + ` {gray-fg}Agent:{/gray-fg} {cyan-fg}${providerLabel(agentProvider)}{/cyan-fg}`
50
- + ` {gray-fg}Reports:{/gray-fg} {cyan-fg}${Number.isFinite(pendingReports) ? pendingReports : 0}{/cyan-fg}`
51
49
  + ` {gray-fg}Cron:{/gray-fg} {cyan-fg}${Array.isArray(cronTasks) ? cronTasks.length : 0}{/cyan-fg}`;
52
50
  }
53
51
 
@@ -132,7 +130,6 @@ function buildDashboardDetailLine(options = {}) {
132
130
  selectedResumeIndex = 0,
133
131
  selectedCronIndex = -1,
134
132
  cronTasks = [],
135
- pendingReports = 0,
136
133
  providerOptions = [],
137
134
  resumeOptions = [],
138
135
  dashHints = {},
@@ -293,7 +290,6 @@ function computeDashboardContent(options = {}) {
293
290
  launchMode,
294
291
  agentProvider,
295
292
  cronTasks,
296
- pendingReports,
297
293
  });
298
294
  return {
299
295
  content: `${rail.line}\n ${line2}`,
@@ -356,7 +352,6 @@ function computeDashboardContent(options = {}) {
356
352
  launchMode,
357
353
  agentProvider,
358
354
  cronTasks,
359
- pendingReports,
360
355
  });
361
356
 
362
357
  return { content, windowStart: agentListWindowStart };
package/src/chat/index.js CHANGED
@@ -375,7 +375,7 @@ async function runChat(projectRoot, options = {}) {
375
375
  }
376
376
 
377
377
  function ensureInputCursorVisible() {
378
- const innerWidth = getInnerWidth();
378
+ const innerWidth = getWrapWidth();
379
379
  if (innerWidth <= 0) return;
380
380
  const totalRows = countLines(input.value, innerWidth);
381
381
  const visibleRows = Math.max(1, input.height || 1);
@@ -713,7 +713,6 @@ async function runChat(projectRoot, options = {}) {
713
713
  let targetAgent = null; // Selected agent for direct messaging
714
714
  let focusMode = "input"; // "input" or "dashboard"
715
715
  let dashboardView = "agents"; // "projects" | "agents" | "mode" | "provider" | "cron"
716
- let reportPendingTotal = 0;
717
716
  let selectedModeIndex = Math.max(0, MODE_OPTIONS.indexOf(launchMode));
718
717
  const providerOptions = [
719
718
  { label: "codex", value: "codex-cli" },
@@ -1212,7 +1211,6 @@ async function runChat(projectRoot, options = {}) {
1212
1211
  cronTasks,
1213
1212
  providerOptions,
1214
1213
  resumeOptions,
1215
- pendingReports: reportPendingTotal,
1216
1214
  dashHints: DASH_HINTS,
1217
1215
  modeOptions: MODE_OPTIONS,
1218
1216
  });
@@ -1256,13 +1254,6 @@ async function runChat(projectRoot, options = {}) {
1256
1254
  if (globalMode) {
1257
1255
  refreshProjectRuntimes();
1258
1256
  }
1259
- const publicPending = Number.isFinite(status?.reports?.pending_total)
1260
- ? status.reports.pending_total
1261
- : 0;
1262
- const controllerPending = Number.isFinite(status?.controller?.pending_total)
1263
- ? status.controller.pending_total
1264
- : 0;
1265
- reportPendingTotal = publicPending + controllerPending;
1266
1257
  cronTasks = Array.isArray(status?.cron?.tasks) ? status.cron.tasks : [];
1267
1258
  const metaList = Array.isArray(status.active_meta) ? status.active_meta : [];
1268
1259
  let fallbackMap = null;
@@ -6,7 +6,7 @@ function safeStrWidth(strWidth, value) {
6
6
  function getInnerWidth({ input, screen, promptWidth = 2 }) {
7
7
  const lpos = input.lpos || input._getCoords();
8
8
  if (lpos && Number.isFinite(lpos.xl) && Number.isFinite(lpos.xi)) {
9
- return Math.max(1, lpos.xl - lpos.xi + 1);
9
+ return Math.max(1, lpos.xl - lpos.xi);
10
10
  }
11
11
  if (typeof input.width === "number") return Math.max(1, input.width);
12
12
  if (typeof input.width === "string") {
package/src/code/tui.js CHANGED
@@ -566,7 +566,7 @@ function runUcodeTui({
566
566
  const getWrapWidth = () => inputMath.getWrapWidth(input, getInnerWidth());
567
567
 
568
568
  const ensureInputCursorVisible = () => {
569
- const innerWidth = getInnerWidth();
569
+ const innerWidth = getWrapWidth();
570
570
  if (innerWidth <= 0) return;
571
571
  const totalRows = inputMath.countLines(input.value || "", innerWidth, (v) => input.strWidth(v));
572
572
  const visibleRows = Math.max(1, input.height || 1);
@@ -255,6 +255,13 @@ function createDaemonCronController(options = {}) {
255
255
  task.timer = null;
256
256
  }
257
257
 
258
+ function detachTimer(timer) {
259
+ if (timer && typeof timer.unref === "function") {
260
+ timer.unref();
261
+ }
262
+ return timer;
263
+ }
264
+
258
265
  function runTask(task) {
259
266
  task.lastRunAt = nowFn();
260
267
  task.tickCount += 1;
@@ -292,17 +299,17 @@ function createDaemonCronController(options = {}) {
292
299
  function attachTaskTimer(task) {
293
300
  if (task.onceAtMs > 0) {
294
301
  const delay = Math.max(0, task.onceAtMs - nowFn());
295
- task.timer = setTimeoutFn(() => {
302
+ task.timer = detachTimer(setTimeoutFn(() => {
296
303
  runTask(task);
297
304
  stopTask(task.id);
298
- }, delay);
305
+ }, delay));
299
306
  return;
300
307
  }
301
308
 
302
- task.timer = setIntervalFn(() => {
309
+ task.timer = detachTimer(setIntervalFn(() => {
303
310
  runTask(task);
304
311
  persistState();
305
- }, task.intervalMs);
312
+ }, task.intervalMs));
306
313
  }
307
314
 
308
315
  function addTask({ intervalMs = 0, onceAtMs = 0, targets = [], prompt = "", title = "" } = {}) {