@caupulican/pi-adaptative 0.77.0 → 0.78.1

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +32 -3
  2. package/dist/core/tools/edit.d.ts.map +1 -1
  3. package/dist/core/tools/edit.js +7 -10
  4. package/dist/core/tools/edit.js.map +1 -1
  5. package/dist/core/tools/find.d.ts.map +1 -1
  6. package/dist/core/tools/find.js.map +1 -1
  7. package/dist/core/tools/grep.d.ts.map +1 -1
  8. package/dist/core/tools/grep.js.map +1 -1
  9. package/dist/core/tools/ls.d.ts.map +1 -1
  10. package/dist/core/tools/ls.js +5 -7
  11. package/dist/core/tools/ls.js.map +1 -1
  12. package/dist/core/tools/read.d.ts.map +1 -1
  13. package/dist/core/tools/read.js +6 -7
  14. package/dist/core/tools/read.js.map +1 -1
  15. package/dist/core/tools/render-utils.d.ts +5 -2
  16. package/dist/core/tools/render-utils.d.ts.map +1 -1
  17. package/dist/core/tools/render-utils.js +17 -1
  18. package/dist/core/tools/render-utils.js.map +1 -1
  19. package/dist/core/tools/write.d.ts.map +1 -1
  20. package/dist/core/tools/write.js +5 -6
  21. package/dist/core/tools/write.js.map +1 -1
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  27. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  28. package/dist/modes/interactive/interactive-mode.js +9 -1
  29. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  30. package/docs/settings.md +1 -1
  31. package/docs/terminal-setup.md +2 -0
  32. package/docs/tui.md +2 -2
  33. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  34. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  35. package/examples/extensions/custom-provider-gitlab-duo/index.ts +53 -2
  36. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  37. package/examples/extensions/sandbox/package-lock.json +2 -2
  38. package/examples/extensions/sandbox/package.json +1 -1
  39. package/examples/extensions/with-deps/package-lock.json +2 -2
  40. package/examples/extensions/with-deps/package.json +1 -1
  41. package/npm-shrinkwrap.json +12 -12
  42. package/package.json +4 -4
@@ -147,6 +147,7 @@ export class InteractiveMode {
147
147
  version;
148
148
  isInitialized = false;
149
149
  onInputCallback;
150
+ pendingUserInputs = [];
150
151
  loadingAnimation = undefined;
151
152
  workingMessage = undefined;
152
153
  workingVisible = true;
@@ -2155,6 +2156,9 @@ export class InteractiveMode {
2155
2156
  if (this.onInputCallback) {
2156
2157
  this.onInputCallback(text);
2157
2158
  }
2159
+ else {
2160
+ this.pendingUserInputs.push(text);
2161
+ }
2158
2162
  this.editor.addToHistory?.(text);
2159
2163
  };
2160
2164
  }
@@ -2633,6 +2637,10 @@ export class InteractiveMode {
2633
2637
  }
2634
2638
  }
2635
2639
  async getUserInput() {
2640
+ const queuedInput = this.pendingUserInputs.shift();
2641
+ if (queuedInput !== undefined) {
2642
+ return queuedInput;
2643
+ }
2636
2644
  return new Promise((resolve) => {
2637
2645
  this.onInputCallback = (text) => {
2638
2646
  this.onInputCallback = undefined;
@@ -2696,7 +2704,7 @@ export class InteractiveMode {
2696
2704
  await this.runtimeHost.dispose();
2697
2705
  const resumeCommand = formatResumeCommand(this.sessionManager);
2698
2706
  if (resumeCommand) {
2699
- process.stdout.write(` ${chalk.dim("To resume this session:")} ${resumeCommand}\n`);
2707
+ process.stdout.write(`${chalk.dim("To resume this session:")} ${resumeCommand}\n`);
2700
2708
  }
2701
2709
  process.exit(0);
2702
2710
  }