Compare commits

...

1 Commits

Author SHA1 Message Date
Michael Bolin
22440c4c06 fix: try to reduce public API of crates to speed up incremental builds 2025-08-06 00:17:14 -07:00
4 changed files with 22 additions and 9 deletions

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;

View File

@@ -1,13 +1,13 @@
use shlex;
#[cfg(target_os = "macos")]
#[derive(Debug, PartialEq, Eq)]
pub struct ZshShell {
pub(crate) struct ZshShell {
shell_path: String,
zshrc_path: String,
}
#[derive(Debug, PartialEq, Eq)]
pub enum Shell {
pub(crate) enum Shell {
#[cfg(target_os = "macos")]
Zsh(ZshShell),
Unknown,
}
@@ -15,6 +15,7 @@ pub enum Shell {
impl Shell {
pub fn format_default_shell_invocation(&self, command: Vec<String>) -> Option<Vec<String>> {
match self {
#[cfg(target_os = "macos")]
Shell::Zsh(zsh) => {
if !std::path::Path::new(&zsh.zshrc_path).exists() {
return None;

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;

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
}