fix: handle missing toolset IDs in welcome banner
- Updated the toolset ID retrieval logic in the build_welcome_banner function to use a fallback to the toolset name if the ID is not present, ensuring robustness in displaying unavailable toolsets.
This commit is contained in:
parent
38db6e9366
commit
4f9f5f70e3
1 changed files with 1 additions and 1 deletions
2
cli.py
2
cli.py
|
|
@ -472,7 +472,7 @@ def build_welcome_banner(console: Console, model: str, cwd: str, tools: List[dic
|
|||
# Also add disabled toolsets so they show in the banner
|
||||
for item in unavailable_toolsets:
|
||||
# Map the internal toolset ID to display name
|
||||
toolset_id = item["name"]
|
||||
toolset_id = item.get("id", item.get("name", "unknown"))
|
||||
display_name = f"{toolset_id}_tools" if not toolset_id.endswith("_tools") else toolset_id
|
||||
if display_name not in toolsets_dict:
|
||||
toolsets_dict[display_name] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue