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

Function useModeViewer

packages/session-ui/src/components/file.tsx:397–405  ·  view source on GitHub ↗
(config: ModeConfig, adapter: ModeAdapter)

Source from the content-addressed store, hash-verified

395}
396
397function useModeViewer(config: ModeConfig, adapter: ModeAdapter) {
398 return useFileViewer({
399 enableLineSelection: config.enableLineSelection,
400 selectedLines: config.selectedLines,
401 commentedLines: () => config.commentedLines() ?? [],
402 onLineSelectionEnd: config.onLineSelectionEnd,
403 ...adapter,
404 })
405}
406
407function useSearchHandle(opts: {
408 search: () => FileSearchControl | undefined

Callers 2

TextViewerFunction · 0.85
DiffViewerFunction · 0.85

Calls 1

useFileViewerFunction · 0.85

Tested by

no test coverage detected