• Humanizes a scope value for display in UI. Converts machine-readable scope names to human-friendly labels.

    Parameters

    • Optionalscope: string

      The raw scope value (e.g., "matching-page", "context-aware").

    Returns string

    Human-friendly label (e.g., "Matching Page", "Context-Aware").

    export function humanizeScope(scope?: string): string {
    if (!scope || scope === "global") {
    return "Global";
    }

    return scope
    .split("-")
    .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
    .join(" ");
    }