mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
@@ -618,10 +618,10 @@ export const cloneChatById = async (token: string, id: string) => {
|
||||
return res;
|
||||
};
|
||||
|
||||
export const cloneChatByShareId = async (token: string, share_id: string) => {
|
||||
export const cloneSharedChatById = async (token: string, id: string) => {
|
||||
let error = null;
|
||||
|
||||
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/${share_id}/clone_shared`, {
|
||||
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/${id}/clone/shared`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
export let className = 'h-full flex pt-8';
|
||||
|
||||
export let chatId = '';
|
||||
export let user = $_user;
|
||||
|
||||
@@ -333,7 +335,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="h-full flex pt-8">
|
||||
<div class={className}>
|
||||
{#if Object.keys(history?.messages ?? {}).length == 0}
|
||||
<ChatPlaceholder
|
||||
modelIds={selectedModels}
|
||||
|
||||
Reference in New Issue
Block a user