[Idea] 文件/Markdown 预览中选中文本 → 以「@路径:行号」精确引用插入输入框(官方内建 + 行级语法) #6331
shenxiuqiang
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
需求概述
在文件 / Markdown 预览中选中一段文本后,一键把「精确位置」插入输入框:@路径:起始行-结束行 加上摘录内容,让 Agent 准确知道要改哪里。希望作为官方内建能力提供,并统一到现有的 @file 引用语法。
使用场景
现状调研(避免重复造轮子)
社区已经验证了这类交互,但都是第三方插件,且集中在会话记录或完整工作台:
官方侧:@deepseek-ai/dsh-client-ui-sidebar-documentpreview 是纯查看器——其 README 明确写着「模型体验:无」「用户在这里读到的东西永不进入模型请求」「预览而非编辑」,并且未包含在默认 bundle 中。
本需求的具体缺口(三点)
建议实现要点(供维护者参考)
价值
English TL;DR: Make the built-in file / Markdown preview support select → insert a line-precise @path:Lstart-Lend reference into the composer, reusing the official reference-chip pipeline, so the agent can target edits exactly. Community plugins (#5855, #1139, #5577) already validate the interaction on the transcript / a full workbench; this asks for the native, line-precise core version plus a documented insertion interface.
All reactions