feat(gui): Implement selectable thinking monologs and fix UI regressions
- Implement [Pure]/[Read] toggle for AI thinking monologues to allow text selection/copying. - Fix TypeError: render_thinking_trace() missing 'entry_index' argument. - Fix [+] buttons in Discussion and Comms history by correctly updating window state registry. - Remove ListClipper from Discussion and Comms panels to fix variable-height clipping issues. - Increase clipping heights for large entries to improve visibility. - Fix code block scroll snapping in Markdown helper by robustifying text synchronization.
This commit is contained in:
@@ -126,13 +126,13 @@ class MarkdownRenderer:
|
||||
|
||||
# Sync text and language
|
||||
lang_id = self._lang_map.get(lang_tag, ed.TextEditor.LanguageDefinitionId.none)
|
||||
target_text = code + "\n"
|
||||
|
||||
if editor.get_text() != target_text:
|
||||
# Robust check to avoid re-setting text every frame (which resets scroll)
|
||||
curr_text = editor.get_text().replace('\r\n', '\n').strip()
|
||||
if curr_text != code.replace('\r\n', '\n').strip():
|
||||
editor.set_text(code)
|
||||
editor.set_language_definition(lang_id)
|
||||
elif editor.get_language_definition_name().lower() != lang_tag:
|
||||
# get_language_definition_name might not match exactly but good enough check
|
||||
editor.set_language_definition(lang_id)
|
||||
|
||||
# Dynamic height calculation
|
||||
|
||||
Reference in New Issue
Block a user