@narumitw/pi-btw 0.61.1 → 0.61.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/dist/index.ts +3 -0
- package/dist/index.ts.map +2 -2
- package/package.json +4 -4
- package/src/fullscreen-ui.ts +6 -0
- package/src/keybindings.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-btw",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.2",
|
|
4
4
|
"description": "Pi extension that adds a /btw side-question command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"prepack": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@earendil-works/pi-ai": "
|
|
36
|
-
"@earendil-works/pi-coding-agent": "
|
|
37
|
-
"@earendil-works/pi-tui": "
|
|
35
|
+
"@earendil-works/pi-ai": "1.2.0",
|
|
36
|
+
"@earendil-works/pi-coding-agent": "1.2.0",
|
|
37
|
+
"@earendil-works/pi-tui": "1.2.0",
|
|
38
38
|
"esbuild": "0.28.2",
|
|
39
39
|
"typescript": "7.0.2"
|
|
40
40
|
},
|
package/src/fullscreen-ui.ts
CHANGED
|
@@ -258,6 +258,12 @@ function normalizedKeyId(key: string): string {
|
|
|
258
258
|
const parts = key.toLowerCase().split("+");
|
|
259
259
|
const base = parts.at(-1);
|
|
260
260
|
if (!base) return "";
|
|
261
|
+
const configuredModifiers = parts.slice(0, -1);
|
|
262
|
+
if (
|
|
263
|
+
new Set(configuredModifiers).size !== configuredModifiers.length ||
|
|
264
|
+
configuredModifiers.some((modifier) => !KEY_MODIFIER_ORDER.includes(modifier as never))
|
|
265
|
+
)
|
|
266
|
+
return "";
|
|
261
267
|
const normalizedBase = base === "esc" ? "escape" : base === "return" ? "enter" : base;
|
|
262
268
|
const modifiers = KEY_MODIFIER_ORDER.filter((modifier) => parts.includes(modifier));
|
|
263
269
|
return [...modifiers, normalizedBase].join("+");
|
package/src/keybindings.ts
CHANGED
|
@@ -48,7 +48,7 @@ const LEGACY_INPUTS = [
|
|
|
48
48
|
...FUNCTION_INPUTS.map((suffix) => `\u001b${suffix}`),
|
|
49
49
|
];
|
|
50
50
|
|
|
51
|
-
/** Strict settings syntax;
|
|
51
|
+
/** Strict settings syntax; reject unknown and duplicate modifier tokens. */
|
|
52
52
|
export function normalizeBtwKey(value: unknown): string | undefined {
|
|
53
53
|
if (typeof value !== "string" || value.length > 80 || /[\s\p{Cc}]/u.test(value)) return undefined;
|
|
54
54
|
const parts = value.toLowerCase().split("+");
|