CedarCopilot wants to merge 1 commit into staging from feat/chat-history-search
Not deployed
Libra has no production signal for this change yet because it has not deployed. Libra checks hourly for 3 days after each deploy.
search-chat-history in-app agent tool so the chat agent can search the user's own past threads too.chat_threads.name and chat_messages.content , per feedback from Zach in #cedar-concentrate, title-only search "wouldn't work" for a thread whose title never mentions what's actually inside it (his example: a CSV account upload buried in a message). Any result whose match wasn't in the title shows a snippet of the matching message.services/chat/search-chat-threads.ts , shared search core, reused by the tRPC route, the agent tool, and (indirectly) both frontend surfaces.trpc/routes/chat.ts , new chat.searchThreads query, same SELF-only assertActor gating as getThreads.mastra/tools/chat/searchChatHistoryTool.ts , new in-app-only tool, registered on both the granular chat agents and the family-surface Master agent (master-surface.ts) so it works regardless of the cedar-master-agent-families flag state.db/migrations/chat_search_trgm.sql , pg_trgm GIN trigram indexes on chat_messages.content and chat_threads.name for ILIKE '%x%' substring search, mirroring the existing crm_email_threads_subject_trgm.sql precedent. Already applied to the dev database.EmbeddedCedarChat.tsx (History popover) and LeftSidebarContent.tsx (Recent popover) both get a filter field styled per crystallized.md §3.4 (h-9, no rule underneath, placeholder doubling as the panel title), debounced, falling back to the existing thread list when the query is empty.pnpm --filter @zero/server run types , cleanpnpm --filter @zero/mail run types , cleansearch-chat-threads.integration.test.ts (real DB): content match with snippet, title match, cross-user isolation , all passingidx_chat_messages_content_trgm 62MB, idx_chat_threads_name_trgm 1.7MB, both valid)🤖 Generated with Claude Code
The PR is not safe to merge until chat-history search works on the Agent SDK harness and stale search results can no longer trigger actions for a previous query; explicit repository-rule violations must also be corrected.
Libra has not measured any production surfaces for this change yet.