This commit is contained in:
Timothy Jaeryang Baek
2025-01-05 00:44:38 -08:00
parent 2444327a47
commit fe59b7f39c
4 changed files with 41 additions and 34 deletions

View File

@@ -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',

View File

@@ -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}