pi-chrome 0.15.30 → 0.15.31
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,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable user-facing changes to `pi-chrome`.
|
|
4
4
|
|
|
5
|
+
## 0.15.31 — 2026-05-31
|
|
6
|
+
|
|
7
|
+
Per-session tab groups.
|
|
8
|
+
|
|
9
|
+
- **Each Pi session gets its own tab group.** Auto-grouped tabs are now named `Pi Session <name>` using the session's display name, falling back to the session id when unnamed. Multiple Pi sessions driving the same Chrome no longer share one group — each collects its tabs separately. Pass an explicit `groupTitle` to override, or `group:false` / `groupTitle:""` on `action=new` to opt out.
|
|
10
|
+
|
|
5
11
|
## 0.15.30 — 2026-05-31
|
|
6
12
|
|
|
7
13
|
Tab grouping for `chrome_tab`.
|
|
@@ -599,6 +599,14 @@ export default function (pi: ExtensionAPI): void {
|
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
+
// Tab-group title for this Pi session: prefer the user-set display name, else the session id.
|
|
603
|
+
const sessionGroupTitle = (ctx: ExtensionContext): string => {
|
|
604
|
+
const sm = ctx.sessionManager;
|
|
605
|
+
const name = sm.getSessionName?.();
|
|
606
|
+
const id = sm.getSessionId?.();
|
|
607
|
+
return `Pi Session ${name || id || "unknown"}`;
|
|
608
|
+
};
|
|
609
|
+
|
|
602
610
|
const updateChromeStatus = (ctx: ExtensionContext): void => {
|
|
603
611
|
if (chromeControlAuthorized()) {
|
|
604
612
|
ctx.ui.setStatus("chrome", ctx.ui.theme.fg("success", "●") + " Chrome Bridge");
|
|
@@ -1037,14 +1045,21 @@ Usage rules:
|
|
|
1037
1045
|
targetId: Type.Optional(Type.String({ description: "Chrome tab id for activate/close/group/ungroup." })),
|
|
1038
1046
|
urlIncludes: Type.Optional(Type.String({ description: "Match the target tab by URL substring for activate/close/group/ungroup." })),
|
|
1039
1047
|
titleIncludes: Type.Optional(Type.String({ description: "Match the target tab by title substring for activate/close/group/ungroup." })),
|
|
1040
|
-
group: Type.Optional(Type.Boolean({ description: "action=new only: pass false to open an ungrouped tab. By default every Pi-opened tab joins
|
|
1041
|
-
groupTitle: Type.Optional(Type.String({ description: "Tab group title for action=group
|
|
1048
|
+
group: Type.Optional(Type.Boolean({ description: "action=new only: pass false to open an ungrouped tab. By default every Pi-opened tab joins this session's own tab group." })),
|
|
1049
|
+
groupTitle: Type.Optional(Type.String({ description: "Tab group title for action=group/new. Defaults to this Pi session's group ('Pi Session <name-or-id>'). Pass an empty string on action=new to opt out of grouping." })),
|
|
1042
1050
|
groupColor: Type.Optional(Type.String({ description: "Tab group color for action=group/new: grey, blue, red, yellow, green, pink, purple, cyan, or orange. Defaults to blue." })),
|
|
1043
1051
|
host: Type.Optional(Type.String()),
|
|
1044
1052
|
port: Type.Optional(Type.Number()),
|
|
1045
1053
|
}),
|
|
1046
|
-
async execute(_id, params, signal): Promise<ToolTextResult> {
|
|
1047
|
-
const
|
|
1054
|
+
async execute(_id, params, signal, _onUpdate, ctx): Promise<ToolTextResult> {
|
|
1055
|
+
const forwarded = { ...params } as typeof params & { groupTitle?: string };
|
|
1056
|
+
// Default every Pi-opened/explicitly-grouped tab into this session's own group,
|
|
1057
|
+
// named after the session display name (falling back to the session id), unless
|
|
1058
|
+
// the caller specified a group title or opted out with group:false.
|
|
1059
|
+
if ((params.action === "new" || params.action === "group") && params.groupTitle === undefined && params.group !== false) {
|
|
1060
|
+
forwarded.groupTitle = sessionGroupTitle(ctx);
|
|
1061
|
+
}
|
|
1062
|
+
const result = await authorizedBridgeSend(`tab.${params.action}`, forwarded, DEFAULT_TIMEOUT_MS, signal);
|
|
1048
1063
|
if (params.action === "list") {
|
|
1049
1064
|
const tabs = result as Array<{ id: number; title: string; url: string; active: boolean; windowId: number; group?: { title?: string } | null }>;
|
|
1050
1065
|
const text = tabs.map((tab) => `${tab.id}\t${tab.active ? "*" : " "}\t${tab.group?.title ? `[${tab.group.title}] ` : ""}${tab.title || "(untitled)"}\t${tab.url}`).join("\n") || "No tabs.";
|