fix(tui): preserve underscored MCP server names#2747
Conversation
There was a problem hiding this comment.
cyq1017 has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Thanks @cyq1017 for taking the time to contribute. This repository is currently observing a maintainer-managed contribution gate in dry-run mode, so this pull request is staying open. When enforcement is enabled, pull requests from contributors who are not listed in Please read |
There was a problem hiding this comment.
Code Review
This pull request updates the parse_prefixed_name function in crates/tui/src/mcp.rs to correctly parse MCP tool names when the server name contains underscores. It achieves this by matching the prefix against known server names from connections and configuration, preferring the longest match, and falling back to the previous split-on-underscore behavior if no match is found. Additionally, two unit tests have been added to verify this behavior. There are no review comments to address, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Refs #2744
Summary
mcp_my_db_execute_sqlroutes tomy_dbVerification
cargo test -p codewhale-tui mcp_pool_call_tool -- --nocapturecargo check -p codewhale-tuirustfmt --edition 2024 --check crates/tui/src/mcp.rsgit diff --checkNote: local macOS verification used CommandLineTools clang/SDK explicitly because the default Xcode.app
cclookup is currently hanging on this machine.