8 lines
195 B
TypeScript
8 lines
195 B
TypeScript
export function compactReasoningPreview(value: string): string {
|
|
return value
|
|
.replace(/\[([^\]]+)]\([^)]+\)/g, "$1")
|
|
.replace(/[*_#`~]+/g, "")
|
|
.replace(/\s+/g, " ")
|
|
.trim();
|
|
}
|