pub struct ToolRenderContext {
pub expanded: bool,
pub args_complete: bool,
pub is_partial: bool,
pub is_error: bool,
pub cwd: String,
pub duration_secs: Option<f64>,
pub exit_code: Option<i32>,
pub cancelled: bool,
pub was_truncated: bool,
pub full_output_path: Option<String>,
pub file_path: Option<String>,
pub expand_key: String,
}Expand description
Context passed to ToolRenderer methods (matching pi’s ToolRenderContext). Carries all metadata about the tool execution that renderers may need.
Fields§
§expanded: bool§args_complete: bool§is_partial: bool§is_error: bool§cwd: StringWorking directory for path resolution.
duration_secs: Option<f64>Duration in seconds (bash).
exit_code: Option<i32>Exit code (bash).
cancelled: boolWhether execution was cancelled (bash).
was_truncated: boolWhether output was truncated (bash/read).
full_output_path: Option<String>Path to full output file (bash).
file_path: Option<String>File path for syntax highlighting (read).
expand_key: StringKeybinding hint for the expand action, e.g. “C-O”.
Trait Implementations§
Source§impl Clone for ToolRenderContext
impl Clone for ToolRenderContext
Source§fn clone(&self) -> ToolRenderContext
fn clone(&self) -> ToolRenderContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToolRenderContext
impl RefUnwindSafe for ToolRenderContext
impl Send for ToolRenderContext
impl Sync for ToolRenderContext
impl Unpin for ToolRenderContext
impl UnsafeUnpin for ToolRenderContext
impl UnwindSafe for ToolRenderContext
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