feat(core): improve subagent result display#20378
Conversation
Summary of ChangesHello @joshualitt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user experience for viewing subagent and tool execution results within the CLI. By implementing intelligent truncation that prioritizes the start of subagent outputs and automatically converting JSON results into a more readable Markdown format, the changes aim to make complex outputs more digestible and easier to understand at a glance. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant improvement to the display of subagent results by truncating long outputs from the top, showing the beginning of the content instead of the end. This is achieved by adding an overflowDirection property that controls the truncation behavior. Additionally, a new safeJsonToMarkdown utility has been added to format JSON outputs from agents into a more readable markdown format, which is a great enhancement for usability. The changes are well-tested. I have one suggestion to reduce code duplication in the truncation logic.
a58f54b to
23ce7f3
Compare
|
Size Change: +4.9 kB (+0.02%) Total Size: 26 MB
ℹ️ View Unchanged
|
23ce7f3 to
2f056d0
Compare
cf72b6d to
7ae739c
Compare
|
This review was generated using I've reviewed the PR and found a couple of areas where the code could better align with our strict development rules: 1. Unnecessary Mocking in
|
e89137b to
7b6c4dc
Compare
|
@jacob314 ptal, all feedback should be addressed. Thanks! |
| } | ||
| } | ||
|
|
||
| function isRecord(value: unknown): value is Record<string, unknown> { |
There was a problem hiding this comment.
We have 2 other isRecord() implementations across the codebase. Can we de-dupe in a central place?
3e00a98 to
71504d5
Compare
71504d5 to
ceff622
Compare
Fixes #18289