Repository navigation
feat(site/src/pages/AgentsPage/components/ChatMessageInput): insert agent delegations with @ in the composer - #183
Conversation
…gent delegations with @ in the composer
…nt names case-insensitively and trim mention stories
|
@codex review
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e2f4c5280
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…t mentions on spawn ability and wire menu a11y Hide the @ menu in child chats that cannot spawn, use the root chat's project in child chats, hold Enter while agents load, render the options inside Lexical's listbox with its ids, and restore the Range prototype after the test suite.
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1dde946e22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…tch errors, announce status, and offer @ only in general children
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67860508db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…r on agent load errors, qualify names while workspace agents are unknown
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cf17e0fc1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…gent names while a selected workspace is not pinned
|
@codex review
|
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merged at
Part of #187. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 012aee744d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Part of #187 (U2, delegate with
@).Chats can delegate to a custom agent through
spawn_agent, but you had to know the exact type name, which is qualified (personal/<name>,org/<name>, ...) when more than one source defines it. Behind thefork-agent-definitionsexperiment, typing@in the composer now opens a menu of the agent types the chat can spawn:@at the start of a line or after whitespace, so email addresses stay plain text.generalandexploretypes first, then the enabled personal, organization and project definitions, plus the workspace subagent files from the chat's context. It applies chatd's naming rules: reserved names are skipped, the first of a name within a source wins, and a name that more than one source defines (or any name while a list is still loading) is offered by its qualified name.generalchild withfork-nested-subagentson, where chatd gives itspawn_agent. Custom children are left out because their definition can removespawn_agentand the client can't see it. A child lists its root chat's project definitions, fetched when the menu opens. The client can't see the depth limit either, so ageneralchild at the maximum depth still shows the menu.typeahead-menulistbox with itstypeahead-item-Nids, so the editor'saria-controlsandaria-activedescendantpoint at the real options. Enter does nothing while the menu is open, no option matches, and a source is still loading or failed to load, so it can't send a half-typed mention; Escape closes the menu and Enter sends again. A failed refetch shows the retry message in a live status region and keeps the cached agents usable. While the workspace agents are unknown (the chat endpoint omits them on a load failure, or a new chat's selected workspace isn't pinned yet), every stored name is tier-qualified.@text withDelegate to the <name> agent (spawn_agent type <name>):and puts the caret at the end. It is a text instruction, not a new API field.ChatMessageInput.tsxchange is one import and one element. It reads the workspace subagents from the chat query the page already loaded, without fetching it again.Tests: 13 plugin tests: choosing a built-in type replaces the mention with the delegation; ArrowDown and Enter insert the highlighted option; an
@inside a word opens nothing and the definitions load only once the menu opens; a name that a stored and a workspace source both define is qualified; stored names are qualified while the workspace agents are unknown, and in a new chat with a selected workspace; Enter doesn't send while agents load; after a load failure Enter doesn't send until Escape closes the menu; a failed refetch keeps the cached agents selectable;@stays text in ageneralchild withoutfork-nested-subagentsand in a custom child; a nested child lists its root chat's project agents;/still opens the skills menu. Breaking the spawn gate, the root project lookup, the Enter handler (loading, error, or menu-open check), the unknown workspace list or the error state each fails its test. The portal and ARIA wiring were checked live (UAT round 1, s1). 4 menu stories cover the list, empty, loading and load error states.Checks:
tsc,biome,oxlint,knip,lint:check,lint:compiler,lint:circular-deps, unit tests (128 inChatMessageInput) and story tests (74) pass locally.Known limits: clicking outside the menu doesn't close it (Escape or moving the caret does), and
computer_useis never offered because it is a reserved name.UAT on the fork UI UAT server (local Vite at head
1dde946e22proxying to it, member account), 4 of 4 pass:@lists the built-ins and the member's personal definitions above the composer, the editor's ARIA attributes point at the highlighted option, and choosing@uat-w10-mentioninserts the delegation.agent_typeuat-w10-mention.fork-nested-subagentson,@expopened the menu. A later review fix hides the menu in custom children, so this now stays text; a unit test covers it.@exploredelegation spawns anexplorechild, and in it@expstays plain text with no menu.Not tested live: Enter while sources load, and a child chat's root project, because no chat on the server has a project. Unit tests cover both.