MCPcopy Create free account
hub / github.com/anomalyco/opencode / cloneSelection

Function cloneSelection

packages/app/src/context/comments.tsx:51–60  ·  view source on GitHub ↗
(selection: SelectedLineRange)

Source from the content-addressed store, hash-verified

49}
50
51function cloneSelection(selection: SelectedLineRange): SelectedLineRange {
52 const next: SelectedLineRange = {
53 start: selection.start,
54 end: selection.end,
55 }
56
57 if (selection.side) next.side = selection.side
58 if (selection.endSide) next.endSide = selection.endSide
59 return next
60}
61
62function cloneComment(comment: LineComment): LineComment {
63 return {

Callers 2

cloneCommentFunction · 0.70
addFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected