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
1db6a5f9
"...composable_kernel_onnxruntime.git" did not exist on "7b1e2c379e0ddbeceec1f91f6d4d5f46cde29f7a"
Commit
1db6a5f9
authored
Nov 08, 2023
by
Timothy J. Baek
Browse files
fix: textarea resizing
parent
085cb5ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
src/routes/+page.svelte
src/routes/+page.svelte
+13
-11
No files found.
src/routes/+page.svelte
View file @
1db6a5f9
...
@@ -675,6 +675,18 @@
...
@@ -675,6 +675,18 @@
}
else
if
(
messages
.
length
!=
0
&&
messages
.
at
(
-
1
).
done
!=
true
)
{
}
else
if
(
messages
.
length
!=
0
&&
messages
.
at
(
-
1
).
done
!=
true
)
{
console
.
log
(
'
wait
'
);
console
.
log
(
'
wait
'
);
}
else
{
}
else
{
document
.
getElementById
(
'
chat-textarea
'
).
style
.
height
=
''
;
messages
=
[
...
messages
,
{
role
:
'
user
'
,
content
:
userPrompt
}
];
prompt
=
''
;
if
(
messages
.
length
==
0
)
{
if
(
messages
.
length
==
0
)
{
await
db
.
put
(
'
chats
'
,
{
await
db
.
put
(
'
chats
'
,
{
id
:
chatId
,
id
:
chatId
,
...
@@ -690,16 +702,6 @@
...
@@ -690,16 +702,6 @@
chats
=
await
db
.
getAllFromIndex
(
'
chats
'
,
'
timestamp
'
);
chats
=
await
db
.
getAllFromIndex
(
'
chats
'
,
'
timestamp
'
);
}
}
messages
=
[
...
messages
,
{
role
:
'
user
'
,
content
:
userPrompt
}
];
prompt
=
''
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
window
.
scrollTo
({
top
:
document
.
body
.
scrollHeight
,
behavior
:
'
smooth
'
});
window
.
scrollTo
({
top
:
document
.
body
.
scrollHeight
,
behavior
:
'
smooth
'
});
},
50
);
},
50
);
...
@@ -1099,6 +1101,7 @@
...
@@ -1099,6 +1101,7 @@
}}
}}
>
>
<textarea
<textarea
id=
"chat-textarea"
class=
"rounded-xl dark:bg-gray-700 dark:text-gray-100 outline-none border dark:border-gray-700 w-full py-3 px-5 pr-12 resize-none"
class=
"rounded-xl dark:bg-gray-700 dark:text-gray-100 outline-none border dark:border-gray-700 w-full py-3 px-5 pr-12 resize-none"
placeholder=
"Send a message"
placeholder=
"Send a message"
bind:value=
{prompt}
bind:value=
{prompt}
...
@@ -1107,7 +1110,6 @@
...
@@ -1107,7 +1110,6 @@
e.preventDefault();
e.preventDefault();
}
}
if (prompt !== ''
&&
e.keyCode == 13
&&
!e.shiftKey) {
if (prompt !== ''
&&
e.keyCode == 13
&&
!e.shiftKey) {
e.target.style.height = '';
submitPrompt(prompt);
submitPrompt(prompt);
}
}
}}
}}
...
...
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