From 8a189aff2c8c893cce518c55bd914edf547876c7 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Tue, 25 Feb 2025 17:46:27 -0500 Subject: [PATCH 1/2] v3.7.5 --- .changeset/cold-poems-change.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cold-poems-change.md diff --git a/.changeset/cold-poems-change.md b/.changeset/cold-poems-change.md new file mode 100644 index 0000000000..41693ccdfc --- /dev/null +++ b/.changeset/cold-poems-change.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +v3.7.5 From 8ec903dd8d886f32aae02fd9a15782d85364030e Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Tue, 25 Feb 2025 17:58:04 -0500 Subject: [PATCH 2/2] Fix typo --- src/core/sliding-window/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/sliding-window/index.ts b/src/core/sliding-window/index.ts index 056358c119..a0fff05ea5 100644 --- a/src/core/sliding-window/index.ts +++ b/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) }