Add continued agent conversations#1275
Conversation
75a89f1 to
f727a44
Compare
f727a44 to
f45c44f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f45c44f52b
ℹ️ 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".
| const cutoff = cutoffByThreadRootId.get(threadRootId); | ||
| if (cutoff === undefined || message.id === cutoff.anchorMessageId) { | ||
| continue; |
There was a problem hiding this comment.
Preserve later task anchors in a thread
When a thread has more than one agent-conversation marker, cutoffByThreadRootId keeps only the earliest marker and this check exempts only that marker's agentReplyId. Any later marker's agent reply falls after the earliest cutoff, so it gets added to hiddenIds; the source thread and the “Go to message” flow then cannot render that later task's anchor/marker. Track all marker anchor IDs per thread, or exempt every marker.agentReplyId, before hiding post-cutoff replies.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf5fc6687c
ℹ️ 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".
| await sendMessageMutation.mutateAsync({ | ||
| content, | ||
| mediaTags, | ||
| mentionPubkeys, | ||
| parentEventId: conversation.threadRootId, |
There was a problem hiding this comment.
Tag agent participants when sending task replies
In the default managed-agent setup the ACP subscription requires a p tag for the agent, but this dedicated conversation composer forwards only the mentions the user typed. For normal replies like “continue” from the new task screen, mentionPubkeys is empty and parentEventId points at the thread root, so the reply is accepted as a thread message but no agent is mentioned and the agent never receives it. Merge the computed routeableAgentPubkeys into the send-time mentions, or otherwise tag the agent participants.
Useful? React with 👍 / 👎.
| const message = | ||
| messageById.get(marker.agentReplyId) ?? | ||
| buildTaskFallbackMessage(marker); |
There was a problem hiding this comment.
Fetch missing task replies before opening markers
When the task marker is loaded but its agentReplyId is not in the currently loaded message window, such as an old task whose recap/title marker was published recently, this creates a synthetic empty TimelineMessage and the Open button passes it to openAgentConversation. That opens the task view with a blank agent reply and no real context instead of loading the conversation. Fetch the reply/ancestors by id as the route deep-link path does before opening, or do not allow opening from the fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b99ec19a0
ℹ️ 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".
| on `buzz messages send` so the conversation stays threaded. \ | ||
| If the human explicitly asks for a channel-root, top-level, \ | ||
| or broadcast post, send that message without `--reply-to`. \ | ||
| "\nIMPORTANT: For ordinary replies in this turn, use `--reply-to {thread_root_id}` \ |
There was a problem hiding this comment.
Keep DM reply anchors on the thread root
The prompt now tells agents to keep replies flat by using the thread root, but the DM path still builds reply_anchor from last_event.event.id when the inbound DM is already in a thread. In an existing DM thread, this generates --reply-to for the human's latest reply instead of the root, so the agent answer nests another level rather than staying flat; use the parsed root id for DM replies too.
Useful? React with 👍 / 👎.
Summary
Tests
cargo fmt --all -- --checkcargo test -p buzz-acpcargo test -p buzz-corecargo test --manifest-path desktop/src-tauri/Cargo.toml managed_agents::runtime::tests::build_env --libcargo test --manifest-path desktop/src-tauri/Cargo.toml managed_agents::discovery::tests::effective_agent_command --libcd desktop && ./node_modules/.bin/tsc --noEmit --pretty falsecd desktop && ../node_modules/.bin/biome check .(passes with existing CSS specificity warnings)cd desktop && node ./scripts/check-file-sizes.mjs && node ./scripts/check-px-text.mjscd desktop && node --import ./test-loader.mjs --experimental-strip-types --test src/features/agents/agentConversations.test.mjs src/features/channels/ui/ChannelPane.helpers.test.mjs src/features/messages/lib/threadPanel.test.mjs