Repository navigation
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
9 tasks
jujn
approved these changes
Oct 29, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope-Java Version
2.1.0-SNAPSHOTDescription
Refs #3834 — slice 01 of 09. The shared tracking issue remains open for the remaining slices.
Pruning or offloading a long tool result currently rebuilds its entire output as one text block, losing images, audio, and other non-text blocks. Pruning also drops producer-supplied execution details.
Summary
Use one shared
ToolResultPreviewimplementation for pruning and offloading. Apply a single text allowance across all text blocks, preserve non-text order and result/message fields, and omit a marker when no text was removed. String previews used for summary input delegate to the same implementation.Offloading still saves complete text through the configured Filesystem and RuntimeContext. Cached text replacements rebuild each view from its own media blocks; failed writes retain the original result. Update EN/ZH context documentation.
Evidence
executionDetails. The initial regression run had 7 failures and 1 error across 21 cases. An additional full-preview boundary test reproduced an omission marker being inserted even when no text was removed.After: all 32 targeted cases pass, covering media order, shared text allowances, result/message fields, canonical/hook views, filesystem readback, failed writes, zero/full previews, whitespace, and the summary's 600-character boundary.
npm testpasses 13 tests;npm run validatepasses, including the repository's check of 432 pages and 584 redirects.mint broken-linksreports 2,218 links in 326 files; this PR changes no documentation links or anchors, and the discrepancy with the repository checker remains unresolved.Merge Danger
Door: two-way — no migration or serialized-state change.
Blast Radius: Harness — tool-result text previews in compaction/offloading and summary-input formatting. Character accounting keeps Java's existing UTF-16 units. Provider-specific media support continues to use the existing converters; no live E2B/Docker/Kubernetes compatibility claim is made.
Checklist
mvn spotless:apply.mvn -B -T1C clean verify; skips recorded above).