Skip to content

Commit 934e832

Browse files
committed
style: fix gofmt indentation and update doc comments
Restore correct tab indentation in three test blocks that picked up an extra tab during editing. Add trailing newline. Update message_box.go doc comments to mention the ╌ variant.
1 parent e80b116 commit 934e832

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

lib/msgfmt/message_box.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
)
66

77
// Usually something like
8-
// ───────────────
8+
// ─────────────── (or ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌)
99
// >
10-
// ───────────────
10+
// ─────────────── (or ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌)
1111
// Used by Claude Code, Goose, and Aider.
1212
func findGreaterThanMessageBox(lines []string) int {
1313
for i := len(lines) - 1; i >= max(len(lines)-6, 0); i-- {
@@ -22,9 +22,9 @@ func findGreaterThanMessageBox(lines []string) int {
2222
}
2323

2424
// Usually something like
25-
// ───────────────
25+
// ─────────────── (or ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌)
2626
// |
27-
// ───────────────
27+
// ─────────────── (or ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌)
2828
func findGenericSlimMessageBox(lines []string) int {
2929
for i := len(lines) - 3; i >= max(len(lines)-9, 0); i-- {
3030
if (strings.Contains(lines[i], "───────────────") || strings.Contains(lines[i], "╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌")) &&

lib/screentracker/pty_conversation_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,9 @@ func TestInitialPromptReadiness(t *testing.T) {
12481248
c := st.NewPTY(ctx, cfg, &testEmitter{})
12491249
c.Start(ctx)
12501250

1251-
// Agent not ready initially, status should be changing.
1252-
advanceFor(ctx, t, mClock, 1*time.Second)
1253-
assert.Equal(t, st.ConversationStatusChanging, c.Status())
1251+
// Agent not ready initially, status should be changing.
1252+
advanceFor(ctx, t, mClock, 1*time.Second)
1253+
assert.Equal(t, st.ConversationStatusChanging, c.Status())
12541254
// Agent becomes ready, prompt gets enqueued, status becomes "changing"
12551255
agent.setScreen("ready")
12561256
advanceFor(ctx, t, mClock, 1*time.Second)
@@ -1282,9 +1282,9 @@ func TestInitialPromptReadiness(t *testing.T) {
12821282
c := st.NewPTY(ctx, cfg, &testEmitter{})
12831283
c.Start(ctx)
12841284

1285-
// Status is "changing" while waiting for readiness (prompt not yet enqueued).
1286-
advanceFor(ctx, t, mClock, 1*time.Second)
1287-
assert.Equal(t, st.ConversationStatusChanging, c.Status())
1285+
// Status is "changing" while waiting for readiness (prompt not yet enqueued).
1286+
advanceFor(ctx, t, mClock, 1*time.Second)
1287+
assert.Equal(t, st.ConversationStatusChanging, c.Status())
12881288
// Agent becomes ready. The snapshot loop detects this, enqueues the prompt,
12891289
// then sees queue + stable + ready and signals the send loop.
12901290
// writeStabilize runs with onWrite changing the screen, so it completes.
@@ -1736,12 +1736,12 @@ func TestInitialPromptSent(t *testing.T) {
17361736

17371737
// Verify no prompt was sent (should only have the initial screen message)
17381738
messages := c.Messages()
1739-
for _, msg := range messages {
1740-
if msg.Role == st.ConversationRoleUser {
1741-
t.Errorf("Unexpected user message sent: %q (empty prompt should not be restored)", msg.Message)
1742-
}
1739+
for _, msg := range messages {
1740+
if msg.Role == st.ConversationRoleUser {
1741+
t.Errorf("Unexpected user message sent: %q (empty prompt should not be restored)", msg.Message)
17431742
}
1744-
})
1743+
}
1744+
})
17451745
}
17461746

17471747
func TestSendRejectsWhenInitialPromptNotReady(t *testing.T) {
@@ -1777,4 +1777,4 @@ func TestSendRejectsWhenInitialPromptNotReady(t *testing.T) {
17771777
// Send() rejects immediately instead of blocking forever.
17781778
err := c.Send(st.MessagePartText{Content: "hello"})
17791779
assert.ErrorIs(t, err, st.ErrMessageValidationChanging)
1780-
}
1780+
}

0 commit comments

Comments
 (0)