Skip to content

Commit 6d0f987

Browse files
committed
wip
1 parent 8d51c68 commit 6d0f987

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/msgfmt/message_box.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package msgfmt
22

33
import (
4+
"fmt"
45
"strings"
56
)
67

@@ -63,6 +64,11 @@ func removeCodexInputBox(msg string) string {
6364

6465
func removeOpencodeMessageBox(msg string) string {
6566
lines := strings.Split(msg, "\n")
67+
fmt.Println("\n\n\n\n\n")
68+
fmt.Println("===================================")
69+
for i := 0; i < len(lines); i++ {
70+
fmt.Printf("%d: %s\n", i, lines[i])
71+
}
6672
// Check the last 3 lines for
6773
//
6874
// ┃ ┃
@@ -74,9 +80,12 @@ func removeOpencodeMessageBox(msg string) string {
7480
if strings.ReplaceAll(lines[i-1], " ", "") == "┃┃" &&
7581
strings.ReplaceAll(lines[i+1], " ", "") == "┃┃" &&
7682
strings.ReplaceAll(lines[i], " ", "") == "┃>┃" {
83+
fmt.Printf("Magic at line: %d, %s\n", i, lines[i])
7784
lines = lines[:i-1]
7885
break
7986
}
8087
}
88+
fmt.Println("===================================")
89+
fmt.Println("\n\n\n\n")
8190
return strings.Join(lines, "\n")
8291
}

0 commit comments

Comments
 (0)