Repository navigation
[6040] 将 LLM 聊天消息区接入统一编辑器只读模式 - #4801
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
chattmfs 协议注册tmfs-permission-handler,对tmfs://chat/{sessionId}/message禁用写权限(input与chat-tab保持可写),并在set_buffer_tree新建缓冲区分支同步检测写权限;begin-system-document-load/end-system-document-loadScheme 胶水接口,在chat-tab-with-buffer中通过dynamic-wind包裹系统级写入豁免,保证 LLM 流式生成、历史会话恢复与样式更新不被edit_announce拦截;qt_chat_tab_widget中基于 QteventFilter(chat_message_readonly/should_block_readonly_event)的局部拦截补丁,保留Ctrl/Cmd+J快捷键;edit_typeset_rep::show_readonly_tip_for_reason中跳过tmfs://chat/内嵌缓冲区,避免主窗口底部状态栏误弹出文件只读提示;unified_readonly_test、qt_chat_tab_widget_test与chat-protocol-test。Why
此前
[0235]/[0237]/[0247]通过 QteventFilter拦截消息区键盘与输入法事件,既无法拦截菜单粘贴/中键粘贴/拖放等非键盘编辑入口,也与[6034]建立的统一只读模式机制割裂。接入统一只读模式后所有用户编辑路径均在edit_announce单点边界统一拦截。How to test
xmake b stemxmake b unified_readonly_test && xmake r unified_readonly_testxmake b qt_chat_tab_widget_test && xmake r qt_chat_tab_widget_testxmake r chat-protocol-testxmake r chat-tree-ops-test