File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1- #![ allow( clippy:: all) ]
2- #![ allow( dead_code) ]
3- #![ allow( unused) ]
4-
51use super :: * ;
2+ use crate :: truncate;
3+ use crate :: truncate:: TruncationPolicy ;
64use base64:: Engine ;
75use base64:: engine:: general_purpose:: STANDARD as BASE64_STANDARD ;
86use codex_git_utils:: GhostCommit ;
@@ -20,8 +18,6 @@ use codex_protocol::models::ReasoningItemContent;
2018use codex_protocol:: models:: ReasoningItemReasoningSummary ;
2119use codex_protocol:: openai_models:: InputModality ;
2220use codex_protocol:: openai_models:: default_input_modalities;
23- use codex_protocol:: output_truncation:: TruncationPolicy ;
24- use codex_protocol:: output_truncation:: truncate_text;
2521use codex_protocol:: protocol:: InterAgentCommunication ;
2622use image:: ImageBuffer ;
2723use image:: ImageFormat ;
@@ -127,7 +123,7 @@ fn reasoning_with_encrypted_content(len: usize) -> ResponseItem {
127123}
128124
129125fn truncate_exec_output ( content : & str ) -> String {
130- truncate_text ( content, TruncationPolicy :: Tokens ( EXEC_FORMAT_MAX_TOKENS ) )
126+ truncate :: truncate_text ( content, TruncationPolicy :: Tokens ( EXEC_FORMAT_MAX_TOKENS ) )
131127}
132128
133129fn approx_token_count_for_text ( text : & str ) -> i64 {
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ pub use codex_login::token_data;
8080mod unified_exec;
8181pub mod windows_sandbox;
8282pub use client:: X_RESPONSESAPI_INCLUDE_TIMING_METRICS_HEADER ;
83+ #[ cfg( test) ]
84+ pub ( crate ) use codex_protocol:: output_truncation as truncate;
8385pub use model_provider_info:: DEFAULT_LMSTUDIO_PORT ;
8486pub use model_provider_info:: DEFAULT_OLLAMA_PORT ;
8587pub use model_provider_info:: LMSTUDIO_OSS_PROVIDER_ID ;
You can’t perform that action at this time.
0 commit comments