feat: improve tool display format#1488
Conversation
| assert!(expected.contains("System")); | ||
| assert!(expected.contains("[✓] read")); | ||
| assert!(expected.contains("[✓] write")); | ||
| assert!(expected.contains("[✓] search")); | ||
| assert!(expected.contains("[ ] patch")); | ||
| assert!(expected.contains("[ ] undo")); | ||
| assert!(expected.contains("[ ] shell")); | ||
| assert!(expected.contains("[ ] fetch")); | ||
| assert!(expected.contains("[ ] remove")); | ||
| } |
There was a problem hiding this comment.
The test assertions for unavailable tools (with [ ] checkboxes) will fail because the format_tools function only adds tools that are present in the ToolsOverview object to the Info output. The function doesn't have logic to show unavailable tools with empty checkboxes.
To fix this, either:
- Modify the
format_toolsfunction to include a predefined list of all possible tools and mark them as available/unavailable based on what's in theToolsOverview, or - Remove the assertions that check for unavailable tools (those with
[ ]prefix)
The current implementation and test expectations are misaligned.
| assert!(expected.contains("System")); | |
| assert!(expected.contains("[✓] read")); | |
| assert!(expected.contains("[✓] write")); | |
| assert!(expected.contains("[✓] search")); | |
| assert!(expected.contains("[ ] patch")); | |
| assert!(expected.contains("[ ] undo")); | |
| assert!(expected.contains("[ ] shell")); | |
| assert!(expected.contains("[ ] fetch")); | |
| assert!(expected.contains("[ ] remove")); | |
| } | |
| assert!(expected.contains("System")); | |
| assert!(expected.contains("[✓] read")); | |
| assert!(expected.contains("[✓] write")); | |
| assert!(expected.contains("[✓] search")); | |
| } |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
9582801 to
cdda519
Compare
| self.writeln(output)?; | ||
| let all_tools = self.api.tools().await?; | ||
| let agent_tools = self.agent_tools().await?; | ||
| println!("{:?}", agent_tools); |
There was a problem hiding this comment.
This debug print statement should be removed before merging. It appears to be a development artifact that would output raw debug formatting of the agent_tools vector to the console during normal operation, which isn't appropriate for production code.
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
fixes #1466