pi-better-model-select 0.3.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Fixed
6
+
7
+ - Use a public, version-pinned jsDelivr URL for the README showcase GIF so npm can display it without access to the private Forgejo repository.
8
+
9
+ ## 0.3.1
10
+
11
+ ### Fixed
12
+
13
+ - Included the README's showcase GIF in the npm package without shipping the other demo assets.
14
+ - Restored the Ctrl+D set-default hint on the main model search screen, including at 80-column widths.
15
+ - Accepting "Save and use anyway" now saves without asking for confirmation again. Default-save messages show the settings path and identify any startup override that remains.
16
+
3
17
  ## 0.3.0
4
18
 
5
19
  ### Added
package/README.md CHANGED
@@ -12,7 +12,7 @@ Run `/bms`, type to filter by name, model ID, or provider, then press Enter to s
12
12
 
13
13
  ## Compact TUI
14
14
 
15
- ![BMS model search, forms, defaults, and result placement](docs/demo/showcase.gif)
15
+ ![BMS model search, forms, defaults, and result placement](https://cdn.jsdelivr.net/npm/pi-better-model-select@0.3.1/docs/demo/showcase.gif)
16
16
 
17
17
  The picker uses aligned model, provider, context, usage, and status columns. Type in the search field in Pi's editor area. Results appear below search by default, matching Pi command completion. Choose **Options → Result placement → Above prompt** for bottom-up results with the best match nearest the search line.
18
18
 
Binary file
@@ -48,8 +48,14 @@ async function applyMainDefault(pi: any, ctx: any, provider: string, modelId: st
48
48
  setPiDefault(preview, provider, modelId, effort);
49
49
  const effective = piPreference(scope === "user" ? preview : user, scope === "project" ? preview : project);
50
50
  const shadowed = effective.provider !== provider || effective.model !== modelId || (effort !== undefined && effective.effort !== effort);
51
- if (shadowed && !(await confirmDefault(ctx, "Higher-priority settings", "Project or per-model settings override this preference at startup. Save and use your selection in this session anyway?", "Save and use anyway"))) return false;
52
- if (selectedEffort === undefined && !(await confirmDefault(ctx, "Save and use Pi default?", `${provider}/${modelId}, effort ${choice}\nScope: ${scope}\n${settingsPath(ctx.cwd, scope)}`, "Save and use"))) return false;
51
+ const path = settingsPath(ctx.cwd, scope);
52
+ const key = `${provider}/${modelId}`;
53
+ const overridePath = settingsPath(ctx.cwd, effective.provider !== provider || effective.model !== modelId || project.modelThinkingLevels?.[key] !== undefined || (scope === "user" && project.defaultThinkingLevel !== undefined) ? "project" : "user");
54
+ const summary = `${provider}/${modelId}, effort ${choice}\nScope: ${scope}\nSave to: ${path}`;
55
+ if (shadowed) {
56
+ const message = `${summary}\nHigher-priority settings in ${overridePath} still apply at startup.\nSave this preference and use your selection in this session anyway?`;
57
+ if (!(await confirmDefault(ctx, "Higher-priority settings", message, "Save and use anyway"))) return false;
58
+ } else if (selectedEffort === undefined && !(await confirmDefault(ctx, "Save and use Pi default?", summary, "Save and use"))) return false;
53
59
  // Parse before changing session state. A malformed file must never be overwritten.
54
60
  readSettings(settingsPath(ctx.cwd, scope));
55
61
  const previousModel = ctx.model;
@@ -68,7 +74,7 @@ async function applyMainDefault(pi: any, ctx: any, provider: string, modelId: st
68
74
  return false;
69
75
  }
70
76
  patchSettings(settingsPath(ctx.cwd, scope), data => setPiDefault(data, provider, modelId, effort === undefined ? undefined : applied));
71
- ctx.ui.notify(`Using ${provider}/${modelId}, effort ${applied}. Saved ${scope} Pi default.${shadowed ? " Higher-priority startup settings still apply." : ""}`, "info");
77
+ ctx.ui.notify(`Using ${provider}/${modelId}, effort ${applied}. Saved ${scope} Pi default to ${path}.${shadowed ? ` Startup still uses ${effective.provider}/${effective.model}, effort ${effective.effort ?? "automatic"}, due to ${overridePath}. Edit the overriding preference to change startup behavior.` : ""}`, "info");
72
78
  return true;
73
79
  } catch (error) {
74
80
  if (previousModel) await pi.setModel(previousModel);
@@ -102,7 +102,8 @@ export function selectListTheme(theme: any): SelectListTheme {
102
102
  };
103
103
  }
104
104
 
105
- const HINT = "↑↓ move · enter load · ctrl+a add · ctrl+o actions · esc close";
105
+ // Keep the default shortcut ahead of secondary actions so narrow terminals show it.
106
+ const HINT = "↑↓ move · enter load · ctrl+d set default · ctrl+o actions · esc close";
106
107
 
107
108
  export interface PickerOptions {
108
109
  placement?: Placement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-model-select",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "Searchable, usage-ranked model picker for Pi with model management, default model and thinking effort selection, and per-role subagent defaults.",
6
6
  "keywords": [
@@ -28,6 +28,7 @@
28
28
  "CHANGELOG.md",
29
29
  "docs/configuration.md",
30
30
  "docs/development.md",
31
+ "docs/demo/showcase.gif",
31
32
  "LICENSE"
32
33
  ],
33
34
  "pi": {