@bismawy/pi-vision-watcher 1.2.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## [1.3.0] - 2026-10-24
4
+
5
+ ### Changed
6
+ - The `/vision-watcher` picker adopts the pi-arnative providers model-list style: rows render a checkbox
7
+ (`[x]` accent when the row is the primary, `[ ]` dim otherwise) instead of a trailing `✓`, labels are the
8
+ bare `provider/id` ref (no `[provider]`/`✦` badges; unselected rows sit in muted), and a scrolled list
9
+ announces hidden rows with `↑ N more` / `↓ N more` lines instead of `(cursor/total)`. The search field and
10
+ the footer sit flush in the frame's one-space pad with no prefix of their own, like the providers screen.
11
+ Fallback members keep the `⇆` mark.
4
12
 
5
13
  ## [1.2.0] - 2026-10-21
6
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bismawy/pi-vision-watcher",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Intelligent vision watcher. Connected models. Zero workflow interruption. Text-only Pi models get background image descriptions with failover chains.",
5
5
  "type": "module",
6
6
  "author": "bismawy",
@@ -3,14 +3,14 @@
3
3
  * describes images during vision handoff.
4
4
  *
5
5
  * Uses the same patterns as pi's built-in selectors and pi-hide-providers:
6
- * - Lists connected (authenticated) models, vision-capable ones first (✦ badge)
6
+ * - Lists connected (authenticated) vision-capable models as bare `provider/id` refs
7
7
  * - A leading "None" row clears the configured vision model
8
8
  * - Space selects the highlighted model as the primary describer (toggle)
9
9
  * - Tab toggles the highlighted model in/out of the failover chain (max 3)
10
10
  * - Ctrl+Shift+R clears the failover chain, Shift+Tab walks the thinking ladder,
11
11
  * Alt+A / Ctrl+Alt+A toggles async paste handoff, Alt+↑↓ reorders rows
12
12
  * - Enter or Ctrl+S saves, Esc / Ctrl+C cancels
13
- * - The primary is marked ✓, chain members ⇆
13
+ * - The primary is the checked row [x], chain members ⇆ (providers style)
14
14
  */
15
15
 
16
16
  import {
@@ -255,13 +255,9 @@ export class VisionModelSelectorComponent implements Component {
255
255
  ),
256
256
  );
257
257
  lines.push("");
258
- // Indented to the list's two-column gutter: at column 0 the field reads as
259
- // a stray line rather than as the thing the list is filtered by.
260
- lines.push(
261
- ...this.searchInput
262
- .render(Math.max(1, width - 2))
263
- .map((line) => ` ${line}`),
264
- );
258
+ // Flush with the wall: boxRow already supplies the one-space pad, so the
259
+ // field carries no prefix of its own — same column as the providers input.
260
+ lines.push(...this.searchInput.render(Math.max(1, width)));
265
261
  lines.push("");
266
262
  lines.push(...this.listContainer.render(width));
267
263
  lines.push("");
@@ -457,7 +453,9 @@ export class VisionModelSelectorComponent implements Component {
457
453
  "[Esc] Cancel",
458
454
  ].join(" ");
459
455
 
460
- return `${this.theme.fg("dim", " ")}${this.theme.fg("accent", count)}${this.theme.fg("dim", ` · ${legend}`)}`;
456
+ // No prefix: boxRow's own pad is the one space, exactly like the providers
457
+ // legend row (`│ 34/44 picked · … │`).
458
+ return `${this.theme.fg("accent", count)}${this.theme.fg("dim", ` · ${legend}`)}`;
461
459
  }
462
460
 
463
461
  /** Move `ref` one row up/down in the display list. The None row is pinned at
@@ -536,7 +534,7 @@ export class VisionModelSelectorComponent implements Component {
536
534
 
537
535
  if (this.filteredItems.length === 0) {
538
536
  this.listContainer.addChild(
539
- new Text(this.theme.fg("muted", " No matching models"), 0, 0),
537
+ new Text(this.theme.fg("muted", "No matching models"), 0, 0),
540
538
  );
541
539
  }
542
540
 
@@ -549,6 +547,14 @@ export class VisionModelSelectorComponent implements Component {
549
547
  );
550
548
  const endIndex = Math.min(startIndex + this.maxVisible, this.filteredItems.length);
551
549
 
550
+ // Hidden rows are announced like the providers list, never silently cut: the
551
+ // ↑ count sits above the window, the ↓ count below it.
552
+ if (startIndex > 0) {
553
+ this.listContainer.addChild(
554
+ new Text(this.theme.fg("dim", `↑ ${startIndex} more`), 0, 0),
555
+ );
556
+ }
557
+
552
558
  for (let i = startIndex; i < endIndex; i++) {
553
559
  const item = this.filteredItems[i];
554
560
  if (!item) continue;
@@ -560,20 +566,19 @@ export class VisionModelSelectorComponent implements Component {
560
566
  if (item.none) {
561
567
  label = this.theme.fg("warning", item.modelName);
562
568
  } else {
563
- const labelled = isSelected
564
- ? softPainter(this.theme, "accent", "accent")(this.theme.bold(item.modelId))
565
- : item.modelId;
566
- const badge = item.vision ? this.theme.fg("success", " ✦") : this.theme.fg("muted", " ·");
567
- const providerBadge = this.theme.fg("muted", ` [${item.provider}]`);
568
- label = `${labelled}${providerBadge}${badge}`;
569
+ // Providers style: the bare `provider/id` ref, no badges — unselected
570
+ // rows sit in muted, the selected row takes the soft tier in bold.
571
+ label = isSelected
572
+ ? softPainter(this.theme, "accent", "accent")(this.theme.bold(item.ref!))
573
+ : this.theme.fg("muted", item.ref!);
569
574
  }
570
575
 
571
- const current = item.ref === this.currentRef && item.ref !== null
572
- ? this.theme.fg("success", " ✓")
573
- : item.none && this.currentRef === null
574
- ? this.theme.fg("success", " ✓")
575
- : "";
576
- // Fallback marker — distinct from the primary's ✓ so a model can visibly
576
+ // Providers-style checkbox: the picked state is chrome, `[x]` accent / `[ ]`
577
+ // dim — it replaces the old ✓ marker so the primary reads like a checked row.
578
+ const marked = item.none ? this.currentRef === null : item.ref === this.currentRef;
579
+ const mark = marked ? this.theme.fg("accent", "[x] ") : this.theme.fg("dim", "[ ] ");
580
+
581
+ // Fallback marker — distinct from the primary's check so a model can visibly
577
582
  // be both the primary and a fallback (Sonnet as primary, Gemini as the
578
583
  // chain behind it).
579
584
  const fallbackMark =
@@ -581,15 +586,12 @@ export class VisionModelSelectorComponent implements Component {
581
586
  ? this.theme.fg("warning", " ⇆")
582
587
  : "";
583
588
 
584
- this.listContainer.addChild(new Text(`${prefix}${label}${current}${fallbackMark}`, 0, 0));
589
+ this.listContainer.addChild(new Text(`${prefix}${mark}${label}${fallbackMark}`, 0, 0));
585
590
  }
586
591
 
587
- if (startIndex > 0 || endIndex < this.filteredItems.length) {
592
+ if (endIndex < this.filteredItems.length) {
588
593
  this.listContainer.addChild(
589
- new Text(
590
- this.theme.fg("muted", ` (${this.selectedIndex + 1}/${this.filteredItems.length})`),
591
- 0, 0,
592
- ),
594
+ new Text(this.theme.fg("dim", `↓ ${this.filteredItems.length - endIndex} more`), 0, 0),
593
595
  );
594
596
  }
595
597