feat: add show_user tool, refactor FSRead, and improve Agent event handling - #556
Merged
Conversation
show_user tool for terminal markdown rendering
Implement a new tool that renders markdown content in the terminal with proper formatting using termimad library. This includes: - Adding termimad dependency to workspace and forge_app crate - Creating new ToolRegistry struct to centralize tool registration - Implementing show_user tool with full markdown rendering capabilities - Updating tool_service to use the new registry - Adding documentation in docs/show-user-tool.md Co-authored-by: Forge <forge@antinomy.ai>
Refactored FSRead tool to use the infrastructure's file read service instead of directly using tokio::fs. This change improves consistency with other file system tools and enables better testability through dependency injection. * Modified FSRead to accept infrastructure as a generic parameter * Updated tool registry to pass infrastructure to FSRead * Added improved output formatting with TitleFormat * Adjusted tests to work with the new implementation Co-authored-by: Forge <forge@antinomy.ai>
show_user tool for terminal markdown renderingRenamed 'claude-tool-description-best-practices.md' to 'tool-guidelines.md' for a more concise and generic filename that better reflects its purpose. Co-authored-by: Forge <forge@antinomy.ai>
- Add documentation about default user visibility behavior - Specify requirements for displaying content to users - Update PLAN mode documentation with new file path conventions Co-authored-by: Forge <forge@antinomy.ai>
Add the display tool to the default agent configuration, enabling user information display capabilities in the standard setup. Co-authored-by: Forge <forge@antinomy.ai>
Changed the execute_tool method signature to directly return ToolResult instead of Option<ToolResult>, simplifying the code flow and removing unnecessary Option unwrapping. Co-authored-by: Forge <forge@antinomy.ai>
Add a new Agent property 'hide_content' that controls whether an agent's output is displayed in the console. This replaces the previous approach of checking agent ID suffixes. - Add hide_content field to Agent struct with proper serialization options - Update Orchestrator to use hide_content flag for filtering messages - Remove worker ID suffix check in UI output handling - Update configuration in forge.yaml files to use the new property - Add tests for merging hide_content property Co-authored-by: Forge <forge@antinomy.ai>
show_user tool, refactor FSRead, and improve Agent event handling
- Fix comment in orchestrator regarding hide_content behavior - Simplify UI message handling by removing redundant comment - Update title-generation agent ID format for consistency - Remove outdated tool description improvement plan document Co-authored-by: Forge <forge@antinomy.ai>
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.
Overview
This PR introduces a new markdown rendering tool for terminal display, refactors FSRead to use infrastructure services, and implements a custom merge strategy for agent subscription events to properly combine event lists when merging agents.
Purpose
These changes improve the user experience by enabling properly formatted terminal output, enhance code consistency through infrastructure dependency injection, and fix event handling when merging agents. The PR also adds comprehensive documentation on tool description best practices.
Implementation
Show User Tool:
termimaddependency for terminal markdown renderingShowUsertool to render markdown in the terminalToolRegistrystruct to centralize tool registrationFSRead Refactor:
FSReadto accept infrastructure as a generic parameterTitleFormatAgent Subscription Event Merging:
merge_subscriptionfunctionDocumentation:
Testing
FSReadShowUsertool functionalityRelated Issues
This PR addresses the need for better terminal output formatting and resolves potential issues with agent subscription event handling during merges.
Changelog
New Features:
Refactoring:
Fixes:
Documentation:
Suggested Reviewers