refactor: split main runtime flows into focused modules

This commit is contained in:
2026-02-19 16:57:06 -08:00
parent 162be118e1
commit d5d71816ac
31 changed files with 3270 additions and 672 deletions

View File

@@ -0,0 +1,21 @@
import type { CliArgs } from '../../cli/args';
export function createHandleTexthookerOnlyModeTransitionHandler(deps: {
isTexthookerOnlyMode: () => boolean;
setTexthookerOnlyMode: (enabled: boolean) => void;
commandNeedsOverlayRuntime: (args: CliArgs) => boolean;
startBackgroundWarmups: () => void;
logInfo: (message: string) => void;
}) {
return (args: CliArgs): void => {
if (
deps.isTexthookerOnlyMode() &&
!args.texthooker &&
(args.start || deps.commandNeedsOverlayRuntime(args))
) {
deps.setTexthookerOnlyMode(false);
deps.logInfo('Disabling texthooker-only mode after overlay/start command.');
deps.startBackgroundWarmups();
}
};
}