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:
teknium1 2026-02-23 14:55:29 -08:00
parent 38db6e9366
commit 4f9f5f70e3

2
cli.py
View file

@ -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] = []