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

Function editorSelectionKey

packages/tui/src/context/editor.ts:376–388  ·  view source on GitHub ↗
(selection: EditorSelection | undefined)

Source from the content-addressed store, hash-verified

374}
375
376export function editorSelectionKey(selection: EditorSelection | undefined) {
377 if (!selection) return ""
378 return [
379 selection.filePath,
380 ...selection.ranges.flatMap((range) => [
381 range.selection.start.line,
382 range.selection.start.character,
383 range.selection.end.line,
384 range.selection.end.character,
385 range.text,
386 ]),
387 ].join("\0")
388}
389
390function openEditorSocket(connection: EditorConnection, WebSocketImpl: typeof WebSocket) {
391 if (!connection.authToken) return new WebSocketImpl(connection.url)

Callers 4

PromptFunction · 0.90
dismissEditorContextFunction · 0.90
setSelectionFunction · 0.85
connectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected