my-durable 0.0.15 → 0.0.16

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.
@@ -551,6 +551,12 @@ export class App {
551
551
  if (matchesKey(data, "escape")) {
552
552
  this.input = null;
553
553
  this.toast = "";
554
+ // esc aborts the filter line: a half-typed needle must not linger.
555
+ if (input.kind === "filter" && this.filter) {
556
+ this.filter = "";
557
+ this.cursor = 0;
558
+ this.notify("filter cleared");
559
+ }
554
560
  return true;
555
561
  }
556
562
  // The slash suggestion list is a MENU while it is open: ↑/↓ steer it and
@@ -652,6 +658,13 @@ export class App {
652
658
  const chunk = data.replace(/\r\n?/g, "\n");
653
659
  if (chunk >= " " || [...chunk].some((ch) => ch >= " ") || chunk.includes("\n")) (input.value += chunk), (this.suggIndex = 0);
654
660
  }
661
+ // The filter narrows the list LIVE, on every keystroke — enter merely
662
+ // closes the line. Waiting for enter made "f" feel dead for a beat.
663
+ if (input.kind === "filter") {
664
+ this.filter = input.value.trim();
665
+ if (!this.filter && this.cursor) this.cursor = 0;
666
+ this.requestRender();
667
+ }
655
668
  return true;
656
669
  }
657
670
 
@@ -717,8 +730,19 @@ export class App {
717
730
  this.openCursor();
718
731
  }
719
732
 
733
+ /**
734
+ * Tab/Shift+Tab cycle whatever tab strip is on screen — pi's exact
735
+ * semantics: the four VIEWS on herd/network/log, the agent's own tabs in
736
+ * the conversation. Before, "tab" outside the agent view did nothing at
737
+ * all, which on the outermost session list reads as "navigation is dead"
738
+ * (reported: "không điều hướng xem tab khác ngoài tab session đầu tiên").
739
+ */
720
740
  private cycleTab(delta: number) {
721
- if (this.view !== "agent") return;
741
+ if (this.view !== "agent") {
742
+ const index = VIEW_TABS.findIndex((t) => t.id === this.view);
743
+ this.setView(VIEW_TABS[(index + delta + VIEW_TABS.length) % VIEW_TABS.length]!.id);
744
+ return;
745
+ }
722
746
  const index = AGENT_TABS.findIndex((t) => t.id === this.tab);
723
747
  this.tab = AGENT_TABS[(index + delta + AGENT_TABS.length) % AGENT_TABS.length]!.id;
724
748
  this.scrollOffset = 0;
@@ -242,7 +242,7 @@ export function renderStatusbar(
242
242
  ? ["tab complete", "↑ history", "enter send", "esc cancel"]
243
243
  : opts.view === "agent"
244
244
  ? ["g herd", "N network", "L log", "[ ] tabs", "m message"]
245
- : ["j/k move", "↵ open", "1-9 jump", "g/N/L views", "esc agent"];
245
+ : ["j/k move", "↵ open", "1-9 jump", "⇥ views", "esc agent"];
246
246
  const right = `${c.muted("ctx")} ${opts.ctxLeft === undefined ? c.muted("—") : c.text(`${opts.ctxLeft}%`)}${opts.background ? c.muted(` · ${opts.background} bg`) : ""} ${c.muted("dev")} ${c.text(fit(opts.device, 18))}`;
247
247
  const left = `${chip} ${keys.map((k) => c.muted(k)).join(c.muted(" • "))}`;
248
248
  const gap = Math.max(1, w - visibleWidth(left) - visibleWidth(right));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Durable Pi \u2014 the durable agent network: hub web UI, device backend daemon, TUI admin and the shared SDK, packaged as one runnable monorepo install",
5
5
  "license": "MIT",
6
6
  "repository": {