@jopqior/pi-subagents-model-selector 1.0.0 → 1.0.2
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 -0
- package/package.json +2 -2
- package/src/selection-form.ts +4 -8
package/README.md
CHANGED
|
@@ -6,6 +6,10 @@ Ask for model and thinking before every new in-process `@jopqior/pi-subagents` c
|
|
|
6
6
|
|
|
7
7
|
Installing or upgrading the core alone does not change selection.
|
|
8
8
|
|
|
9
|
+
> **Source history:** the repository's git history was restored to the original upstream merge graph.
|
|
10
|
+
> Already-published npm artifacts are unchanged, and artifacts published after that restoration are built from the restored history.
|
|
11
|
+
> See [History restoration](https://github.com/Jopqior/gotgenes-pi-packages/blob/main/docs/history-restoration.md) for what this means for old commit links and existing clones.
|
|
12
|
+
|
|
9
13
|
## Install
|
|
10
14
|
|
|
11
15
|
Load **after** `@jopqior/pi-subagents`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jopqior/pi-subagents-model-selector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Pi extension that asks for model and thinking before every new pi-subagents run.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@earendil-works/pi-tui": ">=0.84.4"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@jopqior/pi-subagents": "^1.0.
|
|
51
|
+
"@jopqior/pi-subagents": "^1.0.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@biomejs/biome": "^2.5.11",
|
package/src/selection-form.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
8
8
|
import { modelsAreEqual } from "@earendil-works/pi-ai";
|
|
9
|
+
import { fuzzyFilter } from "@earendil-works/pi-tui";
|
|
9
10
|
import type { SpawnSelection } from "@jopqior/pi-subagents";
|
|
10
11
|
import { getModelSelectorSearchText } from "./model-search-text";
|
|
11
12
|
|
|
@@ -353,14 +354,9 @@ function filterModels(
|
|
|
353
354
|
if (!query) {
|
|
354
355
|
return models;
|
|
355
356
|
}
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
.filter((token) => token.length > 0);
|
|
360
|
-
const filtered = models.filter((model) => {
|
|
361
|
-
const text = modelHaystack(model, input).toLowerCase();
|
|
362
|
-
return tokens.every((token) => text.includes(token.toLowerCase()));
|
|
363
|
-
});
|
|
357
|
+
const filtered = fuzzyFilter([...models], query, (model) =>
|
|
358
|
+
modelHaystack(model, input),
|
|
359
|
+
);
|
|
364
360
|
if (!isDefaultSearch(query)) {
|
|
365
361
|
return filtered;
|
|
366
362
|
}
|