Skip to content

Conversation

@john-b-rush
Copy link
Contributor

Improve the ease of use for selecting and viewing warehouses

@john-b-rush john-b-rush requested a review from Copilot June 6, 2025 06:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves warehouse selection and display functionality by unifying parameter names (replacing "warehouse_id" with "warehouse"), adding fuzzy matching for warehouse names, and enhancing the TUI display behavior using conditional display.

  • Updates test cases to reflect parameter renaming and improved verification for warehouse selection
  • Modifies the warehouse commands (list and select) to support fuzzy matching and conditional display
  • Updates UI and command registry to support the new “conditional” agent_display mode

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_tui_display.py Added extensive tests for basic display, styling, empty list, type conversion, and current warehouse message
tests/test_agent_tools.py Updated handler assertions to include tool_output_callback in the call
tests/test_agent_tool_display_routing.py Adjusted routing tests for conditional display in "list-warehouses" command
tests/fixtures.py Updated add_warehouse fixture to accept additional parameters
tests/commands/test_warehouse_selection.py Renamed tests and updated expectations for warehouse selection
tests/commands/test_list_warehouses.py Introduced new tests for warehouse listing and display parameters
src/ui/tui.py Enhanced TUI display functions to support full table display and styling
src/commands/warehouse_selection.py Refactored warehouse selection to use fuzzy matching and updated parameter naming
src/commands/list_warehouses.py Adjusted list warehouses command to handle display parameter and conditional output
src/command_registry.py Updated CommandDefinition documentation for new agent_display values
src/agent/tool_executor.py Added passing of output_callback in tool_args
src/agent/prompts/default_system_prompt.py Improved the system prompt with updated instructions for warehouse commands
Comments suppressed due to low confidence (2)

src/commands/warehouse_selection.py:68

  • The error message 'warehouse parameter is required.' is generic. Consider providing additional context to distinguish between a missing parameter and a situation where the provided warehouse value does not match any warehouse.
if not warehouse:

src/commands/warehouse_selection.py:41

  • The immediate return on substring match may preempt a better fuzzy match. Consider evaluating all candidates to select the best match based on the similarity score.
if target_lower in warehouse_lower or warehouse_lower.startswith(target_lower):

@john-b-rush john-b-rush merged commit dc65a63 into main Jun 6, 2025
2 checks passed
@john-b-rush john-b-rush deleted the warehouse branch June 6, 2025 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants