ZIm/crates/assistant2/src
Agus Zubiaga d26c477d86
assistant2: Summarize threads in context and continue long ones (#27851)
We'll now prompt the user to start a new thread when the active one gets
too long.

<img width=500
src="https://github.com/user-attachments/assets/91445bc0-3e81-422f-aa4a-b8f0741f9d9a"></img>


When they click "Start New Thread", will create a new one with the
previous one added as context.

<img width=500
src="https://github.com/user-attachments/assets/c3b4223f-5bdd-4ba4-956f-5a5880d5e2c3"></img>

Instead of including the full thread text, we'll now add summarized
versions of threads to the context, allowing you to continue the
conversation even if it was near the token limit.

- Thread summaries are cached and persisted. 
- A cached summary is invalidated if the thread is continued.
- We start generating the thread summary as soon as it's selected from
the picker. Most times, the summary will be ready by the time the user
sends the message.
- If the summary isn't ready by the time a message is sent, the user
message will be displayed in the thread immediately, and a "Summarizing
context..." indicator will appear. After the summaries are ready, we'll
start generating the response and show the usual "Generating..."
indicator.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-04-01 21:48:56 +00:00
..
assistant_configuration assistant2: Allow profiles to enable all context servers (#27847) 2025-04-01 15:25:23 +00:00
context_picker assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
ui assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
active_thread.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
assistant.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
assistant_configuration.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_diff.rs Use new multibuffer excerpts in find-all-references and friends (#27876) 2025-04-01 15:42:32 -06:00
assistant_model_selector.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_panel.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
buffer_codegen.rs Remove assistant ContextSnapshot (#27822) 2025-03-31 21:57:09 -06:00
context.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
context_picker.rs assistant2: Allow clicking on @mentions (#27846) 2025-04-01 15:44:20 +00:00
context_store.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
context_strip.rs Remove assistant ContextSnapshot (#27822) 2025-03-31 21:57:09 -06:00
history_store.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
inline_assistant.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
inline_prompt_editor.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
message_editor.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
profile_selector.rs assistant2: Add affordances for when the selected model does not support tools (#27870) 2025-04-01 20:13:06 +00:00
terminal_codegen.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
terminal_inline_assistant.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
thread.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
thread_history.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
thread_store.rs assistant2: Summarize threads in context and continue long ones (#27851) 2025-04-01 21:48:56 +00:00
tool_use.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
ui.rs assistant2: Agent notification improvements (#27638) 2025-03-28 16:30:48 +00:00