Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions crates/code_assistant_core/src/session/idle_handoff.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Prepared handoffs (see `docs/handoff.md`): when a long session goes
//! idle, a timer gives the user two minutes; if they stay away, the core has
//! idle, a timer gives the user four minutes; if they stay away, the core has
//! the agent write a handoff prompt while the prompt cache is still warm and
//! offers it in the composer as `/new <prompt>`.
//!
Expand All @@ -18,7 +18,7 @@ use std::time::{Duration, Instant};
use tracing::warn;

/// How long a session must stay without user activity.
pub const IDLE_DELAY: Duration = Duration::from_secs(120);
pub const IDLE_DELAY: Duration = Duration::from_secs(240);

/// Configuration persisted at `<config_dir>/handoff.json`.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion crates/ui_gpui/src/main_screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ impl MainScreen {
}

/// Tell the core the user is typing in the session (throttled); it
/// postpones preparing a handoff (two minutes idle).
/// postpones preparing a handoff (four minutes idle).
fn report_user_activity(&mut self, session_id: String, cx: &mut Context<Self>) {
if !self
.activity_reports
Expand Down
2 changes: 1 addition & 1 deletion crates/ui_gpui/src/settings_screen/general_section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl Render for GeneralSection {
.text_color(cx.theme().muted_foreground)
.child(
"When a session whose last request had at least this many \
input tokens stays idle for two minutes, the agent prepares \
input tokens stays idle for four minutes, the agent prepares \
a /new prompt for a follow-up session while the prompt cache \
is still warm. 0 turns this off.",
),
Expand Down
2 changes: 1 addition & 1 deletion docs/handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ so it never starts with consecutive user messages.
## Prepared handoff (idle)

- **Arming**: when a run ends in which the agent answered in the session,
the core arms a per-session deadline of 2 minutes. A `/new` that only
the core arms a per-session deadline of 4 minutes. A `/new` that only
opened an empty context or moved to a new session does not arm it.
- **User activity**: frontends report typing in the viewed session via
`SessionService::note_user_activity(session_id)`, throttled per session
Expand Down
Loading