Treat user shell turns as non-steerable

This commit is contained in:
Eric Traut
2026-04-16 22:21:42 -07:00
parent dd00efe781
commit 4386ba2eda
28 changed files with 138 additions and 38 deletions
+6
View File
@@ -216,6 +216,7 @@ impl SteerInputError {
let turn_kind_label = match turn_kind {
NonSteerableTurnKind::Review => "review",
NonSteerableTurnKind::Compact => "compact",
NonSteerableTurnKind::UserShell => "user shell",
};
ErrorEvent {
message: format!("cannot steer a {turn_kind_label} turn"),
@@ -2787,6 +2788,11 @@ impl Session {
turn_kind: NonSteerableTurnKind::Compact,
});
}
Some(crate::state::TaskKind::UserShell) => {
return Err(SteerInputError::ActiveTurnNotSteerable {
turn_kind: NonSteerableTurnKind::UserShell,
});
}
None => return Err(SteerInputError::NoActiveTurn(input)),
}
+1
View File
@@ -5391,6 +5391,7 @@ async fn steer_input_rejects_non_regular_turns() {
for (task_kind, turn_kind) in [
(TaskKind::Review, NonSteerableTurnKind::Review),
(TaskKind::Compact, NonSteerableTurnKind::Compact),
(TaskKind::UserShell, NonSteerableTurnKind::UserShell),
] {
let (sess, _tc, _rx) = make_session_and_context_with_rx().await;
let input = vec![UserInput::Text {
+1
View File
@@ -64,6 +64,7 @@ pub(crate) enum TaskKind {
Regular,
Review,
Compact,
UserShell,
}
pub(crate) struct RunningTask {
+1 -1
View File
@@ -63,7 +63,7 @@ impl UserShellCommandTask {
impl SessionTask for UserShellCommandTask {
fn kind(&self) -> TaskKind {
TaskKind::Regular
TaskKind::UserShell
}
fn span_name(&self) -> &'static str {