Synced from monorepo

Synced from monorepo

Changes:
- Workspace server: report `/ready` as failed with dwell on hub connect failure
- Refresh OIDC token for the Grok agent in the shell
- ACP terminal output recorder
- Cross-platform provider auth commands in the shell
- Default `/resume` to Grok sessions with a hint for hidden external sessions
- Resume sessions by title with `--resume`
- Limit app-builder archive size
- Data-driven tag labels for slash commands
- Doctor fixes for tmux
- Custom provider gateways and subprocess environment policy in the shell
- `/tutorial` — opt-in onboarding tour of Grok Build
- Soft and required CLI version checks in the shell
- Privacy banner env overrides survive live settings updates
- Add remote flag to override the image-edit model
- Return profile fields from auth info even when the access token is expired
- Add edit control on queued prompt rows
- Keep fail-closed policy when clearing orphans with no team
- Setting to disable the Ctrl+Space/F8 voice shortcut
- Pass `--raw` to pw-record so Linux dictation works on older PipeWire
- Validate git URLs when adding marketplace entries
- Stop shipping stale tool-doc parameter and tool names
- Re-point dashboard attach after `/fork` only when the parent was attached
- Surface Grok Computer media-generation results as file-path chunks
- Clear web background-task tray on kill and keep the task description
- Show privacy upsell banner in agent view until acted on
- Add tools-server client callback surface
- Protect persistent global hook sources

Source-Revision: 95d84f443eddcbed6cbfd6eed22e2eafe6b3939d
This commit is contained in:
grokkybara[bot] 2026-07-23 17:12:33 +00:00
commit 69f0ba880a
286 changed files with 22939 additions and 9624 deletions

View file

@ -260,6 +260,10 @@ pub(crate) struct SessionFlags {
/// Active auth is API key (not OAuth/session). Drives rate-limit copy in
/// `format_acp_error`. Default `false` (OAuth copy) for tests.
pub is_api_key_auth: bool,
/// Startup resume target deferred to the worktree handler after missing
/// local id/title resolution. Worktree failure messages append the
/// no-match hint only when the failing target equals this value.
pub resume_local_miss: Option<String>,
}
impl SessionFlags {
/// Resolve the agent profile name from the flags.
@ -1110,6 +1114,14 @@ pub(crate) async fn persist_setting(
.await
.map_err(|e| e.to_string())
}
"voice_keybind_enabled" => {
let SettingValue::Bool(b) = value else {
return Err(kind_mismatch("voice_keybind_enabled", "Bool", &value));
};
xai_grok_shell::util::config::set_voice_keybind_enabled(b)
.await
.map_err(|e| e.to_string())
}
"voice_capture_mode" => {
let SettingValue::Enum(s) = value else {
return Err(kind_mismatch("voice_capture_mode", "Enum", &value));

View file

@ -7,6 +7,7 @@
//! back through dispatch.
mod helpers;
use super::actions;
use super::session_title_resolve::worktree_resume_failure_message;
#[allow(unused_imports)]
use super::{agent, dispatch};
pub use helpers::ConversationsPartial;
@ -248,6 +249,7 @@ pub(crate) fn execute(
.insert("sessionId".into(), serde_json::json!(sid));
}
let restore_code = session_flags.restore_code;
let resume_local_miss = session_flags.resume_local_miss.clone();
tracing::info!(
?restore_code,
?load_session_id,
@ -257,6 +259,9 @@ pub(crate) fn execute(
tasks
.spawn(async move {
if let Some(sid) = load_session_id {
let local_miss = resume_local_miss
.as_deref()
.filter(|t| *t == sid);
let resume_started = std::time::Instant::now();
let wt_type = xai_grok_shell::util::config::worktree_type();
let copy_mode = if git_ref.is_some() {
@ -300,10 +305,9 @@ pub(crate) fn execute(
);
return TaskResult::WorktreeSessionFailed {
agent_id,
error: sanitize_user_error(
&format!(
"couldn't resume worktree session: {e}"
),
error: worktree_resume_failure_message(
local_miss,
&sanitize_user_error(&e.to_string()),
),
};
}
@ -315,10 +319,9 @@ pub(crate) fn execute(
Err(e) => {
return TaskResult::WorktreeSessionFailed {
agent_id,
error: sanitize_user_error(
&format!(
"couldn't resume worktree session: {e}"
),
error: worktree_resume_failure_message(
local_miss,
&sanitize_user_error(&e.to_string()),
),
};
}
@ -333,10 +336,9 @@ pub(crate) fn execute(
.unwrap_or_else(|| err.to_string());
return TaskResult::WorktreeSessionFailed {
agent_id,
error: sanitize_user_error(
&format!(
"couldn't resume worktree session: {msg}"
),
error: worktree_resume_failure_message(
local_miss,
&sanitize_user_error(&msg),
),
};
}
@ -1867,7 +1869,6 @@ pub(crate) fn execute(
Effect::ApplyDoctorFix { target, plan } => {
tasks
.spawn(async move {
let shell = plan.shell;
let result = tokio::task::spawn_blocking(move || crate::diagnostics::apply_fix(
*plan,
))
@ -1876,7 +1877,6 @@ pub(crate) fn execute(
.and_then(|result| result.map_err(|error| error.to_string()));
TaskResult::DoctorFixApplied {
target,
shell,
result,
}
});

View file

@ -2295,6 +2295,27 @@ fn sanitize_user_error_collapses_disk_full() {
"couldn't create worktree: failed to get HEAD commit from source"
);
}
/// Production ordering of the deferred worktree resume failure: the
/// detail is sanitized FIRST, then composed — sanitizing the composed
/// message would collapse a disk-full chain whole and erase the title
/// hint for a deferred local-miss target.
#[test]
fn worktree_resume_failure_sanitizes_detail_before_hint() {
let raw = "failed to copy index: No space left on device (os error 28)";
let msg = worktree_resume_failure_message(
Some("typo title"),
&sanitize_user_error(raw),
);
assert_eq!(
msg,
format!(
"couldn't resume worktree session: No space left on device; {}",
crate::app::session_title_resolve::title_miss_hint("typo title")
)
);
let id_msg = worktree_resume_failure_message(None, &sanitize_user_error(raw));
assert_eq!(id_msg, "couldn't resume worktree session: No space left on device");
}
/// A resume-picker entry converts to a **dormant** dashboard roster row
/// (the non-leader idle source) preserving title, cwd, model, worktree
/// flag, origin, and last-change time.