mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-27 13:01:12 +03:00
c379191f80
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
12 lines
395 B
TypeScript
12 lines
395 B
TypeScript
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
|
|
export function buildToolSummaryMap(tools: AgentTool[]): Record<string, string> {
|
|
const summaries: Record<string, string> = {};
|
|
for (const tool of tools) {
|
|
const summary = tool.description?.trim() || tool.label?.trim();
|
|
if (!summary) continue;
|
|
summaries[tool.name.toLowerCase()] = summary;
|
|
}
|
|
return summaries;
|
|
}
|