8000 feat(chat): deep research in the web app, a plan card to approve and a live progress card by adeelahmad · Pull Request #517 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ee327cf
fix(assistant): let the assistant's tools be imported first
claude Oct 16, 2026
defb487
feat(chat): each answer records what produced it
claude Oct 17, 2026
983d046
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 17, 2026
acf97d7
test(notes): keep the daily notes test from failing on 2026-10-17
claude Oct 17, 2026
db85b14
Merge origin/main into claude/project-thread-r960xc-c1-record
claude Oct 17, 2026
275692b
Merge remote-tracking branch 'origin/main' into port-c1
claude Oct 17, 2026
33a2c19
feat(chat): choose tools, a tool-call limit and a scope per answer
claude Oct 17, 2026
448565d
Merge remote-tracking branch 'origin/claude/project-thread-r960xc-c1-…
claude Oct 17, 2026
957c3f1
docs(chat): choosing tools, namespaces and a limit; regenerate the cl…
claude Oct 17, 2026
8759a60
feat(chat): a choice made as a conversation starts is the latest choice
claude Oct 17, 2026
73d10e7
fix(chat): setting the server up keeps every tool, whatever the lates…
claude Oct 17, 2026
554668b
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 17, 2026
a22d140
Merge origin/main into claude/project-thread-r960xc-c4-tools
claude Oct 17, 2026
3f0b9de
test(entities): wait for the typed search before counting merge options
claude Oct 17, 2026
33e40f0
Merge origin/main into claude/project-thread-r960xc-c4-tools
claude Oct 17, 2026
dde1384
Merge origin/main into claude/project-thread-r960xc-c4-tools
claude Oct 17, 2026
e6b5cfa
test(settings): the AI section's server values include ai.max_tool_calls
claude Oct 17, 2026
cdf1f0c
Merge origin/main into claude/project-thread-r960xc-c4-tools
claude Oct 17, 2026
a9e21e5
fix(chat): find_resources belongs to the archive's tools
claude Oct 17, 2026
daa8aaa
Merge origin/main into claude/project-thread-r960xc-c4-tools
claude Oct 17, 2026
98b7a8b
docs(chat): a new built-in tool joins a tool group
claude Oct 17, 2026
093d4af
Merge origin/main into claude/project-thread-r960xc-c4-tools
claude Oct 17, 2026
1b55d2b
fix(ci): the upgrade check counts entities of every type
claude Oct 17, 2026
3256021
feat(chat): deep research, a plan to approve and a cited report
claude Oct 17, 2026
1334ee2
Merge origin/main into claude/project-thread-r960xc-c8-research
claude Oct 17, 2026
7f38bae
Merge origin/main into claude/project-thread-r960xc-c8-research
claude Oct 17, 2026
95e897d
feat(chat): deep research in the web app, a plan card to approve and …
claude Oct 17, 2026
523e3a4
Merge origin/main into claude/project-thread-r960xc-c8-ui
claude Oct 18, 2026
2d6145f
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ The backend (`fastapi_backend`) and the frontend (`nextjs-frontend`) are version
it, or say "yes" in a chat room; an API key or an app only declines it unless `research.agents_skip_review` is on.
It runs in the background, one run per person at a time, within its tool calls, `research.max_minutes` and your
budgets, survives a restart, and stops when asked; the cited report comes back in the conversation, its claims
checked against their sources, and saves as a note or makes a podcast episode. The web app's plan and progress
cards are in progress ([Deep research](docs/assistant.md#deep-research)).
checked against their sources, and saves as a note or makes a podcast episode. In the web app, the composer's Deep
research switch asks for it; the plan is a card to edit and approve with Enter, then a progress card that survives a
reload; and the report saves as a note, reads aloud, makes a podcast or exports as Markdown. Settings → AI assistant
→ Deep research holds its limits ([Deep research](docs/assistant.md#deep-research)).
- **Read any message aloud.** Every question and answer in a conversation has a speaker button: one click reads it
aloud by the speech model and voice picked in Settings → AI assistant → Voice (else the browser's own speech),
another stops it. One message plays at a time, long answers go in pieces under every provider's limit, and each
Expand Down
23 changes: 17 additions & 6 deletions docs/assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,12 @@ an image the sandbox shared inline in the answer, not only as a download; the 20

## Deep research

Built in the API, MCP, chat rooms and the assistant's tools; the web app's plan and progress cards are in progress.
Built: the web app, the API, MCP, chat rooms and the assistant's tools.
Give the assistant a goal that needs many look-ups, and it comes back with a plan; once you approve it, the research
runs in the background and a cited report comes back in the conversation.

- **Asking.** Start a question with `/research` (`/research what changed in the capsid work this year?`), send it with
- **Asking.** Turn on the composer's Deep research switch (the telescope) and type the goal, start a question with
`/research` (`/research what changed in the capsid work this year?`), send it with
`research: true` (`POST /api/v1/chats/<id>/messages`), call `POST /api/v1/chats/<id>/research {goal}`, or ask the
assistant for research: its `start_research` tool (the `research` [tool group](#choosing-tools-namespaces-and-a-limit))
works from chat, voice and [chat rooms](chat-rooms.md). It needs a language model that uses tools.
Expand All @@ -490,6 +491,11 @@ runs in the background and a cited report comes back in the conversation.
labelled an estimate: from what each tool call of past research runs cost in the activity ledger, else its likely
tokens at the model's price in Settings (no figure when the model has no price). The plan is the answer to the
question, and it waits as an approval of the assistant's (tool `research`).
- **The plan card.** In the conversation the plan is a card: the follow-up questions with their answers to tap (or
type your own), the sub-questions as a list to reword, add to or remove from, where it looks as ticks (only the
sources you have), a stepper for its tool calls with the estimate beside it, and the report's outline. Enter
approves it, with your edits; once you've answered a question, Enter revises it with your answers instead (Approve
as it is stays one click away). Decline drops it.
- **Approve, edit or revise.** Approve it as it is, or with your edits (`POST /api/v1/approvals/<id>` with
`decision: approve` and `params`: any of `title`, `sub_questions`, `sources`, `max_tool_calls`, `report_outline`), in
the conversation or the Approvals page; or send your answers and edits back for one more planning call (`POST
Expand All @@ -498,8 +504,8 @@ runs in the background and a cited report comes back in the conversation.
it at once, as your own pick.
- **Agents only decline.** An API key, an app or an agent (MCP, the assistant) can decline a plan but not approve it,
as for every approval, unless an admin turns on `research.agents_skip_review` (off by default): then an agent's plan
starts without review. The `research` settings are saved with `PUT /api/v1/settings/research`; their place in
Settings → AI assistant is in progress.
starts without review. The `research` settings are in Settings → AI assistant → Deep research, and
`PUT /api/v1/settings/research`.
- **The run.** Once approved, one process runs it at a time (a claim it keeps with a heartbeat every 10 seconds;
another process takes it over after two minutes of silence and goes on from the last finished step), in stages:
- *gather*: each sub-question in turn, with the assistant's tool loop, its share of the tool calls that are left,
Expand All @@ -519,7 +525,10 @@ runs in the background and a cited report comes back in the conversation.
- **Budgets.** Before each stage the [budgets](budgets.md) of the conversation's namespaces and `all` are checked. One
that is over holds the run (`held`, saying why) until the budget allows it, or until you let it go on anyway (`POST
/api/v1/research/<id>/resume`); a budget that skips stops it with what it found.
- **Progress and stopping.** `GET /api/v1/research/<id>` gives its status (planned, declined, queued, running, held,
- **Progress and stopping.** Once approved, the plan card becomes a progress card that reads the run again every few
seconds, so it carries on after a reload and on a phone: its stage, a bar of the sub-questions done with each one
ticked off, sources found, tool calls, cost and minutes, why a budget holds it with Go on anyway, and Stop. When the
report is saved, the conversation shows it. `GET /api/v1/research/<id>` gives its status (planned, declined, queued, running, held,
done, stopped, failed), stage, and progress: sub-questions done, sources found, tool calls, minutes, and tokens and
cost so far. `GET /api/v1/research?chat_id=<id>` lists a conversation's. `POST /api/v1/research/<id>/stop` stops it
after the step it's on (at once while it waits), and what it found so far is saved in the conversation as its
Expand All @@ -528,7 +537,9 @@ runs in the background and a cited report comes back in the conversation.
(`namespace` when there are several), its archive citations as mention links to what they cite, web ones as links,
and a link back to the conversation (`@[Research: title](chat:12)`), which only you see named. `POST
/api/v1/research/<id>/podcast` makes a [podcast episode](podcasts.md) from the assets the report cites, about its
goal. The report reads aloud and exports like any answer.
goal. In the web app the report has these as Save as note (asking which namespace when it could go in several),
Read aloud (with the voice in Settings → AI assistant), Make a podcast, and Export (a Markdown file with the sources
it cites). Follow-up questions go on from the report.
- **Agents.** MCP has `start_research` (a new conversation unless `chat_id` is given; `namespaces`, `tools`,
`max_tool_calls`) and `research_status` (the plan and progress, and once it's done the report with its sources and
their links).
Expand Down
Loading
Loading
0