MCPcopy Create free account
hub / github.com/CopilotKit/OpenGenerativeUI / formatValue

Function formatValue

apps/app/src/components/tool-rendering.tsx:17–23  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

15};
16
17function formatValue(value: unknown): string {
18 if (Array.isArray(value)) return `[${value.length} items]`;
19 if (typeof value === "object" && value !== null)
20 return `{${Object.keys(value).length} keys}`;
21 if (typeof value === "string") return `"${value}"`;
22 return String(value);
23}
24
25export function ToolReasoning({ name, args, status }: ToolReasoningProps) {
26 const entries = args ? Object.entries(args) : [];

Callers 1

ToolReasoningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected