Files
Netcatty/components/terminal/runtime/terminalFlowConstants.ts
T
bincxz 579daf8852 fix(terminal): load flow constants via JSON in renderer
createRequire() in terminalFlowConstants.ts breaks Vite/browser bundling
and caused "Terminal could not load". Share thresholds through
terminalFlowConstants.json consumed by both renderer and main process.
2026-06-27 02:45:18 +08:00

19 lines
972 B
TypeScript

import terminalFlowConstants from "../../../infrastructure/config/terminalFlowConstants.json";
/**
* Terminal output flow-control thresholds.
*
* Single source of truth: infrastructure/config/terminalFlowConstants.json
* (aligned with VS Code FlowControlConstants).
*/
export const FLOW_HIGH_WATER_MARK = terminalFlowConstants.FLOW_HIGH_WATER_MARK;
export const FLOW_LOW_WATER_MARK = terminalFlowConstants.FLOW_LOW_WATER_MARK;
export const FLOW_CHAR_COUNT_ACK_SIZE = terminalFlowConstants.FLOW_CHAR_COUNT_ACK_SIZE;
export const MAX_PENDING_WRITE_COALESCE_BYTES =
terminalFlowConstants.MAX_PENDING_WRITE_COALESCE_BYTES;
export const MAX_PENDING_WRITE_COALESCE_BYTES_FLOOD =
terminalFlowConstants.MAX_PENDING_WRITE_COALESCE_BYTES_FLOOD;
export const XTERM_WRITE_CALLBACK_FAST_PATH_MAX_BYTES =
terminalFlowConstants.XTERM_WRITE_CALLBACK_FAST_PATH_MAX_BYTES;
export const XTERM_WRITE_CALLBACK_BATCH_BYTES =
terminalFlowConstants.XTERM_WRITE_CALLBACK_BATCH_BYTES;