MCPcopy Create free account
hub / github.com/different-ai/opencode-browser / toolResultText

Function toolResultText

src/plugin.ts:209–214  ·  view source on GitHub ↗
(data: any, fallback: string)

Source from the content-addressed store, hash-verified

207}
208
209function toolResultText(data: any, fallback: string): string {
210 if (typeof data?.content === "string") return data.content;
211 if (typeof data === "string") return data;
212 if (data?.content != null) return JSON.stringify(data.content);
213 return fallback;
214}
215
216async function toolRequest(toolName: string, args: Record<string, any>): Promise<any> {
217 if (USE_AGENT_BACKEND) {

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected