Skip to content

Support @file context in custom command arguments - #590

Open
emecii wants to merge 1 commit into
editor-code-assistant:masterfrom
emecii:fix/custom-command-file-context
Open

Support @file context in custom command arguments#590
emecii wants to merge 1 commit into
editor-code-assistant:masterfrom
emecii:fix/custom-command-file-context

Conversation

@emecii

@emecii emecii commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve @file custom-command arguments after variable substitution and attach their contents through the existing prompt-context format
  • preserve tokenized paths with spaces and line ranges, while leaving the prompt unchanged when a referenced file is unreadable
  • document the behavior and add focused regression coverage

Fixes #163

Testing

  • clojure -M:test — 928 tests, 5,274 assertions, 0 failures
  • clojure -M:test --focus eca.features.commands-test — 26 tests, 196 assertions, 0 failures
  • bb integration-test --dev --ns integration.chat.commands-test — 4 tests, 74 assertions, 0 failures
  • clj-kondo --lint src/eca/features/commands.clj test/eca/features/commands_test.clj — 0 errors, 0 warnings

Whole-tree clj-kondo still reports the pre-existing unresolved dir symbol in test/eca/features/hooks_test.clj:259; the same result reproduces on clean master.

This contribution was prepared with AI assistance. The implementation was exercised with the tests and lint commands listed above.

  • I added a entry in changelog under unreleased section.
  • This is not an AI slop.

@zikajk

zikajk commented Sep 10, 2026

Copy link
Copy Markdown
Member

@emecii Nice feature, and the happy path is solid! Just one blocker.

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.

Feature: Support file content (@) as custom-command arg

2 participants