pi-set-model 0.1.4 → 0.1.6
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/CHANGELOG.md +17 -0
- package/LICENSE +280 -277
- package/README.md +45 -45
- package/package.json +41 -38
- package/set-model.ts +276 -255
package/README.md
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
# pi-set-model
|
|
2
|
-
|
|
3
|
-
Remembers Pi's selected model and thinking level for each project folder. Requires Pi 0.84.1 or newer (tested with the current Pi 0.84.
|
|
4
|
-
|
|
5
|
-
After selecting a model and thinking level, explicitly save that combination for the current working directory with `/set-model set`. New Pi sessions opened in that directory restore it, rather than retaining the model selected in another project. Later `/model`
|
|
6
|
-
|
|
7
|
-
Preferences are stored in the project at `.pi/set-model.json`; they are never shared with another project. Pi must trust the project before the extension reads or writes this project-local setting.
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
> **Avoid duplicate installation.** Install this npm package or the GitHub bundle, not both. Loading both copies can duplicate commands and preference-restoration handlers.
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
pi install npm:pi-set-model
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Or install the full collection:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
pi install git:git@github.com:hknet/pi-extensions@main
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Commands
|
|
24
|
-
|
|
25
|
-
```text
|
|
26
|
-
/set-model # view the saved preference for this folder
|
|
27
|
-
/set-model view # view the saved preference for this folder
|
|
28
|
-
/set-model set # save the active model and thinking level
|
|
29
|
-
/set-model clear # stop restoring a preference for this folder
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Autocomplete completes `/setm...` to `/set-model` without adding a trailing space, then offers `view`, `set`, and `clear`.
|
|
33
|
-
|
|
34
|
-
The folder is Pi's current working directory. Run Pi from the project root when you want one preference for the whole project. The setting is saved at `<cwd>/.pi/set-model.json`.
|
|
35
|
-
|
|
36
|
-
If the saved model is unavailable or has no configured API key, Pi keeps the active model and shows a warning. Empty or malformed preference fields are ignored. Thinking levels are restored after the model and explicitly clamped with Pi's model-capability helper; the restore notice identifies an unsupported saved level. When the session ends, the model and thinking level that were active before the project preference was applied are restored.
|
|
37
|
-
|
|
38
|
-
## Issues and feedback
|
|
39
|
-
|
|
40
|
-
Found a bug or have a feature request? Please report it on
|
|
41
|
-
[GitHub Issues](https://github.com/hknet/pi-extensions/issues).
|
|
42
|
-
|
|
43
|
-
For security vulnerabilities, please use
|
|
44
|
-
[GitHub's private vulnerability reporting](https://github.com/hknet/pi-extensions/security/advisories/new)
|
|
45
|
-
instead of opening a public issue.
|
|
1
|
+
# pi-set-model
|
|
2
|
+
|
|
3
|
+
Remembers Pi's selected model and thinking level for each project folder. Requires Pi 0.84.1 or newer (tested with the current Pi 0.84.3 release).
|
|
4
|
+
|
|
5
|
+
After selecting a model and thinking level, explicitly save that combination for the current working directory with `/set-model set`. New Pi sessions opened in that directory restore it, rather than retaining the model selected in another project. Later thinking-level changes for the saved model automatically update the preference to match Pi's footer. A later `/model` change does not replace the saved project model unless you run `/set-model set` again.
|
|
6
|
+
|
|
7
|
+
Preferences are stored in the project at `.pi/set-model.json`; they are never shared with another project. Pi must trust the project before the extension reads or writes this project-local setting.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
> **Avoid duplicate installation.** Install this npm package or the GitHub bundle, not both. Loading both copies can duplicate commands and preference-restoration handlers.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pi install npm:pi-set-model
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or install the full collection:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pi install git:git@github.com:hknet/pi-extensions@main
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
/set-model # view the saved preference for this folder
|
|
27
|
+
/set-model view # view the saved preference for this folder
|
|
28
|
+
/set-model set # save the active model and thinking level
|
|
29
|
+
/set-model clear # stop restoring a preference for this folder
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Autocomplete completes `/setm...` to `/set-model` without adding a trailing space, then offers `view`, `set`, and `clear`.
|
|
33
|
+
|
|
34
|
+
The folder is Pi's current working directory. Run Pi from the project root when you want one preference for the whole project. The setting is saved at `<cwd>/.pi/set-model.json`.
|
|
35
|
+
|
|
36
|
+
If the saved model is unavailable or has no configured API key, Pi keeps the active model and shows a warning. Empty or malformed preference fields are ignored. Thinking levels are restored after the model and explicitly clamped with Pi's model-capability helper; the restore notice identifies an unsupported saved level. When the session ends, the model and thinking level that were active before the project preference was applied are restored.
|
|
37
|
+
|
|
38
|
+
## Issues and feedback
|
|
39
|
+
|
|
40
|
+
Found a bug or have a feature request? Please report it on
|
|
41
|
+
[GitHub Issues](https://github.com/hknet/pi-extensions/issues).
|
|
42
|
+
|
|
43
|
+
For security vulnerabilities, please use
|
|
44
|
+
[GitHub's private vulnerability reporting](https://github.com/hknet/pi-extensions/security/advisories/new)
|
|
45
|
+
instead of opening a public issue.
|
package/package.json
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-set-model",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Pi extension that remembers model and thinking level per project folder",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"private": false,
|
|
7
|
-
"keywords": ["pi-package", "pi", "extension", "model", "thinking", "project"],
|
|
8
|
-
"license": "EUPL-1.2",
|
|
9
|
-
"author":
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"@earendil-works/pi-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"@earendil-works/pi-
|
|
31
|
-
"optional": true
|
|
32
|
-
},
|
|
33
|
-
"@earendil-works/pi-
|
|
34
|
-
"optional": true
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-set-model",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "Pi extension that remembers model and thinking level per project folder",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"keywords": ["pi-package", "pi", "extension", "model", "thinking", "project"],
|
|
8
|
+
"license": "EUPL-1.2",
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "KAPPER NETWORK-COMMUNICATIONS GmbH",
|
|
11
|
+
"url": "https://kapper.net"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/hknet/pi-extensions.git",
|
|
16
|
+
"directory": "packages/pi-set-model"
|
|
17
|
+
},
|
|
18
|
+
"bugs": { "url": "https://github.com/hknet/pi-extensions/issues" },
|
|
19
|
+
"homepage": "https://github.com/hknet/pi-extensions/tree/main/packages/pi-set-model#readme",
|
|
20
|
+
"files": ["set-model.ts", "README.md", "CHANGELOG.md"],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=22.19.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@earendil-works/pi-ai": "*",
|
|
26
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
27
|
+
"@earendil-works/pi-tui": "*"
|
|
28
|
+
},
|
|
29
|
+
"peerDependenciesMeta": {
|
|
30
|
+
"@earendil-works/pi-ai": {
|
|
31
|
+
"optional": true
|
|
32
|
+
},
|
|
33
|
+
"@earendil-works/pi-coding-agent": {
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
"@earendil-works/pi-tui": {
|
|
37
|
+
"optional": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"pi": { "extensions": ["./set-model.ts"] }
|
|
41
|
+
}
|