fix: 透传 session_prompt_right 插槽,修复对 oc-tps 等提示区插件的遮挡 - #27
Merged
Conversation
Owner
|
感谢你对于该问题的修复,合并 PR 后,我会尽快发布新版本,感谢你的支持。 |
Hotakus
added a commit
that referenced
this pull request
Aug 19, 2026
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.
问题
本插件以
replace模式接管session_prompt插槽后,宿主默认的Prompt组件(连同其内部的session_prompt_right插槽渲染点)被整体替换,且未透传rightprop。结果是任何依赖
session_prompt_right插槽的第三方 TUI 插件(如 oc-tps 的 TPS/AVG/TTFT 显示)在安装本插件后完全无法渲染——两个插件看似冲突,实为本插件吞掉了渲染点。修复
与宿主默认路由(
packages/tui/src/routes/session/index.tsx)保持一致,向api.ui.Prompt透传rightprop:session_prompt_right时正常渲染在其惯常位置(输入框右侧)Slot渲染为null,行为与原先不传right完全一致,零副作用验证
tsc --noEmit通过,构建产物 diff 仅为该 3 行修复TPS - | AVG 31.9 | TTFT 6.9s(oc-tps)与底部命中率状态栏(本插件)共存效果对比
修复前:输入行右侧无 TPS 显示(渲染点被本插件接管后丢失)
修复后(宽终端):