Commit graph

126 commits

Author SHA1 Message Date
oobabooga
504d3d9de1 Simplify the implementation 2025-05-27 18:42:07 -07:00
Th-Underscore
9d1c1a8892
Clean up 2025-05-24 14:22:42 -04:00
Th-Underscore
820a0e75b4
Fix re-selecting message during HTML generation 2025-05-22 19:42:07 -04:00
Th-Underscore
b3c68773b8
Update logic 2025-05-22 19:21:58 -04:00
Th-Underscore
b549ac9cfe
Basic changes for new structure
Removed unnecessary .boogaplus saving+loading and structure validation
Fix replace_last_reply (using 'text' as Textbox when MultimodalTextbox)

TODO: Merge message_versioning.py into chat.py (depending on how to make html_generator.py implement versioning HTML)
2025-05-22 18:28:08 -04:00
Underscore
fee48eb2a8
Merge branch 'dev' into dev 2025-05-21 18:27:56 -04:00
oobabooga
409a48d6bd
Add attachments support (text files, PDF documents) (#7005) 2025-05-21 00:36:20 -03:00
Daniel Dengler
c25a381540
Add a "Branch here" footer button to chat messages (#6967) 2025-05-20 11:07:40 -03:00
oobabooga
8e10f9894a
Add a metadata field to the chat history & add date/time to chat messages (#7003) 2025-05-20 10:48:46 -03:00
Underscore
0cfb8f713e
Update html_generator.py
Replaced problematic `streaming_class` with `selected_class`
2025-05-17 11:11:52 -04:00
Underscore
fcdc4b6e0c
Merge branch 'dev' into dev 2025-05-17 07:00:14 -04:00
oobabooga
e3bba510d4 UI: Only add a blank space to streaming messages in instruct mode 2025-05-16 17:49:17 -07:00
oobabooga
690d693913 UI: Add padding to only show the last message/reply after sending a message
To avoid scrolling
2025-05-04 18:13:29 -07:00
Th-Underscore
bc0df8a518
UI: Add message versioning and navigation (integrated boogaplus extension)
- Created a new module (message_versioning.py) for managing message versioning logic and data storage
- Added relevant Gradio communication in ui_chat.py
- Updated chat.py to append messages to versioning history and other history-related operations
- Updated HTML generation to include message version navigation elements
- Implemented JavaScript functions for handling message version navigation, selection, and history management
- Added relevant CSS styling (handling all three message classes is a little messy, but changing the original class structure might be problematic)

Notes:
- Doesn't always update on first load via `shared.gradio['unique_id'].select()`
- No go-to-first or go-to-last nav arrows
- Some of the methods and variables are... long-winded
- Have only tested with a couple extensions, but this _shouldn't_ break anything and should be completely backwards-compatible
- Haven't put any documentation for controls (Ctrl+Left/Right Arrow for navigation, Ctrl+Up/Down Arrow as an alternative for selection)
- The original footer buttons aren't set to full opacity when the message is selected, only the new nav container
- Output file extension is `.boogaplus` cuz it's cool
- Tried using `None` as a placeholder in the history storage dict (`null` in the JSON) instead of always saving the text to save space, but sometimes leads to client-server issues
2025-05-04 14:57:19 -04:00
oobabooga
b71ef50e9d UI: Add a min-height to prevent constant scrolling during chat streaming 2025-05-02 23:45:58 -07:00
oobabooga
195a45c6e1 UI: Make thinking blocks closed by default 2025-04-30 15:12:46 -07:00
oobabooga
d9de14d1f7
Restructure the repository (#6904) 2025-04-26 08:56:54 -03:00
oobabooga
d35818f4e1
UI: Add a collapsible thinking block to messages with <think> steps (#6902) 2025-04-25 18:02:02 -03:00
oobabooga
a90df27ff5 UI: Add a greeting when the chat history is empty 2025-04-24 20:33:40 -07:00
oobabooga
297a406e05 UI: smoother chat streaming
This removes the throttling associated to gr.Textbox that made words appears in chunks rather than one at a time
2025-04-09 16:02:37 -07:00
oobabooga
c6f2c2fd7e UI: style improvements 2025-02-02 15:34:03 -08:00
oobabooga
0485ff20e8 Workaround for convert_to_markdown bug 2025-01-23 06:21:40 -08:00
oobabooga
5e99dded4e UI: add "Continue" and "Remove" buttons below the last chat message 2025-01-21 09:05:44 -08:00
oobabooga
1ef748fb20 Lint 2025-01-14 16:44:15 -08:00
Underscore
53b838d6c5
HTML: Fix quote pair RegEx matching for all quote types (#6661) 2025-01-13 18:01:50 -03:00
oobabooga
facb4155d4 Fix morphdom leaving ghost elements behind 2025-01-11 20:57:28 -08:00
mamei16
f1797f4323
Unescape backslashes in html_output (#6648) 2025-01-11 18:39:44 -03:00
oobabooga
1b9121e5b8 Add a "refresh" button below the last message, add a missing file 2025-01-11 12:42:25 -08:00
oobabooga
a5d64b586d
Add a "copy" button below each message (#6654) 2025-01-11 16:59:21 -03:00
oobabooga
049297fa66 UI: reduce the size of CSS sent to the UI during streaming 2025-01-04 14:09:36 -08:00
oobabooga
0e673a7a42 UI: reduce the size of HTML sent to the UI during streaming 2025-01-04 11:40:24 -08:00
mamei16
9f24885bd2
Sane handling of markdown lists (#6626) 2025-01-04 15:41:31 -03:00
oobabooga
725639118a UI: Use a tab length of 2 for lists (rather than 4) 2025-01-01 13:53:50 -08:00
oobabooga
64853f8509 Reapply a necessary change that I removed from #6599 (thanks @mamei16!) 2024-12-31 14:43:22 -08:00
mamei16
e953af85cd
Fix newlines in the markdown renderer (#6599)
---------

Co-authored-by: oobabooga <oobabooga4@gmail.com>
2024-12-31 01:04:02 -03:00
oobabooga
0490ee620a UI: increase the threshold for a <li> to be considered long (some more) 2024-12-19 16:51:34 -08:00
oobabooga
89888bef56 UI: increase the threshold for a <li> to be considered long 2024-12-19 14:38:36 -08:00
oobabooga
e2fb86e5df UI: further improve the style of lists and headings 2024-12-19 13:59:24 -08:00
oobabooga
3d19746a5d UI: improve HTML rendering for lists with sub-lists 2024-11-18 10:14:09 -08:00
oobabooga
ffc713f72b UI: fix multiline LaTeX equations 2024-07-27 15:36:10 -07:00
oobabooga
e4d411b841 UI: fix rendering LaTeX enclosed between \[ and \] 2024-07-27 15:21:44 -07:00
oobabooga
42e80108f5 UI: clear the markdown LRU cache when using the default/notebook tabs 2024-07-25 08:01:42 -07:00
oobabooga
947016d010 UI: make the markdown LRU cache infinite (for really long conversations) 2024-07-24 11:54:26 -07:00
oobabooga
e637b702ff UI: make text between quotes colored in chat mode 2024-07-23 21:30:32 -07:00
oobabooga
8ec8bc0b85 UI: handle another edge case while streaming lists 2024-06-26 18:40:43 -07:00
oobabooga
b1187fc9a5 UI: prevent flickering while streaming lists / bullet points 2024-06-25 19:19:45 -07:00
oobabooga
6761b5e7c6
Improved instruct style (with syntax highlighting & LaTeX rendering) (#5936) 2024-04-26 10:13:11 -03:00
Victorivus
c423d51a83
Fix issue #5783 for character images with transparency (#5827) 2024-04-11 02:23:43 -03:00
oobabooga
13fe38eb27 Remove specialized code for gpt-4chan 2024-04-04 16:11:47 -07:00
oobabooga
49b111e2dd Lint 2024-03-17 08:33:23 -07:00