feat: add MCP tool integration

This commit is contained in:
Xin Wang
2026-07-18 00:00:06 +08:00
parent bdf3d3dd9c
commit e39bb48ba8
21 changed files with 1641 additions and 62 deletions
@@ -10,6 +10,7 @@ import {
Pencil,
PhoneOff,
Plus,
ServerCog,
Settings2,
Waypoints,
Wrench,
@@ -472,7 +473,13 @@ export function ToolPicker({
key={tool.id}
className="flex h-8 items-center gap-2 rounded-lg border border-hairline-strong bg-background px-2.5 text-sm"
>
{tool.type === "end_call" ? <PhoneOff size={14} /> : <Wrench size={14} />}
{tool.type === "end_call" ? (
<PhoneOff size={14} />
) : tool.type === "mcp" ? (
<ServerCog size={14} />
) : (
<Wrench size={14} />
)}
<span className="max-w-48 truncate">{tool.name}</span>
<button
type="button"
@@ -535,7 +542,11 @@ export function ToolPicker({
{tool.name}
</span>
<Badge variant="secondary">
{tool.type === "end_call" ? "End Call" : "HTTP"}
{tool.type === "end_call"
? "End Call"
: tool.type === "mcp"
? "MCP"
: "HTTP"}
</Badge>
</div>
<div className="mt-0.5 truncate font-mono text-xs text-muted-foreground">