pi-model-control 0.1.2 → 0.1.4
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 +4 -5
- package/package.json +1 -1
package/extensions/shared.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const NULL_LEVELS = "none";
|
|
2
2
|
|
|
3
3
|
export const DISPLAY_LEVELS = [NULL_LEVELS, "minimal", "low", "medium", "high", "max"];
|
|
4
|
-
const NULL_LEVELS = "none"
|
|
5
|
-
|
|
6
4
|
|
|
7
5
|
export function getSupportedLevels(m: any): string[] {
|
|
8
6
|
if (!m.reasoning) return [NULL_LEVELS];
|
|
@@ -11,9 +9,10 @@ export function getSupportedLevels(m: any): string[] {
|
|
|
11
9
|
if (!map) return [NULL_LEVELS];
|
|
12
10
|
|
|
13
11
|
return DISPLAY_LEVELS.filter((level) => {
|
|
14
|
-
|
|
12
|
+
if (level === NULL_LEVELS) return true;
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
const piLevel = level; // "minimal", "low", "medium", "high", "max"
|
|
15
|
+
return Object.prototype.hasOwnProperty.call(map, piLevel) && map[piLevel] !== null;
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
18
|
|