char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierui: Restructure repo to use `tools/ui` folder and `ui` / `UI` / `llama-ui` / `LLAMA_UI` naming (#23064)59778f019

char/aliceai-t5-moe
416 B14 linesraw
1/**
2 * Redacts a sensitive value, optionally showing the last N characters.
3 *
4 * @param value - The value to redact
5 * @param showLastChars - If provided, reveals the last N characters with a leading mask
6 * @returns The redacted string
7 */
8export function redactValue(value: string, showLastChars?: number): string {
9	if (showLastChars) {
10		return `....${value.slice(-showLastChars)}`;
11	}
12
13	return '[redacted]';
14}