openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
22 lines (21 loc) • 754 B
JavaScript
import { a as resolveRuntimeProcessEntrypointUrl } from "./runtime-process-url-CoHTemu-.mjs";
import { t as WorkerTaskPool } from "./worker-task-pool-BshJjv1P.mjs";
//#region src/gateway/control-ui-public-session-card.ts
/** The HTTP server owns this pool; importing the module does not start a worker. */
function createPublicSessionCardRenderer() {
const e = new WorkerTaskPool({
workerUrl: resolveRuntimeProcessEntrypointUrl("publicSessionCard"),
maxWorkers: 1,
maxPendingTasks: 8,
sharedCompute: true
});
return {
async render(t) {
const n = await e.run(t, { timeoutMs: 1e4 });
return Buffer.from(n.buffer, n.byteOffset, n.byteLength);
},
dispose: () => e.close()
};
}
//#endregion
export { createPublicSessionCardRenderer };