@@ -20,8 +20,8 @@ const testTimeout = 10 * time.Second
2020
2121// testAgent is a goroutine-safe mock implementation of AgentIO.
2222type testAgent struct {
23- mu sync.Mutex
24- screen string
23+ mu sync.Mutex
24+ screen string
2525 // onWrite is called during Write to simulate the agent reacting to
2626 // terminal input (e.g., changing the screen), which unblocks
2727 // writeStabilize's polling loops.
@@ -53,7 +53,7 @@ type testEmitter struct{}
5353
5454func (testEmitter ) EmitMessages ([]st.ConversationMessage ) {}
5555func (testEmitter ) EmitStatus (st.ConversationStatus ) {}
56- func (testEmitter ) EmitScreen (string ) {}
56+ func (testEmitter ) EmitScreen (string ) {}
5757
5858// advanceFor is a shorthand for advanceUntil with a time-based condition.
5959func advanceFor (ctx context.Context , t * testing.T , mClock * quartz.Mock , total time.Duration ) {
@@ -226,11 +226,11 @@ func TestMessages(t *testing.T) {
226226 mClock := quartz .NewMock (t )
227227 mClock .Set (now )
228228 cfg := st.PTYConversationConfig {
229- Clock : mClock ,
230- AgentIO : agent ,
231- SnapshotInterval : 100 * time .Millisecond ,
232- ScreenStabilityLength : 200 * time .Millisecond ,
233- Logger : slog .New (slog .NewTextHandler (io .Discard , nil )),
229+ Clock : mClock ,
230+ AgentIO : agent ,
231+ SnapshotInterval : 100 * time .Millisecond ,
232+ ScreenStabilityLength : 200 * time .Millisecond ,
233+ Logger : slog .New (slog .NewTextHandler (io .Discard , nil )),
234234 }
235235 for _ , opt := range opts {
236236 opt (& cfg )
@@ -519,15 +519,15 @@ func TestInitialPromptReadiness(t *testing.T) {
519519 agent .screen = fmt .Sprintf ("__write_%d" , writeCounter )
520520 }
521521 cfg := st.PTYConversationConfig {
522- Clock : mClock ,
523- SnapshotInterval : 1 * time .Second ,
524- ScreenStabilityLength : 0 ,
525- AgentIO : agent ,
522+ Clock : mClock ,
523+ SnapshotInterval : 1 * time .Second ,
524+ ScreenStabilityLength : 0 ,
525+ AgentIO : agent ,
526526 ReadyForInitialPrompt : func (message string ) bool {
527527 return message == "ready"
528528 },
529- InitialPrompt : []st.MessagePart {st.MessagePartText {Content : "initial prompt here" }},
530- Logger : discardLogger ,
529+ InitialPrompt : []st.MessagePart {st.MessagePartText {Content : "initial prompt here" }},
530+ Logger : discardLogger ,
531531 }
532532
533533 c := st .NewPTY (ctx , cfg , & testEmitter {})
@@ -585,11 +585,11 @@ func TestInitialPromptReadiness(t *testing.T) {
585585 mClock := quartz .NewMock (t )
586586 agent := & testAgent {screen : "ready" }
587587 cfg := st.PTYConversationConfig {
588- Clock : mClock ,
589- SnapshotInterval : 1 * time .Second ,
590- ScreenStabilityLength : 2 * time .Second , // threshold = 3
591- AgentIO : agent ,
592- Logger : discardLogger ,
588+ Clock : mClock ,
589+ SnapshotInterval : 1 * time .Second ,
590+ ScreenStabilityLength : 2 * time .Second , // threshold = 3
591+ AgentIO : agent ,
592+ Logger : discardLogger ,
593593 }
594594
595595 c := st .NewPTY (ctx , cfg , & testEmitter {})
0 commit comments