mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-17 06:35:59 +08:00
refac
This commit is contained in:
parent
8dac2a2140
commit
4e6d165d00
@ -48,6 +48,10 @@
|
|||||||
console.log(func);
|
console.log(func);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (window.opener ?? false) {
|
||||||
|
window.opener.postMessage('loaded', '*');
|
||||||
|
}
|
||||||
|
|
||||||
if (sessionStorage.function) {
|
if (sessionStorage.function) {
|
||||||
func = JSON.parse(sessionStorage.function);
|
func = JSON.parse(sessionStorage.function);
|
||||||
sessionStorage.removeItem('function');
|
sessionStorage.removeItem('function');
|
||||||
@ -61,14 +65,16 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if mounted}
|
{#if mounted}
|
||||||
<FunctionEditor
|
{#key func?.content}
|
||||||
id={func?.id ?? ''}
|
<FunctionEditor
|
||||||
name={func?.name ?? ''}
|
id={func?.id ?? ''}
|
||||||
meta={func?.meta ?? { description: '' }}
|
name={func?.name ?? ''}
|
||||||
content={func?.content ?? ''}
|
meta={func?.meta ?? { description: '' }}
|
||||||
{clone}
|
content={func?.content ?? ''}
|
||||||
on:save={(e) => {
|
{clone}
|
||||||
saveHandler(e.detail);
|
on:save={(e) => {
|
||||||
}}
|
saveHandler(e.detail);
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -45,6 +45,10 @@
|
|||||||
console.log(tool);
|
console.log(tool);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (window.opener ?? false) {
|
||||||
|
window.opener.postMessage('loaded', '*');
|
||||||
|
}
|
||||||
|
|
||||||
if (sessionStorage.tool) {
|
if (sessionStorage.tool) {
|
||||||
tool = JSON.parse(sessionStorage.tool);
|
tool = JSON.parse(sessionStorage.tool);
|
||||||
sessionStorage.removeItem('tool');
|
sessionStorage.removeItem('tool');
|
||||||
@ -58,14 +62,16 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if mounted}
|
{#if mounted}
|
||||||
<ToolkitEditor
|
{#key tool?.content}
|
||||||
id={tool?.id ?? ''}
|
<ToolkitEditor
|
||||||
name={tool?.name ?? ''}
|
id={tool?.id ?? ''}
|
||||||
meta={tool?.meta ?? { description: '' }}
|
name={tool?.name ?? ''}
|
||||||
content={tool?.content ?? ''}
|
meta={tool?.meta ?? { description: '' }}
|
||||||
{clone}
|
content={tool?.content ?? ''}
|
||||||
on:save={(e) => {
|
{clone}
|
||||||
saveHandler(e.detail);
|
on:save={(e) => {
|
||||||
}}
|
saveHandler(e.detail);
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user