@d3ara1n/pi-command-palette 0.2.1 → 0.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/README.md +4 -2
- package/package.json +3 -2
- package/src/index.ts +4 -0
package/README.md
CHANGED
|
@@ -18,9 +18,11 @@ pi install npm:@d3ara1n/pi-command-palette
|
|
|
18
18
|
|
|
19
19
|
Or add to `~/.pi/agent/settings.json`:
|
|
20
20
|
|
|
21
|
-
```
|
|
21
|
+
```jsonc
|
|
22
22
|
{
|
|
23
|
-
"extensions": [
|
|
23
|
+
"extensions": [
|
|
24
|
+
"/absolute/path/to/pi-extensions/packages/pi-command-palette"
|
|
25
|
+
]
|
|
24
26
|
}
|
|
25
27
|
```
|
|
26
28
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d3ara1n/pi-command-palette",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Global command palette for pi — press Ctrl+Shift+P to search and run commands from anywhere",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"pi-package",
|
|
9
|
-
"pi"
|
|
9
|
+
"pi",
|
|
10
|
+
"pi-extension"
|
|
10
11
|
],
|
|
11
12
|
"peerDependencies": {
|
|
12
13
|
"@earendil-works/pi-ai": "*",
|
package/src/index.ts
CHANGED
|
@@ -199,6 +199,9 @@ async function showModelSelector(pi: ExtensionAPI, ctx: ExtensionContext): Promi
|
|
|
199
199
|
(item: SelectItem) => `${item.label} ${item.description ?? ""}`,
|
|
200
200
|
)
|
|
201
201
|
: items;
|
|
202
|
+
// FRAGILE: SelectList has no public filter/setItems API, so we poke its
|
|
203
|
+
// private filteredItems directly. If pi-tui renames it, filtering breaks
|
|
204
|
+
// silently with no compile error.
|
|
202
205
|
(selectList as any).filteredItems = filtered;
|
|
203
206
|
selectList.setSelectedIndex(0);
|
|
204
207
|
queryText.setText(theme.fg("accent", `> ${query}▎`));
|
|
@@ -302,6 +305,7 @@ async function showCommandPalette(pi: ExtensionAPI, ctx: ExtensionContext): Prom
|
|
|
302
305
|
(item: SelectItem) => `${item.label} ${item.description ?? ""}`,
|
|
303
306
|
)
|
|
304
307
|
: selectItems;
|
|
308
|
+
// FRAGILE: see model selector — depends on SelectList.filteredItems.
|
|
305
309
|
(selectList as any).filteredItems = filtered;
|
|
306
310
|
selectList.setSelectedIndex(0);
|
|
307
311
|
queryText.setText(theme.fg("accent", `> ${query}▎`));
|