Skip to main content

Module repo

Module repo 

Source
Expand description

Repository context, ported for parity with wcgw’s repo_context.py.

The flow mirrors wcgw exactly:

  1. Walk the workspace (gitignore-aware) collecting candidate files.
  2. For git repos, pull recently-changed files from history (topological).
  3. Rank every file with the embedded path-probability model.
  4. Build the shown set: active files first, then recent git files, then the statistically-ranked remainder, up to a size that scales with the repo.
  5. Render it as a partially-expanded directory tree.

Functions§

get_repo_context
Build the workspace context string and the list of shown files.