Skip to content

Commit c9fea70

Browse files
committed
fix(ui-eventlog): use truncateUtf16Safe for event payload truncation
1 parent 3f2466c commit c9fea70

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ui/src/pages/overview/event-log.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { EventLogEntry } from "../../api/event-log.ts";
44
import { icons } from "../../components/icons.ts";
55
import { t } from "../../i18n/index.ts";
66
import { formatTimeMs } from "../../lib/format.ts";
7+
import { truncateUtf16Safe } from "@openclaw/normalization-core/utf16-slice";
78
import { formatEventPayload } from "../../lib/presenter.ts";
89

910
type OverviewEventLogProps = {
@@ -32,7 +33,7 @@ export function renderOverviewEventLog(props: OverviewEventLogProps) {
3233
<span class="ov-event-log-name">${entry.event}</span>
3334
${entry.payload
3435
? html`<span class="ov-event-log-payload muted"
35-
>${formatEventPayload(entry.payload).slice(0, 120)}</span
36+
>${truncateUtf16Safe(formatEventPayload(entry.payload), 120)}</span
3637
>`
3738
: nothing}
3839
</div>

0 commit comments

Comments
 (0)