From 924e30fa6e61975a0c482d97e69df5913306af87 Mon Sep 17 00:00:00 2001 From: "Michael@WCD" Date: Thu, 17 Sep 2026 23:08:12 -0400 Subject: [PATCH] fix(basic-host): display human-readable tool title --- examples/basic-host/src/index.tsx | 3 +- .../basic-host/src/tool-display-name.test.ts | 30 +++++++++++++++++++ examples/basic-host/src/tool-display-name.ts | 5 ++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 examples/basic-host/src/tool-display-name.test.ts create mode 100644 examples/basic-host/src/tool-display-name.ts diff --git a/examples/basic-host/src/index.tsx b/examples/basic-host/src/index.tsx index 00c0d52b2..78621860b 100644 --- a/examples/basic-host/src/index.tsx +++ b/examples/basic-host/src/index.tsx @@ -4,6 +4,7 @@ import { Component, type ErrorInfo, type ReactNode, StrictMode, Suspense, use, u import { createRoot } from "react-dom/client"; import { callTool, connectToServer, hasAppHtml, initializeApp, loadSandboxProxy, log, newAppBridge, type ServerInfo, type ToolCallInfo, type ModelContext, type AppMessage } from "./implementation"; import { getTheme, toggleTheme, onThemeChange, type Theme } from "./theme"; +import { getToolDisplayName } from "./tool-display-name"; import styles from "./index.module.css"; /** @@ -341,7 +342,7 @@ function ToolCallInfoPanel({ toolCallInfo, isDestroying, onRequestClose, onClose > {/* Row 1: Header with server:tool name and close button */}
- {toolCallInfo.serverInfo.name}:{toolCallInfo.tool.name} + {toolCallInfo.serverInfo.name}:{getToolDisplayName(toolCallInfo.tool)} {onRequestClose && !isDestroying && (