Repository navigation
feat(settings): 按内置高亮格式管理系统文件关联 - #2361
Merged
xiaoyumuxi merged 3 commits intoNov 23, 2026
Merged
Conversation
xiaoyumuxi
marked this pull request as ready for review
November 23, 2026 12:10
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
用户需要在“设置 → 外观与行为 → 通用”中选择由 Lithe 打开的文本格式,并看见系统实际的默认应用。列表改用内置高亮支持的扩展名及纯文本生成,避免正则、所有文件兜底或不生效的影子偏好。
改动 / Changes
viva.toml的文件类型声明。打包前检查目录一致,跨架构打包时生成器使用主机架构,最终应用与辅助程序保持目标架构。bb0ad53f9100954306fcd139bf0e5003e6a515fe,包含当时最新 main。请先合入 Core 添加对常见配置文件的高亮支持 #186;如果合并方式改变哈希,宿主合入前同步更新 pin。不在本 PR 范围内 / Out of scope
pending。不升级应用版本、不发版。类型专属:feat
多平台对齐
范围检查 / Scope checks
功能矩阵 / Feature matrix
system-file-associations.json,实现与验证状态、证据及动作如实填写,原生验收保持pending。.artifacts/生成视图。插件归属 / Plugin ownership
UI 验证 / UI evidence
TestVisualFileAssociations在 macOS arm64 无头运行,1120×820 点,中文/英文与明暗四种组合;真实系统只读,覆盖勾选、滚轮到底与返回、虚拟化、全选、清空、刷新。最后截图基于4d19f87d9加最终测试清理,最终提交为737384784。统一日志系统 / Structured logging
performedIn/operationFailedIn接入;没有新增运行时 stderr 或自由文本日志通道。界面文案 / i18n
shared/i18n/,已生成并提交字典,界面通过统一接口读取。--check通过,没有扩大豁免。逻辑归属 / Logic placement
性能与内存 / Performance and memory
BenchmarkEditorSyntaxViewportWarm同机改动前后各 6 次:6 场景均在预算内,改动前 1.33–1.47 µs,改动后 1.19–1.29 µs,均为 0 B/op、0 allocs/op;perfhistory 未发现回归。导出元数据不改变染色读取算法,不将差值宣称为性能优化。原生启动、GPU、常驻内存没有对应对比,不算通过。设置 / Settings
插件契约 / Plugin contract
N/A:新增的是共享应用命令,不是插件协议、宿主方法或通知;应用契约在 Core #186,同步精确 pin。
发行包与资源 / Bundle and resources
docs/ci-builds.md说明生成清单和截图归属、生命周期、架构及不可跨工作树复制的约束。无用代码与重构 / Dead code and refactoring
验证 / Verification
file_associations_fixture与公开命令表测试desktop-go.sh test ./internal/core ./internal/fileassociations ./internal/workbench -run '^Test(FileAssociations|SystemDocuments)' -count=1 -timeout=60s-raceTestVisualFileAssociations,vivahead lithevisualdesktop-go.sh build -o … ./cmd/lithegenerate-file-associations.sh --checknode --test --test-timeout=60000 scripts/desktop/package-desktop.test.mjs未能执行的检查和原因:
-tags dev下因既有纯布局 Part/Key 触发断言,已复现并建单 [Feature] 整理共享布局的 Part/Key 身份归属以通过 Viva dev 检查 #2359,未标作通过。提交前确认 / Final checks
origin/main;目标为main。