Skip to content

Function: collectSpaceSuggestions()

collectSpaceSuggestions(opts): Promise<string[]>

Collect the curated starter questions across every resolved Genie space, deduped and capped. Each space’s sample_questions are fetched once (cached for SUGGESTION_CACHE_TTL_MS) via getGenieSpace + genieSampleQuestions, then merged in alias-iteration order so a single-space app surfaces that space’s questions and a multi-space app round-trips breadth-first up to the cap. A per-space fetch failure degrades to “no questions for that space” (logged, not thrown) so one unreachable space never blanks the whole list. When signal aborts (the HTTP caller disconnected), collection stops silently and returns what was merged so far. Returns [] when no spaces are configured.

WorkspaceClient$1

number

AbortSignal

Record<string, GenieSpaceConfig>

Promise<string[]>