Q189: search says how many match, pages through all of them, and says when nothing matches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1b7106d511
commit
bc7e214b65
12 files changed
+163
-27
No files matched your search
@@ -48,4 +48,6 @@ export interface SearchInput {
|
||||
query: string;
|
||||
entityTypes?: SearchEntityType[];
|
||||
limit?: number;
|
||||
/** Hits to skip, for the next page. */
|
||||
offset?: number;
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import type { SpaceHistoryPage, ThreadHistory } from "./chat-domain";
|
||||
import type { RunRequestRecord } from "./provider-runtime-domain";
|
||||
import type { ApprovalDrift } from "./approval-pin";
|
||||
import type { DesktopResult } from "./result";
|
||||
import type { AppSnapshot, SearchResultRecord } from "./domain";
|
||||
import type { AppSnapshot, SearchPage } from "./domain";
|
||||
import type { ProviderModelEntry } from "./provider-models";
|
||||
import type {
|
||||
BootstrapOnboardingInput,
|
||||
@@ -238,7 +238,7 @@ export interface DesktopApi {
|
||||
runHistory(input: { orgId: string; beforeRunId: string | null } & ({ limit: number } | { from: RunCursor })): Promise<DesktopResult<RunHistoryPage>>;
|
||||
chatSpaceHistory(input: { orgId: string; spaceId: string; beforeMessageId: string | null } & ({ limit: number } | { fromMessageId: string })): Promise<DesktopResult<SpaceHistoryPage>>;
|
||||
revokeConnector(input: RevokeConnectorInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
search(input: SearchInput): Promise<DesktopResult<SearchResultRecord[]>>;
|
||||
search(input: SearchInput): Promise<DesktopResult<SearchPage>>;
|
||||
subscribe(callback: (event: RendererEvent) => void): () => void;
|
||||
platform: "win32" | "darwin" | "linux";
|
||||
language: "en" | "zh";
|
||||
|
||||
@@ -9,7 +9,7 @@ export type { ProviderAuthProfileRecord, ProviderAuthSessionRecord } from "./pro
|
||||
export { PROVIDER_DATA_POLICY, PROVIDER_EXECUTION_MODE, type ProviderDataPolicy, type ProviderExecutionMode } from "./provider-policy-domain";
|
||||
export { PROVIDER_REQUEST_STATE, type ProviderRequestRecord, type ProviderRequestState, type ProviderStreamRendererEvent } from "./provider-request-domain";
|
||||
export type { ProviderRateLimitObservationRecord, ProviderRateLimitStateRecord } from "./provider-runtime-domain";
|
||||
export { SEARCH_ENTITY_TYPES, type SearchEntityType, type SearchResultRecord } from "./search-domain";
|
||||
export { SEARCH_ENTITY_TYPES, type SearchEntityType, type SearchPage, type SearchResultRecord } from "./search-domain";
|
||||
export type { BrowserActionPolicyRecord, BrowserActionRecord, BrowserSessionContainerRecord, SocialAccountGrantRecord, SocialAccountRecord, SocialApprovalRouteRecord, SocialAuditRecord } from "./social-domain";
|
||||
export type { AppSnapshot, UiLanguage, UiPreferences, UiTheme } from "./snapshot-domain";
|
||||
export const TASK_STATUS = { BACKLOG: "backlog", IN_PROGRESS: "in_progress", REVIEW: "review", DONE: "done" } as const;
|
||||
|
||||
@@ -16,6 +16,12 @@ export const SEARCH_ENTITY_TYPES = [
|
||||
|
||||
export type SearchEntityType = (typeof SEARCH_ENTITY_TYPES)[number];
|
||||
|
||||
/** One page of the hits the person may read, and how many there are in all. */
|
||||
export interface SearchPage {
|
||||
results: SearchResultRecord[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface SearchResultRecord {
|
||||
entityType: SearchEntityType;
|
||||
entityId: string;
|
||||
|
||||
Reference in new issue
Block a user