MCPcopy Create free account
hub / github.com/cursor/cookbook / summarizeFirstValue

Function summarizeFirstValue

sdk/coding-agent-cli/src/agent.ts:563–574  ·  view source on GitHub ↗
(record: Record<string, unknown>, keys: string[])

Source from the content-addressed store, hash-verified

561}
562
563function summarizeFirstValue(record: Record<string, unknown>, keys: string[]) {
564 for (const key of keys) {
565 const value = record[key]
566 const formatted = formatArgValue(value)
567
568 if (formatted) {
569 return `${key}=${formatted}`
570 }
571 }
572
573 return undefined
574}
575
576function formatArgValue(value: unknown): string | undefined {
577 if (typeof value === "string") {

Callers 1

summarizeToolArgsFunction · 0.85

Calls 1

formatArgValueFunction · 0.85

Tested by

no test coverage detected