fix: try to reduce public API of crates to speed up incremental builds

This commit is contained in:
Michael Bolin
2025-08-06 00:07:45 -07:00
parent 7b3ab968a0
commit 66a5929082
4 changed files with 17 additions and 7 deletions
+4 -4
View File
@@ -15,7 +15,7 @@ pub use codex::Codex;
pub use codex::CodexSpawnOk;
pub mod codex_wrapper;
pub mod config;
pub mod config_profile;
mod config_profile;
pub mod config_types;
mod conversation_history;
pub mod error;
@@ -33,7 +33,7 @@ pub use model_provider_info::ModelProviderInfo;
pub use model_provider_info::WireApi;
pub use model_provider_info::built_in_model_providers;
pub use model_provider_info::create_oss_provider_with_base_url;
pub mod model_family;
mod model_family;
mod models;
mod openai_model_info;
mod openai_tools;
@@ -43,9 +43,9 @@ pub mod protocol;
mod rollout;
pub(crate) mod safety;
pub mod seatbelt;
pub mod shell;
mod shell;
pub mod spawn;
pub mod turn_diff_tracker;
mod turn_diff_tracker;
mod user_notification;
pub mod util;
pub use apply_patch::CODEX_APPLY_PATCH_ARG1;
-2
View File
@@ -1,5 +1,3 @@
use shlex;
#[derive(Debug, PartialEq, Eq)]
pub struct ZshShell {
shell_path: String,
+9
View File
@@ -27,14 +27,23 @@ mod bottom_pane;
mod chatwidget;
mod citation_regex;
mod cli;
#[cfg(feature = "vt100-tests")]
pub mod custom_terminal;
#[cfg(not(feature = "vt100-tests"))]
mod custom_terminal;
mod exec_command;
mod file_search;
mod get_git_diff;
mod git_warning_screen;
mod history_cell;
#[cfg(feature = "vt100-tests")]
pub mod insert_history;
#[cfg(not(feature = "vt100-tests"))]
mod insert_history;
#[cfg(feature = "vt100-tests")]
pub mod live_wrap;
#[cfg(not(feature = "vt100-tests"))]
mod live_wrap;
mod log_layer;
mod markdown;
mod slash_command;
+4 -1
View File
@@ -1,5 +1,4 @@
use unicode_width::UnicodeWidthChar;
use unicode_width::UnicodeWidthStr;
/// A single visual row produced by RowBuilder.
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -10,7 +9,9 @@ pub struct Row {
}
impl Row {
#[cfg(test)]
pub fn width(&self) -> usize {
use unicode_width::UnicodeWidthStr;
self.text.width()
}
}
@@ -39,6 +40,7 @@ impl RowBuilder {
self.target_width
}
#[cfg(test)]
pub fn set_width(&mut self, width: usize) {
self.target_width = width.max(1);
// Rewrap everything we have (simple approach for Step 1).
@@ -87,6 +89,7 @@ impl RowBuilder {
}
/// Return a snapshot of produced rows (non-draining).
#[cfg(test)]
pub fn rows(&self) -> &[Row] {
&self.rows
}