Skip to content

Commit 33fdf77

Browse files
committed
fmt
1 parent ba9f6db commit 33fdf77

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ linters:
44
- exhaustive
55
settings:
66
exhaustive:
7+
default-signifies-exhaustive: true
78
check:
89
- "switch"
910
- "map"

lib/termexec/utils.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ func calcOpencodeAnimatedContent(lines []string) (int, bool) {
2020
}
2121

2222
func removeAnimatedContent(screen string, agentType msgfmt.AgentType) (string, bool) {
23-
lines := strings.Split(screen, "\n")
24-
animatedContentEnd := -1
25-
var continueRemoving bool
2623
switch agentType {
2724
case msgfmt.AgentTypeOpencode:
28-
animatedContentEnd, continueRemoving = calcOpencodeAnimatedContent(lines)
25+
lines := strings.Split(screen, "\n")
26+
animatedContentEnd, continueRemoving := calcOpencodeAnimatedContent(lines)
27+
return strings.Join(lines[animatedContentEnd+1:], "\n"), continueRemoving
2928
default:
3029
return screen, false
3130
}
32-
return strings.Join(lines[animatedContentEnd+1:], "\n"), continueRemoving
3331
}

0 commit comments

Comments
 (0)