MCPcopy Create free account
hub / github.com/coder/agentapi / isScreenStableLocked

Method isScreenStableLocked

lib/screentracker/pty_conversation.go:537–548  ·  view source on GitHub ↗

isScreenStableLocked returns true if the screen content has been stable for the required number of snapshots. Caller MUST hold c.lock.

()

Source from the content-addressed store, hash-verified

535// isScreenStableLocked returns true if the screen content has been stable
536// for the required number of snapshots. Caller MUST hold c.lock.
537func (c *PTYConversation) isScreenStableLocked() bool {
538 snapshots := c.snapshotBuffer.GetAll()
539 if len(snapshots) < c.stableSnapshotsThreshold {
540 return false
541 }
542 for i := 1; i < len(snapshots); i++ {
543 if snapshots[0].screen != snapshots[i].screen {
544 return false
545 }
546 }
547 return true
548}
549
550// caller MUST hold c.lock
551func (c *PTYConversation) statusLocked() ConversationStatus {

Callers 2

StartMethod · 0.95
statusLockedMethod · 0.95

Calls 1

GetAllMethod · 0.80

Tested by

no test coverage detected