Skip to content

Commit 8c493b3

Browse files
fixed profile context condensation threshold (RooCodeInc#5230)
1 parent cd60bb3 commit 8c493b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/task/Task.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,8 @@ export class Task extends EventEmitter<ClineEvents> {
17081708

17091709
const contextWindow = modelInfo.contextWindow
17101710

1711+
const currentProfileId = state?.listApiConfigMeta.find((profile) => profile.name === state?.currentApiConfigName)?.id ?? "default";
1712+
17111713
const truncateResult = await truncateConversationIfNeeded({
17121714
messages: this.apiConversationHistory,
17131715
totalTokens: contextTokens,
@@ -1721,7 +1723,7 @@ export class Task extends EventEmitter<ClineEvents> {
17211723
customCondensingPrompt,
17221724
condensingApiHandler,
17231725
profileThresholds,
1724-
currentProfileId: state?.currentApiConfigName || "default",
1726+
currentProfileId,
17251727
})
17261728
if (truncateResult.messages !== this.apiConversationHistory) {
17271729
await this.overwriteApiConversationHistory(truncateResult.messages)

0 commit comments

Comments
 (0)