Skip to content

Function: humanizeStatus()

humanizeStatus(status): string

Convert a raw Genie wire status (FETCHING_METADATA, ASKING_AI, EXECUTING_QUERY, …) into a short, sentence-cased label safe to drop into a UI pill. Known states get a curated label; unknown states fall back to string.tokenizeWithOptions so new states still render cleanly without code changes.

Pure (no Node-only deps), safe for browser bundles. Both the Genie agent (server) and any UI that subscribes to status events call this so labels stay in lock-step across the wire.

"ASKING_AI" | "CANCELLED" | "COMPLETED" | "EXECUTING_QUERY" | "FAILED" | "FETCHING_METADATA" | "FILTERING_CONTEXT" | "PENDING_WAREHOUSE" | "QUERY_RESULT_EXPIRED" | "SUBMITTED"

string