Skip to content

Your lightweight open-source personal agent.

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