pi-vision-handoff 0.9.0 → 0.9.1
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 +1 -1
- package/src/vision-model-selector.ts +17 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-vision-handoff",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
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": "Tom X Nguyen",
|
|
@@ -21,6 +21,8 @@ import {
|
|
|
21
21
|
matchesKey,
|
|
22
22
|
Spacer,
|
|
23
23
|
Text,
|
|
24
|
+
truncateToWidth,
|
|
25
|
+
wrapTextWithAnsi,
|
|
24
26
|
} from "@earendil-works/pi-tui";
|
|
25
27
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
26
28
|
import type { ThinkingLevel } from "@earendil-works/pi-ai";
|
|
@@ -121,9 +123,21 @@ export class VisionModelSelectorComponent implements Component {
|
|
|
121
123
|
const lines: string[] = [];
|
|
122
124
|
lines.push(...new DynamicBorder((s) => this.theme.fg("accent", s)).render(width));
|
|
123
125
|
lines.push("");
|
|
124
|
-
lines.push(this.theme.fg("accent", this.theme.bold("Vision Handoff")));
|
|
125
126
|
lines.push(
|
|
126
|
-
|
|
127
|
+
truncateToWidth(
|
|
128
|
+
this.theme.fg("accent", this.theme.bold("Vision Handoff")),
|
|
129
|
+
width,
|
|
130
|
+
"",
|
|
131
|
+
),
|
|
132
|
+
);
|
|
133
|
+
lines.push(
|
|
134
|
+
...wrapTextWithAnsi(
|
|
135
|
+
this.theme.fg(
|
|
136
|
+
"muted",
|
|
137
|
+
"Pick a vision-capable model to describe images for text-only models.",
|
|
138
|
+
),
|
|
139
|
+
width,
|
|
140
|
+
),
|
|
127
141
|
);
|
|
128
142
|
lines.push("");
|
|
129
143
|
lines.push(...this.searchInput.render(width));
|
|
@@ -132,7 +146,7 @@ export class VisionModelSelectorComponent implements Component {
|
|
|
132
146
|
lines.push("");
|
|
133
147
|
lines.push(...this.footerText.render(width));
|
|
134
148
|
lines.push(...new DynamicBorder((s) => this.theme.fg("accent", s)).render(width));
|
|
135
|
-
return lines;
|
|
149
|
+
return lines.map((line) => truncateToWidth(line, width, ""));
|
|
136
150
|
}
|
|
137
151
|
|
|
138
152
|
handleInput(data: string): void {
|