feat(tracker): return TodoList display for tracker tools#22060
Conversation
|
Hi @anj-s, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
|
Size Change: +1.67 kB (+0.01%) Total Size: 26.1 MB
ℹ️ View Unchanged
|
Summary of ChangesHello, 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 integration of the experimental task tracker within the CLI. It streamlines the user experience by automatically approving tracker-related tools when the feature is active, eliminating repetitive policy prompts. Furthermore, it standardizes the output of tracker tools to a structured Highlights
Changelog
Activity
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 effectively integrates the experimental task tracker by auto-allowing its tools and providing a structured TodoList display for the UI. I have two suggestions for improvement. First, in packages/core/src/policy/config.ts, the logic for auto-allowing tracker tools can be simplified and made more robust by using a wildcard rule. Second, in packages/core/src/tools/trackerTools.ts, the addTask function has a performance issue due to creating new Set objects inside a recursive loop; I've suggested a more efficient implementation.
scidomino
left a comment
There was a problem hiding this comment.
From Gemini:
In packages/cli/src/ui/components/messages/ToolResultDisplay.tsx, there is logic that explicitly returns null if the resultDisplay is a TodoList object. It does this because the TodoTray component renders those lists persistently at the bottom of the screen instead of in the chat feed.
By changing TrackerVisualizeInvocation to use buildTodosReturnDisplay(), when the user runs the tracker_visualize tool, nothing will be printed to the main chat feed. They will only see the TodoTray update. Is that intended?
Yes, this is intended for now. I am in discussion with UI/UX about the best way to use the visualize tool. If I return the ascii output as is there is some concern about it being confusing for the user. However we still need a way for the LLM to visualize the current progress. I had #19942 to figure this out. |
Summary
This PR integrates the experimental task tracker more deeply with the CLI and UI by modifying the
returnDisplayof all tracker tools to return a structuredTodoListobject. This allows the CLI UI to natively render the current state of tasks (todos) seamlessly after each tracker operation.Details
buildTodosReturnDisplayintrackerTools.tsto map tasks to a structuredTodoListformat.returnDisplaywith the structuredTodoListreturn for all tracker tool invocations.visitedSetinstead of allocating new ones recursively.TASK_TYPE_LABELSfromtrackerTypes.tsfor reuse in displaying task types.Related Issues
Fixes #21734
How to Validate
"experimental": { "taskTracker": true }).create a task to write tests).Pre-Merge Checklist