Repository navigation
feat(editor): Viva 右键复制符号与代码行引用 (#2015) - #2043
Closed
lithe-support[bot] wants to merge 6 commits into
Closed
lithe-support[bot] wants to merge 6 commits into
lithe-support[bot] wants to merge 6 commits into
Conversation
1 task done
24 of 32 tasks
Contributor
Author
已由无冲突的替代 PR 接续本 PR 创建时基于旧 已使用 Lithe-Support Bot 从最新 后续以 #2046 为准,本旧 PR 不再追加提交,以免重复 CI。新 PR 仍需通过自己的 CI 与无头截图验收;不自动合并。Lithe-Support 当前没有关闭旧 PR、更新分支基线或改 Draft/Ready 状态的写入动作,所以此处只标记为被替代,不把它误报为已关闭。 |
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 17, 2026
* feat(editor): port #2015 Viva copy-reference feature onto current main, preserving toolchain Core changes * fix(editor): pin integrated Core with nullable symbol children support (#2015) * chore(editor): pin formatted Core integration SHA for #2015 * fix(editor): 复制源码位置在文档已修改时清掉过期请求,去掉测试里的调试日志 (#2015) 符号回复到达时文档已改或已关,原来只清 pending 不清请求本身,过期请求一直挂着; 现在同时清掉,测试断言它不再残留。删掉 TestCopyReferenceLocationUsesLanguageSymbols 里排查用的 t.Cleanup 日志。 * fix(editor): 复制源码位置等待语言服务器符号设上限,右键位置随菜单关闭失效 (#2015) - 语言服务器一直不回答时,最多等 3 秒(referenceSymbolsTimeout),之后取消请求、 记录 editor_copy_reference_symbols 日志,按没有服务器时的规则复制文件路径和行号; 回答到达或被新一次复制替换时停止计时。 - 右键坐标只属于它打开的那一次菜单:菜单画出后没选这一项就关闭,坐标丢弃, 之后 Shift+F10 打开的菜单读取光标位置。 - 新增两个回归测试,修复前失败、修复后通过;更新 Agent Note 与功能矩阵说明, 矩阵备注不再写 Core PR 待配套合入。 --------- Co-authored-by: lithe-support[bot] <356900028+lithe-support[bot]@users.noreply.github.com> Co-authored-by: Yao Jingxi <23722032@bjtu.edu.cn>
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
编辑器右键原先缺少复制当前代码引用的入口。Core #70 新增通用符号引用格式化接口;本 PR 将它接入 macOS/Windows 共用的 Viva 编辑器。
改动 / Changes
documentSymbols返回包、类、方法、签名时生成com.example.DemoClass#goHome(String,Integer)#L137;没有可靠符号时返回文件路径#L137。desktop/internal/core/reference_location.go作为 Rust Core JSON 桥接;固定依赖 Core lithe 0.2.1 #70 的7836c6c(在 Core 合入后必须换成 main 上的正式 SHA)。不在本 PR 范围内 / Out of scope
不引入语言专用源码分析器、不修改 LSP 插件协议、不改变现有标签页的复制路径子菜单。
类型专属:feat
多平台对齐
范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/editor-copy-reference-location.json,两端实现状态和验证状态分别列示;原生均为 pending。插件归属 / Plugin ownership
UI 验证 / UI evidence
TestVisualCopyReferenceLocation,覆盖 dark/light × zh-Hans/en,真实菜单及粘贴行为。统一日志系统 / Structured logging
performed、backgroundFailed、operationFailed的既有事件边界,不记录源码、引用内容或私密路径。界面文案 / i18n
native.copySourceLocation中英文翻译,不硬编码或手动修改生成资源。逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A:无新增设置。
插件契约 / Plugin contract
N/A:不修改插件契约、宿主方法或通知;独立的共享 Core 编辑器命令新增于 #70。
发行包与资源 / Bundle and resources
无用代码与重构 / Dead code and refactoring
验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/workbench -run 'TestCopyReferenceLocation|TestEditorContextMenuCopiesReference'LITHE_VISUAL_OUTPUT_DIR=.artifacts/issue-2015 scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualCopyReferenceLocation$'node scripts/i18n/generate-i18n.mjs --check、功能矩阵门禁、插件归属门禁未能执行的检查和原因: 机器人仅有仓库文件写入及 CI 只读能力,运行环境的 GitHub DNS 不可达且未安装 Rust 工具链,因此不能本地克隆运行 Viva;Linux CI 是这次能得到的真实构建验证,不能冒充原生验收。
提交前确认 / Final checks
main(7899acad)创建单独开发分支;目标main。