You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(codex): make wrapper slash commands mention-style with capture-aware submit
Rework slash wrapper command execution to match mention-style behavior while keeping queue ordering deterministic and preserving user input when possible.
Design decisions:
- Extract prompt capture + Enter-submit logic into context/prompt_submit.lua so mention and wrapper flows share one implementation.
- Keep send_command() generic: send only /<command> payload, then submit with Enter in on_sent (no inline newline payload).
- Route wrapper APIs (set_model, show_status, show_permissions, compact, review, show_diff) and active-session resume through a dedicated wrapper dispatcher that captures, clears, sends, and auto-submits.
- For wrappers, copy non-empty captured prompt text to unnamed register ("), do not restore it after submit, and emit warning-level feedback.
- Warn on capture_status == unavailable_buffer (clear may discard prompt content when buffer introspection is unavailable).
- Keep mention restore semantics intact; wrappers intentionally remain non-restoring.
- Normalize submit fallback behavior by using \r for channel-send Enter.
- Improve prompt parsing/capture heuristics: support compact prompt forms like >draft, treat symbol-only markers (> , >> ) as empty input, and add prompt-like uncertainty helpers.
Documentation/testing updates:
- Update docs/command-interactions.md to split generic send_command() behavior from wrapper autosubmit behavior and document warning policy.
- Expand unit coverage for wrapper autosubmit payload + ordering, register-save success/failure, unavailable-buffer warning behavior (including resume), and empty/symbol-only prompt cases.,
0 commit comments