Organize bundled Rust resources under asset directories (#41477)

## Why

The `core` and `tui` Bazel targets treated nearly their entire crate trees as
compile-time data, mixing embedded runtime resources with source files and test
fixtures.

## What changed

- Move embedded resources for `core` and `tui` into dedicated `assets/`
  directories and update their `include_str!` paths.
- Restrict Bazel compile data to explicit asset and frame directories.
- Move test-only prompts into `tests/fixtures`, resolve the core prompt through
  `find_resource!`, and reuse the integration-test file glob when assembling
  Bazel test data.

GitOrigin-RevId: eee9b0e41df77ea2604215a7f7333a6fe8317bfa
This commit is contained in:
Tamir Duberstein
2026-08-29 06:05:28 +00:00
committed by copyberry
parent 9a0d7a7cd0
commit 6478a751fd
29 changed files with 36 additions and 44 deletions
@@ -22,6 +22,6 @@ impl ContextualUserFragment for GuardianNodeReplPolicy {
}
fn body(&self) -> String {
include_str!("../guardian/node_repl_policy.md").to_string()
include_str!("../../assets/guardian/node_repl_policy.md").to_string()
}
}
@@ -10,7 +10,7 @@ use codex_protocol::openai_models::ReasoningEffort;
use serde::Deserialize;
use serde::Serialize;
const DEFAULT_INSTRUCTIONS: &str = include_str!("../../../templates/persistent_mode.md");
const DEFAULT_INSTRUCTIONS: &str = include_str!("../../../assets/persistent_mode.md");
const REPLACEMENT_NOTICE: &str = "These persistent-mode instructions replace all previously provided persistent-mode instructions.";
const REMOVAL_NOTICE: &str =
"The previously provided persistent-mode instructions no longer apply.";