fix(cli): use terminal-safe diagram guidance in Ask mode - #13696
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 58.7K · Output: 8K · Cached: 391K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
September 2, 2026 13:19
WebReflection
approved these changes
Sep 2, 2026
This was referenced Sep 6, 2026
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.
What Problem This Solves
The built-in Ask prompt recommends Mermaid diagrams in every client, but the terminal displays Mermaid source instead of rendering a diagram.
Why This Change Was Made
Use the existing client flag and a named set of Mermaid-capable clients to keep the change in Kilo-owned agent setup. VS Code and JetBrains retain the original prompt; CLI, unset, ACP, and unknown clients receive plain-text or ASCII guidance. No renderer or shared upstream prompt changes are needed.
User Impact
CLI Ask mode no longer recommends unreadable Mermaid blocks for visual explanations. Explicit requests for Mermaid source remain allowed. Editor diagram support, read-only restrictions, and custom agent prompts are unchanged.
Detection remains server-process-wide: a terminal attached to an editor-owned backend still follows that backend client flag. Per-viewer capability negotiation is outside this fix.
Evidence
debug agent asksmoke test confirms the final generated prompt contains ASCII guidance and no Mermaid recommendation, without making an LLM request.