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

Function queueCommentFocus

packages/app/src/components/prompt-input.tsx:287–302  ·  view source on GitHub ↗
(attempts = 6)

Source from the content-addressed store, hash-verified

285 comments.setActive(focus)
286
287 const queueCommentFocus = (attempts = 6) => {
288 const schedule = (left: number) => {
289 requestAnimationFrame(() => {
290 comments.setFocus({ ...focus })
291 if (left <= 0) return
292 requestAnimationFrame(() => {
293 const current = comments.focus()
294 if (!current) return
295 if (current.file !== focus.file || current.id !== focus.id) return
296 schedule(left - 1)
297 })
298 })
299 }
300
301 schedule(attempts)
302 }
303
304 const wantsReview = item.commentOrigin === "review" || (item.commentOrigin !== "file" && commentInReview(item.path))
305 if (wantsReview) {

Callers 1

openCommentFunction · 0.85

Calls 1

scheduleFunction · 0.70

Tested by

no test coverage detected