MCPcopy Create free account
hub / github.com/block/buzz / getResultText

Function getResultText

desktop/src/features/agents/ui/agentSessionFileRead.ts:119–129  ·  view source on GitHub ↗
(result: string)

Source from the content-addressed store, hash-verified

117}
118
119function getResultText(result: string): string {
120 const parsed = parseToolResultValue(result);
121 if (typeof parsed === "string") {
122 return parsed;
123 }
124
125 const record = asRecord(parsed);
126 return (
127 getRecordString(record, ["content", "text", "output", "stdout"]) ?? result
128 );
129}
130
131function getRecordString(
132 record: Record<string, unknown>,

Callers 2

buildSkillReadContentFunction · 0.70
buildFileReadContentFunction · 0.70

Calls 3

parseToolResultValueFunction · 0.90
asRecordFunction · 0.90
getRecordStringFunction · 0.85

Tested by

no test coverage detected