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
bf5775e0
Commit
bf5775e0
authored
Jun 20, 2024
by
Timothy J. Baek
Browse files
refac
parent
9108df17
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
backend/apps/webui/models/functions.py
backend/apps/webui/models/functions.py
+1
-0
src/lib/components/workspace/Functions.svelte
src/lib/components/workspace/Functions.svelte
+16
-4
No files found.
backend/apps/webui/models/functions.py
View file @
bf5775e0
...
@@ -55,6 +55,7 @@ class FunctionModel(BaseModel):
...
@@ -55,6 +55,7 @@ class FunctionModel(BaseModel):
class
FunctionResponse
(
BaseModel
):
class
FunctionResponse
(
BaseModel
):
id
:
str
id
:
str
user_id
:
str
user_id
:
str
type
:
str
name
:
str
name
:
str
meta
:
FunctionMeta
meta
:
FunctionMeta
updated_at
:
int
# timestamp in epoch
updated_at
:
int
# timestamp in epoch
...
...
src/lib/components/workspace/Functions.svelte
View file @
bf5775e0
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
toast.error(error);
toast.error(error);
return [];
return [];
});
});
console.log(functions);
});
});
</script>
</script>
...
@@ -107,17 +109,27 @@
...
@@ -107,17 +109,27 @@
href={`/workspace/functions/edit?id=${encodeURIComponent(func.id)}`}
href={`/workspace/functions/edit?id=${encodeURIComponent(func.id)}`}
class="flex items-center text-left"
class="flex items-center text-left"
>
>
<div class=" flex-1 self-center pl-
5
">
<div class=" flex-1 self-center pl-
1
">
<div class=" font-semibold flex items-center gap-1.5">
<div class=" font-semibold flex items-center gap-1.5">
<div
class=" text-xs font-black px-1 rounded uppercase line-clamp-1 bg-gray-500/20 text-gray-700 dark:text-gray-200"
>
{func.type}
</div>
<div>
<div>
{func.name}
{func.name}
</div>
</div>
<div class=" text-gray-500 text-xs font-medium">{func.id}</div>
</div>
</div>
<div class="flex gap-1.5 px-1">
<div class=" text-gray-500 text-xs font-medium">{func.id}</div>
<div class=" text-xs overflow-hidden text-ellipsis line-clamp-1">
<div class=" text-xs overflow-hidden text-ellipsis line-clamp-1">
{func.meta.description}
{func.meta.description}
</div>
</div>
</div>
</div>
</div>
</a>
</a>
</div>
</div>
<div class="flex flex-row space-x-1 self-center">
<div class="flex flex-row space-x-1 self-center">
...
...
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