@bismawy/pi-vision-watcher 1.0.12 → 1.0.13

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": "@bismawy/pi-vision-watcher",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Give text-only pi models vision — describe images with a vision model you pick via an interactive picker, then hand off the text description to non-vision models",
5
5
  "type": "module",
6
6
  "author": "bismawy",
@@ -41,6 +41,8 @@ export const MAX_FALLBACKS = 3;
41
41
  * it), `alt+f` is pi's editor word-right, and `ctrl+f` is pi's find-text. */
42
42
  const FALLBACK_KEY = Key.ctrl("q");
43
43
  const FALLBACK_KEY_HINT = "ctrl+q";
44
+ const RESET_FALLBACKS_KEY = Key.ctrlShift("q");
45
+ const RESET_FALLBACKS_KEY_HINT = "ctrl+shift+q";
44
46
 
45
47
  /** Provider ids that don't title-case cleanly. Everything else falls back to
46
48
  * word-capitalisation (`custom-openrouter-ai` → "Custom Openrouter AI"). */
@@ -255,6 +257,11 @@ export class VisionModelSelectorComponent implements Component {
255
257
  // chosen together. Intercepted before the search input (like the other ctrl
256
258
  // shortcuts) so the key never lands in the filter text. See
257
259
  // {@link FALLBACK_KEY} for why it isn't ctrl+f.
260
+ if (matchesKey(data, RESET_FALLBACKS_KEY)) {
261
+ this.clearFallbacks();
262
+ return;
263
+ }
264
+
258
265
  if (matchesKey(data, FALLBACK_KEY)) {
259
266
  const item = this.filteredItems[this.selectedIndex];
260
267
  if (item?.ref) this.toggleFallback(item.ref);
@@ -333,22 +340,30 @@ export class VisionModelSelectorComponent implements Component {
333
340
  private getFooterText(): string {
334
341
  const totalCount = this.allItems.length - 1; // exclude the None row
335
342
  const matches = this.searchInput.getValue()
336
- ? `${this.filteredItems.length - 1} matches`
337
- : `total ${totalCount} vision-capable models`;
343
+ ? `${this.filteredItems.length - 1} matches.`
344
+ : `total ${totalCount} models.`;
338
345
 
339
346
  // The current selection lives in the detail pane above, so the footer only
340
347
  // carries keys + the model count.
341
348
  const parts: string[] = [
342
349
  `${keyText("tui.select.confirm")} = done`,
343
- "space = select vision models (👀)",
344
- `${FALLBACK_KEY_HINT} = fallback models (🔁)`,
350
+ "space = vision models",
351
+ `${FALLBACK_KEY_HINT} = fallback models`,
352
+ `${RESET_FALLBACKS_KEY_HINT} = reset fallbacks models`,
345
353
  "ctrl+t = thinking",
346
354
  "ctrl+a = async fallback",
347
355
  "esc = cancel",
348
356
  matches,
349
357
  ];
350
358
 
351
- return this.theme.fg("dim", ` ${parts.join(" · ")} `);
359
+ return this.theme.fg("dim", ` ${parts.join(" | ")}`);
360
+ }
361
+
362
+ private clearFallbacks(): void {
363
+ if (this.fallbacks.size === 0) return;
364
+ this.fallbacks.clear();
365
+ this.notice = null;
366
+ this.updateList();
352
367
  }
353
368
 
354
369
  /** Toggle a model's membership in the fallback chain, preserving list order