mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:21:23 +00:00
fix: handle gateway slash command replies in TUI
This commit is contained in:
@@ -140,6 +140,11 @@ export function extractTextFromMessage(
|
||||
return formatRawAssistantErrorForUi(errorMessage);
|
||||
}
|
||||
|
||||
export function isCommandMessage(message: unknown): boolean {
|
||||
if (!message || typeof message !== "object") return false;
|
||||
return (message as Record<string, unknown>).command === true;
|
||||
}
|
||||
|
||||
export function formatTokens(total?: number | null, context?: number | null) {
|
||||
if (total == null && context == null) return "tokens ?";
|
||||
const totalLabel = total == null ? "?" : formatTokenCount(total);
|
||||
|
||||
Reference in New Issue
Block a user