mirror of
https://github.com/openai/codex.git
synced 2026-11-06 00:30:29 +00:00
Fix /goal usage text for control commands (#26551)
## Why The TUI's `/goal` usage text only advertised the objective form even though `/goal clear`, `/goal edit`, `/goal pause`, and `/goal resume` are implemented. This made the lifecycle controls difficult to discover and allowed the duplicated help text to drift from actual behavior. Fixes #25530. ## What changed - Show the complete `/goal [<objective>|clear|edit|pause|resume]` syntax in usage messages. - Share one usage string across slash-command dispatch and goal-related app messages. - Add inline snapshot coverage for the control-command usage path.
This commit is contained in:
1 parent
e781816ead
commit
fb0993dd3b
4 files changed
+21
-3
No files matched your search
@@ -784,6 +784,21 @@ async fn goal_control_slash_commands_emit_goal_events() {
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn goal_control_slash_command_without_thread_shows_full_usage() {
|
||||
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
chat.set_feature_enabled(Feature::Goals, /*enabled*/ true);
|
||||
|
||||
submit_composer_text(&mut chat, "/goal pause");
|
||||
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
assert_eq!(cells.len(), 1, "expected goal usage message");
|
||||
insta::assert_snapshot!(
|
||||
lines_to_single_string(&cells[0]),
|
||||
@"• Usage: /goal [<objective>|clear|edit|pause|resume] The session must start before you can change a goal."
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn goal_edit_slash_command_opens_goal_editor() {
|
||||
for thread_id in [Some(ThreadId::new()), None] {
|
||||
|
||||
Reference in new issue
Block a user