Show Paseo logo and nice names for Paseo MCP tool calls

Detect Paseo MCP tool names across provider formats (Claude's
mcp__paseo__*, Codex's paseo.*) and display humanized leaf names
with the Paseo SVG logo instead of raw namespaced strings.
This commit is contained in:
Mohamed Boudra
2026-04-11 13:02:22 +07:00
parent cff41d78ab
commit 6897a400e5
5 changed files with 144 additions and 0 deletions
@@ -1,4 +1,8 @@
import type { ToolCallTimelineItem } from "../server/agent/agent-sdk-types.js";
import {
getPaseoToolLeafName,
isPaseoToolName,
} from "../server/agent/tool-name-normalization.js";
import { stripCwdPrefix } from "./path-utils.js";
export type ToolCallDisplayInput = Pick<
@@ -32,6 +36,12 @@ function humanizeToolName(name: string): string {
if (!trimmed) {
return name;
}
if (isPaseoToolName(trimmed)) {
const leaf = getPaseoToolLeafName(trimmed);
if (leaf) {
return humanizeToolName(leaf);
}
}
if (/[:./]/.test(trimmed) || trimmed.includes("__")) {
return trimmed;
}