Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
4e6d165d
Commit
4e6d165d
authored
Jun 27, 2024
by
Timothy J. Baek
Browse files
refac
parent
8dac2a21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
20 deletions
+32
-20
src/routes/(app)/workspace/functions/create/+page.svelte
src/routes/(app)/workspace/functions/create/+page.svelte
+16
-10
src/routes/(app)/workspace/tools/create/+page.svelte
src/routes/(app)/workspace/tools/create/+page.svelte
+16
-10
No files found.
src/routes/(app)/workspace/functions/create/+page.svelte
View file @
4e6d165d
...
@@ -48,6 +48,10 @@
...
@@ -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,6 +65,7 @@
...
@@ -61,6 +65,7 @@
</script>
</script>
{#if mounted}
{#if mounted}
{#key func?.content}
<FunctionEditor
<FunctionEditor
id={func?.id ?? ''}
id={func?.id ?? ''}
name={func?.name ?? ''}
name={func?.name ?? ''}
...
@@ -71,4 +76,5 @@
...
@@ -71,4 +76,5 @@
saveHandler(e.detail);
saveHandler(e.detail);
}}
}}
/>
/>
{/key}
{/if}
{/if}
src/routes/(app)/workspace/tools/create/+page.svelte
View file @
4e6d165d
...
@@ -45,6 +45,10 @@
...
@@ -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,6 +62,7 @@
...
@@ -58,6 +62,7 @@
</script>
</script>
{#if mounted}
{#if mounted}
{#key tool?.content}
<ToolkitEditor
<ToolkitEditor
id={tool?.id ?? ''}
id={tool?.id ?? ''}
name={tool?.name ?? ''}
name={tool?.name ?? ''}
...
@@ -68,4 +73,5 @@
...
@@ -68,4 +73,5 @@
saveHandler(e.detail);
saveHandler(e.detail);
}}
}}
/>
/>
{/key}
{/if}
{/if}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment