mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add managed worktree creation to TUI session commands (#43120)
## What changed - Add `/worktree` to start a fresh conversation or fork the current conversation into a new managed checkout. - Offer current-checkout and new-worktree choices for `/new` and `/fork`, preserving optional conversation names. Enable these choices for local Git repositories when the `worktrees` feature is enabled. - Load destination configuration, bind the checkout to the replacement thread, and inherit conversation history only when forking. - Reject creation from explicitly untrusted sources and require an idle primary session without queued input. Refuse forks when developer instructions differ, with guidance for removing the unused checkout. ## Testing Add picker snapshots and tests for command availability, named selections, fresh versus forked history, destination configuration, worktree ownership, and feature and trust checks. GitOrigin-RevId: d6c83e00217660aacf2a6d92acad50b506607e0b
This commit is contained in:
1 parent
f5a71ff40a
commit
f6976ab036
28 files changed
+980
-30
No files matched your search
@@ -366,6 +366,7 @@ mod hooks;
|
||||
mod interaction;
|
||||
mod skills;
|
||||
mod slash_dispatch;
|
||||
mod worktree_picker;
|
||||
use self::skills::collect_tool_mentions;
|
||||
use self::skills::find_app_mentions;
|
||||
use self::skills::find_skill_mentions_with_tool_mentions;
|
||||
@@ -582,6 +583,7 @@ pub(crate) struct ChatWidget {
|
||||
status_account_display: Option<StatusAccountDisplay>,
|
||||
runtime_model_provider_base_url: Option<String>,
|
||||
pub(crate) remote_connection: Option<RemoteConnectionStatus>,
|
||||
pub(crate) local_worktree_operations: bool,
|
||||
token_info: Option<TokenUsageInfo>,
|
||||
token_usage_pending: bool,
|
||||
// Status and polling use account usage reads; response streams may identify meters differently.
|
||||
|
||||
Reference in new issue
Block a user