Repository navigation
Add user-scoped previous conversation tools - #2203
BlueHotDog wants to merge 5 commits into
Conversation
…ation-tools # Conflicts: # .agents/skills/diagnose-agent-feedback/SKILL.md # .agents/skills/diagnose-agent-feedback/references/production-access.md
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: d695b3e21a
ℹ️ 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".
| where: i.task_id in ^task_ids and i.type in [:user_message, :agent_response], | ||
| where: | ||
| fragment( | ||
| "strpos(lower(coalesce(?->>'content', ?->'messages'->>0, '')), lower(?)) > 0", |
There was a problem hiding this comment.
Search every text block in a user message
When a prior user message contains multiple text blocks and the search term appears only in the second or later block, this predicate silently excludes the conversation because it examines only messages[0]. Interaction.UserMessage.attrs/3 persists every text block in messages, and ReadPreviousConversation.readable_text/1 joins all of them, so searchable history differs from readable history. Search all message strings and build the excerpt from the matching text rather than restricting both expressions to the first element.
Useful? React with 👍 / 👎.
| FrontmanServer.Tools.FindPreviousConversations, | ||
| FrontmanServer.Tools.GetToolResult, | ||
| FrontmanServer.Tools.ReadPreviousConversation, |
There was a problem hiding this comment.
Add a changelog entry for the new conversation tools
This commit exposes two new user-facing tools but includes neither a changeset nor a direct changelog update; I checked the complete changed-file list. The root AGENTS.md requires notable changes to be recorded and limits skip-changelog to chore/docs-only changes. Although .github/workflows/changelog-check.yml exempts changes without publishable packages from its coverage check, that exemption does not satisfy the repository's documented release-note requirement. Add a changelog entry describing the new history-search capability.
AGENTS.md reference: AGENTS.md:L65-L66
Useful? React with 👍 / 👎.
| defmodule FrontmanServer.Tools.PreviousConversationsTest do | ||
| use FrontmanServer.DataCase, async: true |
There was a problem hiding this comment.
Split the change below the repository's net-new-line limit
The reviewed commit adds 756 lines and removes 9, totaling 747 net-new lines, exceeding the root AGENTS.md requirement to keep PRs below 500 net-new lines. Split this work into smaller reviewable changes, including separating the unrelated production-diagnostic guidance, while retaining integration coverage for the new tools.
AGENTS.md reference: AGENTS.md:L25-L25
Useful? React with 👍 / 👎.
Summary
previous_conversationstool: search the authenticated user's earlier conversations, list selected task interactions, and page through selected text.Tasks.History; never expose arbitrary tool-result bodies.The PR is 506 added and 9 removed lines (497 net); application code is 362 added lines. Historical content is labeled as reference material, not current instructions. The tests use real completed turns.
Validation
MIX_TEST_DB_SUFFIX=_previous_conversations_delta_newbase mise exec -- make precommit TEST_ARGS='--max-cases 8'— 1,196 passed, 5 skipped, 2 excluded; format, strict compile and Credo passed.MCPDiagnosticsTestassertions; those tests passed alone and the full suite passed at max-cases 8.A direct
CHANGELOG.mdentry covers this server-side feature; no publishable package needs a changeset.