MCPcopy Create free account
hub / github.com/HKUDS/AgentSpace / writeOutput

Function writeOutput

packages/db/src/postgres-cli.ts:134–146  ·  view source on GitHub ↗
(payload: unknown, json: boolean)

Source from the content-addressed store, hash-verified

132}
133
134function writeOutput(payload: unknown, json: boolean): void {
135 if (json) {
136 console.log(JSON.stringify(payload, null, 2));
137 return;
138 }
139
140 if (typeof payload === "string") {
141 console.log(payload);
142 return;
143 }
144
145 console.log(JSON.stringify(payload, null, 2));
146}
147
148main().catch((error: unknown) => {
149 const message = error instanceof Error ? error.message : String(error);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected