Skip to content

Commit e3c9d51

Browse files
committed
fix(pkg-py): tool.annotations.extra not extras
1 parent 8c48e12 commit e3c9d51

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg-py/src/shinychat/_chat_normalize_chatlas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def tool_result_contents(x: "ContentToolResult") -> Tagifiable:
291291
icon = None
292292
if tool and tool.annotations:
293293
tool_title = tool.annotations.get("title")
294-
icon = tool.annotations.get("extras", {}).get("icon")
294+
icon = tool.annotations.get("extra", {}).get("icon")
295295
icon = icon or tool.annotations.get("icon")
296296

297297
# Icon strings and HTML display never get escaped

pkg-py/tests/playwright/tools/basic/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ def list_files_impl():
4141
annotations: ToolAnnotations = {}
4242
if TOOL_OPTS["with_title"]:
4343
annotations["title"] = "List Files"
44+
annotations["extra"] = {
45+
"icon": faicons.icon_svg("folder"),
46+
}
4447

4548
# Define the tool function based on configuration
4649
if TOOL_OPTS["async"]:

0 commit comments

Comments
 (0)