@towles/tool 0.0.113 → 0.0.115

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": "@towles/tool",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "description": "One off quality of life scripts that I use on a daily basis.",
5
5
  "homepage": "https://github.com/ChrisTowles/towles-tool#readme",
6
6
  "bugs": {
@@ -252,6 +252,7 @@ function AgentListItem(props: AgentListItemProps) {
252
252
  return props.agent.status === "done" ? "✓" : props.agent.status === "error" ? "✗" : "⚠";
253
253
  if (props.agent.status === "running") return SPINNERS[props.spinIdx() % SPINNERS.length]!;
254
254
  if (props.agent.status === "waiting") return "◉";
255
+ if (props.agent.status === "question") return "?";
255
256
  return "○";
256
257
  };
257
258
 
@@ -270,6 +271,7 @@ function AgentListItem(props: AgentListItemProps) {
270
271
  if (props.agent.status === "error") return "error";
271
272
  if (props.agent.status === "interrupted") return "stopped";
272
273
  if (props.agent.status === "waiting") return "waiting";
274
+ if (props.agent.status === "question") return "question";
273
275
  return "";
274
276
  };
275
277
 
@@ -34,6 +34,7 @@ export function SessionCard(props: SessionCardProps) {
34
34
  if (s === "interrupted") return P().peach;
35
35
  if (s === "running") return P().yellow;
36
36
  if (s === "waiting") return P().blue;
37
+ if (s === "question") return P().green;
37
38
  if (props.isFocused) return P().lavender;
38
39
  return "transparent";
39
40
  };
@@ -49,6 +50,7 @@ export function SessionCard(props: SessionCardProps) {
49
50
  const s = status();
50
51
  if (s === "running") return SPINNERS[props.spinIdx() % SPINNERS.length]!;
51
52
  if (s === "waiting") return "◉";
53
+ if (s === "question") return "?";
52
54
  if (isUnseenTerminal()) return UNSEEN_ICON;
53
55
  return "";
54
56
  };
@@ -7,7 +7,7 @@ export function computeSessionStatusCounts(sessions: SessionData[]): SessionStat
7
7
  let idle = 0;
8
8
  for (const s of sessions) {
9
9
  const status = s.agentState?.status;
10
- if (status === "running" || status === "waiting") {
10
+ if (status === "running" || status === "waiting" || status === "question") {
11
11
  active++;
12
12
  } else if (status === "error") {
13
13
  error++;
@@ -6,6 +6,7 @@ const TERMINAL_PRUNE_MS = 5 * 60 * 1000;
6
6
 
7
7
  const STATUS_PRIORITY: Record<string, number> = {
8
8
  running: 5,
9
+ question: 4,
9
10
  error: 4,
10
11
  interrupted: 3,
11
12
  waiting: 2,
@@ -61,9 +61,8 @@ export function determineStatus(entry: JournalEntry): AgentStatus | null {
61
61
  if (msg.role === "assistant") {
62
62
  const toolUses = items.filter((c) => c.type === "tool_use");
63
63
  if (toolUses.length === 0) return "done";
64
- // AskUserQuestion means the agent is waiting for user input, not running
65
- const allWaiting = toolUses.every((c) => (c as any).name === "AskUserQuestion");
66
- return allWaiting ? "waiting" : "running";
64
+ const allAsking = toolUses.every((c) => (c as any).name === "AskUserQuestion");
65
+ return allAsking ? "question" : "running";
67
66
  }
68
67
 
69
68
  if (msg.role === "user") return "running";
@@ -1,4 +1,11 @@
1
- export type AgentStatus = "idle" | "running" | "done" | "error" | "waiting" | "interrupted";
1
+ export type AgentStatus =
2
+ | "idle"
3
+ | "running"
4
+ | "done"
5
+ | "error"
6
+ | "waiting"
7
+ | "question"
8
+ | "interrupted";
2
9
 
3
10
  export interface AgentEvent {
4
11
  agent: string;
@@ -1145,7 +1145,7 @@ export function startServer(
1145
1145
  lastStatus = "done";
1146
1146
  } else {
1147
1147
  lastStatus = toolUses.every((c: any) => c.name === "AskUserQuestion")
1148
- ? "waiting"
1148
+ ? "question"
1149
1149
  : "running";
1150
1150
  }
1151
1151
  } else if (msg.role === "user") {
@@ -148,7 +148,7 @@ function resolveClaudeCodeJournalInfo(threadId: string): {
148
148
  lastStatus = "done";
149
149
  } else {
150
150
  lastStatus = toolUses.every((c: any) => c.name === "AskUserQuestion")
151
- ? "waiting"
151
+ ? "question"
152
152
  : "running";
153
153
  }
154
154
  } else if (msg.role === "user") {
@@ -62,6 +62,7 @@ const CATPPUCCIN_MOCHA: Theme = {
62
62
  done: "#a6e3a1",
63
63
  error: "#f38ba8",
64
64
  waiting: "#89b4fa",
65
+ question: "#a6e3a1",
65
66
  interrupted: "#fab387",
66
67
  },
67
68
  icons: {
@@ -70,6 +71,7 @@ const CATPPUCCIN_MOCHA: Theme = {
70
71
  done: "✓",
71
72
  error: "✗",
72
73
  waiting: "◉",
74
+ question: "?",
73
75
  interrupted: "⚠",
74
76
  },
75
77
  };
@@ -104,6 +106,7 @@ const CATPPUCCIN_LATTE: Theme = {
104
106
  done: "#40a02b",
105
107
  error: "#d20f39",
106
108
  waiting: "#1e66f5",
109
+ question: "#40a02b",
107
110
  interrupted: "#fe640b",
108
111
  },
109
112
  icons: CATPPUCCIN_MOCHA.icons,
@@ -139,6 +142,7 @@ const TOKYO_NIGHT: Theme = {
139
142
  done: "#9ece6a",
140
143
  error: "#f7768e",
141
144
  waiting: "#7aa2f7",
145
+ question: "#9ece6a",
142
146
  interrupted: "#ff9e64",
143
147
  },
144
148
  icons: CATPPUCCIN_MOCHA.icons,
@@ -174,6 +178,7 @@ const GRUVBOX_DARK: Theme = {
174
178
  done: "#b8bb26",
175
179
  error: "#fb4934",
176
180
  waiting: "#83a598",
181
+ question: "#b8bb26",
177
182
  interrupted: "#fe8019",
178
183
  },
179
184
  icons: CATPPUCCIN_MOCHA.icons,
@@ -209,6 +214,7 @@ const NORD: Theme = {
209
214
  done: "#a3be8c",
210
215
  error: "#bf616a",
211
216
  waiting: "#81a1c1",
217
+ question: "#a3be8c",
212
218
  interrupted: "#d08770",
213
219
  },
214
220
  icons: CATPPUCCIN_MOCHA.icons,
@@ -244,6 +250,7 @@ const DRACULA: Theme = {
244
250
  done: "#50fa7b",
245
251
  error: "#ff5555",
246
252
  waiting: "#8be9fd",
253
+ question: "#50fa7b",
247
254
  interrupted: "#ffb86c",
248
255
  },
249
256
  icons: CATPPUCCIN_MOCHA.icons,
@@ -279,6 +286,7 @@ const CATPPUCCIN_FRAPPE: Theme = {
279
286
  done: "#a6d189",
280
287
  error: "#e78284",
281
288
  waiting: "#8da4e2",
289
+ question: "#a6d189",
282
290
  interrupted: "#ef9f76",
283
291
  },
284
292
  icons: CATPPUCCIN_MOCHA.icons,
@@ -314,6 +322,7 @@ const CATPPUCCIN_MACCHIATO: Theme = {
314
322
  done: "#a6da95",
315
323
  error: "#ed8796",
316
324
  waiting: "#8aadf4",
325
+ question: "#a6da95",
317
326
  interrupted: "#f5a97f",
318
327
  },
319
328
  icons: CATPPUCCIN_MOCHA.icons,
@@ -349,6 +358,7 @@ const GITHUB_DARK: Theme = {
349
358
  done: "#3fb950",
350
359
  error: "#f85149",
351
360
  waiting: "#58a6ff",
361
+ question: "#3fb950",
352
362
  interrupted: "#d29922",
353
363
  },
354
364
  icons: CATPPUCCIN_MOCHA.icons,
@@ -384,6 +394,7 @@ const ONE_DARK: Theme = {
384
394
  done: "#98c379",
385
395
  error: "#e06c75",
386
396
  waiting: "#61afef",
397
+ question: "#98c379",
387
398
  interrupted: "#d19a66",
388
399
  },
389
400
  icons: CATPPUCCIN_MOCHA.icons,
@@ -419,6 +430,7 @@ const KANAGAWA: Theme = {
419
430
  done: "#98BB6C",
420
431
  error: "#E82424",
421
432
  waiting: "#7E9CD8",
433
+ question: "#98BB6C",
422
434
  interrupted: "#FFA066",
423
435
  },
424
436
  icons: CATPPUCCIN_MOCHA.icons,
@@ -454,6 +466,7 @@ const EVERFOREST: Theme = {
454
466
  done: "#a7c080",
455
467
  error: "#e67e80",
456
468
  waiting: "#7fbbb3",
469
+ question: "#a7c080",
457
470
  interrupted: "#e69875",
458
471
  },
459
472
  icons: CATPPUCCIN_MOCHA.icons,
@@ -489,6 +502,7 @@ const MATERIAL: Theme = {
489
502
  done: "#c3e88d",
490
503
  error: "#f07178",
491
504
  waiting: "#82aaff",
505
+ question: "#c3e88d",
492
506
  interrupted: "#f78c6c",
493
507
  },
494
508
  icons: CATPPUCCIN_MOCHA.icons,
@@ -524,6 +538,7 @@ const COBALT2: Theme = {
524
538
  done: "#9eff80",
525
539
  error: "#ff0088",
526
540
  waiting: "#0088ff",
541
+ question: "#9eff80",
527
542
  interrupted: "#ff628c",
528
543
  },
529
544
  icons: CATPPUCCIN_MOCHA.icons,
@@ -559,6 +574,7 @@ const FLEXOKI: Theme = {
559
574
  done: "#879A39",
560
575
  error: "#D14D41",
561
576
  waiting: "#4385BE",
577
+ question: "#879A39",
562
578
  interrupted: "#DA702C",
563
579
  },
564
580
  icons: CATPPUCCIN_MOCHA.icons,
@@ -594,6 +610,7 @@ const AYU: Theme = {
594
610
  done: "#7FD962",
595
611
  error: "#D95757",
596
612
  waiting: "#59C2FF",
613
+ question: "#7FD962",
597
614
  interrupted: "#FF8F40",
598
615
  },
599
616
  icons: CATPPUCCIN_MOCHA.icons,
@@ -629,6 +646,7 @@ const AURA: Theme = {
629
646
  done: "#61ffca",
630
647
  error: "#ff6767",
631
648
  waiting: "#a277ff",
649
+ question: "#61ffca",
632
650
  interrupted: "#ffca85",
633
651
  },
634
652
  icons: CATPPUCCIN_MOCHA.icons,
@@ -664,6 +682,7 @@ const MATRIX: Theme = {
664
682
  done: "#62ff94",
665
683
  error: "#ff4b4b",
666
684
  waiting: "#30b3ff",
685
+ question: "#62ff94",
667
686
  interrupted: "#ffa83d",
668
687
  },
669
688
  icons: CATPPUCCIN_MOCHA.icons,