pi-mcp-adapter 2.1.0 → 2.1.1

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/mcp-panel.ts +9 -23
  2. package/package.json +1 -1
package/mcp-panel.ts CHANGED
@@ -8,7 +8,6 @@ interface PanelTheme {
8
8
  title: string;
9
9
  selected: string;
10
10
  direct: string;
11
- failed: string;
12
11
  needsAuth: string;
13
12
  placeholder: string;
14
13
  description: string;
@@ -22,7 +21,6 @@ const DEFAULT_THEME: PanelTheme = {
22
21
  title: "2",
23
22
  selected: "36",
24
23
  direct: "32",
25
- failed: "31",
26
24
  needsAuth: "33",
27
25
  placeholder: "2;3",
28
26
  description: "2",
@@ -649,34 +647,22 @@ class McpPanel {
649
647
  const expandIcon = server.expanded ? "▾" : "▸";
650
648
  const prefix = isCursor ? fg(t.selected, expandIcon) : fg(t.border, server.expanded ? expandIcon : "·");
651
649
 
652
- let statusStr: string;
653
- switch (server.connectionStatus) {
654
- case "connected":
655
- statusStr = fg(t.direct, "●") + " " + fg(t.direct, "connected");
656
- break;
657
- case "idle":
658
- statusStr = fg(t.description, "○") + " " + fg(t.description, "idle");
659
- break;
660
- case "failed":
661
- statusStr = fg(t.failed, "✕") + " " + fg(t.failed, "failed");
662
- break;
663
- case "needs-auth":
664
- statusStr = fg(t.needsAuth, "⚷") + " " + fg(t.needsAuth, "needs auth");
665
- break;
666
- case "connecting":
667
- statusStr = fg(t.description, "⋯") + " " + fg(t.description, "connecting");
668
- break;
669
- }
670
-
671
650
  const nameStr = isCursor ? bold(fg(t.selected, server.name)) : server.name;
672
651
  const importLabel = server.source === "import" ? fg(t.description, ` (${server.importKind ?? "import"})`) : "";
673
652
 
674
653
  if (!server.hasCachedData) {
675
- return `${prefix} ${nameStr}${importLabel} ${statusStr} ${fg(t.description, "(not cached)")}`;
654
+ return `${prefix} ${nameStr}${importLabel} ${fg(t.description, "(not cached)")}`;
676
655
  }
677
656
 
678
657
  const directCount = server.tools.filter((t) => t.isDirect).length;
679
658
  const totalCount = server.tools.length;
659
+ let toggleIcon = fg(t.description, "○");
660
+ if (directCount === totalCount && totalCount > 0) {
661
+ toggleIcon = fg(t.direct, "●");
662
+ } else if (directCount > 0) {
663
+ toggleIcon = fg(t.needsAuth, "◐");
664
+ }
665
+
680
666
  let toolInfo = "";
681
667
  if (totalCount > 0) {
682
668
  toolInfo = `${directCount}/${totalCount}`;
@@ -687,7 +673,7 @@ class McpPanel {
687
673
  toolInfo = fg(t.description, toolInfo);
688
674
  }
689
675
 
690
- return `${prefix} ${nameStr}${importLabel} ${statusStr} ${toolInfo}`;
676
+ return `${prefix} ${toggleIcon} ${nameStr}${importLabel} ${toolInfo}`;
691
677
  }
692
678
 
693
679
  private renderToolRow(tool: ToolState, isCursor: boolean, innerW: number): string {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-mcp-adapter",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "MCP (Model Context Protocol) adapter extension for Pi coding agent",
5
5
  "type": "module",
6
6
  "license": "MIT",