teknium1
f271ba09b0
fix(context): derive the /context file listing from the builder's own discovery walk
...
Review follow-up (Enough1122) on the salvaged #91272 : the original
list_context_file_sources() hand-mirrored the priority ladder inside
build_context_files_prompt, so the two would drift the moment the builder
gained a context type or changed precedence — misreporting what the prompt
holds is worse than not showing it.
Now prompt_builder exposes one candidate finder per context type
(_CONTEXT_FILE_CANDIDATES → discover_context_files) and BOTH the loaders and
the manifest walk it. The manifest lives in the new sibling
agent/context_file_sources.py (not appended to the facade) and:
- reports empty / unreadable files truthfully instead of "✓ 0 tokens",
- mirrors the install-tree guard ("suppressed") so a Desktop session that
fell back into the Hermes tree sees why nothing loaded,
- lists every .cursor/rules/*.mdc as loaded, matching the builder which
concatenates all of them,
- measures truncation on the rendered "## label" section like the builder.
The block now renders on every surface that shows the /context category
table: CLI/TUI (hermes_cli/cli_info_mixin.py) and the messaging gateway
(gateway/slash_commands_status.py). The Desktop popover consumes the raw
session.context_breakdown payload (no text table) and is left as-is.
Tests trimmed to the two invariants: manifest/prompt parity across every
context type at once, and truncated/suppressed follow the builder.
2026-09-15 03:37:49 -07:00
..
2026-09-13 09:40:44 -07:00
2026-09-14 21:49:13 -04:00
2026-09-13 05:09:43 -07:00
2026-09-14 09:19:32 -07:00
2026-09-15 03:36:22 -07:00
2026-09-14 09:02:28 -07:00
2026-09-11 19:01:47 -07:00
2026-09-13 05:07:11 -07:00
2026-09-12 08:25:54 -07:00
2026-09-13 14:48:09 -07:00
2026-09-13 05:09:43 -07:00
2026-09-14 20:38:07 +05:30
2026-09-12 22:07:41 -07:00
2026-09-12 22:07:41 -07:00
2026-09-12 22:07:41 -07:00
2026-09-13 05:07:11 -07:00
2026-09-12 22:07:41 -07:00
2026-09-13 05:07:11 -07:00
2026-09-12 22:07:41 -07:00
2026-09-14 20:38:07 +05:30
2026-09-13 05:07:11 -07:00
2026-09-13 20:57:03 -07:00
2026-09-12 08:25:54 -07:00
2026-09-15 03:34:20 -07:00
2026-09-12 08:25:54 -07:00
2026-09-13 14:35:32 -07:00
2026-09-15 14:52:26 +05:30
2026-09-15 03:37:49 -07:00
2026-09-13 20:41:41 -07:00
2026-09-15 14:52:26 +05:30
2026-09-13 20:54:50 -07:00
2026-09-13 14:35:32 -07:00
2026-09-13 05:21:02 -07:00
2026-09-12 22:00:02 -07:00
2026-09-13 14:35:32 -07:00
2026-09-13 16:43:50 -07:00
2026-09-13 20:50:10 -07:00
2026-09-13 05:07:11 -07:00
2026-09-11 11:54:49 -07:00
2026-09-12 08:25:36 -07:00
2026-09-13 20:41:41 -07:00
2026-09-12 16:17:04 -07:00
2026-09-15 03:34:20 -07:00
2026-09-13 05:09:06 -07:00
2026-09-15 00:41:13 +05:30
2026-09-13 05:07:50 -07:00
2026-09-14 08:10:36 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 05:09:06 -07:00
2026-09-14 09:19:32 -07:00
2026-09-12 05:56:15 -07:00
2026-09-13 05:21:02 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 05:09:06 -07:00
2026-09-15 12:51:27 +05:30
2026-09-12 08:24:11 -07:00
2026-09-15 11:03:39 +05:30
2026-09-13 20:51:06 -07:00
2026-09-12 21:39:10 -07:00
2026-09-14 08:10:36 -07:00
2026-09-14 16:16:06 -07:00
2026-09-14 16:16:06 -07:00
2026-09-13 15:41:01 -07:00
2026-09-14 20:51:37 +05:30
2026-09-13 15:41:01 -07:00
2026-09-12 15:00:37 +05:30
2026-09-13 15:41:01 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 05:08:29 -07:00
2026-09-15 03:33:53 -07:00
2026-09-14 16:14:33 -07:00
2026-09-13 14:37:17 -07:00
2026-09-13 05:09:06 -07:00
2026-09-14 16:14:33 -07:00
2026-09-13 05:09:43 -07:00
2026-09-14 16:14:33 -07:00
2026-09-14 05:28:46 -07:00
2026-09-12 08:47:21 -07:00
2026-09-12 08:25:54 -07:00
2026-09-13 16:43:50 -07:00
2026-09-14 08:10:36 -07:00
2026-09-14 08:10:36 -07:00
2026-09-13 05:07:50 -07:00
2026-09-12 08:34:43 -07:00
2026-09-12 20:49:18 -07:00
2026-09-11 19:50:46 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 20:54:50 -07:00
2026-09-12 05:10:51 -07:00
2026-09-13 16:43:50 -07:00
2026-09-13 16:43:50 -07:00
2026-09-13 21:06:39 -07:00
2026-09-12 01:35:05 -07:00
2026-09-12 01:35:05 -07:00
2026-09-12 14:05:36 -07:00
2026-09-13 21:07:35 -07:00
2026-09-14 22:01:32 +00:00
2026-09-14 08:10:36 -07:00
2026-09-12 08:24:26 -07:00
2026-09-14 21:00:29 -07:00
2026-09-13 05:07:11 -07:00
2026-09-12 07:57:13 -07:00
2026-09-14 21:00:29 -07:00
2026-09-15 10:48:49 +05:30
2026-09-15 10:48:49 +05:30
2026-09-15 11:03:39 +05:30
2026-09-12 08:27:53 -07:00
2026-09-13 14:33:11 -07:00
2026-09-13 14:33:11 -07:00
2026-09-15 12:45:29 +05:30
2026-09-13 05:08:29 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:11 -07:00
2026-09-15 03:36:22 -07:00
2026-09-14 21:18:47 +05:30
2026-09-14 19:49:12 +05:30
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:09:06 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-13 05:21:02 -07:00
2026-09-11 06:37:27 -07:00
2026-09-11 06:24:54 -07:00
2026-09-15 12:51:27 +05:30
2026-09-13 05:32:38 -07:00
2026-09-12 08:25:54 -07:00
2026-09-12 08:25:54 -07:00
2026-09-12 08:25:54 -07:00
2026-09-15 14:15:59 +05:30
2026-09-12 08:25:54 -07:00
2026-09-13 05:08:29 -07:00
2026-09-12 21:47:53 -07:00
2026-09-13 05:21:02 -07:00
2026-09-14 08:10:36 -07:00
2026-09-14 08:10:36 -07:00
2026-09-15 14:52:26 +05:30
2026-09-11 06:24:54 -07:00
2026-09-12 08:34:43 -07:00
2026-09-13 05:07:50 -07:00
2026-09-12 08:25:54 -07:00
2026-09-13 05:08:20 -07:00
2026-09-13 05:08:20 -07:00
2026-09-14 20:51:37 +05:30
2026-09-13 14:44:38 -07:00
2026-09-13 15:41:01 -07:00
2026-09-13 19:19:32 -07:00
2026-09-15 00:41:13 +05:30
2026-09-13 05:07:50 -07:00
2026-09-12 06:13:44 -07:00
2026-09-11 15:28:37 -07:00
2026-09-14 08:10:36 -07:00
2026-09-12 18:35:21 -07:00
2026-09-11 06:37:27 -07:00
2026-09-11 19:50:46 -07:00
2026-09-13 21:30:02 -07:00
2026-09-13 20:55:29 -07:00
2026-09-13 20:55:29 -07:00
2026-09-13 05:07:11 -07:00