Introduce openclaw adapter package with server execution, CLI stream formatting, and UI config fields. Register the adapter across CLI, server, and UI registries. Add adapter label in all relevant pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
333 B
TypeScript
19 lines
333 B
TypeScript
import pc from "picocolors";
|
|
|
|
export function printOpenClawStreamEvent(raw: string, debug: boolean): void {
|
|
const line = raw.trim();
|
|
if (!line) return;
|
|
|
|
if (!debug) {
|
|
console.log(line);
|
|
return;
|
|
}
|
|
|
|
if (line.startsWith("[openclaw]")) {
|
|
console.log(pc.cyan(line));
|
|
return;
|
|
}
|
|
|
|
console.log(pc.gray(line));
|
|
}
|