bermudis-pi-goodies 0.5.0 → 0.5.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 +1 -1
- package/fixed-defaults.ts +3 -12
- package/model-thinking.ts +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ extensions. One entry point, ten independent features.
|
|
|
21
21
|
After publishing the package to npm:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
pi install npm:bermudis-pi-goodies@0.5.
|
|
24
|
+
pi install npm:bermudis-pi-goodies@0.5.2
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Remove any old `bermudis-pi-goodies.ts` symlink before reloading Pi. Each
|
package/fixed-defaults.ts
CHANGED
|
@@ -332,18 +332,9 @@ export default function fixedDefaults(
|
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
await schedule(ctx, "[fixed-defaults] failed to apply override:");
|
|
339
|
-
} catch {
|
|
340
|
-
ctx.ui.notify(
|
|
341
|
-
"Defaults saved, but applying them to settings.json failed.",
|
|
342
|
-
"warning",
|
|
343
|
-
);
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
|
|
335
|
+
// The active model is already Pi's current selection. Do not rewrite
|
|
336
|
+
// settings here: that write is unnecessary and must not take ownership
|
|
337
|
+
// of Pi's native defaultThinkingLevel persistence.
|
|
347
338
|
ctx.ui.notify(
|
|
348
339
|
`Pinned ${model.provider}/${model.id} as the startup model`,
|
|
349
340
|
"info",
|
package/model-thinking.ts
CHANGED
|
@@ -218,11 +218,19 @@ export default function modelThinking(
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
pi.on("model_select", (event, ctx) => {
|
|
221
|
-
|
|
221
|
+
// When Pi restores a model from session history (e.g. resume/fork), keep
|
|
222
|
+
// the thinking level that was active in that session instead of
|
|
223
|
+
// overwriting it with the per-model default.
|
|
224
|
+
if (event.source === "restore") return;
|
|
225
|
+
apply(ctx, false);
|
|
222
226
|
});
|
|
223
227
|
|
|
224
|
-
pi.on("session_start", (
|
|
228
|
+
pi.on("session_start", (event, ctx) => {
|
|
225
229
|
if (!ctx.model) return;
|
|
230
|
+
// Resumed or forked sessions already carry their last thinking level
|
|
231
|
+
// (restored by Pi from the session's branch). Don't clobber it with
|
|
232
|
+
// the per-model default; the default only applies to fresh sessions.
|
|
233
|
+
if (event.reason === "resume" || event.reason === "fork") return;
|
|
226
234
|
apply(ctx, true);
|
|
227
235
|
});
|
|
228
236
|
|