core-agent-ide/codex-rs/protocol/src
charley-oai 531748a080
Prompt Expansion: Preserve Text Elements (#9518)
Summary
- Preserve `text_elements` through custom prompt argument parsing and
expansion (named and numeric placeholders).
- Translate text element ranges through Shlex parsing using sentinel
substitution, and rehydrate text + element ranges per arg.
- Drop image attachments when their placeholder does not survive prompt
expansion, keeping attachments consistent with rendered elements.
- Mirror changes in TUI2 and expand tests for prompt parsing/expansion
edge cases.

Tests
- placeholders with spaces as single tokens (positional + key=value,
quoted + unquoted),
  - prompt expansion with image placeholders,
  - large paste + image arg combinations,
  - unused image arg dropped after expansion.
2026-01-20 18:30:20 -08:00
..
prompts fix(core) Preserve base_instructions in SessionMeta (#9427) 2026-01-19 21:59:36 -08:00
account.rs fix: move account struct to app-server-protocol and use camelCase (#5829) 2025-10-27 14:06:13 -07:00
approvals.rs Removed experimental "command risk assessment" feature (#7799) 2025-12-10 09:48:11 -08:00
config_types.rs Add collaboration modes test prompts (#9443) 2026-01-18 11:39:08 -08:00
custom_prompts.rs [app-server] remove serde(skip_serializing_if = "Option::is_none") annotations (#5939) 2025-10-30 18:18:53 +00:00
items.rs Add total (non-partial) TextElement placeholder accessors (#9545) 2026-01-20 14:04:11 -08:00
lib.rs Migrate tui to use UserTurn (#9497) 2026-01-19 13:40:39 -08:00
message_history.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
models.rs fix(core) Preserve base_instructions in SessionMeta (#9427) 2026-01-19 21:59:36 -08:00
num_format.rs Auto compact at ~90% (#5292) 2025-10-20 11:29:49 -07:00
openai_models.rs Add migration_markdown in model_info (#9219) 2026-01-15 01:55:22 +00:00
parse_command.rs [app-server] remove serde(skip_serializing_if = "Option::is_none") annotations (#5939) 2025-10-30 18:18:53 +00:00
plan_tool.rs [app-server] remove serde(skip_serializing_if = "Option::is_none") annotations (#5939) 2025-10-30 18:18:53 +00:00
protocol.rs fix(core) Preserve base_instructions in SessionMeta (#9427) 2026-01-19 21:59:36 -08:00
request_user_input.rs Feat: request user input tool (#9472) 2026-01-19 10:17:30 -08:00
thread_id.rs Migrate tui to use UserTurn (#9497) 2026-01-19 13:40:39 -08:00
user_input.rs Prompt Expansion: Preserve Text Elements (#9518) 2026-01-20 18:30:20 -08:00