From aed152b5300cf8e4be03565d6cd483ec98f166fa Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Fri, 25 Apr 2025 19:42:24 -0700 Subject: [PATCH] narrative narrative narrative (#3121) * notice * changeset --- .changeset/loud-spies-deny.md | 5 +++++ src/core/task/index.ts | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 .changeset/loud-spies-deny.md 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")