docs: flesh out deep research task — UI button + agent MCP tool for report reading

This commit is contained in:
Lukas Parsons 2026-07-07 14:09:48 -04:00
parent 66b45e7d27
commit 2e06a82cc1

View file

@ -24,8 +24,8 @@ Last updated: 2026-07-07
- A `grep_documents` or `search_documents` tool for semantic/fulltext search
- Auto-inject active document content into agent context when relevant
- [ ] **Deep Research: "Send to Chat" reference injection (not just new-chat Discuss)**
The only way to link research to chat is the "Discuss" button, which creates a brand-new session via `/api/research/spinoff`. Need a second button to inject a research reference (`[Title](#research-<id>)`) into the currently active chat's message input, matching the document "Chat" button pattern. Applies to: research panel sidebar (panel.js:1012), research library cards (documentLibrary.js:2767), and the inline result message (chatRenderer.js:1070).
- [ ] **Deep Research: "Send to Chat" reference + agent MCP tool to read reports**
Two-part feature: **(1) UI** — Add a button (alongside "Discuss") to inject a research reference (`[Title](#research-<id>)`) into the active chat's message input, matching the document "Chat" button pattern. Applies to: research panel sidebar (panel.js:1012), research library cards (documentLibrary.js:2767), and inline result messages (chatRenderer.js:1070). **(2) Agent tooling** — Research reports are HTML artifacts served at `/api/research/report/<id>`, not library documents. The agent currently can't resolve a research reference — pasting an ID gets a blank stare. Need an MCP tool (e.g. `read_research` or `get_research_report`) that accepts a research ID, fetches the report HTML, strips it to readable text, and returns it to the agent. Without this, the "Send to Chat" reference is dead text.
- [ ] **First-party document support in agent mode**
Documents feel "disjointed from the agent." The agent creates documents fine but can't easily discover or reference existing ones contextually. Ideas: