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
abbfd1dc
Commit
abbfd1dc
authored
Dec 02, 2023
by
Timothy J. Baek
Browse files
fix: copy code button issue
parent
566698a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/lib/components/chat/Messages.svelte
src/lib/components/chat/Messages.svelte
+2
-2
No files found.
src/lib/components/chat/Messages.svelte
View file @
abbfd1dc
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
blocks
.
forEach
((
block
)
=>
{
blocks
.
forEach
((
block
)
=>
{
// only add button if browser supports Clipboard API
// only add button if browser supports Clipboard API
if
(
navigator
.
clipboard
&&
block
.
childNodes
.
length
<
2
)
{
if
(
navigator
.
clipboard
&&
block
.
childNodes
.
length
<
2
&&
block
.
id
!==
'
user-message
'
)
{
let
code
=
block
.
querySelector
(
'
code
'
);
let
code
=
block
.
querySelector
(
'
code
'
);
code
.
style
.
borderTopRightRadius
=
0
;
code
.
style
.
borderTopRightRadius
=
0
;
code
.
style
.
borderTopLeftRadius
=
0
;
code
.
style
.
borderTopLeftRadius
=
0
;
...
@@ -425,7 +425,7 @@
...
@@ -425,7 +425,7 @@
{/each}
{/each}
</div>
</div>
{/if}
{/if}
<pre
class=
"
"
>
{message.content}
</pre>
<pre
id=
"user-message
"
>
{message.content}
</pre>
<div
class=
" flex justify-start space-x-1"
>
<div
class=
" flex justify-start space-x-1"
>
{#if message.parentId !== null
&&
message.parentId in history.messages
&&
(history.messages[message.parentId]?.childrenIds.length ?? 0) > 1}
{#if message.parentId !== null
&&
message.parentId in history.messages
&&
(history.messages[message.parentId]?.childrenIds.length ?? 0) > 1}
...
...
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