Repository navigation
chore : render answered user question outside agent steps - #1394
harshil-2096 wants to merge 4 commits into
Conversation
🦋 Changeset detectedLatest commit: 4820108 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
…eps and add countAgentSteps utility for accurate step counting.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4820108. Configure here.
|
|
||
| if (index < cutIndex) { | ||
| // Answered user questions stay visible: render them outside the collapsible Agent steps. | ||
| if (isAnsweredAskUser(part)) return null; |
There was a problem hiding this comment.
Held-back reply splits into empty accordion
Medium Severity
Ungrouping an answered question splits Agent steps, so while the 500-character holdback is still active the trailing reply is grouped into a new accordion after the question. Earlier tools still count as steps before the cut, so cutIndex stays at the end of the message and that second accordion can show 0 tool calls with the streaming text muted inside it until 500 characters arrive or the turn finishes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4820108. Configure here.


Summary
Closes AGE-2830
Changes
How was this tested?
Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,python/trueforge_sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Low Risk
UI-only message layout and step counting; no auth, API, or data-path changes.
Overview
Answered user questions now render outside the collapsible Agent steps accordion instead of being buried inside it, with a small margin on the read-only prompt card.
Implementation treats completed
ask_usertool calls as hidden for agent-step logic: they are skipped ingroupBy(leaf render), excluded from the trailing-text 500-char holdback, and omitted from step counts. Tool/thinking counts are computed per accordion via newcountAgentStepsrather than message-wide totals fromcomputeAgentStepsSplit, so split groups do not show inflated step numbers.Unit tests cover hidden-only-tool flows and per-group counting.
Reviewed by Cursor Bugbot for commit 4820108. Bugbot is set up for automated code reviews on this repo. Configure here.