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>
This commit is contained in:
bmen25124
2025-03-06 22:30:17 +03:00
committed by GitHub
parent 4d81dfb085
commit 50f1e3f0f2
4 changed files with 127 additions and 13 deletions

View File

@@ -453,6 +453,8 @@ export const event_types = {
MESSAGE_DELETED: 'message_deleted',
MESSAGE_UPDATED: 'message_updated',
MESSAGE_FILE_EMBEDDED: 'message_file_embedded',
MESSAGE_REASONING_EDITED: 'message_reasoning_edited',
MESSAGE_REASONING_DELETED: 'message_reasoning_deleted',
MORE_MESSAGES_LOADED: 'more_messages_loaded',
IMPERSONATE_READY: 'impersonate_ready',
CHAT_CHANGED: 'chat_id_changed',