Synced from monorepo
Synced from monorepo Changes: - Report invalid MCP server config instead of failing startup - Keep completed terminal output when the gateway connection is lost - Show a duration-only detail view for single-task task output - Don't let a stale registry turn counter hide local sessions - Raise the file-descriptor soft limit on Linux and log effective limits at startup - Stop aborting when HTTP client construction fails - Make session thread and runtime spawn failures recoverable - Fix main-prompt paste parity in the question freeform input - Fire SessionEnd hooks on /exit and headless quit - Embed the deployment-config signing public key - Repaint paste-chip background on inline panel inputs - Security: prevent acceptEdits from auto-approving agent writes into the always-trusted global hook root - Fix stacked "Worked for" markers so parks render as status and turns close with exactly one marker - Parse hooks from config files - Add a remote kill-switch for managed-config signature verification - Security: fix workspace file-reference resolution bypassing workspace filesystem confinement Source-Revision: d02693a856a54f1030695b36b91d276e96b30b23
This commit is contained in:
parent
6e38642082
commit
47348d13ec
138 changed files with 7283 additions and 5796 deletions
|
|
@ -19,6 +19,17 @@ use crate::views::prompt_widget::PromptEvent;
|
|||
use crossterm::event::{MouseButton, MouseEvent, MouseEventKind};
|
||||
use std::time::Instant;
|
||||
impl AgentView {
|
||||
/// Time-paired multi-click check for the prompt textarea. Pairing is
|
||||
/// time-only (no coordinates); a mispaired action is one undo step.
|
||||
/// Records the click for the next pairing.
|
||||
pub(super) fn prompt_click_is_double(&mut self) -> bool {
|
||||
let now = std::time::Instant::now();
|
||||
let is_double = self
|
||||
.last_prompt_click_ms
|
||||
.is_some_and(|last| now.duration_since(last).as_millis() < MULTI_CLICK_TIMEOUT_MS);
|
||||
self.last_prompt_click_ms = Some(now);
|
||||
is_double
|
||||
}
|
||||
/// Handle mouse events: click-to-focus, forward to prompt textarea.
|
||||
///
|
||||
/// Scroll events are handled at app level (not here).
|
||||
|
|
@ -454,7 +465,6 @@ impl AgentView {
|
|||
if self.visible_queue_is_empty() {
|
||||
self.hide_queue_pane();
|
||||
}
|
||||
self.maybe_push_parked_marker();
|
||||
return InputOutcome::Action(Action::QueueRemoveShared {
|
||||
id: server_id,
|
||||
expected_version: row.version,
|
||||
|
|
@ -464,7 +474,6 @@ impl AgentView {
|
|||
}
|
||||
let was_drain_blocked = self.drain_blocked();
|
||||
self.remove_local_queue_row(id);
|
||||
self.maybe_push_parked_marker();
|
||||
if was_drain_blocked {
|
||||
return InputOutcome::Action(Action::DrainQueue);
|
||||
}
|
||||
|
|
@ -509,10 +518,7 @@ impl AgentView {
|
|||
self.pending_effects.push(eff);
|
||||
}
|
||||
}
|
||||
let now = std::time::Instant::now();
|
||||
if let Some(last) = self.last_prompt_click_ms
|
||||
&& now.duration_since(last).as_millis() < MULTI_CLICK_TIMEOUT_MS
|
||||
{
|
||||
if self.prompt_click_is_double() {
|
||||
if self.prompt.file_ref_near_cursor()
|
||||
&& let Some((path, initial_range)) =
|
||||
self.prompt.file_ref_element_at_cursor()
|
||||
|
|
@ -526,7 +532,6 @@ impl AgentView {
|
|||
self.prompt.refresh_slash(&self.session.models);
|
||||
}
|
||||
}
|
||||
self.last_prompt_click_ms = Some(now);
|
||||
}
|
||||
InputOutcome::Changed
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue