feat: add OpenClaw adapter type
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>
This commit is contained in:
18
packages/adapters/openclaw/src/cli/format-event.ts
Normal file
18
packages/adapters/openclaw/src/cli/format-event.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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));
|
||||
}
|
||||
1
packages/adapters/openclaw/src/cli/index.ts
Normal file
1
packages/adapters/openclaw/src/cli/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { printOpenClawStreamEvent } from "./format-event.js";
|
||||
Reference in New Issue
Block a user