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
84844a84
"src/git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "fc46532955e497a23c1bba9ff3c670db38dd163e"
Commit
84844a84
authored
Feb 07, 2024
by
Timothy J. Baek
Browse files
feat: display max 4 suggestions
parent
7ac338ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/lib/components/chat/MessageInput/Suggestions.svelte
src/lib/components/chat/MessageInput/Suggestions.svelte
+8
-1
No files found.
src/lib/components/chat/MessageInput/Suggestions.svelte
View file @
84844a84
<script lang="ts">
<script lang="ts">
export let submitPrompt: Function;
export let submitPrompt: Function;
export let suggestionPrompts = [];
export let suggestionPrompts = [];
let prompts = [];
$: prompts =
suggestionPrompts.length <= 4
? suggestionPrompts
: suggestionPrompts.sort(() => Math.random() - 0.5).slice(0, 4);
</script>
</script>
<div class=" flex flex-wrap-reverse mb-3 md:p-1 text-left w-full">
<div class=" flex flex-wrap-reverse mb-3 md:p-1 text-left w-full">
{#each
suggestionP
rompts as prompt, promptIdx}
{#each
p
rompts as prompt, promptIdx}
<div class="{promptIdx > 1 ? 'hidden sm:inline-flex' : ''} basis-full sm:basis-1/2 p-[5px]">
<div class="{promptIdx > 1 ? 'hidden sm:inline-flex' : ''} basis-full sm:basis-1/2 p-[5px]">
<button
<button
class=" flex-1 flex justify-between w-full h-full px-4 py-2.5 bg-white hover:bg-gray-50 dark:bg-gray-900 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-800 rounded-lg transition group"
class=" flex-1 flex justify-between w-full h-full px-4 py-2.5 bg-white hover:bg-gray-50 dark:bg-gray-900 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-800 rounded-lg transition group"
...
...
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