Skip to content

Chat: maxPersistedMessages (4.iii 6f, parity 7, draft) - #3316

Closed
mattzcarey wants to merge 1 commit into
slim/chat-fn-6f6from
slim/chat-fn-6f8
Closed

mattzcarey wants to merge 1 commit into
slim/chat-fn-6f6from
slim/chat-fn-6f8

Conversation

@mattzcarey

Copy link
Copy Markdown
Member

DRAFT, 4.iii 6f parity step 7, stacked on #3315. ChatHost.options.maxPersistedMessages (RFC ChatOptions) keeps at most that many messages: after a reply is stored, the oldest beyond the cap are deleted, as AIChatAgent's option does today. Test: with three questions and a cap of 2, after the reply the transcript is the newest question and the reply.

Cost: one history read and one delete per reply when the option is set; none otherwise.

@changeset-bot

changeset-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cdf3329

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@3316

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@3316

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@3316

hono-agents

npm i https://pkg.pr.new/hono-agents@3316

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@3316

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@3316

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@3316

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@3316

commit: cdf3329

@agent-think

agent-think Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (0fed73f7 → cdf3329a, workflow run)

@mattzcarey
mattzcarey force-pushed the slim/chat-fn-6f8 branch 2 times, most recently from 2275378 to 5feb357 Compare November 27, 2026 00:28
@mattzcarey
mattzcarey changed the base branch from slim/chat-fn-6f7 to slim/chat-fn-6f6 November 27, 2026 00:28
@mattzcarey

Copy link
Copy Markdown
Member Author

Closed to drain open PRs (COMMON, 27 Nov). This PR's commits are commits of #3361 (the switch), which now sits directly on #3298. The branch is kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant