MCPcopy Index your code
hub / github.com/anomalyco/opencode / openEditorSocket

Function openEditorSocket

packages/tui/src/context/editor.ts:390–398  ·  view source on GitHub ↗
(connection: EditorConnection, WebSocketImpl: typeof WebSocket)

Source from the content-addressed store, hash-verified

388}
389
390function openEditorSocket(connection: EditorConnection, WebSocketImpl: typeof WebSocket) {
391 if (!connection.authToken) return new WebSocketImpl(connection.url)
392
393 return new WebSocketImpl(connection.url, {
394 headers: {
395 "x-claude-code-ide-authorization": connection.authToken,
396 },
397 } as any)
398}
399
400function parseMessage(value: unknown) {
401 if (typeof value !== "string") return

Callers 1

connectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected