diff --git a/.changeset/loud-spies-deny.md b/.changeset/loud-spies-deny.md new file mode 100644 index 00000000..b1b59e28 --- /dev/null +++ b/.changeset/loud-spies-deny.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +add truncation notice when truncating manually diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 42407e7f..cd9d3d1f 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -1505,6 +1505,10 @@ export class Task { "quarter", // Force aggressive truncation ) await this.saveClineMessagesAndUpdateHistory() + await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( + Date.now(), + await ensureTaskDirectoryExists(this.getContext(), this.taskId), + ) this.didAutomaticallyRetryFailedApiRequest = true } else if (isOpenRouter && !this.didAutomaticallyRetryFailedApiRequest) { @@ -1515,6 +1519,10 @@ export class Task { "quarter", // Force aggressive truncation ) await this.saveClineMessagesAndUpdateHistory() + await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( + Date.now(), + await ensureTaskDirectoryExists(this.getContext(), this.taskId), + ) } console.log("first chunk failed, waiting 1 second before retrying")