Repository navigation
feat(site/src/pages/AgentsPage): show async question answers without their call line - #31315
ibetitsmike wants to merge 6 commits into
Conversation
@codex review |
Codex Review SummaryThis 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: c343301d1b
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c5fee0b50
ℹ️ 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".
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 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". |
@codex review |
1 similar comment
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58a7915af7
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 406ec346e4
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c4bebcbac
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6023c9175
ℹ️ 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".
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06b50e4470
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8cb264a92
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66a1c52382
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3103cc3d23
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27e888dec0
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! 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". |
DanielleMaywood
left a comment
There was a problem hiding this comment.
This review was performed by ai-review, an automated review bot.
2 inline findings.
Coverage
Coverage: 18 of 18 files reviewed; 35 rules.
Candidates: 265 found, 239 outside changed lines, 2 already discussed, 24 evaluated.
Findings: 2 (3 sites, 1 pre-existing sites), 0 over budget, 0 failed.
Model: deepseek/deepseek-v4.1-flash; 21 questions, 20 answered, 1 abstained (unsure 1), 0 cached; 0 uncalibrated findings held back; 21080 input and 7534 output tokens.
Experiments: 2 run, 0 passed, 2 vetoed, 0 unverified, 0 skipped for time.
vetoed: TYPE-1 site/src/pages/AgentsPage/components/ChatConversation/messageParsing.ts:411: 2 new type errors, first src/pages/AgentsPage/components/ChatConversation/messageParsing.ts: TS2345 Argument of type 'ChatMessagePart[]
vetoed: TYPE-1 site/src/pages/AgentsPage/components/ChatConversation/messageParsing.ts:444: 2 new type errors, first src/pages/AgentsPage/components/ChatConversation/messageHelpers.ts: TS2345 Argument of type 'readonly ChatMessagePart[]
7518ffb to
65ee0de
Compare
…their call line An async answer's first line names the ask_user_question call for the model. The bubble, the queue row, Copy, Edit and the prompt history now leave that line out, and an edit adds it back on send so the answer still answers its question. This is the net change of mike/codagt-1460-async-answer-messages at 7518ffb, rebased onto queued-message editing (#29555). The editing hook now loads history and queued targets through one path, so the call line is split off where a target loads and kept on the loaded target. Queued edits therefore hide and restore it too, and the guard that keeps an edit opened during an earlier send uses the hook's existing load counter.
65ee0de to
f573cbb
Compare
…0-async-answer-messages
…op asyncAnswer comments that restate the code
…0-async-answer-messages
…rate steps in deriveMessageDisplayState
| const asyncAnswerPattern = new RegExp(`^${asyncAnswerLead}([^\\n]+):(?:\\n|$)`); | ||
|
|
||
| const asyncAnswerPromptPattern = new RegExp( | ||
| `^${asyncAnswerLead}[^\\n]+:(?:\\n|$|\\S)`, | ||
| ); |
There was a problem hiding this comment.
uhhhh, what?? why do we need regexs for these questions?
Stack
This stack lets the agent in Coder Agents web UI chats ask a question with
ask_user_questionwithout ending its turn. Chats created through the API and plan mode keep the blocking tool.ask_user_questionwhose options are one-line answers, and sends a web push.Refs CODAGT-1460
Why
An async answer is an ordinary user message. Its first line,
Answer to ask_user_question call <id>:, tells the model which question it answers. That line is for the model, so this PR keeps it out of what the user reads, copies and edits.What changes (
site/src/pages/AgentsPage)asyncAnswer.tsbuilds and parses the prefix line. A message is an answer only when its first text part starts with the exact line, and the call ID is the rest of that line, so provider IDs with spaces or colons work. The server trims each text part, so when a skill chip follows the prefix line, the line ends its part; the bubble, the queue row, Copy and Edit read the answer from the parts, so the chip never ends up in the call ID.Messages without the prefix line render, copy and edit as before.
Validation
Vitest (
asyncAnswer.test.ts,messageHelpers.test.ts,useConversationEditingState.test.ts,ChatMessageInput.test.tsx,ConversationTimeline.test.tsx,AgentChatPage.test.tsx,ChatPageContent.test.tsx) and the Storybook tests for the touched stories pass, as do biome, oxlint,tsc, knip and the pre-commit hook. TheAgentChatPagetest edits an answer that starts with a skill chip and checks that the request keeps the call line. Earlier remote dogfood UAT of the combined stack checked that an edited answer keeps exactly one prefix line with a chip first, in the middle or at the end, and that ArrowUp never recalls a delivered answer.