76 Commits

Author SHA1 Message Date
Cohee
73230272f3 Apply regex to multiswipe reasoning, set reasoning_type to Parsed 2025-03-10 10:48:31 +00:00
Cohee
96d79ac4e9 Merge branch 'staging' into continue-from-reasoning 2025-03-09 01:19:25 +02:00
Cohee
0ea64050ff Parse reasoning in multi-swipe swipes 2025-03-08 23:06:56 +02:00
Cohee
980ed76cc3 Fix auto-parsing of continue from reasoning
Continues #3606
2025-03-08 12:58:26 +02:00
Wolfsblvt
91fe2841e3 Fix reasoning rendering on auto-save message 2025-03-08 05:52:11 +01:00
bmen25124
50f1e3f0f2
Added translation to reasoning block (#3617)
* Added translate to reasoning block

* Added mising reset value

* Shortcut nullable type

* Added reasoning edited/deleted events, better naming

* Fixed async call

* Added await to saveChat calls

* Exported updateReasoningUI

* Removed translated reasoning on edit if auto mode is none

* Added new value check before updating reasoning block, fixed an issue that display value stays same when we edit the message.

* Translate reasoning before the main message

* Fixed auto mode translate for reasoning message

* Translate reasoning first. Prevent out of bounds access

* Fix translating reasoning on swipe generation

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-03-06 21:30:17 +02:00
Cohee
7be6e0d5af Fix continue duplicating reasoning block 2025-03-04 00:42:50 +02:00
Cohee
9c4bffc487
Merge pull request #3577 from SillyTavern/the-best-model-tm
Add gpt-4.5-preview (best model ™️ - most expensive for sure)
2025-02-27 23:30:34 +02:00
Wolfsblvt
ea643cce6e Add gpt-4.5-preview 2025-02-27 22:08:29 +01:00
Wolfsblvt
b98556855d Fix undefined translation 2025-02-27 21:15:12 +01:00
Cohee
8b135f9ca3 Remove async from event handler 2025-02-25 21:52:03 +02:00
Cohee
422517ec93 Cancel debounced chat save if regular save is performed 2025-02-25 21:38:24 +02:00
Cohee
eceaa9cacc Replace debounced save with regular 2025-02-25 21:32:39 +02:00
Wolfsblvt
d28f39d77a Save chat on reasoning parse 2025-02-25 17:23:12 +01:00
Wolfsblvt
8bdc00e0b9 Fix reasoning not always being synced to swipe 2025-02-25 17:10:13 +01:00
Cohee
b8ebed0f4c Claude 3.7 think mode 2025-02-24 23:43:13 +02:00
Cohee
4802e4bed2 Reasoning edit/parse updates
1. Parse reasoning on message edit
2. Reasoning edit follow 'auto-save' preference
2025-02-22 19:14:01 +02:00
Cohee
5c79c8e162 [chore] Reformat new code 2025-02-22 12:47:19 +02:00
yokuminto
13f76c974e reasoning or reasoning_content 2025-02-22 16:09:42 +08:00
Wolfsblvt
b0a2f241d2 Fix hidden reasoning not allowing manual parsing 2025-02-21 18:01:25 +01:00
Cohee
87afb1633b reasoning-set: Return if message not found 2025-02-17 19:54:50 +02:00
Wolfsblvt
994d69508b Merge branch 'parse-reasoning-command-args' into reasoning-parsing-streaming 2025-02-17 03:54:24 +01:00
Wolfsblvt
1ad3a2b968 Add 'return' and 'strict' to /reasoning-parse
- Add 'return' arg to `/reasoning-parse` to decide whether to return the reasoning, or the content without reasoning. Defaulting to reasoning.
- Add 'strict' arg to `/reasoning-parse` to decide whether the reasoning block has to be at the beginning of the provided message or not. Defaulting to true.
- Update parsing of all reasoning (even the auto parse one) to be strict by default - meaning the regex block has to be at the beginning (excluding whitespaces)
2025-02-17 03:47:31 +01:00
Cohee
1156b648eb Merge branch 'staging' into reasoning-parsing-streaming 2025-02-16 23:12:41 +02:00
Cohee
ec49b19aff Fix chat render when OpenRouter "website setting" model used 2025-02-16 22:46:44 +02:00
Wolfsblvt
b3688087d5 Save reasoning type with the message
- use mes extras property to save where the reasoning came from
- update it accordingly on streaming, slash commands and manual add
- Modify title tooltip on reasoning header to show the origin where it makes sense, providing the user with a little bit more orientation about the reasoning.
2025-02-16 05:05:48 +01:00
Wolfsblvt
bcea4248c4 Shouldn't parse reasoning if real reasoning there 2025-02-16 03:21:02 +01:00
Wolfsblvt
9590127bae Handle auto parsing reasoning during streaming
- Add function to handle auto parsing reasoning from the streamed message during streaming
- Only works when the reasoning prefix is EXACTLY at the beginning of the message
- Tried to keep this lightweight, no regex parsing, remembering the index, so it's simple string splicing
- Add utility function that trims a string only if `trim_spaces` is enabled
2025-02-16 03:09:20 +01:00
Wolfsblvt
37d9d4c253 Make sure auto-expand doesn't conflict with hidden 2025-02-15 21:44:06 +01:00
Wolfsblvt
dd50f49176 Fix auto expand on thinking during new message 2025-02-15 10:23:36 +01:00
Cohee
1a52d3c293 Fix rendering of messages without extra object 2025-02-13 12:22:41 +00:00
Cohee
d6bf3439b4 Don't try to update reasoning for impersonation stream 2025-02-13 10:55:32 +00:00
Wolfsblvt
93f3334ad0 Make hidden reasoning blocks not toggleable 2025-02-12 22:38:26 +01:00
Wolfsblvt
b5fc7d6d4d Add toggle for showing hidden reasoning 2025-02-12 22:04:48 +01:00
Wolfsblvt
c2377f0c13 Re-add reasoning placeholder check to prompt build
- Was removed because placeholder is not needed anymore. But for compatibility with old saved chats from staging that might have this, we should keep it for a while (or forever)
2025-02-12 18:43:05 +01:00
Cohee
d1018a824c Merge branch 'staging' into hidden-reasoning-tracking 2025-02-11 23:45:13 +02:00
Wolfsblvt
d9b2311e17 Allow editing/adding hidden reasoning blocks
- Fix cancel not cancelling correctly
- Allow editing/adding of hidden reasoning blocks
- Make style and tooltip to show on edit that hidden reasoning is present
- Update reasoning UI on edit cancel - to be sure
2025-02-11 22:17:40 +01:00
Wolfsblvt
21af0243d6 Rework reasoning CSS selectors and fixes
- Remove reliance on :empty state of reasoning textbox, now using the actual css class on mes (".mes.reasoning")
- Fix reasoning add not working when Auto-Expand is not enabled
- Clean setting of dataset attributes, now removing when null
2025-02-11 21:45:54 +01:00
Cohee
63e3816e92 Remove reasoning from queit prompt results if auto-parse is enabled
Fixes #3457
2025-02-11 22:35:56 +02:00
Wolfsblvt
d60609716b Yoink reasoning placeholder from being saved 2025-02-11 20:58:05 +01:00
Wolfsblvt
c8b103a9e8 Make "Thinking..." default to fix weird flicker 2025-02-11 18:41:44 +01:00
Wolfsblvt
703e876f4a Fix and shorten isHiddenReasoningModel 2025-02-10 06:15:47 +01:00
Wolfsblvt
31f19d0d8a More fixes on reasoning
- Fix resetting reasoning on swipes
- Fix not updating reasoning time/end on gen when trim spaces was enabled
- Fix hidden model checking not working
2025-02-09 08:26:51 +01:00
Wolfsblvt
d48db9aded Update hidden reasoning model function
- Now more flexibly supports different API providers, and uses direct model names
- Fixes hidden reasoning time for OpenRouter and custom endpoints
2025-02-09 06:27:04 +01:00
Wolfsblvt
c501673241 Small improvements to reasoning UI 2025-02-09 06:03:23 +01:00
Wolfsblvt
0792c17f55 Update reasoning CSS hide hidden reasoning again 2025-02-09 05:25:43 +01:00
Wolfsblvt
9697322f1e More coding on ReasoningHandler, fixing stuff 2025-02-09 05:17:56 +01:00
Wolfsblvt
d8eeab0c00 Refactoring StreamProcessor -> ReasoningHandler 2025-02-09 01:26:01 +01:00
Cohee
c886de5deb Move isHiddenReasoningModel 2025-02-08 18:17:38 +02:00
Wolfsblvt
d94ac48b65 Add thinking time for hidden reasoning models
- Streamline reasoning UI update functionality
- Add helper function to identify hidden reasoning models
- Fix/update reasoning time calculation to actually utilize start gen time
- Fix reasoning UI update on swipe
- add CSS class for hidden reasoning blocks (to make it possible to hide for users)
2025-02-08 00:45:33 +01:00