feat(core): 规范各风格提示词中的文件引用格式#23
Open
huangdengdui wants to merge 1 commit intoOrionStarAI:opensourcefrom
Open
Conversation
统一要求 AI 在响应中使用相对路径+行号格式引用文件 (如 src/routes/index.ts:42),便于 VSCode 等 IDE 插件场景将文件引用渲染为可点击的跳转链接。 涉及:cursor、claude-code、gemini3、vscode、default 风格 Signed-off-by: huangdengdui <huangdengdui@cmcm.com>
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.
Summary / 摘要
规范各风格提示词中的文件引用格式,统一要求 AI 在响应中使用相对路径 + 行号格式引用文件(如
src/routes/index.ts:42),便于 VSCode 等 IDE 插件场景将文件引用渲染为可点击的跳转链接。Standardize file reference format in agent-style prompts, requiring AI to use relative path + line number format (e.g.
src/routes/index.ts:42) in responses, enabling VSCode and other IDE plugins to render file references as clickable navigation links.Changes / 变更说明
packages/core/src/core/prompts.tsCOMMUNICATION中追加文件引用相对路径规范Code References补充相对路径示例Communication Style新增File References条目Code References补充相对路径示例Core Mandates新增File References条目Testing / 测试
在对应风格下与 AI 对话,观察 AI 在响应中引用文件时是否使用
相对路径:行号格式(如src/foo/bar.ts:42),在 VSCode 插件中验证该格式可被渲染为可点击的跳转链接。