Add indexed history search across iOS and web
TestFlight / Build and upload (push) Successful in 1m55s
TestFlight / Build and upload (push) Successful in 1m55s
This commit is contained in:
+7
-1
@@ -33,7 +33,9 @@ export type SearchWorkspaceItem = SearchSummary & {
|
||||
type: "search";
|
||||
};
|
||||
|
||||
export type WorkspaceItem = ChatWorkspaceItem | SearchWorkspaceItem;
|
||||
export type WorkspaceItem = (ChatWorkspaceItem | SearchWorkspaceItem) & { searchSnippet?: string | null };
|
||||
|
||||
export type WorkspaceSearchResponse = { items: WorkspaceItem[]; hasMore: boolean };
|
||||
|
||||
export type Message = {
|
||||
id: string;
|
||||
@@ -272,6 +274,10 @@ export async function listWorkspaceItems() {
|
||||
return data.items;
|
||||
}
|
||||
|
||||
export function searchWorkspaceItems(query: string, signal?: AbortSignal) {
|
||||
return api<WorkspaceSearchResponse>(`/v1/workspace-items?${new URLSearchParams({ q: query })}`, { signal });
|
||||
}
|
||||
|
||||
export async function verifySession() {
|
||||
return api<{ authenticated: true; mode: "open" | "token" }>("/v1/auth/session");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user