fix(tui): /compact <instructions> reach the compaction request
The queued /compact command drained into Effect::Compact with only the session id, so the instructions typed after the command never reached the shell's compaction prompt (which already accepts userContext). The effect carries the parsed instructions, trimmed so an edited queue row with leading whitespace still counts. Ported from upstream 1.0.22 (grok-build dispatch/queue.rs). Claude-Session: https://claude.ai/code/session_01RUqV8HVGXcAETyYbZ2tPQ4
This commit is contained in:
1 parent
4512df79e6
commit
584d0fb77e
4 files changed
+46
-6
No files matched your search
@@ -1388,13 +1388,18 @@ pub(crate) fn execute(
|
||||
}
|
||||
});
|
||||
}
|
||||
Effect::Compact { agent_id, session_id } => {
|
||||
Effect::Compact {
|
||||
agent_id,
|
||||
session_id,
|
||||
user_context,
|
||||
} => {
|
||||
let tx = acp_tx.clone();
|
||||
tasks
|
||||
.spawn(async move {
|
||||
let params = serde_json::json!(
|
||||
{ "sessionId" : session_id.0.to_string(), }
|
||||
);
|
||||
let params = serde_json::json!({
|
||||
"sessionId": session_id.0.to_string(),
|
||||
"userContext": user_context,
|
||||
});
|
||||
let req = acp::ExtRequest::new(
|
||||
"kigi/compact_conversation",
|
||||
serde_json::value::to_raw_value(¶ms)
|
||||
|
||||
Reference in new issue
Block a user