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.
- package/extensions/shared.ts +7 -7
- package/package.json +1 -1
package/extensions/shared.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
15
|
-
return Object.prototype.hasOwnProperty.call(map, piLevel) && map[piLevel] !== null;
|
|
15
|
+
return true;
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|