aoaoe 0.75.0 → 0.76.0

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
@@ -325,6 +325,25 @@ async function main() {
325
325
  tui.log("system", `viewing session #${sessionIdx}`);
326
326
  }
327
327
  });
328
+ // wire quick-switch: bare digit 1-9 jumps to session (or switches in drilldown)
329
+ input.onQuickSwitch((num) => {
330
+ if (tui.getViewMode() === "drilldown") {
331
+ // in drilldown, switch to a different session
332
+ const ok = tui.enterDrilldown(num);
333
+ if (ok)
334
+ tui.log("system", `switched to session #${num}`);
335
+ else
336
+ tui.log("system", `session #${num} not found`);
337
+ }
338
+ else {
339
+ // in overview, drill into session
340
+ const ok = tui.enterDrilldown(num);
341
+ if (ok)
342
+ tui.log("system", `viewing session #${num}`);
343
+ else
344
+ tui.log("system", `session #${num} not found`);
345
+ }
346
+ });
328
347
  // wire /search command to TUI activity filter
329
348
  input.onSearch((pattern) => {
330
349
  tui.setSearch(pattern);
package/dist/input.d.ts CHANGED
@@ -2,6 +2,7 @@ export type ScrollDirection = "up" | "down" | "top" | "bottom";
2
2
  export declare const INSIST_PREFIX = "__INSIST__";
3
3
  export type ViewHandler = (target: string | null) => void;
4
4
  export type SearchHandler = (pattern: string | null) => void;
5
+ export type QuickSwitchHandler = (sessionNum: number) => void;
5
6
  export interface MouseEvent {
6
7
  button: number;
7
8
  col: number;
@@ -26,6 +27,7 @@ export declare class InputReader {
26
27
  private mouseMoveHandler;
27
28
  private lastMoveRow;
28
29
  private searchHandler;
30
+ private quickSwitchHandler;
29
31
  private mouseDataListener;
30
32
  onScroll(handler: (dir: ScrollDirection) => void): void;
31
33
  onQueueChange(handler: (count: number) => void): void;
@@ -34,6 +36,7 @@ export declare class InputReader {
34
36
  onMouseWheel(handler: MouseWheelHandler): void;
35
37
  onMouseMove(handler: MouseMoveHandler): void;
36
38
  onSearch(handler: SearchHandler): void;
39
+ onQuickSwitch(handler: QuickSwitchHandler): void;
37
40
  private notifyQueueChange;
38
41
  start(): void;
39
42
  drain(): string[];
package/dist/input.js CHANGED
@@ -34,6 +34,7 @@ export class InputReader {
34
34
  mouseMoveHandler = null;
35
35
  lastMoveRow = 0; // debounce: only fire move handler when row changes
36
36
  searchHandler = null;
37
+ quickSwitchHandler = null;
37
38
  mouseDataListener = null;
38
39
  // register a callback for scroll key events (PgUp/PgDn/Home/End)
39
40
  onScroll(handler) {
@@ -63,6 +64,10 @@ export class InputReader {
63
64
  onSearch(handler) {
64
65
  this.searchHandler = handler;
65
66
  }
67
+ // register a callback for quick-switch (bare digit 1-9 on empty input line)
68
+ onQuickSwitch(handler) {
69
+ this.quickSwitchHandler = handler;
70
+ }
66
71
  notifyQueueChange() {
67
72
  this.queueChangeHandler?.(this.queue.length);
68
73
  }
@@ -191,6 +196,12 @@ export class InputReader {
191
196
  this.rl?.prompt();
192
197
  return;
193
198
  }
199
+ // quick-switch: bare digit 1-9 jumps to that session
200
+ if (/^[1-9]$/.test(line) && this.quickSwitchHandler) {
201
+ this.quickSwitchHandler(parseInt(line, 10));
202
+ this.rl?.prompt();
203
+ return;
204
+ }
194
205
  // built-in slash commands
195
206
  if (line.startsWith("/")) {
196
207
  this.handleCommand(line);
@@ -231,6 +242,7 @@ ${BOLD}controls:${RESET}
231
242
  ESC ESC same as /interrupt (shortcut)
232
243
 
233
244
  ${BOLD}navigation:${RESET}
245
+ 1-9 quick-switch: jump to session N (type digit + Enter)
234
246
  /view [N|name] drill into a session's live output (default: 1)
235
247
  /back return to overview from drill-down
236
248
  /search <pattern> filter activity entries by substring (case-insensitive)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aoaoe",
3
- "version": "0.75.0",
3
+ "version": "0.76.0",
4
4
  "description": "Autonomous supervisor for agent-of-empires sessions using OpenCode or Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",