(
tabId: string,
blockId: string,
connectElem: HTMLDivElement,
options: TermTypes.ITerminalOptions & TermTypes.ITerminalInitOnlyOptions,
waveOptions: TermWrapOptions
)
| 123 | inRepaintTransaction: boolean = false; |
| 124 | |
| 125 | constructor( |
| 126 | tabId: string, |
| 127 | blockId: string, |
| 128 | connectElem: HTMLDivElement, |
| 129 | options: TermTypes.ITerminalOptions & TermTypes.ITerminalInitOnlyOptions, |
| 130 | waveOptions: TermWrapOptions |
| 131 | ) { |
| 132 | this.loaded = false; |
| 133 | this.tabId = tabId; |
| 134 | this.blockId = blockId; |
| 135 | this.sendDataHandler = waveOptions.sendDataHandler; |
| 136 | this.nodeModel = waveOptions.nodeModel; |
| 137 | this.ptyOffset = 0; |
| 138 | this.dataBytesProcessed = 0; |
| 139 | this.hasResized = false; |
| 140 | this.lastUpdated = Date.now(); |
| 141 | this.promptMarkers = []; |
| 142 | this.shellIntegrationStatusAtom = jotai.atom(null) as jotai.PrimitiveAtom<ShellIntegrationStatus | null>; |
| 143 | this.lastCommandAtom = jotai.atom(null) as jotai.PrimitiveAtom<string | null>; |
| 144 | this.claudeCodeActiveAtom = jotai.atom(false); |
| 145 | this.webglEnabledAtom = jotai.atom(false) as jotai.PrimitiveAtom<boolean>; |
| 146 | this.terminal = new Terminal(options); |
| 147 | this.fitAddon = new FitAddon(); |
| 148 | this.serializeAddon = new SerializeAddon(); |
| 149 | this.searchAddon = new SearchAddon(); |
| 150 | this.terminal.loadAddon(this.searchAddon); |
| 151 | this.terminal.loadAddon(this.fitAddon); |
| 152 | this.terminal.loadAddon(this.serializeAddon); |
| 153 | this.terminal.loadAddon( |
| 154 | new WebLinksAddon( |
| 155 | (e, uri) => { |
| 156 | e.preventDefault(); |
| 157 | switch (PLATFORM) { |
| 158 | case PlatformMacOS: |
| 159 | if (e.metaKey) { |
| 160 | fireAndForget(() => openLink(uri)); |
| 161 | } |
| 162 | break; |
| 163 | default: |
| 164 | if (e.ctrlKey) { |
| 165 | fireAndForget(() => openLink(uri)); |
| 166 | } |
| 167 | break; |
| 168 | } |
| 169 | }, |
| 170 | { |
| 171 | hover: (e, uri) => { |
| 172 | this.hoveredLinkUri = uri; |
| 173 | this.onLinkHover?.(uri, e.clientX, e.clientY); |
| 174 | }, |
| 175 | leave: () => { |
| 176 | this.hoveredLinkUri = null; |
| 177 | this.onLinkHover?.(null, 0, 0); |
| 178 | }, |
| 179 | } |
| 180 | ) |
| 181 | ); |
| 182 | this.setTermRenderer(WebGLSupported && waveOptions.useWebGl ? "webgl" : "dom"); |
nothing calls this directly
no test coverage detected