mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 22:27:29 +00:00
Add a "copy" button below each message (#6654)
This commit is contained in:
parent
58342740a5
commit
a5d64b586d
5 changed files with 104 additions and 26 deletions
|
|
@ -3,7 +3,7 @@ import io
|
|||
|
||||
import requests
|
||||
|
||||
from modules import shared
|
||||
from modules import shared, ui
|
||||
from modules.logging_colors import logger
|
||||
|
||||
original_open = open
|
||||
|
|
@ -58,6 +58,7 @@ def my_open(*args, **kwargs):
|
|||
'\n <script src="file/js/morphdom/morphdom-umd.min.js"></script>'
|
||||
f'\n <link id="highlight-css" rel="stylesheet" href="file/css/highlightjs/{"github-dark" if shared.settings["dark_theme"] else "github"}.min.css">'
|
||||
'\n <script>hljs.addPlugin(new CopyButtonPlugin());</script>'
|
||||
f'\n <script>{ui.global_scope_js}</script>'
|
||||
'\n </head>'
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue