agenthud 0.11.0 → 0.11.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/dist/index.js CHANGED
@@ -15,4 +15,4 @@ Error: Node.js ${MIN_NODE_VERSION}+ is required (current: ${process.version})
15
15
  process.exit(1);
16
16
  }
17
17
  if (!process.env.NODE_ENV) process.env.NODE_ENV = "production";
18
- import("./main-KTFHI6KH.js");
18
+ import("./main-3J6HDPKN.js");
@@ -3300,6 +3300,18 @@ function collectAllIds(tree) {
3300
3300
  }
3301
3301
  return ids;
3302
3302
  }
3303
+ function initialSelectedId(tree) {
3304
+ const firstProject = tree.projects[0];
3305
+ if (firstProject) return `__proj-${firstProject.name}__`;
3306
+ if (tree.coldProjects.length > 0) return "__cold__";
3307
+ return null;
3308
+ }
3309
+ function initialExpandedIds(tree) {
3310
+ if (tree.projects.length === 0 && tree.coldProjects.length > 0) {
3311
+ return /* @__PURE__ */ new Set(["__cold__"]);
3312
+ }
3313
+ return /* @__PURE__ */ new Set();
3314
+ }
3303
3315
  function App({
3304
3316
  mode,
3305
3317
  scopeToProject: scopeToProject2
@@ -3316,18 +3328,18 @@ function App({
3316
3328
  const [sessionTree, setSessionTree] = useState3(
3317
3329
  () => discoverSessions(config, discoverOptions)
3318
3330
  );
3319
- const [selectedId, setSelectedId] = useState3(() => {
3320
- const firstProject = sessionTree.projects[0];
3321
- if (firstProject) return `__proj-${firstProject.name}__`;
3322
- return null;
3323
- });
3331
+ const [selectedId, setSelectedId] = useState3(
3332
+ () => initialSelectedId(sessionTree)
3333
+ );
3324
3334
  const [focus, setFocus] = useState3("tree");
3325
3335
  const [scrollOffset, setScrollOffset] = useState3(0);
3326
3336
  const [isLive, setIsLive] = useState3(true);
3327
3337
  const [activities, setActivities] = useState3([]);
3328
3338
  const [gitActivities, setGitActivities] = useState3([]);
3329
3339
  const [newCount, setNewCount] = useState3(0);
3330
- const [expandedIds, setExpandedIds] = useState3(/* @__PURE__ */ new Set());
3340
+ const [expandedIds, setExpandedIds] = useState3(
3341
+ () => initialExpandedIds(sessionTree)
3342
+ );
3331
3343
  const [viewerCursorLine, setViewerCursorLine] = useState3(0);
3332
3344
  const [detailMode, setDetailMode] = useState3(false);
3333
3345
  const [detailActivity, setDetailActivity] = useState3(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenthud",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "CLI tool to monitor agent status in real-time. Works with Claude Code, multi-agent workflows, and any AI agent system.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",