Repository navigation
fix(macos): 修复长提示词导致的设置窗口卡顿 - #63
Open
xionghaizhi wants to merge 1 commit into
Open
xionghaizhi wants to merge 1 commit into
xionghaizhi wants to merge 1 commit into
Conversation
freestylefly
requested changes
Nov 23, 2026
freestylefly
left a comment
Owner
There was a problem hiding this comment.
@xionghaizhi 麻烦同步最新的 main,并修复下方的 macOS 13 兼容性问题。修复后直接更新这个 PR,等 CI 通过后请重新提请审核和合并。谢谢!
| .allowsHitTesting(false) | ||
| } | ||
| .focused($promptFocused) | ||
| .focusEffectDisabled() |
Owner
There was a problem hiding this comment.
当前 main 的最低支持版本是 macOS 13,.focusEffectDisabled() 要求 macOS 14,合并后会导致编译失败。请改用 main 中已有的 .compatFocusEffectDisabled()。
This branch has not been deployed
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.
问题
场景设置使用较长的中文提示词时,从 Dock 恢复窗口、切换场景和编辑提示词会出现卡顿。主线程采样指向多行
TextField的自动高度计算和中文排版;只读提示词及预览区也会按全文参与布局。修复
TextEditor,避免按全文反复计算高度。NSTextView,保留完整文本、选择和复制;内容未变化时不重新赋值,避免重复排版和选区重置。验证
main单独提取修复。当前环境为 Linux,未在本地运行 AppKit 测试;此组合的自动验证以本 PR 的 CI 检查结果为准。