feat: release chat and mindspace UI updates
This commit is contained in:
@@ -726,6 +726,25 @@ export function buildChatSaveThumbnailUrl(input: {
|
||||
return `/api/mindspace/v1/pages/chat-save-thumbnail?${params.toString()}`;
|
||||
}
|
||||
|
||||
export async function quickShareFromChat(input: {
|
||||
sessionId: string;
|
||||
messageId: string;
|
||||
selectedLinkIndex?: number;
|
||||
}): Promise<{ publicUrl: string; filename: string }> {
|
||||
const result = await apiFetch<{ data: { publicUrl: string; filename: string } }>(
|
||||
'/mindspace/v1/pages/quick-share-from-chat',
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
session_id: input.sessionId,
|
||||
message_id: input.messageId,
|
||||
selected_link_index: input.selectedLinkIndex ?? 0,
|
||||
}),
|
||||
},
|
||||
);
|
||||
return result.data;
|
||||
}
|
||||
|
||||
export async function fetchPreviewAsset(path: string): Promise<string> {
|
||||
let res: Response;
|
||||
try {
|
||||
@@ -754,6 +773,7 @@ export async function saveChatMessageAsPage(input: {
|
||||
categoryCode?: MindSpaceSaveCategory;
|
||||
selectedLinkIndex?: number;
|
||||
acknowledgedFindingIds?: string[];
|
||||
replacePageId?: string;
|
||||
}): Promise<ChatSaveResult> {
|
||||
const result = await apiFetch<{ data: ChatSaveResult }>(
|
||||
'/mindspace/v1/pages/save-from-chat',
|
||||
@@ -769,6 +789,7 @@ export async function saveChatMessageAsPage(input: {
|
||||
selected_link_index: input.selectedLinkIndex ?? 0,
|
||||
acknowledged_finding_ids: input.acknowledgedFindingIds,
|
||||
page_type: input.templateId === 'report' ? 'report' : 'article',
|
||||
replace_page_id: input.replacePageId,
|
||||
}),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user