Skip to content

Chore: Enhance candidate filepath list for @ character#155

Merged
tninja merged 10 commits intomainfrom
kang_feat
Feb 5, 2026
Merged

Chore: Enhance candidate filepath list for @ character#155
tninja merged 10 commits intomainfrom
kang_feat

Conversation

@tninja
Copy link
Copy Markdown
Owner

@tninja tninja commented Feb 4, 2026

It added:

  1. visible files logic support out of repo file
  2. recent focused buffer file or dir in candidate list

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the file path candidate list that appears when typing the @ character in AI prompts. It adds two key capabilities: (1) support for including files that are outside the current git repository, and (2) inclusion of the 5 most recently visited buffer files in the candidate list.

Changes:

  • Added helper functions to handle out-of-repo files and recent buffer paths
  • Refactored ai-code--visible-window-files to remove git-repo filtering, enabling out-of-repo file support
  • Removed three test cases that tested the old implementation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
ai-code-prompt-mode.el Added ai-code--normalize-path, ai-code--candidate-path, ai-code--current-frame-dired-paths, and ai-code--recent-buffer-paths helper functions; refactored ai-code--visible-window-files to support out-of-repo files; updated ai-code--prompt-filepath-candidates to include recent buffer paths
test/test_ai-code-prompt-mode.el Removed three tests (ai-code-test-visible-window-files, ai-code-test-prompt-filepath-candidates-prioritizes-visible-windows, ai-code-test-prompt-filepath-candidates-includes-dired-directories) that tested the old implementation

Comment thread ai-code-prompt-mode.el
Comment thread ai-code-prompt-mode.el
Comment thread ai-code-prompt-mode.el Outdated
Comment thread ai-code-prompt-mode.el Outdated
Comment thread ai-code-prompt-mode.el Outdated
Comment thread ai-code-prompt-mode.el
Comment thread test/test_ai-code-prompt-mode.el
Comment thread ai-code-prompt-mode.el
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 4, 2026

@tninja I've opened a new pull request, #156, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread ai-code-prompt-mode.el Outdated
Comment thread ai-code-prompt-mode.el
Comment thread ai-code-prompt-mode.el
Comment thread ai-code-prompt-mode.el
tninja and others added 4 commits February 4, 2026 08:37
* Initial plan

* Add tests for refactored helper functions and behaviors

Co-authored-by: tninja <714625+tninja@users.noreply.github.com>

* Fix trailing whitespace in test

Co-authored-by: tninja <714625+tninja@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 5, 2026

@tninja I've opened a new pull request, #157, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 5, 2026

@tninja I've opened a new pull request, #158, to work on those changes. Once the pull request is ready, I'll request review from you.

@tninja tninja merged commit a89e4f8 into main Feb 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants