@hasna/assistants 0.6.47 → 0.6.48

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/index.js CHANGED
@@ -119994,7 +119994,7 @@ function formatAge(ms) {
119994
119994
  return `${days}d`;
119995
119995
  }
119996
119996
  // packages/core/src/commands/builtin.ts
119997
- var VERSION = "0.6.47";
119997
+ var VERSION = "0.6.48";
119998
119998
  function resolveAuthTimeout(resolve5) {
119999
119999
  resolve5({ exitCode: 1, stdout: { toString: () => "{}" } });
120000
120000
  }
@@ -144068,7 +144068,41 @@ function formatStreamEvent(chunk) {
144068
144068
 
144069
144069
  // packages/terminal/src/index.tsx
144070
144070
  var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
144071
- var VERSION3 = "0.6.47";
144071
+ var VERSION3 = "0.6.48";
144072
+ var SYNC_START = "\x1B[?2026h";
144073
+ var SYNC_END = "\x1B[?2026l";
144074
+ function enableSynchronizedOutput() {
144075
+ const originalWrite = process.stdout.write.bind(process.stdout);
144076
+ let buffer = "";
144077
+ let flushTimeout = null;
144078
+ const flush = () => {
144079
+ if (buffer) {
144080
+ originalWrite(SYNC_START + buffer + SYNC_END);
144081
+ buffer = "";
144082
+ }
144083
+ flushTimeout = null;
144084
+ };
144085
+ process.stdout.write = function(chunk, encodingOrCallback, callback) {
144086
+ const str = typeof chunk === "string" ? chunk : chunk.toString();
144087
+ buffer += str;
144088
+ if (flushTimeout) {
144089
+ clearTimeout(flushTimeout);
144090
+ }
144091
+ flushTimeout = setTimeout(flush, 0);
144092
+ const cb2 = typeof encodingOrCallback === "function" ? encodingOrCallback : callback;
144093
+ if (cb2) {
144094
+ setImmediate(() => cb2());
144095
+ }
144096
+ return true;
144097
+ };
144098
+ return () => {
144099
+ if (flushTimeout) {
144100
+ clearTimeout(flushTimeout);
144101
+ }
144102
+ flush();
144103
+ process.stdout.write = originalWrite;
144104
+ };
144105
+ }
144072
144106
  function parseArgs(argv) {
144073
144107
  const args = argv.slice(2);
144074
144108
  const options = {
@@ -144214,15 +144248,17 @@ if (options.print !== null) {
144214
144248
  process.exit(1);
144215
144249
  });
144216
144250
  } else {
144251
+ const disableSyncOutput = enableSynchronizedOutput();
144217
144252
  const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(App2, {
144218
144253
  cwd: options.cwd,
144219
144254
  version: VERSION3
144220
144255
  }, undefined, false, undefined, this), {
144221
- incrementalRendering: true
144256
+ patchConsole: true
144222
144257
  });
144223
144258
  waitUntilExit().then(() => {
144259
+ disableSyncOutput();
144224
144260
  process.exit(0);
144225
144261
  });
144226
144262
  }
144227
144263
 
144228
- //# debugId=88441107860B779664756E2164756E21
144264
+ //# debugId=9A6D7C9FB46821D364756E2164756E21