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

Function group

packages/app/src/context/comments.tsx:69–80  ·  view source on GitHub ↗
(comments: LineComment[])

Source from the content-addressed store, hash-verified

67}
68
69function group(comments: LineComment[]) {
70 return comments.reduce<Record<string, LineComment[]>>((acc, comment) => {
71 const list = acc[comment.file]
72 const next = cloneComment(comment)
73 if (list) {
74 list.push(next)
75 return acc
76 }
77 acc[comment.file] = [next]
78 return acc
79 }, {})
80}
81
82function createCommentSessionState(store: Store<CommentStore>, setStore: SetStoreFunction<CommentStore>) {
83 const [state, setState] = createStore({

Callers 2

replaceFunction · 0.70
WhichKeyPanelFunction · 0.50

Calls 2

cloneCommentFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected