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

Function setRef

packages/app/src/context/comments.tsx:90–93  ·  view source on GitHub ↗
(
    key: "focus" | "active",
    value: CommentFocus | null | ((value: CommentFocus | null) => CommentFocus | null),
  )

Source from the content-addressed store, hash-verified

88 const all = () => aggregate(store.comments)
89
90 const setRef = (
91 key: "focus" | "active",
92 value: CommentFocus | null | ((value: CommentFocus | null) => CommentFocus | null),
93 ) => setState(key, value)
94
95 const setFocus = (value: CommentFocus | null | ((value: CommentFocus | null) => CommentFocus | null)) =>
96 setRef("focus", value)

Callers 4

bindFunction · 0.85
setFocusFunction · 0.85
setActiveFunction · 0.85

Calls 1

setStateFunction · 0.85

Tested by

no test coverage detected