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.
Parameters
Section titled “Parameters”client
Section titled “client”WorkspaceClient$1
limit?
Section titled “limit?”number
signal?
Section titled “signal?”AbortSignal
spaces
Section titled “spaces”Record<string, GenieSpaceConfig>
Returns
Section titled “Returns”Promise<string[]>