MCPcopy
hub / github.com/marimo-team/marimo / parseTypedCommand

Function parseTypedCommand

packages/lsp/index.ts:106–128  ·  view source on GitHub ↗
(typedCommand: string)

Source from the content-addressed store, hash-verified

104}
105
106export function parseTypedCommand(typedCommand: string): string[] {
107 if (!typedCommand.includes(":")) {
108 // Fallback for old format - simple split by spaces
109 return typedCommand.split(" ");
110 }
111
112 const colonIndex = typedCommand.indexOf(":");
113 const serverType = typedCommand.substring(0, colonIndex);
114 const binaryPath = typedCommand.substring(colonIndex + 1);
115
116 switch (serverType) {
117 case "copilot":
118 return ["node", binaryPath, "--stdio"];
119 case "basedpyright":
120 return [binaryPath, "--stdio"];
121 case "pyrefly":
122 return [binaryPath, "lsp"];
123 case "ty":
124 return [binaryPath, "server"];
125 default:
126 throw new Error(`Unknown LSP server type: ${serverType}`);
127 }
128}
129
130function handleWebSocketConnection(
131 languageServerCommand: string[],

Callers 2

index.test.tsFile · 0.90
mainFunction · 0.85

Calls 2

indexOfMethod · 0.80
splitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…