pub struct ContextItem {Show 13 fields
pub id: String,
pub kind: ContextItemKind,
pub label: String,
pub source_path: Option<PathBuf>,
pub scope: String,
pub content_hash: Option<u64>,
pub artifact_handle: Option<String>,
pub byte_count: usize,
pub content: Option<String>,
pub token_estimate: usize,
pub visibility: ContextVisibility,
pub reason_code: String,
pub reason: String,
}Expand description
A single context source considered for the working set.
Fields§
§id: StringStable id (see item_id_for_path / item_id_for_session_range).
kind: ContextItemKindWhat kind of context this is.
label: StringShort human-readable label (e.g. a file path or transcript label).
source_path: Option<PathBuf>Absolute source path when the item is file-backed.
scope: StringScope label — "." for root, or a relative subtree path.
content_hash: Option<u64>Content hash of the full original content, when applicable.
artifact_handle: Option<String>Stable handle for bounded redacted recovery, when this item has one.
byte_count: usizeOriginal byte count of the source content.
content: Option<String>Renderable content for the prompt projection, when this item is
selected as normal context content. None for metadata-only items
(pins rendered as handles, candidates, dropped items) and for items
whose content is projected through other bundle fields (transcript
entries are lowered as messages, not inlined here).
The model-visible dashboard deliberately omits this field.
token_estimate: usizeConservative estimated token cost (ceil(utf8_bytes / 3) + 16).
visibility: ContextVisibilityInclusion status this turn.
reason_code: StringStable policy code for why this state was assigned.
reason: StringWhy the item is visible, omitted, archived, dropped, blocked, or summary-only.
Implementations§
Trait Implementations§
Source§impl Clone for ContextItem
impl Clone for ContextItem
Source§fn clone(&self) -> ContextItem
fn clone(&self) -> ContextItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more