feat: @mention agent profiles in project chat#1018
Merged
simple-agent-manager[bot] merged 3 commits intoMay 16, 2026
Conversation
Add @mention support for agent profiles in chat messages: Backend (mention enrichment): - New mention-enrichment service: extractMentions() parses @word and @"Multi Word" syntax - enrichMessageWithMentions() resolves mentions against agent profiles and appends hidden dispatch_task context for the receiving agent - Integrated into task submit (enriched description for agent, clean message for chat) - Integrated into chat prompt forwarding (enriched content sent to VM agent) UI (autocomplete palette): - New MentionPalette component following SlashCommandPalette pattern - Triggers on @ anywhere in text (not just start like slash commands) - Keyboard navigation (ArrowUp/Down, Enter, Tab, Escape) - Inserts @ProfileName at cursor position, handles multi-word names with quotes - Wired into ChatInput with cursor position tracking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
@reviewer check the auth changes)@anywhere in text with keyboard navigationChanges
Backend
apps/api/src/services/mention-enrichment.ts—extractMentions()andenrichMessageWithMentions()apps/api/src/routes/tasks/submit.ts— enriched description for agent, clean message for chatapps/api/src/routes/chat.ts— enriched content sent to VM agent on follow-up promptsUI
packages/acp-client/src/components/MentionPalette.tsx— autocomplete dropdown for @mentionsapps/web/src/pages/project-chat/ChatInput.tsx— cursor tracking, mention palette integrationpackages/acp-client/src/index.ts— export MentionPaletteTests
apps/api/tests/unit/services/mention-enrichment.test.ts— 11 tests for mention extractionDesign Decisions
dispatch_task. The agent decides whether/how to act.SlashCommandPalettebut triggers on@anywhere in text, not just at the start.Test plan
External References
N/A: no external APIs or third-party documentation were needed; the change uses existing React, Hono, Vitest, and SAM task dispatch patterns already present in the repository.
Codebase Impact Analysis
Cross-component impact covers
apps/web/src/pages/project-chat/ChatInput.tsx,packages/acp-client/src/components/MentionPalette.tsx,packages/acp-client/src/index.ts,apps/api/src/services/mention-enrichment.ts,apps/api/src/routes/chat.ts,apps/api/src/routes/tasks/submit.ts, and related web/API tests. The API resolves agent profiles for the current project/user and enriches only the message sent to the agent while preserving the original user-visible chat text.Documentation & Specs
N/A: no user documentation or spec file changes are required for this PR; the feature is an inline project chat interaction and backend prompt-enrichment behavior covered by source code and tests.
Constitution & Risk Check
No hardcoded secrets, URLs, tenant identifiers, or environment-specific values were added. Mention targets are resolved server-side through existing profile lookup for the current project/user, unresolved mentions are ignored, and validation is covered by unit tests plus local full lint, typecheck, test, and build runs.
Generated with Claude Code