pub struct WorkingSet {
pub config: WorkingSetConfig,
pub turn: u64,
pub entries: HashMap<String, WorkingSetEntry>,
}Expand description
Repo-aware working-set state.
Fields§
§config: WorkingSetConfigTracking configuration.
turn: u64Monotonic turn counter (increments on user messages).
entries: HashMap<String, WorkingSetEntry>Path entries keyed by workspace-relative path.
Implementations§
Source§impl WorkingSet
impl WorkingSet
Sourcepub fn observe_user_message(&mut self, text: &str, workspace: &Path)
pub fn observe_user_message(&mut self, text: &str, workspace: &Path)
Observe a user message and update the working set.
Sourcepub fn observe_tool_call(
&mut self,
tool_name: &str,
input: &Value,
output: Option<&str>,
workspace: &Path,
)
pub fn observe_tool_call( &mut self, tool_name: &str, input: &Value, output: Option<&str>, workspace: &Path, )
Observe a tool call (input and optional output).
Sourcepub fn rebuild_from_messages(&mut self, messages: &[Message], workspace: &Path)
pub fn rebuild_from_messages(&mut self, messages: &[Message], workspace: &Path)
Rebuild the working set from existing messages (best effort).
This is used when syncing a resumed session.
Sourcepub fn summary_block(&self, workspace: &Path) -> Option<String>
pub fn summary_block(&self, workspace: &Path) -> Option<String>
Render a compact working-set block for the system prompt.
Byte-stable across next_turn() calls when no new paths are observed
(#280): the rendered lines drop the turn-relative touches and
last seen N turn(s) ago fields, and the order is taken from
sorted_for_prompt (turn-agnostic) instead of sorted_entries.
The block lands in the system prompt before the historical
conversation; any byte that drifts here cache-misses everything that
follows in DeepSeek’s KV prefix cache.
Trait Implementations§
Source§impl Clone for WorkingSet
impl Clone for WorkingSet
Source§fn clone(&self) -> WorkingSet
fn clone(&self) -> WorkingSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more