mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
## Why `codex_core` is consistently a bottleneck for incremental builds during iteration. The simplest fix is to make the crate smaller. ## Summary `codex-core` owns several reusable prompt renderers and static prompt assets, which makes the crate harder to split apart. Rename `codex-review-prompts` to `codex-prompts` and move shared review, goal, permissions, compaction, realtime, hierarchical AGENTS.md, and `apply_patch` prompts into it. Move prompt-only tests and update consumers and `CODEOWNERS`. ## Validation - `just test -p codex-prompts -p codex-apply-patch` - `just test -p codex-core prompt_caching` - Bazel builds for the affected crates
19 lines
716 B
Rust
19 lines
716 B
Rust
use super::*;
|
|
use pretty_assertions::assert_eq;
|
|
|
|
#[test]
|
|
fn render_review_exit_success_replaces_results_placeholder() {
|
|
assert_eq!(
|
|
render_review_exit_success("Finding A\nFinding B"),
|
|
"<user_action>\n <context>User initiated a review task. Here's the full review output from reviewer model. User may select one or more comments to resolve.</context>\n <action>review</action>\n <results>\n Finding A\nFinding B\n </results>\n </user_action>\n"
|
|
);
|
|
}
|
|
|
|
#[test]
|
|
fn normalize_review_template_line_endings_rewrites_crlf() {
|
|
assert_eq!(
|
|
normalize_review_template_line_endings("<user_action>\r\n <results>\r\n None.\r\n"),
|
|
"<user_action>\n <results>\n None.\n"
|
|
);
|
|
}
|