mirror of
https://github.com/openai/codex.git
synced 2026-04-28 02:11:08 +03:00
tasks
This commit is contained in:
21
tasks/01-dynamic-mount-commands.md
Normal file
21
tasks/01-dynamic-mount-commands.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Task 01: Dynamic Mount-Add and Mount-Remove Commands
|
||||
|
||||
## Goal
|
||||
Implement the `/mount-add` and `/mount-remove` slash commands in the TUI, supporting two modes:
|
||||
|
||||
1. **Inline DSL**: e.g. `/mount-add host=/path/to/host container=/path/in/agent mode=rw`
|
||||
2. **Interactive dialog**: if the user just types `/mount-add` or `/mount-remove` without args, pop up a prompt to fill in `host`, `container`, and optional `mode` fields.
|
||||
|
||||
These commands should:
|
||||
- Create or remove symlinks (or real directories) under the current working directory.
|
||||
- Update the in-memory `SandboxPolicy` to grant or revoke read/write permission for the host path.
|
||||
- Emit confirmation or error messages into the TUI log pane.
|
||||
|
||||
## Acceptance Criteria
|
||||
- Users can type `/mount-add host=... container=... mode=...` and the mount is created immediately.
|
||||
- Users can type `/mount-add` alone to open a small TUI form prompting for the three fields.
|
||||
- Symmetrically for `/mount-remove` by container path.
|
||||
- The `sandbox_policy` is updated so subsequent shell commands can read/write the newly mounted folder.
|
||||
|
||||
## Notes
|
||||
- This builds on the static `[[sandbox.mounts]]` support introduced earlier.
|
||||
19
tasks/02-auto-approve-predicates.md
Normal file
19
tasks/02-auto-approve-predicates.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Task 02: Granular Auto-Approval Predicates
|
||||
|
||||
## Goal
|
||||
Let users configure one or more scripts in `config.toml` that examine each proposed shell command and output exactly one of:
|
||||
|
||||
- `continue` => auto-approve and proceed under the sandbox
|
||||
- `deny` => auto-reject (skip sandbox and do not run the command)
|
||||
- `user-confirm` => pause execution and open the interactive approval dialog for manual decision
|
||||
|
||||
If the script exits non-zero or prints anything else, default to `user-confirm`.
|
||||
|
||||
## Acceptance Criteria
|
||||
- New `[[auto_allow]]` table in `config.toml` supporting one or more `script = "..."` entries.
|
||||
- Before running any shell/subprocess, Codex invokes each configured script in order, passing the candidate command as an argument.
|
||||
- If a script prints `continue`/`deny`/`user-confirm`, take that action and skip remaining scripts.
|
||||
- If all scripts return non-zero or invalid output, pause for manual approval (existing logic).
|
||||
|
||||
## Notes
|
||||
- This pairs with the existing `approval_policy = "unless-allow-listed"` but adds custom logic before prompting.
|
||||
13
tasks/03-live-config-reload.md
Normal file
13
tasks/03-live-config-reload.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Task 03: Live Config Reload and Prompt on Changes
|
||||
|
||||
## Goal
|
||||
Detect changes to the user `config.toml` file while a session is running and prompt the user to apply or ignore the updated settings.
|
||||
|
||||
## Acceptance Criteria
|
||||
- A background file watcher watches `$CODEX_HOME/config.toml` (or active user config path).
|
||||
- On any write event, compute a unified diff between the in-memory config and the on-disk file.
|
||||
- Pause the agent, display the diff in the TUI bottom pane, and offer two actions: `Apply new config now` or `Continue with old config`.
|
||||
- If the user applies, re-parse the config, merge overrides, and resume using the new settings. Otherwise, discard changes and resume.
|
||||
|
||||
## Notes
|
||||
- Leverage a crate such as `notify` for FS events and `similar` or `diff` for unified diff generation.
|
||||
16
tasks/04-auto-mount-repo.md
Normal file
16
tasks/04-auto-mount-repo.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Task 04: Auto-Mount Entire Repo and Auto-CD to Subfolder
|
||||
|
||||
## Goal
|
||||
Allow users to enable a flag so that each session:
|
||||
|
||||
1. Detects the Git repository root of the current working directory.
|
||||
2. Bind-mounts the entire repository into `/workspace` in the session.
|
||||
3. Changes directory to `/workspace/<relative-path-from-root>` to mirror the user’s original subfolder.
|
||||
|
||||
## Acceptance Criteria
|
||||
- New `auto_mount_repo = true` and optional `mount_prefix = "/workspace"` in `config.toml`.
|
||||
- Before any worktree or mount processing, detect the Git root, bind-mount it to `mount_prefix`, and set `cwd` to `mount_prefix + relative_path`.
|
||||
- Existing worktree/session-worktree logic should operate relative to this new `cwd`.
|
||||
|
||||
## Notes
|
||||
- This offloads the entire monorepo into the session, leaving the user’s original clone untouched.
|
||||
13
tasks/05-textbox-newline-expansion.md
Normal file
13
tasks/05-textbox-newline-expansion.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Task 05: Multi-line Composer Support (Ctrl+J & Auto-Expand)
|
||||
|
||||
## Goal
|
||||
Enable users to insert newlines in the chat prompt without submitting the message when they press `Ctrl+J`. The composer box should auto-expand vertically up to a configurable maximum height.
|
||||
|
||||
## Acceptance Criteria
|
||||
- Pressing `Ctrl+J` when focused in the prompt adds a newline instead of submitting.
|
||||
- The composer widget grows in height as lines wrap or newlines are inserted, up to a max height (e.g. 10 lines).
|
||||
- Below the max height, the input box uses a scrollbar or stops expanding.
|
||||
- Behavior is consistent across windows and respects TUI resize events.
|
||||
|
||||
## Notes
|
||||
- This requires changes in `tui/src/bottom_pane/chat_composer.rs` logic and layout in `tui/src/bottom_pane/bottom_pane_view.rs`.
|
||||
13
tasks/06-external-editor-prompt.md
Normal file
13
tasks/06-external-editor-prompt.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Task 06: External Editor Integration for Prompt Entry
|
||||
|
||||
## Goal
|
||||
Allow users to spawn an external editor (e.g. Neovim) to compose or edit the chat prompt. The prompt box should update with the editor's contents when closed.
|
||||
|
||||
## Acceptance Criteria
|
||||
- A slash command `/edit-prompt` (or `Ctrl+E`) launches the user's preferred editor on a temporary file pre-populated with the current draft.
|
||||
- Upon editor exit, the draft is re-read into the composer widget.
|
||||
- Configurable via `editor = "${VISUAL:-${EDITOR:-nvim}}"` setting in `config.toml`.
|
||||
|
||||
## Notes
|
||||
- Leverage the existing file-opener machinery or spawn a subprocess directly.
|
||||
Modify `tui/src/bottom_pane/chat_composer.rs` and command handling in `tui/src/app.rs`.
|
||||
11
tasks/07-undo-feedback-decision.md
Normal file
11
tasks/07-undo-feedback-decision.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Task 07: Undo Feedback Decision with Esc Key
|
||||
|
||||
## Goal
|
||||
Enhance the user-approval dialog so that if the user opted to leave feedback (“No, enter feedback”) they can press `Esc` to cancel the feedback flow and return to the previous approval choice menu (e.g. “Yes, proceed” vs. “No, enter feedback”).
|
||||
|
||||
## Acceptance Criteria
|
||||
- While the feedback-entry textarea is active, pressing `Esc` closes the feedback editor and reopens the yes/no confirmation dialog.
|
||||
- The cancellation must restore the dialog state without losing any partially entered feedback text.
|
||||
|
||||
## Notes
|
||||
- Changes in `tui/src/bottom_pane/approval_modal_view.rs` and input handling in the approval modal.
|
||||
11
tasks/08-clarify-exact-command.md
Normal file
11
tasks/08-clarify-exact-command.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Task 08: Clarify “Exact Command” Wording in Approval Prompts
|
||||
|
||||
## Goal
|
||||
Refine the approval dialog wording to clearly explain what “this exact command” means: whether it matches the exact command string, the binary invocation, or the tool category.
|
||||
|
||||
## Acceptance Criteria
|
||||
- Update the approval modal description in `tui/src/bottom_pane/approval_modal_view.rs` to specify that it matches the literal command line string.
|
||||
- Adjust config docs in `codex-rs/docs/protocol_v1.md` and `config.md` to mirror the clarified definition.
|
||||
|
||||
## Notes
|
||||
- This is purely a documentation and UI-text change; no logic modification required.
|
||||
Reference in New Issue
Block a user