ZIm/crates/assistant_context_editor
Ben Brandt b4109a2376
Prevent keybindings from triggering requests that should be disabled (#30221)
Extracts authorization logic to a single method and add early
returns in message handlers to prevent sending requests when the model
configuration is invalid or terms haven't been accepted.

This was allowing for the TOS popup to show up even for logged out users
because they could bypass the disabled button with the keybinding.

Now the behavior should be the same either way, that the request isn't
made unless they can send it.

The text thread already has a banner to tell the user to configure a
model provider, so I don't think we need to pop up a separate modal,
since the button is disabled anyway.

Release Notes:

- N/A
2025-05-08 10:03:58 +00:00
..
src Prevent keybindings from triggering requests that should be disabled (#30221) 2025-05-08 10:03:58 +00:00
Cargo.toml agent: Remove feature flag checks (#30055) 2025-05-06 21:38:05 -04:00
LICENSE-GPL Add assistant_context_editor crate (#23429) 2025-01-21 21:22:59 +00:00