@narumitw/pi-chrome-devtools 0.6.2 → 0.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-chrome-devtools",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "Pi extension that exposes Chrome DevTools Protocol tools.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,13 +36,13 @@ const CHROME_DEVTOOLS_TOOL_NAMES = [
36
36
  "chrome_devtools_screenshot",
37
37
  ] as const;
38
38
  const COMMAND_COMPLETIONS = [
39
- { value: "help", label: "Show command usage" },
40
- { value: "quickstart", label: "Show endpoint and launch help" },
41
- { value: "status", label: "Show tool and settings status" },
42
- { value: "tools", label: "Select Chrome DevTools tools" },
43
- { value: "toggle", label: "Select Chrome DevTools tools" },
44
- { value: "enable", label: "Enable all Chrome DevTools tools" },
45
- { value: "disable", label: "Disable all Chrome DevTools tools" },
39
+ { value: "help", label: "help", description: "Show command usage" },
40
+ { value: "quickstart", label: "quickstart", description: "Show endpoint and launch help" },
41
+ { value: "status", label: "status", description: "Show tool and settings status" },
42
+ { value: "tools", label: "tools", description: "Select Chrome DevTools tools" },
43
+ { value: "toggle", label: "toggle", description: "Select Chrome DevTools tools" },
44
+ { value: "enable", label: "enable", description: "Enable all Chrome DevTools tools" },
45
+ { value: "disable", label: "disable", description: "Disable all Chrome DevTools tools" },
46
46
  ];
47
47
  const MENU_OPTIONS = {
48
48
  quickstart: "Quick start / endpoint help",
@@ -467,8 +467,8 @@ export function parseCommand(args: string): CommandAction | "unknown" {
467
467
  }
468
468
 
469
469
  export function commandCompletions(prefix: string) {
470
- const normalized = prefix.trim().toLowerCase();
471
- if (normalized.includes(" ")) return null;
470
+ const normalized = prefix.trimStart().toLowerCase();
471
+ if (/\s/.test(normalized)) return null;
472
472
 
473
473
  const matches = COMMAND_COMPLETIONS.filter((completion) =>
474
474
  completion.value.startsWith(normalized),