introduces workspace items as combined search+chat model
This commit is contained in:
@@ -17,6 +17,16 @@ export type SearchSummary = {
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type ChatWorkspaceItem = ChatSummary & {
|
||||
type: "chat";
|
||||
};
|
||||
|
||||
export type SearchWorkspaceItem = SearchSummary & {
|
||||
type: "search";
|
||||
};
|
||||
|
||||
export type WorkspaceItem = ChatWorkspaceItem | SearchWorkspaceItem;
|
||||
|
||||
export type Message = {
|
||||
id: string;
|
||||
createdAt: string;
|
||||
@@ -214,6 +224,11 @@ export async function listChats() {
|
||||
return data.chats;
|
||||
}
|
||||
|
||||
export async function listWorkspaceItems() {
|
||||
const data = await api<{ items: WorkspaceItem[] }>("/v1/workspace-items");
|
||||
return data.items;
|
||||
}
|
||||
|
||||
export async function verifySession() {
|
||||
return api<{ authenticated: true; mode: "open" | "token" }>("/v1/auth/session");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user