feat: open prompt in configured external editor (#7606)

Add `ctrl+g` shortcut to enable opening current prompt in configured
editor (`$VISUAL` or `$EDITOR`).


- Prompt is updated with editor's content upon editor close.
- Paste placeholders are automatically expanded when opening the
external editor, and are not "recompressed" on close
- They could be preserved in the editor, but it would be hard to prevent
the user from modifying the placeholder text directly, which would drop
the mapping to the `pending_paste` value
- Image placeholders stay as-is
- `ctrl+g` explanation added to shortcuts menu, snapshot tests updated



https://github.com/user-attachments/assets/4ee05c81-fa49-4e99-8b07-fc9eef0bbfce
This commit is contained in:
sayan-oai
2025-12-22 15:12:23 -08:00
committed by GitHub
parent 8e900c210c
commit 4673090f73
14 changed files with 723 additions and 18 deletions

View File

@@ -407,6 +407,7 @@ async fn make_chatwidget_manual(
last_rendered_width: std::cell::Cell::new(None),
feedback: codex_feedback::CodexFeedback::new(),
current_rollout_path: None,
external_editor_state: ExternalEditorState::Closed,
};
(widget, rx, op_rx)
}