MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / buildActions

Function buildActions

src/ui/components/McpPicker.tsx:53–65  ·  view source on GitHub ↗

Build the action list for a server based on its current state.

(state: McpServerState)

Source from the content-addressed store, hash-verified

51
52/** Build the action list for a server based on its current state. */
53function buildActions(state: McpServerState): string[] {
54 const actions: string[] = []
55 if (state.status === "needs-auth") actions.push("Authenticate")
56 if (state.disabled || state.status === "disabled") actions.push("Enable")
57 else actions.push("Disable")
58 actions.push("Reconnect")
59 // Delete is last so it's a deliberate choice past the everyday toggles.
60 // It's always available — disabling and re-enabling a server still leaves
61 // the config entry, which is the right behaviour when you might want it
62 // back. Delete is the explicit "I don't want this server here at all" path.
63 actions.push("Delete")
64 return actions
65}
66
67/**
68 * Interactive MCP server manager, opened by the `/mcp` command.

Callers 1

McpPickerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected