pi-model-control 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.
@@ -4,15 +4,15 @@ export const DISPLAY_LEVELS = [NULL_LEVELS, "minimal", "low", "medium", "high",
4
4
 
5
5
  export function getSupportedLevels(m: any): string[] {
6
6
  if (!m.reasoning) return [NULL_LEVELS];
7
-
8
- const map = m.thinkingLevelMap;
9
- if (!map) return [NULL_LEVELS];
10
-
7
+
11
8
  return DISPLAY_LEVELS.filter((level) => {
12
- if (level === NULL_LEVELS) return true;
9
+ const piLevel = level === NULL_LEVELS ? "off" : level;
10
+
11
+ const mapped = m.thinkingLevelMap?.[piLevel];
12
+
13
+ if (mapped === null) return false;
13
14
 
14
- const piLevel = level; // "minimal", "low", "medium", "high", "max"
15
- return Object.prototype.hasOwnProperty.call(map, piLevel) && map[piLevel] !== null;
15
+ return true;
16
16
  });
17
17
  }
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-model-control",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Model and thinking level controls for pi — /variants and /thinking commands",
5
5
  "type": "module",
6
6
  "files": [