Synced from monorepo
Synced from monorepo Changes: - Cache growing transcripts on the messages backend - Tell the model when a wait was clamped instead of re-inviting it - Stop the stationarity nudge from claiming results are identical - Deliver the stationarity nudge after the tool result - Run auth provider commands through the platform shell (fixes Windows) - Keep monitor tool stdout short and prescriptive - Use UUIDs for analytics event insert IDs - Stop crashing at startup when the host runs out of threads - Delete the current session from within the session - Add project forking-settings toggle (backend and deploy-time control) - Reap a session’s bash and background commands when it closes - Reap a session’s hook child processes when it closes - Track coding-data consent decisions - Fail open the access gate to stop false CLI paywalls - Ship Agent Dashboard user guide - Enable doom-loop recovery by default - Kill agent children and the idle inhibitor when the parent process dies - Fix multi-process credential wipe and orphaned session log writers Source-Revision: 6372e41d828b8a6ee82c29e01a69e27ec895cca9
This commit is contained in:
parent
5da6962e4a
commit
500129c714
89 changed files with 3841 additions and 771 deletions
|
|
@ -110,9 +110,27 @@ fn is_current_coding_data_write(app: &AppView, seq: u64, agent_id: AgentId) -> b
|
|||
false
|
||||
}
|
||||
|
||||
fn log_coding_data_consent_selected(
|
||||
source: xai_grok_telemetry::events::CodingDataConsentSource,
|
||||
opted_in: bool,
|
||||
previous_opted_in: bool,
|
||||
) {
|
||||
use xai_grok_telemetry::events::{CodingDataConsentChoice, CodingDataConsentSelected};
|
||||
xai_grok_telemetry::session_ctx::log_event(CodingDataConsentSelected {
|
||||
source,
|
||||
choice: CodingDataConsentChoice::from_opted_in(opted_in),
|
||||
previous_choice: CodingDataConsentChoice::from_opted_in(previous_opted_in),
|
||||
changed: opted_in != previous_opted_in,
|
||||
});
|
||||
}
|
||||
|
||||
/// Set coding-data-sharing preference. SHELL-owned, auth-metadata-backed
|
||||
/// (persists via ACP ext-request, NOT `~/.grok/config.toml`).
|
||||
pub(super) fn set_coding_data_sharing(app: &mut AppView, opted_in: bool) -> Vec<Effect> {
|
||||
pub(super) fn set_coding_data_sharing(
|
||||
app: &mut AppView,
|
||||
opted_in: bool,
|
||||
source: xai_grok_telemetry::events::CodingDataConsentSource,
|
||||
) -> Vec<Effect> {
|
||||
// ── Guard 1: Enterprise ZDR ──────────────────────────────────────
|
||||
if app.is_zdr {
|
||||
app.show_toast("\u{2717} Cannot change: Zero Data Retention enabled");
|
||||
|
|
@ -131,6 +149,7 @@ pub(super) fn set_coding_data_sharing(app: &mut AppView, opted_in: bool) -> Vec<
|
|||
}
|
||||
let agent_id = coding_data_sharing_agent_id(app);
|
||||
let prev = !app.coding_data_retention_opt_out;
|
||||
log_coding_data_consent_selected(source, opted_in, prev);
|
||||
|
||||
// ── Idempotent path: skip the ACP round-trip. ────────────────────
|
||||
if prev == opted_in {
|
||||
|
|
@ -455,7 +474,11 @@ pub(in crate::app::dispatch) fn dispatch_privacy_banner_opt_in(app: &mut AppView
|
|||
if app.privacy_banner_opt_in_inflight || !app.privacy_banner_should_show() {
|
||||
return vec![];
|
||||
}
|
||||
let effects = set_coding_data_sharing(app, true);
|
||||
let effects = set_coding_data_sharing(
|
||||
app,
|
||||
true,
|
||||
xai_grok_telemetry::events::CodingDataConsentSource::PrivacyBanner,
|
||||
);
|
||||
// should_show guarantees opted-out + unguarded, so effects is only empty
|
||||
// if a guard regresses; leaving inflight false keeps [Opt in] clickable.
|
||||
app.privacy_banner_opt_in_inflight = !effects.is_empty();
|
||||
|
|
@ -476,6 +499,12 @@ pub(in crate::app::dispatch) fn dispatch_privacy_banner_opt_out(app: &mut AppVie
|
|||
if app.privacy_banner_opt_in_inflight || !app.privacy_banner_should_show() {
|
||||
return vec![];
|
||||
}
|
||||
let previous_opted_in = !app.coding_data_retention_opt_out;
|
||||
log_coding_data_consent_selected(
|
||||
xai_grok_telemetry::events::CodingDataConsentSource::PrivacyBanner,
|
||||
false,
|
||||
previous_opted_in,
|
||||
);
|
||||
let mut effects = ack_privacy_banner(app);
|
||||
effects.push(Effect::SetCodingDataSharing {
|
||||
agent_id: coding_data_sharing_agent_id(app),
|
||||
|
|
|
|||
Loading…
Reference in a new issue