teknium1
2ca53fc386
refactor(cli): move cli.py module-level helper clusters into topical siblings; cli.py lands under 2,000 lines ( #116911 )
...
Mechanical, behaviour-neutral extraction along the existing hermes_cli/cli_*.py
pattern. Six clusters of module-level helpers leave cli.py:
- cli_config_load.py prefill messages, reasoning/service-tier parsing, terminal
env mirroring, CLI defaults + YAML merge, logging bootstrap
- cli_render.py reasoning-tag stripping, ANSI/skin colours, light-mode
detection, markdown/final rendering, output-history
recording, _cprint, ChatConsole, compact banner, panel wrap
- cli_terminal_input.py file drops/attachments, bracketed-paste patch, extended
Enter keys, CPR guards, TUI input height, query images
- cli_shutdown.py process session-id sync, exit watchdog, cleanup steps,
session-finalize notifications, one-shot finalize
- cli_single_query.py kanban goal loops, exit-code mapping, quiet -q runner,
image routing, signal handlers, single-query mode
- cli_auto_maintenance.py state-db / checkpoint startup maintenance
Every moved body is AST-identical to the base copy modulo two mechanical
edits: cli-level names are late-bound with a call-time `from cli import ...`
(the cli_init_mixin pattern) and mutable cli state is read through `_cli().NAME`
(the gateway_service_unit `_gw()` pattern), so every monkeypatch seam on the
`cli` facade still intercepts moved code and no read snapshots stale state.
Mutable module state and every `global`-writing function stay in cli.py; the
facade re-exports the moved names in one import block.
test_bracketed_paste_timeout AST-loads the paste helper from its new home.
cli.py 3959 -> 1820 lines.
2026-09-20 20:42:17 -07:00
..
2026-09-18 09:18:00 -07:00
2026-09-17 00:02:09 -07:00
2026-09-20 13:21:24 -07:00
2026-09-20 10:06:50 -07:00
2026-09-16 17:16:06 -07:00
2026-09-19 09:38:01 -07:00
2026-09-19 09:33:05 -07:00
2026-09-19 12:11:59 -07:00
2026-09-19 09:40:56 -07:00
2026-09-19 00:59:44 -07:00
2026-09-19 10:29:37 -07:00
2026-09-18 10:17:59 -07:00
2026-09-20 10:18:48 -07:00
2026-09-17 09:02:26 -07:00
2026-09-20 22:46:49 -04:00
2026-09-16 17:16:06 -07:00
2026-09-19 09:23:22 -07:00
2026-09-19 09:31:28 -07:00
2026-09-17 00:34:50 -05:00
2026-09-20 20:13:41 -07:00
2026-09-19 03:43:58 +05:30
2026-09-20 18:20:44 -07:00
2026-09-20 20:42:17 -07:00
2026-09-16 17:49:48 -07:00
2026-09-20 15:56:33 -07:00
2026-09-19 01:43:15 -07:00
2026-09-18 10:24:15 -07:00
2026-09-20 13:35:09 -07:00
2026-09-16 17:23:44 -07:00
2026-09-20 16:23:22 -07:00
2026-09-19 09:43:20 -07:00
2026-09-20 09:20:51 -07:00
2026-09-19 03:15:10 -07:00
2026-09-19 09:40:23 -07:00
2026-09-20 11:48:28 -07:00
2026-09-18 09:18:00 -07:00
2026-09-18 09:18:00 -07:00
2026-09-19 10:22:33 -07:00
2026-09-18 10:00:29 -07:00
2026-09-19 09:30:56 -07:00
2026-09-19 09:30:56 -07:00
2026-09-16 17:15:38 -07:00
2026-09-20 12:44:48 -07:00
2026-09-18 09:41:02 -07:00
2026-09-18 12:44:32 -07:00
2026-09-20 18:54:24 -07:00
2026-09-20 20:13:33 -07:00
2026-09-19 16:28:57 +05:30
2026-09-16 17:16:06 -07:00
2026-09-18 17:10:12 +02:00
2026-09-18 17:10:12 +02:00
2026-09-18 12:46:54 -07:00
2026-09-20 16:33:49 -07:00
2026-09-20 15:17:49 +05:30
2026-09-20 11:19:50 -07:00
2026-09-19 10:26:08 -07:00
2026-09-19 02:38:49 -07:00
2026-09-18 15:12:27 -07:00
2026-09-18 09:38:01 -07:00
2026-09-20 10:49:13 -07:00
2026-09-17 09:04:11 -07:00
2026-09-18 09:38:01 -07:00
2026-09-20 11:12:12 -07:00
2026-09-20 18:26:14 -07:00
2026-09-16 23:13:20 -04:00
2026-09-20 16:41:21 +05:30
2026-09-17 08:44:06 -07:00
2026-09-20 11:52:04 -07:00
2026-09-16 23:13:20 -04:00
2026-09-20 10:05:53 -07:00
2026-09-18 10:38:08 -07:00
2026-09-16 17:44:36 -07:00
2026-09-20 15:57:25 -07:00
2026-09-19 09:29:18 -07:00
2026-09-20 12:15:07 -07:00
2026-09-18 09:56:28 -07:00
2026-09-20 20:13:25 -07:00
2026-09-18 21:47:13 +05:30
2026-09-20 00:19:04 +05:30
2026-09-19 12:30:32 -07:00
2026-09-20 11:52:45 -07:00
2026-09-20 16:32:50 -07:00
2026-09-17 19:00:40 -04:00
2026-09-20 10:39:01 -07:00
2026-09-19 02:59:51 -07:00
2026-09-18 17:10:12 +02:00
2026-09-18 12:49:13 -07:00
2026-09-18 09:25:59 -07:00
2026-09-19 00:43:49 +05:30
2026-09-20 16:28:59 +05:30
2026-09-20 12:47:14 -07:00
2026-09-20 14:23:15 -07:00
2026-09-20 10:50:27 -07:00
2026-09-20 12:03:06 -07:00
2026-09-18 10:00:29 -07:00
2026-09-20 10:05:53 -07:00
2026-09-18 10:15:11 -07:00
2026-09-20 10:19:25 -07:00
2026-09-19 10:05:26 -07:00
2026-09-20 11:28:15 -07:00
2026-09-18 01:43:35 +05:30
2026-09-20 15:55:14 -07:00
2026-09-19 00:10:41 +05:30
2026-09-20 18:43:59 -07:00
2026-09-20 10:24:53 -07:00
2026-09-20 19:03:47 -07:00
2026-09-18 09:48:41 -07:00
2026-09-18 09:29:44 -07:00
2026-09-18 09:50:19 -07:00
2026-09-20 19:03:47 -07:00
2026-09-18 10:21:42 -07:00
2026-09-18 09:32:02 -07:00
2026-09-17 08:55:01 -07:00
2026-09-18 09:32:02 -07:00
2026-09-18 10:04:23 -07:00
2026-09-20 10:13:26 -07:00
2026-09-20 10:08:02 -07:00
2026-09-20 19:03:47 -07:00
2026-09-20 19:03:47 -07:00
2026-09-20 19:03:47 -07:00
2026-09-20 19:03:47 -07:00
2026-09-18 11:03:57 -07:00
2026-09-18 12:48:16 -07:00
2026-09-20 10:41:25 -07:00
2026-09-18 10:10:05 -07:00
2026-09-20 12:47:14 -07:00
2026-09-20 15:17:14 +05:30
2026-09-19 09:53:48 -07:00
2026-09-20 11:14:00 -07:00
2026-09-20 20:42:05 -07:00
2026-09-20 11:50:48 -07:00
2026-09-20 15:29:34 -07:00
2026-09-20 14:23:15 -07:00
2026-09-20 15:53:25 -07:00
2026-09-17 08:44:33 -07:00
2026-09-19 02:44:02 -07:00
2026-09-20 00:22:24 -07:00
2026-09-18 09:45:32 -07:00
2026-09-19 23:46:42 -07:00
2026-09-20 12:50:53 -07:00
2026-09-20 12:40:36 -07:00
2026-09-18 09:23:13 -07:00
2026-09-18 09:41:02 -07:00
2026-09-20 14:29:39 -07:00
2026-09-19 09:34:40 -07:00
2026-09-18 11:01:52 -07:00
2026-09-17 08:55:04 -07:00
2026-09-19 22:18:25 +05:30
2026-09-20 14:29:39 -07:00
2026-09-19 09:32:32 -07:00
2026-09-20 11:14:00 -07:00
2026-09-20 16:22:25 -07:00
2026-09-19 10:22:01 -07:00
2026-09-20 20:41:54 -07:00
2026-09-20 14:02:17 +05:30
2026-09-18 09:52:03 -07:00
2026-09-19 20:55:20 -07:00
2026-09-19 09:24:25 -07:00
2026-09-18 11:01:52 -07:00
2026-09-16 18:12:34 -07:00
2026-09-19 09:42:18 -07:00
2026-09-19 01:16:39 -07:00
2026-09-18 11:01:52 -07:00
2026-09-17 09:04:11 -07:00
2026-09-18 09:50:52 -07:00
2026-09-16 17:51:11 -07:00
2026-09-20 10:16:51 -07:00
2026-09-20 10:02:22 -07:00
2026-09-18 17:09:28 +02:00
2026-09-20 14:29:39 -07:00
2026-09-17 09:03:29 -07:00
2026-09-20 14:29:39 -07:00
2026-09-20 15:56:55 -07:00
2026-09-19 11:58:06 -07:00
2026-09-20 10:44:52 -07:00
2026-09-19 20:54:06 -07:00
2026-09-19 21:11:30 -07:00
2026-09-17 00:11:27 -07:00
2026-09-20 11:49:00 -07:00
2026-09-18 09:43:19 -07:00
2026-09-20 11:52:45 -07:00
2026-09-20 12:44:48 -07:00
2026-09-18 09:43:19 -07:00
2026-09-18 09:43:19 -07:00
2026-09-20 15:21:14 -07:00
2026-09-20 15:27:46 -07:00
2026-09-20 20:29:14 +05:30
2026-09-20 13:55:03 -07:00
2026-09-20 18:45:07 -07:00
2026-09-19 01:43:14 +05:30
2026-09-20 10:29:54 -07:00
2026-09-19 20:45:06 -07:00
2026-09-18 15:40:37 +05:30
2026-09-17 08:53:48 -07:00
2026-09-20 10:14:01 -07:00
2026-09-18 15:40:37 +05:30
2026-09-20 10:01:58 -07:00
2026-09-20 10:06:29 -07:00
2026-09-20 12:51:30 -07:00
2026-09-20 11:55:07 -07:00
2026-09-18 01:43:35 +05:30
2026-09-19 09:25:29 -07:00
2026-09-19 23:42:20 -07:00
2026-09-17 09:06:59 -07:00
2026-09-18 12:52:36 -07:00
2026-09-18 09:38:01 -07:00
2026-09-18 17:09:28 +02:00
2026-09-19 00:45:43 -07:00
2026-09-17 00:34:50 -05:00
2026-09-20 13:22:30 -07:00
2026-09-19 03:43:03 +05:30
2026-09-20 14:02:17 +05:30
2026-09-18 09:55:21 -07:00
2026-09-19 00:24:50 +05:30
2026-09-20 18:16:47 +05:30
2026-09-20 00:22:24 -07:00
2026-09-20 20:13:41 -07:00
2026-09-18 10:38:41 -07:00
2026-09-16 17:49:48 -07:00
2026-09-20 00:11:37 -07:00
2026-09-20 20:36:42 -07:00
2026-09-18 22:36:41 -07:00
2026-09-20 20:13:25 -07:00
2026-09-20 10:08:37 -07:00
2026-09-20 12:17:52 +05:30
2026-09-18 21:47:13 +05:30
2026-09-18 09:47:06 -07:00
2026-09-20 15:16:35 +05:30
2026-09-17 00:02:09 -07:00
2026-09-20 16:23:22 -07:00
2026-09-18 12:51:22 -07:00
2026-09-20 18:25:48 -07:00
2026-09-18 09:38:34 -07:00
2026-09-20 11:30:36 -07:00
2026-09-19 01:44:53 +05:30
2026-09-18 10:15:11 -07:00
2026-09-20 15:16:06 +05:30
2026-09-18 21:47:13 +05:30
2026-09-19 23:46:08 -07:00
2026-09-20 12:44:48 -07:00
2026-09-19 09:42:18 -07:00
2026-09-20 00:13:01 -07:00
2026-09-16 17:13:56 -07:00
2026-09-17 00:02:09 -07:00
2026-09-17 00:02:09 -07:00
2026-09-19 02:33:41 -07:00
2026-09-20 15:23:04 -07:00
2026-09-20 20:13:57 -07:00
2026-09-18 12:44:04 -07:00
2026-09-20 09:52:06 -07:00
2026-09-20 00:03:06 -07:00
2026-09-20 20:13:57 -07:00
2026-09-20 18:51:36 -07:00
2026-09-17 00:02:09 -07:00
2026-09-19 23:52:01 -07:00
2026-09-20 10:29:35 -07:00
2026-09-18 12:47:23 -07:00
2026-09-19 23:52:01 -07:00
2026-09-17 00:02:09 -07:00
2026-09-18 17:09:28 +02:00
2026-09-19 02:01:36 -07:00
2026-09-19 02:01:36 -07:00
2026-09-18 09:38:01 -07:00
2026-09-19 02:02:14 -07:00
2026-09-17 00:02:09 -07:00
2026-09-19 02:33:41 -07:00
2026-09-19 02:33:41 -07:00
2026-09-19 10:31:14 -07:00
2026-09-19 09:42:49 -07:00
2026-09-20 10:21:52 -07:00
2026-09-19 02:39:51 -07:00
2026-09-18 01:43:35 +05:30
2026-09-18 10:32:15 -07:00
2026-09-18 10:18:40 -07:00
2026-09-19 10:04:52 -07:00
2026-09-20 20:13:41 -07:00
2026-09-16 17:11:08 -07:00
2026-09-20 12:45:24 -07:00
2026-09-18 10:18:40 -07:00
2026-09-19 10:56:19 -07:00
2026-09-20 09:20:51 -07:00
2026-09-20 11:54:02 -07:00
2026-09-20 15:15:36 +05:30
2026-09-19 03:35:57 -07:00
2026-09-20 12:39:58 -07:00
2026-09-18 09:25:59 -07:00
2026-09-20 16:41:21 +05:30
2026-09-20 10:40:12 -07:00