Skip to content

Commit 55a9ea0

Browse files
committed
wip
1 parent 5486d31 commit 55a9ea0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/msgfmt/msgfmt.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,16 @@ func formatCodexMessage(message string, userInput string) string {
258258
func formatOpencodeMessage(message string, userInput string) string {
259259
fmt.Println("\n\n\n\n\n")
260260
fmt.Println("===================================")
261-
if len(message) > 10 {
262-
fmt.Println(message[len(message)-7:])
261+
lines := strings.Split(message, "\n")
262+
if len(lines) > 10 {
263+
for _, data := range lines[len(lines)-7:] {
264+
fmt.Println(data)
265+
}
266+
fmt.Println(lines[len(lines)-7:])
263267
}
264268
fmt.Println("===================================")
265269
fmt.Println("\n\n\n\n\n")
266-
//message = RemoveUserInput(message, userInput, AgentTypeOpencode)
270+
message = RemoveUserInput(message, userInput, AgentTypeOpencode)
267271
//message = removeOpencodeMessageBox(message)
268272
//message = trimEmptyLines(message)
269273
return message

0 commit comments

Comments
 (0)