mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +00:00
Move context prefixing and request extraction into `user_prompt`, and update IDE context injection, thread routing, thread titles, transcript export, and user message rendering to use the shared helpers. Preserve the request delimiter, text element byte offsets, and input ordering. Move the existing last-delimiter extraction test alongside the shared helpers. GitOrigin-RevId: 3ee350506a536a6dba9575e8311188bc92fed584
14 lines
411 B
Rust
14 lines
411 B
Rust
use super::extract_prompt_request_with_offset;
|
|
use pretty_assertions::assert_eq;
|
|
|
|
#[test]
|
|
fn extract_prompt_request_returns_text_after_last_delimiter() {
|
|
let message =
|
|
"# Context\n## My request for Codex:\nFirst\n## My request for Codex:\n Second\n";
|
|
|
|
assert_eq!(
|
|
extract_prompt_request_with_offset(message),
|
|
("Second", message.find("Second").expect("request offset"))
|
|
);
|
|
}
|