Skip to content

(feat) Mention artifact files in the chat composer with @ #6139

Description

@ashrafchowdury

When I want the agent to work on a file it already produced, I have no way to point at it. I either describe the path in prose and hope the agent resolves the right file, or I re-upload a copy through the paperclip — even though the session drive already holds the artifact. Naming a file should be as quick as naming a command.

Typing @ in the composer should open the same palette that / opens today, listing the session's artifacts:

  • Search across the drive. Typing after the @ filters files and folders by name everywhere in the drive, not just the folder currently in view.
  • Drill into folders. Selecting a folder enters it and scopes further typing to its contents, with a way back out to the parent.
  • Pick a folder or a file. Selecting a file references that file; selecting a folder references the whole directory, so the agent gets everything under it as context.
  • Full keyboard navigation. Arrows move, Enter selects, Tab drills into a folder, Escape steps back a level and then closes. The whole flow works without the mouse, the way the / palette does.
  • Open only at a word boundary, so an email address or a handle typed mid-sentence never triggers the menu.
  • Insert a real reference, not literal text — the mention resolves to a drive path the agent receives, and it renders in the message as a chip a reader can recognize.

What exists today to build on:

  • The / palette: web/packages/agenta-ui/src/RichChatInput/plugins/SlashCommandPlugin.tsx and web/packages/agenta-ui/src/RichChatInput/assets/slashCommands.ts, wired through web/packages/agenta-chat/src/components/ChatComposer.tsx and web/oss/src/components/AgentChatSlice/hooks/useChatSlashCommands.tsx.
  • The drive that holds the artifacts: web/packages/agenta-entity-ui/src/drive/useDriveTreeData.ts and web/oss/src/components/Drives/chatFileRefs.tsx, which already turns a file reference into a link in a rendered message.

The composer is shared, so the mention menu should land for every surface that mounts ChatComposer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions