MCPcopy
hub / github.com/nukeop/nuclear / truncateForToast

Function truncateForToast

packages/player/src/utils/logging.ts:19–24  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

17const TOAST_MAX_LENGTH = 100;
18
19const truncateForToast = (message: string): string => {
20 if (message.length > TOAST_MAX_LENGTH) {
21 return `${message.slice(0, TOAST_MAX_LENGTH)}...`;
22 }
23 return message;
24};
25
26type ReportErrorOptions = {
27 userMessage: string;

Callers 1

reportErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected