pi-mono/apps/p2/plugins/coding-tools/web.tsx
Mario Zechner abc14343fd feat(p2): tools' chat look comes from the plugins that own them
The web UI keeps no tool-specific code: each tool's plugin contributes how its calls show (words on the wheel and in
the sheet, the row's argument, a failure word, its words in a run's summary, its detail, a nested call's detail, a
result after the answer) to the ToolActivities registry, keyed by tool name, from its web facet. coding-tools,
terminals, codemode, subagents, agent, artifacts, send-file, ports, conversations and history register theirs. A tool
without a contribution reads as its name and first short string argument, with the generic icon and its input as
JSON and output as its detail. Tool declarations are unchanged.
2026-11-06 17:39:08 +01:00

10 lines
398 B
TypeScript

// The coding tools' web facet: how their calls show in the chat (activity.tsx).
import { contribute, defineFacet } from "@p2/app/v1";
import { ToolActivities } from "@p2/app/v1/web";
import { codingToolActivities } from "./activity.tsx";
export default defineFacet((host) => {
contribute(host, "p2.web-coding-tools", (self) => {
self.contribute(ToolActivities, codingToolActivities);
});
});