MCPcopy Create free account
hub / github.com/codeaashu/claude-code / activate

Method activate

src/server/web/public/terminal.js:8680–8689  ·  view source on GitHub ↗
(e3)

Source from the content-addressed store, hash-verified

8678 const e4 = { antialias: false, depth: false, preserveDrawingBuffer: true };
8679 if (!document.createElement("canvas").getContext("webgl2", e4)) throw new Error("Webgl2 is only supported on Safari 16 and above");
8680 }
8681 super(), this._preserveDrawingBuffer = e3, this._onChangeTextureAtlas = this.register(new t2.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new t2.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = this.register(new t2.EventEmitter()), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._onContextLoss = this.register(new t2.EventEmitter()), this.onContextLoss = this._onContextLoss.event;
8682 }
8683 activate(e3) {
8684 const i2 = e3._core;
8685 if (!e3.element) return void this.register(i2.onWillOpen((() => this.activate(e3))));
8686 this._terminal = e3;
8687 const s2 = i2.coreService, o2 = i2.optionsService, h2 = i2, l = h2._renderService, c = h2._characterJoinerService, d = h2._charSizeService, _ = h2._coreBrowserService, u = h2._decorationService, g = h2._logService, v = h2._themeService;
8688 (0, a.setTraceLogger)(g), this._renderer = this.register(new n.WebglRenderer(e3, c, d, _, s2, u, o2, v, this._preserveDrawingBuffer)), this.register((0, t2.forwardEvent)(this._renderer.onContextLoss, this._onContextLoss)), this.register((0, t2.forwardEvent)(this._renderer.onChangeTextureAtlas, this._onChangeTextureAtlas)), this.register((0, t2.forwardEvent)(this._renderer.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas)), this.register((0, t2.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas, this._onRemoveTextureAtlasCanvas)), l.setRenderer(this._renderer), this.register((0, r.toDisposable)((() => {
8689 const t3 = this._terminal._core._renderService;
8690 t3.setRenderer(this._terminal._core._createRenderer()), t3.handleResize(e3.cols, e3.rows);
8691 })));
8692 }

Callers

nothing calls this directly

Calls 5

onWillOpenMethod · 0.80
setRendererMethod · 0.80
_createRendererMethod · 0.80
registerMethod · 0.45
handleResizeMethod · 0.45

Tested by

no test coverage detected