pi-chrome 0.15.6 → 0.15.7
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable user-facing changes to `pi-chrome`.
|
|
4
4
|
|
|
5
|
+
## 0.15.7 — 2026-05-14
|
|
6
|
+
|
|
7
|
+
- **Grouped `/chrome` menu.** Bare `/chrome` now opens a status dashboard with grouped actions: authorize, lock, status, doctor, background/watch mode, and onboard. Authorize/background open submenus instead of showing one flat command list.
|
|
8
|
+
|
|
5
9
|
## 0.15.6 — 2026-05-14
|
|
6
10
|
|
|
7
11
|
- **Bare `/chrome` is now a command menu.** Running `/chrome` shows interactive options for every `/chrome ...` command, including authorize/revoke/status/doctor/onboard/background variants.
|
|
@@ -700,39 +700,57 @@ Usage rules:
|
|
|
700
700
|
ctx.ui.notify(await statusSummary(), "info");
|
|
701
701
|
};
|
|
702
702
|
|
|
703
|
+
const openAuthorizeMenu = async (ctx: ExtensionContext): Promise<void> => {
|
|
704
|
+
const choice = await ctx.ui.select("Authorize Chrome control", [
|
|
705
|
+
"This Pi session",
|
|
706
|
+
"15 minutes",
|
|
707
|
+
"1 hour",
|
|
708
|
+
"One Chrome command",
|
|
709
|
+
"Auth status",
|
|
710
|
+
]);
|
|
711
|
+
if (!choice) return;
|
|
712
|
+
switch (choice) {
|
|
713
|
+
case "This Pi session": return authorizeHandler(ctx, "session");
|
|
714
|
+
case "15 minutes": return authorizeHandler(ctx, "15m");
|
|
715
|
+
case "1 hour": return authorizeHandler(ctx, "1h");
|
|
716
|
+
case "One Chrome command": return authorizeHandler(ctx, "once");
|
|
717
|
+
case "Auth status": return authorizeHandler(ctx, "status");
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
const openBackgroundMenu = async (ctx: ExtensionContext): Promise<void> => {
|
|
722
|
+
const choice = await ctx.ui.select("Background / watch mode", [
|
|
723
|
+
"Toggle background mode",
|
|
724
|
+
"Run in background",
|
|
725
|
+
"Bring Chrome forward",
|
|
726
|
+
"Background status",
|
|
727
|
+
]);
|
|
728
|
+
if (!choice) return;
|
|
729
|
+
switch (choice) {
|
|
730
|
+
case "Toggle background mode": return backgroundHandler(ctx, "toggle");
|
|
731
|
+
case "Run in background": return backgroundHandler(ctx, "on");
|
|
732
|
+
case "Bring Chrome forward": return backgroundHandler(ctx, "off");
|
|
733
|
+
case "Background status": return backgroundHandler(ctx, "status");
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
|
|
703
737
|
const openCommandMenu = async (ctx: ExtensionContext): Promise<void> => {
|
|
704
|
-
const choice = await ctx.ui.select(
|
|
705
|
-
"
|
|
706
|
-
"
|
|
707
|
-
"
|
|
708
|
-
"/
|
|
709
|
-
"/
|
|
710
|
-
"/
|
|
711
|
-
"/chrome status",
|
|
712
|
-
"/chrome doctor",
|
|
713
|
-
"/chrome onboard",
|
|
714
|
-
"/chrome background",
|
|
715
|
-
"/chrome background toggle",
|
|
716
|
-
"/chrome background on",
|
|
717
|
-
"/chrome background off",
|
|
718
|
-
"/chrome background status",
|
|
738
|
+
const choice = await ctx.ui.select(`pi-chrome\n${await statusSummary()}`, [
|
|
739
|
+
"Authorize Chrome control…",
|
|
740
|
+
"Lock Chrome control",
|
|
741
|
+
"Connection status",
|
|
742
|
+
"Doctor / troubleshoot",
|
|
743
|
+
"Background / watch mode…",
|
|
744
|
+
"Install / onboard extension",
|
|
719
745
|
]);
|
|
720
746
|
if (!choice) return;
|
|
721
747
|
switch (choice) {
|
|
722
|
-
case "
|
|
723
|
-
case "
|
|
724
|
-
case "
|
|
725
|
-
case "/
|
|
726
|
-
case "/
|
|
727
|
-
case "/
|
|
728
|
-
case "/chrome status": return statusHandler(ctx);
|
|
729
|
-
case "/chrome doctor": return doctorHandler(ctx);
|
|
730
|
-
case "/chrome onboard": return onboardHandler(ctx);
|
|
731
|
-
case "/chrome background": return backgroundHandler(ctx, "");
|
|
732
|
-
case "/chrome background toggle": return backgroundHandler(ctx, "toggle");
|
|
733
|
-
case "/chrome background on": return backgroundHandler(ctx, "on");
|
|
734
|
-
case "/chrome background off": return backgroundHandler(ctx, "off");
|
|
735
|
-
case "/chrome background status": return backgroundHandler(ctx, "status");
|
|
748
|
+
case "Authorize Chrome control…": return openAuthorizeMenu(ctx);
|
|
749
|
+
case "Lock Chrome control": return revokeHandler(ctx);
|
|
750
|
+
case "Connection status": return statusHandler(ctx);
|
|
751
|
+
case "Doctor / troubleshoot": return doctorHandler(ctx);
|
|
752
|
+
case "Background / watch mode…": return openBackgroundMenu(ctx);
|
|
753
|
+
case "Install / onboard extension": return onboardHandler(ctx);
|
|
736
754
|
}
|
|
737
755
|
};
|
|
738
756
|
|