Skip to content

Commit 2125c2e

Browse files
committed
refactor(agents): remove dead code and unused import in context_compressor
Remove stale placeholder comments and unused strings import at the end of context_compressor.go. The strings package had no remaining usage after the dead code was stripped. go import ( "fmt" "codeactor/internal/llm" "codeactor/internal/tokenutil" "codeactor/pkg/api" ) Tested with go build ./... and go test ./internal/agents/... -run TestTruncateToolResultsToBudget -v.
1 parent 844ade3 commit 2125c2e

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

internal/agents/context_compressor.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package agents
22

33
import (
44
"fmt"
5-
"strings"
65

76
"codeactor/internal/llm"
87
"codeactor/internal/tokenutil"
@@ -149,9 +148,3 @@ func TruncateToolResultsToBudget(messages []llm.Message, maxTokens, keepTokens i
149148
}
150149
return messages
151150
}
152-
153-
// truncateToTokenBudget 兼容旧签名(保留,内部实现已在上方)。
154-
// 注意:本包内调用统一使用上方已定义的版本。
155-
156-
// ensure 保证代码编译通过(此处仅为占位,实际逻辑在上方)。
157-
var _ = strings.Contains

0 commit comments

Comments
 (0)