Update upstream to 5163763
CI / test (push) Canceled after 0s
CI / grok-linux-amd64 (push) Canceled after 0s
CI / grok-windows-amd64 (push) Canceled after 0s
CI / grok-macos-arm64 (push) Canceled after 0s
CI / release (push) Canceled after 0s

Forward-port the six local patches onto the two new monorepo syncs
(SOURCE_REV e6a67a54 -> 84ae1223). Resolved 0001 against the runtime
full_version() injection and 0005 against the Option-wrapped
UserPromptSubmit hook payload.
This commit is contained in:
iceBear67
2026-08-16 03:22:31 +00:00
parent c48b60d383
commit a968ad297c
6 changed files with 53 additions and 53 deletions
@@ -40,10 +40,10 @@ class as Esc -- rather than faking a keypress and lying in the session log.
Remote prompts carry clientIdentifier for the same reason.
diff --git a/Cargo.lock b/Cargo.lock
index 3f214ce0ec69942190a8d35ca99f0b7662bee8c7..65ffbd9a021c7e7de45248a3237f52ae02e763a4 100644
index 8fc3009c68e60a71ed400d7b3a2fb318c7455956..bcd7f081a49128e010d3b3122038002b7e58b9ca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -13696,6 +13696,7 @@ dependencies = [
@@ -13737,6 +13737,7 @@ dependencies = [
"dunce",
"enum_delegate",
"flate2",
@@ -51,7 +51,7 @@ index 3f214ce0ec69942190a8d35ca99f0b7662bee8c7..65ffbd9a021c7e7de45248a3237f52ae
"git2",
"image",
"indexmap",
@@ -13724,6 +13725,7 @@ dependencies = [
@@ -13765,6 +13766,7 @@ dependencies = [
"tempfile",
"textwrap",
"tokio",
@@ -60,7 +60,7 @@ index 3f214ce0ec69942190a8d35ca99f0b7662bee8c7..65ffbd9a021c7e7de45248a3237f52ae
"toml",
"toml_edit 0.22.27",
diff --git a/crates/codegen/xai-grok-pager/Cargo.toml b/crates/codegen/xai-grok-pager/Cargo.toml
index db32aa6610bb1276b53842117cf99d7602a5f736..c0a2d49158def2249255c25a3abef59b6e857cad 100644
index 86d9d26dd190714acd133643dc73ce6e332c1e63..cc56f87f878c18533dc595f40f3ece490d3131d9 100644
--- a/crates/codegen/xai-grok-pager/Cargo.toml
+++ b/crates/codegen/xai-grok-pager/Cargo.toml
@@ -92,6 +92,11 @@ xai-grok-update = { path = "../xai-grok-update" }
@@ -76,7 +76,7 @@ index db32aa6610bb1276b53842117cf99d7602a5f736..c0a2d49158def2249255c25a3abef59b
# Crash-recovery registry of open TUI sessions.
xai-grok-active-sessions = { workspace = true }
diff --git a/crates/codegen/xai-grok-pager/docs/user-guide/04-slash-commands.md b/crates/codegen/xai-grok-pager/docs/user-guide/04-slash-commands.md
index 1a06af17055384f657adf066af8e8b30b79d809c..1ad8905a4495a8b37a5339ede68cba8304f418bf 100644
index 723efc5b91874535777cca954e62547106b0d11f..6149b9fb68a86cbcc78b27d5998f9c1e27f62937 100644
--- a/crates/codegen/xai-grok-pager/docs/user-guide/04-slash-commands.md
+++ b/crates/codegen/xai-grok-pager/docs/user-guide/04-slash-commands.md
@@ -103,6 +103,34 @@ Rename the current session. Alias: `/title`.
@@ -115,10 +115,10 @@ index 1a06af17055384f657adf066af8e8b30b79d809c..1ad8905a4495a8b37a5339ede68cba83
## Model and Mode
diff --git a/crates/codegen/xai-grok-pager/src/app/acp_handler/mod.rs b/crates/codegen/xai-grok-pager/src/app/acp_handler/mod.rs
index 80aa6e5544434d0403cc87a5bda8628ab4e0d5c6..358a7ea9c234613bfcaf701e60315ba27d2bc7b5 100644
index 87667c5843cca2c4d2f56d41bc67103bd8296e85..5dea13dda409c058a0d4a1841eb882fef6e96fd6 100644
--- a/crates/codegen/xai-grok-pager/src/app/acp_handler/mod.rs
+++ b/crates/codegen/xai-grok-pager/src/app/acp_handler/mod.rs
@@ -152,6 +152,16 @@ use workflow_ingest::*;
@@ -153,6 +153,16 @@ use workflow_ingest::*;
/// background agent must still land in its own scrollback so the user sees
/// the full turn after switching back.
pub(crate) fn handle(msg: AcpClientMessage, app: &mut AppView) -> bool {
@@ -136,7 +136,7 @@ index 80aa6e5544434d0403cc87a5bda8628ab4e0d5c6..358a7ea9c234613bfcaf701e60315ba2
AcpClientMessage::SessionNotification(notif) => {
let mut meta = NotificationMeta::from_json(notif.request.meta.as_ref());
diff --git a/crates/codegen/xai-grok-pager/src/app/actions.rs b/crates/codegen/xai-grok-pager/src/app/actions.rs
index 1d205af8f0ba4ed065087a84e5050d35b2edd804..1644f044962b9fb1d9c4573b2b02db4798ecafda 100644
index ac4b7057e3a24800969cbae01271bfa76fae469c..ce40302b71943058a974c38274dea3903bc13aeb 100644
--- a/crates/codegen/xai-grok-pager/src/app/actions.rs
+++ b/crates/codegen/xai-grok-pager/src/app/actions.rs
@@ -30,6 +30,22 @@ pub enum SwitchModelError {
@@ -162,7 +162,7 @@ index 1d205af8f0ba4ed065087a84e5050d35b2edd804..1644f044962b9fb1d9c4573b2b02db47
/// Synchronous, side-effect-free user intent.
///
/// Produced by [`super::input`] from key/mouse events.
@@ -714,6 +730,11 @@ pub enum Action {
@@ -717,6 +733,11 @@ pub enum Action {
/// tasks as a system block (`/tasks`). The surface minimal mode uses in
/// place of the `TasksPane`.
ShowTasks,
@@ -175,10 +175,10 @@ index 1d205af8f0ba4ed065087a84e5050d35b2edd804..1644f044962b9fb1d9c4573b2b02db47
ShowPlan,
/// Enter plan mode. If a description is provided, also start a turn
diff --git a/crates/codegen/xai-grok-pager/src/app/app_view.rs b/crates/codegen/xai-grok-pager/src/app/app_view.rs
index 5a960e588c81ecc9d642217455fa28a87fc84b28..c7a0e0e729560569dac2e603a6178cec81dfd121 100644
index abbbf08a7239da006a7bf14a749230ec5398b276..b336028865a9c0c58dd0de4ea1197050c267df49 100644
--- a/crates/codegen/xai-grok-pager/src/app/app_view.rs
+++ b/crates/codegen/xai-grok-pager/src/app/app_view.rs
@@ -1217,6 +1217,18 @@ pub struct AppView {
@@ -1229,6 +1229,18 @@ pub struct AppView {
/// combinations are unrepresentable; production mutates it only through the
/// `AppView::voice_*` transition methods.
pub voice_state: VoiceState,
@@ -197,7 +197,7 @@ index 5a960e588c81ecc9d642217455fa28a87fc84b28..c7a0e0e729560569dac2e603a6178cec
}
/// Reshow window elapsed? None/0 = never. Unparseable ack fails open (show).
fn privacy_banner_reshow_elapsed(acked_at: &str, reshow_days: Option<u64>) -> bool {
@@ -1648,6 +1660,9 @@ impl AppView {
@@ -1667,6 +1679,9 @@ impl AppView {
voice_auth: None,
voice_cmd_tx: None,
voice_state: VoiceState::Idle,
@@ -208,10 +208,10 @@ index 5a960e588c81ecc9d642217455fa28a87fc84b28..c7a0e0e729560569dac2e603a6178cec
}
/// Seed `deferred_model_switch` from CLI `-m`. The CLI effort token is
diff --git a/crates/codegen/xai-grok-pager/src/app/app_view_tests.rs b/crates/codegen/xai-grok-pager/src/app/app_view_tests.rs
index 272f3b11dcf8b83935622dd01142bb4a15e2e7fc..2cd3d0eb554b1a4d9572efa3353c1db48aa178a0 100644
index 8de13f2db0bf9dd4f0630bfc8b099ada608c4a38..b456dac46ea39af343f4f0fd84ce7012e67fc97d 100644
--- a/crates/codegen/xai-grok-pager/src/app/app_view_tests.rs
+++ b/crates/codegen/xai-grok-pager/src/app/app_view_tests.rs
@@ -305,6 +305,9 @@ pub(crate) fn test_app() -> AppView {
@@ -308,6 +308,9 @@ pub(crate) fn test_app() -> AppView {
voice_auth: None,
voice_cmd_tx: None,
voice_state: VoiceState::Idle,
@@ -511,7 +511,7 @@ index 0000000000000000000000000000000000000000..43a3fb0c4694c7da7741b683f5286c71
+ }
+}
diff --git a/crates/codegen/xai-grok-pager/src/app/dispatch/router.rs b/crates/codegen/xai-grok-pager/src/app/dispatch/router.rs
index 61b37dcd39deb4d6dde7873f6ad29ef68c537b41..f5895ee6181bc0e50766c538f7110e246fbfba8b 100644
index 86df4292ad50f986a716298ef85c0a73bd9e12ab..1d2e07109f57220660c6737290dd949fa29e5f73 100644
--- a/crates/codegen/xai-grok-pager/src/app/dispatch/router.rs
+++ b/crates/codegen/xai-grok-pager/src/app/dispatch/router.rs
@@ -48,6 +48,7 @@ use super::prompt::{
@@ -544,10 +544,10 @@ index 61b37dcd39deb4d6dde7873f6ad29ef68c537b41..f5895ee6181bc0e50766c538f7110e24
Action::EnterPlanMode { description } => dispatch_enter_plan_mode(app, description),
Action::SetPlanMode(kind) => set_plan_mode(app, kind),
diff --git a/crates/codegen/xai-grok-pager/src/app/dispatch/tests/mod.rs b/crates/codegen/xai-grok-pager/src/app/dispatch/tests/mod.rs
index 4aa72560f1ff7c9158e7905f53a83ec51cbea714..270ec9d3d2a19550cabd1884bf4eeb2ce77326e0 100644
index 63d41e80a915f5ce67ecbeca00669628e568ede8..c41f28667fca9caf278155a8f211139e66b6eee9 100644
--- a/crates/codegen/xai-grok-pager/src/app/dispatch/tests/mod.rs
+++ b/crates/codegen/xai-grok-pager/src/app/dispatch/tests/mod.rs
@@ -293,6 +293,9 @@ fn test_app() -> AppView {
@@ -296,6 +296,9 @@ fn test_app() -> AppView {
voice_auth: None,
voice_cmd_tx: None,
voice_state: VoiceState::Idle,
@@ -558,10 +558,10 @@ index 4aa72560f1ff7c9158e7905f53a83ec51cbea714..270ec9d3d2a19550cabd1884bf4eeb2c
}
/// Build a default `AgentSession` for
diff --git a/crates/codegen/xai-grok-pager/src/app/event_loop.rs b/crates/codegen/xai-grok-pager/src/app/event_loop.rs
index 134a05c92417bf9038e9c784c0ee34b9b9d5bec7..1d31be3fe37b6cbbdf62c498fc30cb973d2d6e0b 100644
index d0f8962eb2d298072d4a232c7ec50b5ddec5ba37..30cca1ed9792f09785d3227d424a170e2cd8d111 100644
--- a/crates/codegen/xai-grok-pager/src/app/event_loop.rs
+++ b/crates/codegen/xai-grok-pager/src/app/event_loop.rs
@@ -1707,6 +1707,12 @@ pub(crate) async fn run(
@@ -1737,6 +1737,12 @@ pub(crate) async fn run(
let mut voice_rx = None::<tokio::sync::mpsc::Receiver<xai_grok_voice::VoiceEvent>>;
let voice_auth_factory = connection.auth_manager.clone();
@@ -574,7 +574,7 @@ index 134a05c92417bf9038e9c784c0ee34b9b9d5bec7..1d31be3fe37b6cbbdf62c498fc30cb97
// Animation tick: only scheduled when there are running entries.
let mut tick_interval = tick_interval;
let mut animation_tick_at: Option<Instant> = None;
@@ -2128,6 +2134,19 @@ pub(crate) async fn run(
@@ -2158,6 +2164,19 @@ pub(crate) async fn run(
presenter.request_presentation(&mut app, terminal, false);
}
@@ -594,7 +594,7 @@ index 134a05c92417bf9038e9c784c0ee34b9b9d5bec7..1d31be3fe37b6cbbdf62c498fc30cb97
// Stop voice if the user has left the recording session (see method).
app.enforce_voice_session_bound();
@@ -3023,6 +3042,37 @@ pub(crate) async fn run(
@@ -3053,6 +3072,37 @@ pub(crate) async fn run(
presenter.request(false);
}