Skip to content

fix(agent-core): mark truncated skill descriptions with an ellipsis - #1064

Merged
RealKai42 merged 1 commit into
mainfrom
fix/skill-listing-truncation
Jun 24, 2026
Merged

fix(agent-core): mark truncated skill descriptions with an ellipsis#1064
RealKai42 merged 1 commit into
mainfrom
fix/skill-listing-truncation

Conversation

@7Sageer

@7Sageer 7Sageer commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue

Problem

The model-facing skill listing (the "available skills" block injected into the system prompt) truncated long skill descriptions to 250 characters by silently slicing, with no ellipsis or marker. Neither the user nor the model could tell a description had been cut, so the second half of a description — often the "when to use / when not to use" guidance — could be dropped without any signal.

What changed

  • Truncated descriptions now end with an ellipsis (), matching the existing body-fallback truncation convention.
  • Truncation walks whole grapheme clusters (via Intl.Segmenter) so it never splits a surrogate pair or combining sequence.
  • Added tests: descriptions at or below the limit stay unchanged; long descriptions get an ellipsis within the limit; a grapheme cluster at the boundary is dropped whole and leaves no dangling surrogate.

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. (No doc update — the change is internal to the model-facing skill listing.)

The model-facing skill listing silently sliced long descriptions to 250 characters with no marker, so neither the user nor the model could tell a description was cut. Truncated entries now end with an ellipsis and the truncation walks whole grapheme clusters so it never splits a surrogate pair or combining sequence.
@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 61bb7e0

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

This PR includes changesets to release 1 package
Name Type
@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 Jun 24, 2026

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

commit: 61bb7e0

@RealKai42
RealKai42 merged commit a752a53 into main Jun 24, 2026
10 checks passed
@RealKai42
RealKai42 deleted the fix/skill-listing-truncation branch June 24, 2026 05:20
@github-actions github-actions Bot mentioned this pull request Jun 24, 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.

2 participants