Skip to content

Commit 87b5267

Browse files
committed
I need to see terminal state
1 parent cb07760 commit 87b5267

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/client/extensionActivation.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { registerReplCommands, registerReplExecuteOnEnter, registerStartNativeRe
5555
import { registerTriggerForTerminalREPL } from './terminals/codeExecution/terminalReplWatcher';
5656
import { registerPythonStartup } from './terminals/pythonStartup';
5757
import { registerPixiFeatures } from './pythonEnvironments/common/environmentManagers/pixi';
58+
import { traceVerbose } from './logging';
5859

5960
export async function activateComponents(
6061
// `ext` is passed to any extra activation funcs.
@@ -115,6 +116,20 @@ export function activateFeatures(ext: ExtensionState, _components: Components):
115116
registerStartNativeReplCommand(ext.disposables, interpreterService);
116117
registerReplCommands(ext.disposables, interpreterService, executionHelper, commandManager);
117118
registerReplExecuteOnEnter(ext.disposables, interpreterService, commandManager);
119+
120+
window.onDidChangeTerminalState((e) => {
121+
const ourTerminalState = e.state;
122+
console.log(ourTerminalState);
123+
traceVerbose('Printing our terminal state from service.ts', ourTerminalState);
124+
125+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
126+
const ourStateTypeless = (ourTerminalState as unknown) as { isInteractedWith: any; shellType: any };
127+
const ourState = ourStateTypeless.isInteractedWith;
128+
traceVerbose('Printing our terminal state from service.ts', ourState);
129+
const ourShellType = ourStateTypeless.shellType;
130+
traceVerbose('Printing our terminal state from service.ts', ourShellType);
131+
traceVerbose('finished printing our terminal state');
132+
});
118133
}
119134

120135
/// //////////////////////////

0 commit comments

Comments
 (0)