Skip to main content

Module working_set

Module working_set 

Source
Expand description

Repo-aware working set tracking and prompt context packing.

The goal of this module is to keep a small, high-signal list of “active” paths that the assistant should prioritize. It observes user messages and tool calls, extracts likely paths, and produces:

  • a compact working-set summary block for the system prompt
  • pinned message indices that compaction should preserve

Structs§

WorkingSet
Repo-aware working-set state.
WorkingSetConfig
Configuration for working-set tracking.
WorkingSetEntry
A single working-set entry.
Workspace
Repo-aware resolver for @-mentions and file pickers.

Enums§

WorkingSetSource
The source that most recently updated an entry.

Constants§

DEFAULT_COMPLETIONS_WALK_DEPTH
Default directory depth walked when surfacing file-mention completions. Set high enough that conventionally nested source trees (Java/.NET/web projects routinely reach 7-9 levels) stay reachable, while a 0 override removes the limit entirely. Keeps Tab snappy in deep monorepos via the .gitignore-aware walk and per-keypress candidate caps (#2488).

Functions§

rank_completion_candidates
Rank pre-collected completion candidates for partial the same way Workspace::completions ranks live walk hits: case-insensitive prefix matches first, then substring matches, each bucket alphabetical, truncated to limit (#3757).