MCPcopy Index your code
hub / github.com/codeaashu/claude-code / parse

Method parse

src/server/web/public/terminal.js:2773–2791  ·  view source on GitHub ↗
(e3, t3)

Source from the content-addressed store, hash-verified

2771 return this._curAttrData.extended.urlId;
2772 }
2773 parse(e3, t3) {
2774 let i3, s3 = this._activeBuffer.x, r2 = this._activeBuffer.y, n2 = 0;
2775 const o2 = this._parseStack.paused;
2776 if (o2) {
2777 if (i3 = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t3)) return this._logSlowResolvingAsync(i3), i3;
2778 s3 = this._parseStack.cursorStartX, r2 = this._parseStack.cursorStartY, this._parseStack.paused = false, e3.length > b && (n2 = this._parseStack.position + b);
2779 }
2780 if (this._logService.logLevel <= v.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e3 ? ` "${e3}"` : ` "${Array.prototype.map.call(e3, ((e4) => String.fromCharCode(e4))).join("")}"`), "string" == typeof e3 ? e3.split("").map(((e4) => e4.charCodeAt(0))) : e3), this._parseBuffer.length < e3.length && this._parseBuffer.length < b && (this._parseBuffer = new Uint32Array(Math.min(e3.length, b))), o2 || this._dirtyRowTracker.clearRange(), e3.length > b) for (let t4 = n2; t4 < e3.length; t4 += b) {
2781 const n3 = t4 + b < e3.length ? t4 + b : e3.length, o3 = "string" == typeof e3 ? this._stringDecoder.decode(e3.substring(t4, n3), this._parseBuffer) : this._utf8Decoder.decode(e3.subarray(t4, n3), this._parseBuffer);
2782 if (i3 = this._parser.parse(this._parseBuffer, o3)) return this._preserveStack(s3, r2, o3, t4), this._logSlowResolvingAsync(i3), i3;
2783 }
2784 else if (!o2) {
2785 const t4 = "string" == typeof e3 ? this._stringDecoder.decode(e3, this._parseBuffer) : this._utf8Decoder.decode(e3, this._parseBuffer);
2786 if (i3 = this._parser.parse(this._parseBuffer, t4)) return this._preserveStack(s3, r2, t4, 0), this._logSlowResolvingAsync(i3), i3;
2787 }
2788 this._activeBuffer.x === s3 && this._activeBuffer.y === r2 || this._onCursorMove.fire();
2789 const a2 = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), h2 = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
2790 h2 < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(h2, this._bufferService.rows - 1), Math.min(a2, this._bufferService.rows - 1));
2791 }
2792 print(e3, t3, i3) {
2793 let s3, r2;
2794 const n2 = this._charsetService.charset, o2 = this._optionsService.rawOptions.screenReaderMode, a2 = this._bufferService.cols, h2 = this._coreService.decPrivateModes.wraparound, d2 = this._coreService.modes.insertMode, u2 = this._curAttrData;

Callers 15

parseAgentFromJsonFunction · 0.45
parseAgentsFromJsonFunction · 0.45
_tempFunction · 0.45
BashPermissionRequestFunction · 0.45
_tempFunction · 0.45
macro.tsFile · 0.45
WebSocketTransportClass · 0.45

Calls 6

_preserveStackMethod · 0.95
clearRangeMethod · 0.80
decodeMethod · 0.80
fireMethod · 0.80
debugMethod · 0.45

Tested by

no test coverage detected