Skip to content

Handle slash-prefixed paths as prompts / 将斜杠开头路径作为普通提示处理#3887

Merged
esengine merged 1 commit into
main-v2from
fix/slash-path-diagnostics
Jun 11, 2026
Merged

Handle slash-prefixed paths as prompts / 将斜杠开头路径作为普通提示处理#3887
esengine merged 1 commit into
main-v2from
fix/slash-path-diagnostics

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • Route slash-prefixed path diagnostics through the normal prompt path instead of treating them as unknown slash commands.
  • Resolve existing file paths with compiler line/column suffixes as file references while preserving the original diagnostic text.
  • Keep true unknown single-segment slash commands on the existing unknown-command notice path.

Tests

  • go test ./internal/control
  • go test ./...
  • (cd desktop && go test ./...)

Fixes #3884
Fixes #3798

@SivanCola SivanCola requested a review from esengine as a code owner June 10, 2026 17:41
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@github-actions github-actions Bot added agent Core agent loop (internal/agent, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 10, 2026
@SivanCola SivanCola enabled auto-merge June 10, 2026 17:42
@SivanCola SivanCola force-pushed the fix/slash-path-diagnostics branch from 5bbf37d to 968818e Compare June 10, 2026 17:47

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid fix for the paste-a-diagnostic case. Two things I like: the path-like heuristic stays conservative (single-segment /foo is still an unknown command, only /foo/bar... routes to a prompt), and resolveAbsRef confines the auto-attached file ref to the project root so an out-of-tree absolute path degrades gracefully to a plain prompt instead of reading arbitrary paths. Good test coverage on the exists/missing/unknown-command branches too. Thanks!

@esengine esengine merged commit 413b583 into main-v2 Jun 11, 2026
13 checks passed
@esengine esengine deleted the fix/slash-path-diagnostics branch June 11, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: /开头的文本无法识别 [Bug]:输入框输入触发问题

2 participants