Skip to main content

SearchOutcome

@forge/monorepo


@forge/monorepo / backend/src / SearchOutcome

Type Alias: SearchOutcome

SearchOutcome = { hits: readonly SearchHit[]; query: string; searched: true; } | { detail: string; query: string; reason: "not-configured" | "unavailable" | "timed-out"; searched: false; }

Defined in: backend/src/toolkit/web.ts:103

What a search returned, or why it did not.

searched: false is not an empty result list, and the distinction is the whole type. "I searched and found nothing" and "I could not search" lead a model to opposite next actions, and collapsing them into [] makes it confidently report that nothing exists.