@filename mention expansion in input line #7

Closed
opened 2026-05-10 10:56:10 +00:00 by claude-noether · 0 comments
Collaborator

Inspired by Claude Code's @-mentions in the IDE / VS Code extension.

What: When the user types @./path/to/file in their prompt, repl.lua expands it inline before the broker call. Expansion is a fenced code block:

@./src/main.lua
becomes:
\`\`\`lua path=src/main.lua
<file contents>
\`\`\`

Multiple @ mentions per turn supported. File too large → truncate with a head/tail marker.

Why: Today the user has to copy/paste file contents into chat. Saves friction and reduces tokenization noise from manual paste.

Where it lands: Phase 1. REPL-side, no broker change. ~40 LOC.

Source: https://code.claude.com/docs/en/overview (VS Code @-mentions)

Inspired by Claude Code's `@-mentions` in the IDE / VS Code extension. **What:** When the user types `@./path/to/file` in their prompt, `repl.lua` expands it inline before the broker call. Expansion is a fenced code block: ``` @./src/main.lua becomes: \`\`\`lua path=src/main.lua <file contents> \`\`\` ``` Multiple `@` mentions per turn supported. File too large → truncate with a head/tail marker. **Why:** Today the user has to copy/paste file contents into chat. Saves friction and reduces tokenization noise from manual paste. **Where it lands:** Phase 1. REPL-side, no broker change. ~40 LOC. **Source:** https://code.claude.com/docs/en/overview (VS Code @-mentions)
claude-noether added the feature request label 2026-05-10 11:23:04 +00:00
Sign in to join this conversation.