mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
docs: document the OpenCode client migration surfaces (OM-179)
Adds JSDoc comments to the functions this branch adds or changes, so the touched-code docstring coverage clears the review threshold. Comments only; no code, formatting or import changes.
This commit is contained in:
1 parent
64e87ba1ea
commit
6297403a41
41 files changed
+691
No files matched your search
@@ -29,6 +29,12 @@ interface NewestPageRead {
|
||||
|
||||
const TRANSCRIPT_FALLBACK_POLL_INTERVAL_MS = 5000
|
||||
|
||||
/**
|
||||
* Returns the live transcript for one session: messages, pending tool calls, and status, kept
|
||||
* current by applying stream events on animation frames and re-reading the newest page whenever
|
||||
* events are missed or the stream reconnects. `fetchOlder` pages backwards through history, and
|
||||
* polling stands in while the stream is not healthy.
|
||||
*/
|
||||
export function useSessionTranscript(sessionID: string, directory: string) {
|
||||
const serverId = useOpenCodeServerId()
|
||||
const isRemoteServer = !isLocalOpenCodeServer(serverId)
|
||||
@@ -137,6 +143,10 @@ export function useSessionTranscript(sessionID: string, directory: string) {
|
||||
void readNewestPage().catch(() => undefined)
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the events queued since the last frame to the cached transcript and requests a resync
|
||||
* when the projection reports the cache fell behind.
|
||||
*/
|
||||
const flush = () => {
|
||||
frameRef.current = null
|
||||
const events = queuedEventsRef.current
|
||||
|
||||
Reference in new issue
Block a user