Sfoglia il codice sorgente

Merge pull request #1198 from RooVetGit/v3.7.5

V3.7.5
Chris Estreich 10 mesi fa
parent
commit
904f369574
2 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 5 0
      .changeset/cold-poems-change.md
  2. 1 1
      src/core/sliding-window/index.ts

+ 5 - 0
.changeset/cold-poems-change.md

@@ -0,0 +1,5 @@
+---
+"roo-cline": patch
+---
+
+v3.7.5

+ 1 - 1
src/core/sliding-window/index.ts

@@ -49,5 +49,5 @@ export function truncateConversationIfNeeded(
  */
 function getMaxTokens(modelInfo: ModelInfo): number {
 	// The buffer needs to be at least as large as `modelInfo.maxTokens`, or 20% of the context window if for some reason it's not set.
-	return modelInfo.contextWindow - Math.max(modelInfo.maxTokens || modelInfo.contextWindow * 0.2)
+	return modelInfo.contextWindow - (modelInfo.maxTokens || modelInfo.contextWindow * 0.2)
 }