Fix string formatting in tool_display_title function for URL handling
Browse files- ui/agent/tools.py +2 -2
ui/agent/tools.py
CHANGED
|
@@ -146,9 +146,9 @@ def tool_display_title(tool_name: str, args: dict[str, Any]) -> str:
|
|
| 146 |
query = truncate(str(args.get("query") or "immigration sources"), 80)
|
| 147 |
return f"Search 路 {query}"
|
| 148 |
if tool_name == "scrape_web_page":
|
| 149 |
-
return f"Read 路 {_url_host_or_path(str(args.get(
|
| 150 |
if tool_name == "crawl_web_site":
|
| 151 |
-
return f"Crawl 路 {_url_host_or_path(str(args.get(
|
| 152 |
if tool_name == "update_globe":
|
| 153 |
countries = _join(args.get("countries") or [], "selected countries")
|
| 154 |
return f"Globe 路 {countries}"
|
|
|
|
| 146 |
query = truncate(str(args.get("query") or "immigration sources"), 80)
|
| 147 |
return f"Search 路 {query}"
|
| 148 |
if tool_name == "scrape_web_page":
|
| 149 |
+
return f"Read 路 {_url_host_or_path(str(args.get('url') or ''))}"
|
| 150 |
if tool_name == "crawl_web_site":
|
| 151 |
+
return f"Crawl 路 {_url_host_or_path(str(args.get('url') or ''), limit=60)}"
|
| 152 |
if tool_name == "update_globe":
|
| 153 |
countries = _join(args.get("countries") or [], "selected countries")
|
| 154 |
return f"Globe 路 {countries}"
|