Add MCP server (v1 read-only): toggle, per-pane gate, panel UI
This commit is contained in:
parent
6068522ee3
commit
83d8932c98
15 changed files with 1235 additions and 7 deletions
|
|
@ -123,6 +123,12 @@
|
|||
color: #f0c060;
|
||||
border-color: #c98a1f;
|
||||
}
|
||||
.bcast-chip.mcp-chip.on {
|
||||
/* Green for MCP-allowed — clearly distinct from broadcast's orange. */
|
||||
background: #1a3a1a;
|
||||
color: #80e080;
|
||||
border-color: #2a6a2a;
|
||||
}
|
||||
|
||||
.distro-menu {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -418,6 +418,22 @@ export default function LeafPane({ leaf }: { leaf: LeafNode }) {
|
|||
📡
|
||||
</button>
|
||||
|
||||
<button
|
||||
className={`bcast-chip mcp-chip${leaf.mcpAllow ? " on" : ""}`}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
orch.toggleMcpAllow(leaf.id);
|
||||
}}
|
||||
title={
|
||||
leaf.mcpAllow
|
||||
? "MCP can see this pane — click to revoke"
|
||||
: "MCP cannot see this pane — click to allow (only matters when the MCP server is on)"
|
||||
}
|
||||
aria-pressed={leaf.mcpAllow ? "true" : "false"}
|
||||
>
|
||||
🤖
|
||||
</button>
|
||||
|
||||
{isIdle && statusOk ? (
|
||||
<span className="pane-status idle" title={`No output for ${IDLE_THRESHOLD_MS / 1000}s+`}>
|
||||
idle
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ export interface Orchestration {
|
|||
setShell: (leafId: NodeId, spec: LeafShellSpec) => void;
|
||||
setLabel: (leafId: NodeId, label: string | undefined) => void;
|
||||
toggleBroadcast: (leafId: NodeId) => void;
|
||||
/** Flip the per-pane mcpAllow flag. Default-deny; chip in the pane
|
||||
* toolbar drives this. */
|
||||
toggleMcpAllow: (leafId: NodeId) => void;
|
||||
|
||||
// SSH host management
|
||||
openHostManager: () => void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue