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

Method decode

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

Source from the content-addressed store, hash-verified

4524 this._interim = 0;
4525 }
4526 clear() {
4527 this._interim = 0;
4528 }
4529 decode(e3, t3) {
4530 const i2 = e3.length;
4531 if (!i2) return 0;
4532 let s2 = 0, r = 0;
4533 if (this._interim) {
4534 const i3 = e3.charCodeAt(r++);
4535 56320 <= i3 && i3 <= 57343 ? t3[s2++] = 1024 * (this._interim - 55296) + i3 - 56320 + 65536 : (t3[s2++] = this._interim, t3[s2++] = i3), this._interim = 0;
4536 }
4537 for (let n = r; n < i2; ++n) {
4538 const r2 = e3.charCodeAt(n);
4539 if (55296 <= r2 && r2 <= 56319) {
4540 if (++n >= i2) return this._interim = r2, s2;
4541 const o = e3.charCodeAt(n);
4542 56320 <= o && o <= 57343 ? t3[s2++] = 1024 * (r2 - 55296) + o - 56320 + 65536 : (t3[s2++] = r2, t3[s2++] = o);
4543 } else 65279 !== r2 && (t3[s2++] = r2);
4544 }
4545 return s2;
4546 }

Callers 8

extractMcpbContentsFunction · 0.80
readStreamMethod · 0.80
createDumpPromptsFetchFunction · 0.80
parseMethod · 0.80
streamChatFunction · 0.80
parseSseResponseMethod · 0.80
parseStreamFunction · 0.80

Calls 1

fillMethod · 0.80

Tested by

no test coverage detected