agent: Add more Rust code examples, update TODO check (#28737)
Release Notes: - N/A
This commit is contained in:
parent
d0f806456c
commit
b1e4e6048a
38 changed files with 142 additions and 2 deletions
|
@ -0,0 +1,3 @@
|
|||
url = "https://github.com/alacritty/alacritty.git"
|
||||
revision = "c9c41e637ac49f3cd67cf0362c596ae9d947f896"
|
||||
language_extension = "rs"
|
|
@ -0,0 +1,6 @@
|
|||
1. **Field Renaming and Semantic Clarification**: The `hold` field in `Options`, `TerminalOptions`, and `PtyOptions` has been renamed to `drain_on_exit` across the codebase. This improves semantic clarity by distinguishing between two distinct behaviors: draining output before exit versus holding the terminal open after exit.
|
||||
2. **Behavioral Shift in Exit Logic**: The logic previously controlled by `hold` now uses `drain_on_exit`, ensuring the child process’s output is drained upon termination, but the window may still close unless explicitly held open via external means. Exit handling in `event_loop.rs` has been updated to reflect this behavioral distinction.
|
||||
3. **Config and Struct Updates**: All related structs (`UiConfig`, `Window`, `WindowContext`, `EventLoop`) have been updated to reflect the new `drain_on_exit` naming. This ensures consistent naming and avoids legacy confusion.
|
||||
4. **UI Window Behavior**: A new `hold` field has been added to the `Window` struct to manage whether the terminal window should remain open on exit, separating UI behavior from terminal process behavior.
|
||||
5. **Exit Control Improvements**: When a user closes a window manually (`CloseRequested` event), `hold` is explicitly set to `false` to allow proper shutdown, ensuring manual control supersedes configuration-based persistence.
|
||||
6. **Documentation and Changelog Updates**: The CHANGELOG entry for version `0.25.0-dev` documents the replacement of `hold` with `drain_on_exit`, providing visibility into this breaking change and its rationale (terminal holding should now be handled externally).
|
|
@ -0,0 +1 @@
|
|||
I'd like to rename and refactor the `hold` behavior in the Alacritty terminal codebase to better reflect its actual use and separate terminal process handling from window behavior. Please rename the `hold` field in all relevant config structs (`Options`, `TerminalOptions`, `PtyOptions`) to `drain_on_exit` to make it clear that the terminal should drain its output before exiting, not necessarily hold the window open. Update all associated logic and struct initializations accordingly. Additionally, add a new `hold` field specifically to the `Window` struct to control whether the terminal window should remain open after the terminal process exits. Ensure that when a user explicitly closes the window (e.g., via `WindowEvent::CloseRequested`), this `hold` flag is set to false to allow normal shutdown. Update any logic that previously depended on `hold` to use the appropriate new field, and include a changelog entry explaining this semantic split and why the change was made.
|
Loading…
Add table
Add a link
Reference in a new issue