/**
 * Replace `[label](url)` markdown links with their visible label only.
 *
 * The daily-brief hint generated by the home-brief prompt wraps every
 * referenced entity in the same `[name](url)` form as welcome — that lets
 * the LLM keep a stable entity reference, and lets the agent resolve the
 * link target when the user submits via the hint placeholder. We strip the
 * link syntax for placeholder display so the visible text is clean; the
 * raw hint (with markdown) still flows through to `useSend`.
 */
export const stripMarkdownLinks = (text: string): string =>
  text.replaceAll(/\[([^\]]+)\]\([^)]*\)/g, '$1');
