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-12 05:09:11 -07:00
2026-09-13 05:07:50 -07:00
2026-09-03 17:13:22 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 05:07:11 -07:00
2026-09-15 10:49:19 +05:30
2026-09-10 11:48:01 -07:00
2026-09-06 20:50:02 +05:30
2026-09-02 13:29:48 -07:00
2026-09-03 13:16:47 -07:00
2026-09-02 18:56:06 -07:00
2026-09-13 09:18:02 -07:00
2026-09-15 03:34:20 -07:00
2026-09-15 12:46:27 +05:30
2026-09-13 05:20:26 -07:00
2026-09-14 20:01:19 +05:30
2026-09-13 05:07:11 -07:00
2026-09-06 05:37:03 -07:00
2026-09-06 05:37:03 -07:00
2026-09-14 20:01:19 +05:30
2026-09-02 20:10:26 -07:00
2026-09-02 21:38:20 -07:00
2026-09-03 17:13:22 -07:00
2026-09-15 10:49:19 +05:30
2026-09-11 19:39:12 -07:00
2026-09-07 06:02:22 -07:00
2026-09-13 05:19:48 -07:00
2026-09-07 07:06:58 -07:00
2026-09-14 06:55:54 -07:00
2026-09-02 18:18:18 -07:00
2026-09-12 01:35:05 -07:00
2026-09-02 18:49:57 -07:00
2026-09-02 18:49:57 -07:00
2026-09-02 18:49:57 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-05 10:54:19 +05:30
2026-09-15 12:46:27 +05:30
2026-09-07 05:24:15 -07:00
2026-09-07 05:24:15 -07:00
2026-09-10 18:08:16 -07:00
2026-09-02 18:47:54 -07:00
2026-09-15 10:49:19 +05:30
2026-09-15 12:46:27 +05:30
2026-09-06 22:45:31 +05:30
2026-09-07 21:22:49 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-13 05:09:43 -07:00
2026-09-07 05:59:08 -07:00
2026-09-13 05:09:43 -07:00
2026-09-11 02:07:48 -07:00
2026-09-15 03:37:49 -07:00
2026-09-05 16:44:23 +05:30
2026-09-13 05:20:26 -07:00
2026-09-14 07:21:18 -07:00
2026-09-11 03:45:33 +05:30
2026-09-13 19:30:48 +05:30
2026-09-02 18:57:14 -07:00
2026-09-07 08:06:48 -07:00
2026-09-13 05:09:43 -07:00
2026-09-03 22:00:01 -07:00
2026-09-11 03:45:33 +05:30
2026-09-03 09:44:26 -07:00
2026-09-12 05:56:15 -07:00
2026-09-07 08:19:32 -07:00
2026-09-07 07:10:28 -07:00
2026-09-12 08:23:42 -07:00
2026-09-03 04:31:46 -07:00
2026-09-15 10:49:19 +05:30
2026-09-09 16:30:24 -07:00
2026-09-02 13:29:48 -07:00
2026-09-03 17:13:22 -07:00
2026-09-09 11:29:56 -07:00
2026-09-02 18:22:13 -07:00
2026-09-10 10:35:07 -07:00
2026-09-15 13:27:24 +05:30
2026-09-14 06:44:54 -07:00
2026-09-11 15:26:46 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-07 08:08:04 -07:00
2026-09-12 01:35:05 -07:00
2026-09-15 00:41:14 +05:30
2026-09-12 08:23:13 -07:00
2026-09-02 18:53:53 -07:00
2026-09-09 13:08:25 +05:30
2026-09-09 10:58:16 -07:00
2026-09-07 08:28:43 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 18:58:42 -07:00
2026-09-02 18:22:13 -07:00
2026-09-11 11:54:49 -07:00
2026-09-03 22:00:01 -07:00
2026-09-02 19:22:42 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 18:29:05 -07:00
2026-09-02 22:21:06 -07:00
2026-09-13 05:19:48 -07:00
2026-09-13 05:19:48 -07:00
2026-09-02 18:28:38 -07:00
2026-09-02 18:28:38 -07:00
2026-09-14 20:35:28 +05:30
2026-09-03 09:44:26 -07:00
2026-09-10 18:11:25 -07:00
2026-09-02 19:10:21 -07:00
2026-09-13 20:50:10 -07:00
2026-09-11 16:50:20 -07:00
2026-09-02 18:33:06 -07:00
2026-09-13 05:09:43 -07:00
2026-09-13 05:09:43 -07:00
2026-09-06 09:11:04 -07:00
2026-09-13 05:09:06 -07:00
2026-09-02 19:05:15 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 15:26:46 -07:00
2026-09-09 12:17:57 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 15:07:39 -07:00
2026-09-02 19:10:21 -07:00
2026-09-02 18:22:01 -07:00
2026-09-13 05:09:43 -07:00
2026-09-15 03:37:49 -07:00
2026-09-03 17:13:22 -07:00
2026-09-14 06:55:54 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:33:06 -07:00
2026-09-12 13:44:52 -07:00
2026-09-02 18:44:36 -07:00
2026-09-02 19:10:21 -07:00
2026-09-13 05:09:43 -07:00
2026-09-11 03:45:33 +05:30
2026-09-02 19:18:18 -07:00
2026-09-02 18:51:24 -07:00
2026-09-13 05:19:48 -07:00
2026-09-14 20:35:28 +05:30
2026-09-13 21:27:35 -07:00
2026-09-10 09:22:31 -07:00
2026-09-13 21:30:40 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 13:23:24 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-13 19:23:09 +05:30
2026-09-13 05:09:43 -07:00
2026-09-08 04:38:47 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 19:18:18 -07:00
2026-09-03 04:56:59 +05:30
2026-09-15 11:03:39 +05:30
2026-09-06 05:35:12 -07:00
2026-09-09 10:32:01 +05:30
2026-09-13 05:07:11 -07:00
2026-09-02 19:19:44 -07:00
2026-09-03 17:13:22 -07:00
2026-09-15 03:34:20 -07:00
2026-09-07 07:10:28 -07:00
2026-09-12 08:25:59 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 10:40:25 -07:00
2026-09-03 12:29:52 -07:00
2026-09-03 13:29:35 -07:00
2026-09-02 19:42:28 -07:00
2026-09-03 03:31:03 -07:00
2026-09-12 08:34:07 -07:00
2026-09-02 19:36:47 -07:00
2026-09-09 10:31:26 +05:30
2026-09-15 03:34:20 -07:00
2026-09-03 13:24:04 -07:00
2026-09-04 00:15:16 -07:00
2026-09-13 05:20:26 -07:00
2026-09-02 19:19:44 -07:00
2026-09-02 19:42:28 -07:00
2026-09-13 21:08:32 -07:00
2026-09-10 02:21:16 +05:30
2026-09-15 00:41:14 +05:30
2026-09-12 21:07:46 -07:00
2026-09-06 22:56:51 +05:30
2026-09-12 08:25:14 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-11 03:45:33 +05:30
2026-09-12 08:27:11 -07:00
2026-09-14 20:35:28 +05:30
2026-09-10 10:45:57 -07:00
2026-09-06 13:21:17 -07:00
2026-09-13 19:23:09 +05:30
2026-09-03 13:12:23 -07:00
2026-09-11 06:37:27 -07:00
2026-09-09 12:17:57 +05:30
2026-09-10 13:23:24 -07:00
2026-09-13 14:46:42 -07:00
2026-09-15 10:48:49 +05:30
2026-09-09 09:51:31 -07:00
2026-09-09 12:17:57 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 13:12:23 -07:00
2026-09-06 13:21:17 -07:00
2026-09-06 13:21:17 -07:00
2026-09-12 10:00:06 +05:30
2026-09-07 06:15:43 -07:00
2026-09-11 01:37:22 -07:00
2026-09-02 18:40:01 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 19:30:27 -07:00
2026-09-02 19:26:50 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:45:32 -07:00
2026-09-09 11:42:43 -07:00
2026-09-06 14:19:42 -07:00
2026-09-06 13:21:17 -07:00
2026-09-10 02:44:26 -07:00
2026-09-10 11:48:01 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 05:08:29 -07:00
2026-09-02 19:19:54 -07:00
2026-09-02 18:29:10 -07:00
2026-09-02 19:07:07 -07:00
2026-09-12 13:44:52 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 07:17:00 -07:00