- Migrate favorite command from opencode to csc with /hub command - Rename /favorite → /cloud-enabled → /knowledge-hub → /hub - Auto-enable cloud favorites on startup without manual Update button - Toggle items immediately on check/uncheck without Update button - Add favorite REST routes and kh alias (later removed) - Fix UDS socket path length exceeding macOS sockaddr_un.sun_path limit - Add AbortController timeout to CoStrict fetch to prevent startup blocking - Fix build robustness (handle missing download-ripgrep script) - Merge server refactor: Hono-based HTTP API, session management, transcript reader - Add serve API docs, server module unit tests, and cloud command handler Signed-off-by: 林凯90331 <90331@sangfor.com> Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
export function createServerLogger() {
|
|
return {
|
|
info(message: string, meta?: Record<string, unknown>) {
|
|
process.stderr.write(
|
|
`[serve:info] ${message}${meta ? ' ' + JSON.stringify(meta) : ''}\n`,
|
|
)
|
|
},
|
|
error(message: string, meta?: Record<string, unknown>) {
|
|
process.stderr.write(
|
|
`[serve:error] ${message}${meta ? ' ' + JSON.stringify(meta) : ''}\n`,
|
|
)
|
|
},
|
|
}
|
|
}
|