MCPcopy Create free account
hub / github.com/echoVic/blade-code / colorize

Method colorize

src/ui/components/Progress.ts:246–259  ·  view source on GitHub ↗

* 颜色化框架

(frame: string)

Source from the content-addressed store, hash-verified

244 * 颜色化框架
245 */
246 private colorize(frame: string): string {
247 switch (this.options.color) {
248 case 'green':
249 return UIStyles.status.success(frame);
250 case 'yellow':
251 return UIStyles.status.warning(frame);
252 case 'red':
253 return UIStyles.status.error(frame);
254 case 'gray':
255 return UIStyles.status.muted(frame);
256 default:
257 return UIStyles.status.info(frame);
258 }
259 }
260}
261
262/**

Callers 1

startMethod · 0.95

Calls 5

successMethod · 0.80
warningMethod · 0.80
mutedMethod · 0.80
errorMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected