MCPcopy Create free account
hub / github.com/Stevenic/codepilot / error

Method error

src/internals/Colorize.ts:20–26  ·  view source on GitHub ↗

* Renders the given text as error text. * @param error Error text to render.

(error: Error|string)

Source from the content-addressed store, hash-verified

18 * @param error Error text to render.
19 */
20 public static error(error: Error|string): string {
21 if (typeof error === 'string') {
22 return `\x1b[31;1m${error}\x1b[0m`;
23 } else {
24 return `\x1b[31;1m${error.message}\x1b[0m`;
25 }
26 }
27
28 /**
29 * Renders the given text with a highlight to call attention.

Callers 1

completePromptMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected