pub struct OutputCaps {
pub tool_result_chars: usize,
pub web_body_chars: usize,
pub shell_output_lines: usize,
pub grep_matches: usize,
pub list_entries: usize,
pub glob_results: usize,
}Expand description
Pre-computed output caps for all tools in a session.
Fields§
§tool_result_chars: usizeMax chars for tool results stored in conversation history.
Base: 10,000 (was MAX_TOOL_RESULT_CHARS in tool_dispatch.rs).
web_body_chars: usizeMax chars for web page body content.
Base: 15,000 (was MAX_BODY_CHARS in web_fetch.rs).
shell_output_lines: usizeMax lines of shell command output.
Base: 256 (was MAX_OUTPUT_LINES in shell.rs).
grep_matches: usizeMax grep matches returned.
Base: 100 (was MAX_MATCHES in grep.rs).
list_entries: usizeMax directory listing entries.
Base: 200 (was MAX_ENTRIES in file_tools.rs).
glob_results: usizeMax glob search results.
Base: 200 (was MAX_RESULTS in glob_tool.rs).
Implementations§
Source§impl OutputCaps
impl OutputCaps
Sourcepub fn for_context(max_context_tokens: usize) -> Self
pub fn for_context(max_context_tokens: usize) -> Self
Compute caps scaled to the given context window size (in tokens).
use koda_core::output_caps::OutputCaps;
// 100K context = 1× (baseline)
let caps = OutputCaps::for_context(100_000);
assert_eq!(caps.grep_matches, 100);
// 200K context = 2×
let caps = OutputCaps::for_context(200_000);
assert_eq!(caps.grep_matches, 200);Trait Implementations§
Source§impl Clone for OutputCaps
impl Clone for OutputCaps
Source§fn clone(&self) -> OutputCaps
fn clone(&self) -> OutputCaps
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputCaps
impl Debug for OutputCaps
Source§impl Default for OutputCaps
impl Default for OutputCaps
Source§impl PartialEq for OutputCaps
impl PartialEq for OutputCaps
impl Copy for OutputCaps
impl Eq for OutputCaps
impl StructuralPartialEq for OutputCaps
Auto Trait Implementations§
impl Freeze for OutputCaps
impl RefUnwindSafe for OutputCaps
impl Send for OutputCaps
impl Sync for OutputCaps
impl Unpin for OutputCaps
impl UnsafeUnpin for OutputCaps
impl UnwindSafe for OutputCaps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more