pi-arsenal 0.1.3 → 0.2.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/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
  | Module | What it does |
19
19
  |---|---|
20
20
  | **Workspace Drawer** | Projects, files, computer browser, usage, Mermaid gallery, Session Library, optional Translation Studio, Skill Library, and MCP Server browser. |
21
- | **Session Library** | Inspect sessions, rename them, add private descriptions, reload in the current window, and delete non-current sessions. |
21
+ | **Session Library** | Start a fresh session in the current window; inspect sessions, rename them, add private descriptions, reload in the current window, and delete non-current sessions. |
22
22
  | **Skill Library** | Browse enabled/disabled skills by folder; add private labels; enable/disable skills or folders; organize folders; prepare `/skill:<name>` commands. |
23
23
  | **MCP Server Browser** | Read cached MCP servers and tools without displaying secrets. |
24
24
  | **Task Panel** | Shows the active plan, enforces one-step-at-a-time status progression, and prevents an unfinished plan from being replaced without explicit user approval. |
@@ -142,13 +142,13 @@ function paint(line: string, colors: string, theme: Theme): string {
142
142
 
143
143
  function splash(theme: Theme, width: number): string[] {
144
144
  const label = `${theme.bold(theme.fg("error", "◆"))}${theme.fg("text", " ID: 沫路")} ${theme.fg("dim", "// PI ARSENAL")}`;
145
- const artWidth = Math.max(...PORTRAIT.map(visibleWidth), visibleWidth(label));
146
- if (width < artWidth) return [truncateToWidth(label, width)];
147
- const center = (line: string) => " ".repeat(Math.max(0, Math.floor((width - artWidth) / 2))) + line;
148
- const logoWidth = Math.max(...ARSENAL_LOGO.map(visibleWidth));
149
- if (width < Math.max(artWidth, logoWidth)) return [truncateToWidth(label, width)];
150
- const centerLogo = (line: string) => " ".repeat(Math.max(0, Math.floor((width - logoWidth) / 2))) + theme.fg("error", line);
151
- return ["", ...PORTRAIT.map((line, index) => center(paint(line, COLOR_MASK[index] || "", theme))), "", ...ARSENAL_LOGO.map(centerLogo), center(label), ""];
145
+ // Use a single block width so PORTRAIT, ARSENAL_LOGO, and label all share
146
+ // the same centre point and never drift apart on wide terminals.
147
+ const blockWidth = Math.max(...PORTRAIT.map(visibleWidth), ...ARSENAL_LOGO.map(visibleWidth), visibleWidth(label));
148
+ if (width < blockWidth) return [truncateToWidth(label, width)];
149
+ const pad = " ".repeat(Math.max(0, Math.floor((width - blockWidth) / 2)));
150
+ const center = (line: string) => pad + line;
151
+ return ["", ...PORTRAIT.map((line, index) => center(paint(line, COLOR_MASK[index] || "", theme))), "", ...ARSENAL_LOGO.map((line) => center(theme.fg("error", line))), center(label), ""];
152
152
  }
153
153
 
154
154
  export default function startupSplash(pi: ExtensionAPI) {