fix: remove redundant length guard and fix compact type indentation
This commit is contained in:
parent
d21d4e035a
commit
60163ccf50
|
|
@ -879,7 +879,7 @@ export class AgentRunner {
|
|||
strategy: Extract<ContextStrategy, { type: 'compact' }>,
|
||||
): LLMMessage[] {
|
||||
const estimated = estimateTokens(messages)
|
||||
if (estimated <= strategy.maxTokens || messages.length < 4) {
|
||||
if (estimated <= strategy.maxTokens) {
|
||||
return messages
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue