@xynogen/pix-toolbox 0.1.14 → 0.1.15

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/toolbox.ts +8 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-toolbox",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Pi tool — gated tool toggle UI (/toolbox)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/toolbox.ts CHANGED
@@ -345,8 +345,8 @@ export default function registerToolbox(pi: ExtensionAPI): void {
345
345
  const accent = "accent";
346
346
  const mute = (s: string) => theme.fg("muted", s);
347
347
  const guide = (key: string, action: string) =>
348
- theme.fg("text", key) + theme.fg("dim", ` ${action}`);
349
- const guideSep = theme.fg("dim", " · ");
348
+ theme.fg("text", key) + theme.fg("muted", ` ${action}`);
349
+ const guideSep = theme.fg("muted", " · ");
350
350
 
351
351
  type RowState = "active" | "gated";
352
352
  const stateOf = (name: string): RowState => (ops.isActive(name) ? "active" : "gated");
@@ -354,7 +354,7 @@ export default function registerToolbox(pi: ExtensionAPI): void {
354
354
  const labelFor = (r: ToolRow): string => {
355
355
  const active = stateOf(r.name) === "active";
356
356
  const marker = active ? " " : theme.fg("warning", "#");
357
- const name = active ? theme.fg("success", r.name) : theme.fg("dim", r.name);
357
+ const name = active ? theme.fg("success", r.name) : theme.fg("muted", r.name);
358
358
  const kind = mute(`[${r.mcp ? "MCP" : "tool"}]`);
359
359
  return `${marker} ${name} ${kind}`;
360
360
  };
@@ -386,7 +386,7 @@ export default function registerToolbox(pi: ExtensionAPI): void {
386
386
  selectedPrefix: (t: string) => theme.fg(accent, t),
387
387
  selectedText: (t: string) => theme.fg(accent, t),
388
388
  description: (t: string) => t,
389
- scrollInfo: (t: string) => theme.fg("dim", t),
389
+ scrollInfo: (t: string) => theme.fg("muted", t),
390
390
  noMatch: (t: string) => theme.fg("warning", t),
391
391
  },
392
392
  {
@@ -395,6 +395,7 @@ export default function registerToolbox(pi: ExtensionAPI): void {
395
395
  },
396
396
  );
397
397
 
398
+ // SAFETY: SelectList exposes these stable fields internally for label refreshes.
398
399
  const internal = list as unknown as {
399
400
  items: SelectItem[];
400
401
  filteredItems: SelectItem[];
@@ -420,7 +421,7 @@ export default function registerToolbox(pi: ExtensionAPI): void {
420
421
  const sel = list.getSelectedItem();
421
422
  if (!sel) return;
422
423
  const msg = toggleTool(action, sel.value, rows, ops);
423
- statusText = theme.fg("muted", msg);
424
+ statusText = theme.fg("dim", msg);
424
425
  refreshLabels();
425
426
  };
426
427
 
@@ -473,7 +474,7 @@ export default function registerToolbox(pi: ExtensionAPI): void {
473
474
  minHeight: MIN_MODAL_HEIGHT,
474
475
  header: [
475
476
  theme.fg(accent, theme.bold("🧰 Toolbox")),
476
- theme.fg("muted", "Search:"),
477
+ theme.fg("dim", "Search:"),
477
478
  ...search.render(inner),
478
479
  "",
479
480
  ],
@@ -565,6 +566,7 @@ export default function registerToolbox(pi: ExtensionAPI): void {
565
566
  }
566
567
 
567
568
  if (typeof ctx.ui.custom === "function") {
569
+ // SAFETY: The runtime command context satisfies showPicker's narrowed UI contract.
568
570
  await showPicker(ctx as unknown as Parameters<typeof showPicker>[0]);
569
571
  } else {
570
572
  ctx.ui.notify(renderList(getRows(), ops.isActive), "info");