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
Hide 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,14 +65,16 @@
...
@@ -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}
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,14 +62,16 @@
...
@@ -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}
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