MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / constructor

Method constructor

frontend/app/view/term/termwrap.ts:125–325  ·  view source on GitHub ↗
(
        tabId: string,
        blockId: string,
        connectElem: HTMLDivElement,
        options: TermTypes.ITerminalOptions & TermTypes.ITerminalInitOnlyOptions,
        waveOptions: TermWrapOptions
    )

Source from the content-addressed store, hash-verified

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");

Callers

nothing calls this directly

Calls 13

setTermRendererMethod · 0.95
handleResizeMethod · 0.95
fireAndForgetFunction · 0.90
openLinkFunction · 0.90
handleOsc7CommandFunction · 0.90
handleOsc52CommandFunction · 0.90
handleOsc16162CommandFunction · 0.90
getOverrideConfigAtomFunction · 0.90
setBadgeFunction · 0.90
pushMethod · 0.80
scrollToBottomMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected