feat: add terminal detachment functionality
implement terminal cleanup when closing tabs or unmounting component remove unused actionRunner prop across components delete unused file-watcher utility
This commit is contained in:
@@ -10,6 +10,7 @@ const logger = createScopedLogger('Terminal');
|
||||
|
||||
export interface TerminalRef {
|
||||
reloadStyles: () => void;
|
||||
getTerminal: () => XTerm | undefined;
|
||||
}
|
||||
|
||||
export interface TerminalProps {
|
||||
@@ -80,6 +81,9 @@ export const Terminal = memo(
|
||||
const terminal = terminalRef.current!;
|
||||
terminal.options.theme = getTerminalTheme(readonly ? { cursor: '#00000000' } : {});
|
||||
},
|
||||
getTerminal: () => {
|
||||
return terminalRef.current;
|
||||
},
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user