Skip to content

fix: project persisted context messages - #195

Merged
kermanx merged 1 commit into
mainfrom
xtr/project-context-messages
May 29, 2026
Merged

fix: project persisted context messages#195
kermanx merged 1 commit into
mainfrom
xtr/project-context-messages

Conversation

@kermanx

@kermanx kermanx commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue. This follows maintainer-requested cleanup of context projection behavior.

Problem

Context projection was dropping persisted UserPromptSubmit hook results and blocked prompts before building model input. It also kept an unused ephemeral injection API and relied on message text envelopes to decide whether adjacent user messages could be merged, which made projection behavior harder to reason about from message metadata.

What changed

  • Removed the unused ephemeral injection argument and rendering path from context projection.
  • Project persisted hook results and blocked prompt records into model context while still filtering partial messages and empty assistant placeholders.
  • Merge adjacent user messages only when both messages have real user origin, keeping synthetic or missing-origin user-role messages separate.
  • Updated hook documentation, changeset, and tests/snapshots for the new projection behavior.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented May 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 04bfa4c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@moonshot-ai/agent-core Patch
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

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

@pkg-pr-new

pkg-pr-new Bot commented May 29, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@04bfa4c
npx https://pkg.pr.new/@moonshot-ai/kimi-code@04bfa4c

commit: 04bfa4c

@kermanx
kermanx merged commit 3a0e060 into main May 29, 2026
7 checks passed
@kermanx
kermanx deleted the xtr/project-context-messages branch May 29, 2026 06:43
@github-actions github-actions Bot mentioned this pull request May 29, 2026
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