@@ -8,10 +8,9 @@ import { Command } from "commander";
88
99import log from "../utils/log.js" ;
1010import { getBackspaceSequence , Shell } from "../utils/shell.js" ;
11- import isterm from "../isterm/index.js" ;
1211import { enableWin32InputMode , resetToInitialState } from "../utils/ansi.js" ;
13- import { SuggestionManager , MAX_LINES , KeyPressEvent } from "./suggestionManager.js" ;
14- import { ISTerm } from "../isterm/pty.js" ;
12+ import { MAX_LINES , type KeyPressEvent , type SuggestionManager } from "./suggestionManager.js" ;
13+ import type { ISTerm } from "../isterm/pty.js" ;
1514import { v4 as uuidV4 } from "uuid" ;
1615
1716export const renderConfirmation = ( live : boolean ) : string => {
@@ -72,7 +71,11 @@ const _direction = (term: ISTerm): "above" | "below" => {
7271} ;
7372
7473export const render = async ( program : Command , shell : Shell , underTest : boolean , login : boolean ) => {
75- const term = await isterm . spawn ( program , { shell, rows : process . stdout . rows , cols : process . stdout . columns , underTest, login } ) ;
74+ const [ isterm , { SuggestionManager } ] = await Promise . all ( [
75+ import ( "../isterm/index.js" ) ,
76+ import ( "./suggestionManager.js" ) ,
77+ ] ) ;
78+ const term = await isterm . default . spawn ( program , { shell, rows : process . stdout . rows , cols : process . stdout . columns , underTest, login } ) ;
7679 const suggestionManager = new SuggestionManager ( term , shell ) ;
7780 let hasSuggestion = false ;
7881 let direction = _direction ( term ) ;
0 commit comments