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

Function run

packages/session-ui/src/components/message-part.tsx:273–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271 }
272
273 const run = () => {
274 timeout = undefined
275 const text = getValue()
276 if (!live?.()) {
277 sync(text)
278 return
279 }
280 if (!text.startsWith(shown) || text.length <= shown.length) {
281 sync(text)
282 return
283 }
284 if (text.length - shown.length <= TEXT_RENDER_IMMEDIATE) {
285 sync(text)
286 return
287 }
288 const end = next(text, shown.length)
289 sync(text.slice(0, end))
290 if (end < text.length) timeout = setTimeout(run, TEXT_RENDER_PACE_MS)
291 }
292
293 createEffect(() => {
294 const text = getValue()

Callers

nothing calls this directly

Calls 4

syncFunction · 0.70
nextFunction · 0.70
getValueFunction · 0.50
liveFunction · 0.50

Tested by

no test coverage detected