Skip to content

Commit 99b9c11

Browse files
committed
fix(msgfmt): teach message box detection about the elusive U+254C dashed line
Claude Code v2.1.87 decided to get fancy with its onboarding screen, using ╌ (BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL) instead of the classic ─ (BOX DRAWINGS LIGHT HORIZONTAL). Our detector stared at this new character like a cat seeing a cucumber. Add ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ as an alternative pattern in both findGreaterThanMessageBox and findGenericSlimMessageBox. Refs: #209
1 parent a80af34 commit 99b9c11

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

lib/msgfmt/message_box.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
func findGreaterThanMessageBox(lines []string) int {
1313
for i := len(lines) - 1; i >= max(len(lines)-6, 0); i-- {
1414
if strings.Contains(lines[i], ">") {
15-
if i > 0 && strings.Contains(lines[i-1], "───────────────") {
15+
if i > 0 && (strings.Contains(lines[i-1], "───────────────") || strings.Contains(lines[i-1], "╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌")) {
1616
return i - 1
1717
}
1818
return i
@@ -27,9 +27,9 @@ func findGreaterThanMessageBox(lines []string) int {
2727
// ───────────────
2828
func findGenericSlimMessageBox(lines []string) int {
2929
for i := len(lines) - 3; i >= max(len(lines)-9, 0); i-- {
30-
if strings.Contains(lines[i], "───────────────") &&
30+
if (strings.Contains(lines[i], "───────────────") || strings.Contains(lines[i], "╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌")) &&
3131
(strings.Contains(lines[i+1], "|") || strings.Contains(lines[i+1], "│") || strings.Contains(lines[i+1], "❯")) &&
32-
strings.Contains(lines[i+2], "───────────────") {
32+
(strings.Contains(lines[i+2], "───────────────") || strings.Contains(lines[i+2], "╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌")) {
3333
return i
3434
}
3535
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
1 function greet() {
2+
2 - console.log("Hello, World!");
3+
2 + console.log("Hello, Claude!");
4+
3 }
5+
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
6+
> Try "what does this code do?"
7+
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
8+
Syntax theme: Monokai Extended (ctrl+t to disable)

0 commit comments

Comments
 (0)