pi-hide-providers 0.1.9 → 0.1.10

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": "pi-hide-providers",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Hide providers and models from pi's model selector — filter the /model list and Ctrl+P cycling via a configurable blocklist",
5
5
  "type": "module",
6
6
  "author": "Tom X Nguyen",
@@ -23,6 +23,8 @@ import {
23
23
  matchesKey,
24
24
  Spacer,
25
25
  Text,
26
+ truncateToWidth,
27
+ wrapTextWithAnsi,
26
28
  } from "@earendil-works/pi-tui";
27
29
  import type { Theme } from "@earendil-works/pi-coding-agent";
28
30
  import { DynamicBorder, keyText } from "@earendil-works/pi-coding-agent";
@@ -135,11 +137,20 @@ export class HideProviderSelectorComponent implements Component {
135
137
 
136
138
  lines.push(...new DynamicBorder((s) => this.theme.fg("accent", s)).render(width));
137
139
  lines.push("");
138
- lines.push(this.theme.fg("accent", this.theme.bold("Hide Provider Configuration")));
139
140
  lines.push(
140
- this.theme.fg(
141
- "muted",
142
- `Select providers or models to hide from the model selector.`,
141
+ truncateToWidth(
142
+ this.theme.fg("accent", this.theme.bold("Hide Provider Configuration")),
143
+ width,
144
+ "",
145
+ ),
146
+ );
147
+ lines.push(
148
+ ...wrapTextWithAnsi(
149
+ this.theme.fg(
150
+ "muted",
151
+ `Select providers or models to hide from the model selector.`,
152
+ ),
153
+ width,
143
154
  ),
144
155
  );
145
156
  lines.push("");
@@ -150,7 +161,7 @@ export class HideProviderSelectorComponent implements Component {
150
161
  lines.push(...this.footerText.render(width));
151
162
  lines.push(...new DynamicBorder((s) => this.theme.fg("accent", s)).render(width));
152
163
 
153
- return lines;
164
+ return lines.map((line) => truncateToWidth(line, width, ""));
154
165
  }
155
166
 
156
167
  handleInput(data: string): void {