@funnycode/myclaude 0.1.105 → 0.1.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/myclaude.js CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.105",
8
- BUILD_TIME: "2026-07-19T17:13:00.724Z",
7
+ VERSION: "0.1.106",
8
+ BUILD_TIME: "2026-07-19T19:22:14.042Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117491,7 +117491,7 @@ var package_default;
117491
117491
  var init_package = __esm(() => {
117492
117492
  package_default = {
117493
117493
  name: "@funnycode/myclaude",
117494
- version: "0.1.105",
117494
+ version: "0.1.106",
117495
117495
  private: false,
117496
117496
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117497
117497
  license: "MIT",
@@ -210330,9 +210330,56 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210330
210330
  bufferChunks.push(decoded);
210331
210331
  bufferLength += decoded.length;
210332
210332
  if (bufferLength > MAX_BUFFER_SIZE2) {
210333
- logForDebugging("dumpPrompts: buffer exceeded max size, skipping event", { level: "warn" });
210334
- bufferChunks.length = 0;
210335
- bufferLength = 0;
210333
+ logForDebugging("dumpPrompts: buffer exceeded max size, extracting complete events", { level: "warn" });
210334
+ const fullBuffer = bufferChunks.join("");
210335
+ const lastDoubleNewline2 = fullBuffer.lastIndexOf(`
210336
+
210337
+ `);
210338
+ if (lastDoubleNewline2 !== -1) {
210339
+ const completeEvents = fullBuffer.slice(0, lastDoubleNewline2);
210340
+ const incomplete = fullBuffer.slice(lastDoubleNewline2 + 2);
210341
+ for (const event of completeEvents.split(`
210342
+
210343
+ `)) {
210344
+ let dataLines = [];
210345
+ for (const line of event.split(`
210346
+ `)) {
210347
+ if (line.startsWith("data: ") && line !== "data: [DONE]") {
210348
+ dataLines.push(line.slice(6));
210349
+ }
210350
+ }
210351
+ if (dataLines.length > 0) {
210352
+ try {
210353
+ const chunk = jsonParse(dataLines.join(`
210354
+ `));
210355
+ chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210356
+ if (chunkEntries.length >= 50) {
210357
+ await appendToFile(filePath, chunkEntries);
210358
+ chunkEntries.length = 0;
210359
+ }
210360
+ } catch (err2) {
210361
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210362
+ }
210363
+ }
210364
+ }
210365
+ bufferChunks.length = 0;
210366
+ bufferChunks.push(incomplete);
210367
+ bufferLength = incomplete.length;
210368
+ if (bufferLength > MAX_BUFFER_SIZE2) {
210369
+ logForDebugging("dumpPrompts: incomplete buffer still exceeds max size, truncating", { level: "warn" });
210370
+ const truncated = incomplete.slice(-MAX_BUFFER_SIZE2);
210371
+ bufferChunks.length = 0;
210372
+ bufferChunks.push(truncated);
210373
+ bufferLength = truncated.length;
210374
+ }
210375
+ } else {
210376
+ logForDebugging("dumpPrompts: no complete events, truncating buffer", { level: "warn" });
210377
+ const fullBuffer2 = bufferChunks.join("");
210378
+ const truncated = fullBuffer2.slice(-MAX_BUFFER_SIZE2);
210379
+ bufferChunks.length = 0;
210380
+ bufferChunks.push(truncated);
210381
+ bufferLength = truncated.length;
210382
+ }
210336
210383
  continue;
210337
210384
  }
210338
210385
  const buffer2 = bufferChunks.join("");
@@ -210348,19 +210395,24 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210348
210395
  for (const event of completeEvents.split(`
210349
210396
 
210350
210397
  `)) {
210398
+ let dataLines = [];
210351
210399
  for (const line of event.split(`
210352
210400
  `)) {
210353
210401
  if (line.startsWith("data: ") && line !== "data: [DONE]") {
210354
- try {
210355
- const chunk = jsonParse(line.slice(6));
210356
- chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210357
- if (chunkEntries.length >= 50) {
210358
- await appendToFile(filePath, chunkEntries);
210359
- chunkEntries.length = 0;
210360
- }
210361
- } catch (err2) {
210362
- logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210402
+ dataLines.push(line.slice(6));
210403
+ }
210404
+ }
210405
+ if (dataLines.length > 0) {
210406
+ try {
210407
+ const chunk = jsonParse(dataLines.join(`
210408
+ `));
210409
+ chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210410
+ if (chunkEntries.length >= 50) {
210411
+ await appendToFile(filePath, chunkEntries);
210412
+ chunkEntries.length = 0;
210363
210413
  }
210414
+ } catch (err2) {
210415
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210364
210416
  }
210365
210417
  }
210366
210418
  }
@@ -210374,15 +210426,20 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210374
210426
  for (const event of buffer.split(`
210375
210427
 
210376
210428
  `)) {
210429
+ let dataLines = [];
210377
210430
  for (const line of event.split(`
210378
210431
  `)) {
210379
210432
  if (line.startsWith("data: ") && line !== "data: [DONE]") {
210380
- try {
210381
- const chunk = jsonParse(line.slice(6));
210382
- chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210383
- } catch (err2) {
210384
- logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210385
- }
210433
+ dataLines.push(line.slice(6));
210434
+ }
210435
+ }
210436
+ if (dataLines.length > 0) {
210437
+ try {
210438
+ const chunk = jsonParse(dataLines.join(`
210439
+ `));
210440
+ chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210441
+ } catch (err2) {
210442
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210386
210443
  }
210387
210444
  }
210388
210445
  }
package/dist/myclaude.mjs CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.105",
8
- BUILD_TIME: "2026-07-19T17:13:00.724Z",
7
+ VERSION: "0.1.106",
8
+ BUILD_TIME: "2026-07-19T19:22:14.042Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117491,7 +117491,7 @@ var package_default;
117491
117491
  var init_package = __esm(() => {
117492
117492
  package_default = {
117493
117493
  name: "@funnycode/myclaude",
117494
- version: "0.1.105",
117494
+ version: "0.1.106",
117495
117495
  private: false,
117496
117496
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117497
117497
  license: "MIT",
@@ -210330,9 +210330,56 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210330
210330
  bufferChunks.push(decoded);
210331
210331
  bufferLength += decoded.length;
210332
210332
  if (bufferLength > MAX_BUFFER_SIZE2) {
210333
- logForDebugging("dumpPrompts: buffer exceeded max size, skipping event", { level: "warn" });
210334
- bufferChunks.length = 0;
210335
- bufferLength = 0;
210333
+ logForDebugging("dumpPrompts: buffer exceeded max size, extracting complete events", { level: "warn" });
210334
+ const fullBuffer = bufferChunks.join("");
210335
+ const lastDoubleNewline2 = fullBuffer.lastIndexOf(`
210336
+
210337
+ `);
210338
+ if (lastDoubleNewline2 !== -1) {
210339
+ const completeEvents = fullBuffer.slice(0, lastDoubleNewline2);
210340
+ const incomplete = fullBuffer.slice(lastDoubleNewline2 + 2);
210341
+ for (const event of completeEvents.split(`
210342
+
210343
+ `)) {
210344
+ let dataLines = [];
210345
+ for (const line of event.split(`
210346
+ `)) {
210347
+ if (line.startsWith("data: ") && line !== "data: [DONE]") {
210348
+ dataLines.push(line.slice(6));
210349
+ }
210350
+ }
210351
+ if (dataLines.length > 0) {
210352
+ try {
210353
+ const chunk = jsonParse(dataLines.join(`
210354
+ `));
210355
+ chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210356
+ if (chunkEntries.length >= 50) {
210357
+ await appendToFile(filePath, chunkEntries);
210358
+ chunkEntries.length = 0;
210359
+ }
210360
+ } catch (err2) {
210361
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210362
+ }
210363
+ }
210364
+ }
210365
+ bufferChunks.length = 0;
210366
+ bufferChunks.push(incomplete);
210367
+ bufferLength = incomplete.length;
210368
+ if (bufferLength > MAX_BUFFER_SIZE2) {
210369
+ logForDebugging("dumpPrompts: incomplete buffer still exceeds max size, truncating", { level: "warn" });
210370
+ const truncated = incomplete.slice(-MAX_BUFFER_SIZE2);
210371
+ bufferChunks.length = 0;
210372
+ bufferChunks.push(truncated);
210373
+ bufferLength = truncated.length;
210374
+ }
210375
+ } else {
210376
+ logForDebugging("dumpPrompts: no complete events, truncating buffer", { level: "warn" });
210377
+ const fullBuffer2 = bufferChunks.join("");
210378
+ const truncated = fullBuffer2.slice(-MAX_BUFFER_SIZE2);
210379
+ bufferChunks.length = 0;
210380
+ bufferChunks.push(truncated);
210381
+ bufferLength = truncated.length;
210382
+ }
210336
210383
  continue;
210337
210384
  }
210338
210385
  const buffer2 = bufferChunks.join("");
@@ -210348,19 +210395,24 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210348
210395
  for (const event of completeEvents.split(`
210349
210396
 
210350
210397
  `)) {
210398
+ let dataLines = [];
210351
210399
  for (const line of event.split(`
210352
210400
  `)) {
210353
210401
  if (line.startsWith("data: ") && line !== "data: [DONE]") {
210354
- try {
210355
- const chunk = jsonParse(line.slice(6));
210356
- chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210357
- if (chunkEntries.length >= 50) {
210358
- await appendToFile(filePath, chunkEntries);
210359
- chunkEntries.length = 0;
210360
- }
210361
- } catch (err2) {
210362
- logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210402
+ dataLines.push(line.slice(6));
210403
+ }
210404
+ }
210405
+ if (dataLines.length > 0) {
210406
+ try {
210407
+ const chunk = jsonParse(dataLines.join(`
210408
+ `));
210409
+ chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210410
+ if (chunkEntries.length >= 50) {
210411
+ await appendToFile(filePath, chunkEntries);
210412
+ chunkEntries.length = 0;
210363
210413
  }
210414
+ } catch (err2) {
210415
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210364
210416
  }
210365
210417
  }
210366
210418
  }
@@ -210374,15 +210426,20 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210374
210426
  for (const event of buffer.split(`
210375
210427
 
210376
210428
  `)) {
210429
+ let dataLines = [];
210377
210430
  for (const line of event.split(`
210378
210431
  `)) {
210379
210432
  if (line.startsWith("data: ") && line !== "data: [DONE]") {
210380
- try {
210381
- const chunk = jsonParse(line.slice(6));
210382
- chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210383
- } catch (err2) {
210384
- logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210385
- }
210433
+ dataLines.push(line.slice(6));
210434
+ }
210435
+ }
210436
+ if (dataLines.length > 0) {
210437
+ try {
210438
+ const chunk = jsonParse(dataLines.join(`
210439
+ `));
210440
+ chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
210441
+ } catch (err2) {
210442
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210386
210443
  }
210387
210444
  }
210388
210445
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.105",
3
+ "version": "0.1.106",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",