Skip to content

feat(desktop): @file menu in the composer and collapsed file block in chat (ATO-1596, ATO-1597) - #1619

Draft
sosidudku1 wants to merge 2 commits into
rel/xp-buildfrom
fix/ato-1596-desktop-file-mentions-menu
Draft

sosidudku1 wants to merge 2 commits into
rel/xp-buildfrom
fix/ato-1596-desktop-file-mentions-menu

Conversation

@sosidudku1

Copy link
Copy Markdown
Collaborator

Part of ATO-1496 (desktop @ file mentions). This PR is the renderer half: ATO-1596 and ATO-1597. It needs the main/preload half, #1614 (window.atomic.mentionsSearch and the <mentioned-files> block on send). Without it the menu simply never opens.

Behaviour copied from our TUI (PR #1428) and Claude Code / Cursor @file.

ATO-1596: the @ menu in the composer

  • New desktop/renderer/file-mentions.js holds all the logic. @ at the start of a line or after whitespace opens the menu; me@site.com does not. Text that starts with / keeps the slash menu.
  • Search is debounced 80 ms through mentionsSearch(skillSessionId(), query) (the same session id skillList uses); a stale answer is dropped. Up to 50 rows; an empty result shows "No matching files".
  • Keys: ↑↓ move, Tab and Enter insert @path (with one trailing space), Esc closes. While the menu is open Enter never sends. IME composition is ignored (isComposing / 229). Click on a row inserts too.
  • No menu for a remote agent or when the bridge is missing.
  • renderer.js: four one-line hooks next to the slash menu (popover, click, input, keydown). Styles reuse .slashlist, .slashrow, .slashfoot plus .fmmenu and .fmrow in composer.css.

ATO-1597: the block in the chat history

  • A user message that comes back from history with a <mentioned-files> block shows one line per file under the bubble (@src/app.ts · 4 KB, plus "truncated" when cut), not the file contents.
  • attachments.js: attSplitMessage strips the mention block first; attToEditor, attPlainText and attQueueLabel drop it, so "send again", rollback, copy and the queue label use only the typed text and files are not inlined twice.
  • renderer.js: the two caption comparisons in resend/regenerate use attPlainText.

Tests

desktop/test/file-mentions-renderer.test.mjs: query detection (start, after space, not inside an email), path insertion and caret, block parse and one-line summaries, block stripped for editing.

Not yet checked on the second Mac.

This branch has not been deployed

No deployments
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.

1 participant