Skip to content
This repository was archived by the owner on Sep 13, 2026. It is now read-only.

Commit 93ac955

Browse files
authored
fix: update message box formatting detection for claude (#169)
1 parent 19f5db4 commit 93ac955

6 files changed

Lines changed: 16 additions & 15 deletions

File tree

‎lib/msgfmt/message_box.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func findGreaterThanMessageBox(lines []string) int {
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], "───────────────") &&
31-
(strings.Contains(lines[i+1], "|") || strings.Contains(lines[i+1], "│")) &&
31+
(strings.Contains(lines[i+1], "|") || strings.Contains(lines[i+1], "│") || strings.Contains(lines[i+1], "❯")) &&
3232
strings.Contains(lines[i+2], "───────────────") {
3333
return i
3434
}

‎lib/msgfmt/testdata/format/claude/auto-accept-edits/msg.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
3. Use Claude to help with file analysis, editing, bash commands and git
1414
4. Be as specific as you would with another engineer for the best results
1515

16-
╭──────────────────────────────────────────────────────────────────────────────╮
17-
│ > │
18-
╰──────────────────────────────────────────────────────────────────────────────╯
16+
───────────────────────────────────────────────────────────────────
17+
❯
18+
───────────────────────────────────────────────────────────────────
1919
⏵⏵ auto-accept edits on (shift+tab to ✓ Update installed • Restart to
2020
toggle) apply

‎lib/msgfmt/testdata/format/claude/first_message/msg.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
3. Use Claude to help with file analysis, editing, bash commands and git
1414
4. Be as specific as you would with another engineer for the best results
1515

16-
╭──────────────────────────────────────────────────────────────────────────────╮
17-
│ > Try "refactor handler.go" │
18-
╰──────────────────────────────────────────────────────────────────────────────╯
16+
───────────────────────────────────────────────────────────────────
17+
❯
18+
───────────────────────────────────────────────────────────────────
1919
? for shortcuts

‎lib/msgfmt/testdata/format/claude/multi-line-input/msg.txt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
⏺ This code is from
2727
/Users/hugodutka/dev/agentapi/chat/src/components/ChatInterface.tsx
2828

29-
╭──────────────────────────────────────────────────────────────────────────────╮
30-
│ > │
29+
───────────────────────────────────────────────────────────────────
30+
❯
31+
───────────────────────────────────────────────────────────────────

‎lib/msgfmt/testdata/format/claude/remove-task-tool-call/msg.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
}
7474

7575

76-
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
77-
> 
78-
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
76+
───────────────────────────────────────────────────────────────────
77+
❯
78+
───────────────────────────────────────────────────────────────────
7979
? for shortcuts ⧉ In message_box.go
8080

‎lib/msgfmt/testdata/format/claude/second_message/msg.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
⏺ I'm doing well! How can I help you with your coding project today?
1919

20-
╭──────────────────────────────────────────────────────────────────────────────╮
21-
│ >  │
22-
╰──────────────────────────────────────────────────────────────────────────────╯
20+
───────────────────────────────────────────────────────────────────
21+
❯
22+
───────────────────────────────────────────────────────────────────
2323
? for shortcuts

0 commit comments

Comments
 (0)