Repository navigation
[6040] 注册 chat lazy-tmfs-handler 修复首次进入 Chat 输入框只读缺陷 - #4802
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
修复 #4801 合入后,非社区版启动后首次点击
Chat标签页时,「欢迎使用 Liii STEM!」下方输入框(tmfs://chat/*/input)无法通过键盘输入任何内容(报错read-only/invalid history)的回归问题。Why
tmfs-permission-handler (chat name type)定义在TeXmacs/plugins/llm/progs/llm/chat-protocol.scm,但chat协议从未通过lazy-tmfs-handler注册到lazy-tmfs-table。Chat标签页时,chat_init创建tmfs://chat/*/input缓冲区调用set_buffer_tree->has_permission(name, "w")->(tmfs-permission? ...)的时机早于llm插件的延迟加载时机,导致回落到默认处理器tmfs-handler #t 'permission?并对"write"返回#f,将输入框误标为read_only = true。How
TeXmacs/progs/init-research.scm注册(lazy-tmfs-handler (llm chat-loader) chat),在首次查询tmfs://chat/*权限时由lazy-tmfs-force立即按需加载(llm chat-loader)。tests/Edit/Modify/unified_readonly_test.cpp增加在llm插件懒加载前创建tmfs://chat/unit-test/input(read_only == false)与tmfs://chat/unit-test/message(read_only == true)的回归验证。Verification
xmake b unified_readonly_test && xmake r unified_readonly_test: 3 passed, 0 failedxmake b qt_chat_tab_widget_test && xmake r qt_chat_tab_widget_test: 92 passed, 0 failedxmake b stem && xmake r chat-protocol-test: 127 correct, 0 faileddev-agent/tests/mogan/python/6040.py --verify):启动非社区版并点击Chat后输入a b c正常上屏(delta=343),无read-only/invalid history异常