scai 0.1.136 → 0.1.137

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.
@@ -164,8 +164,10 @@ export class MainAgent {
164
164
  await transformPlanGenStep.run(this.context);
165
165
  logLine("PLAN", "transformPlanGen", t());
166
166
  }
167
- const transformPlan = this.context.analysis?.planSuggestion?.plan ?? { steps: [] };
168
- for (const step of transformPlan.steps.filter(s => s.groups?.includes("transform"))) {
167
+ const transformSteps = [
168
+ ...(this.context.analysis?.planSuggestion?.plan?.steps ?? [])
169
+ ].filter(s => s.groups?.includes("transform"));
170
+ for (const step of transformSteps) {
169
171
  stepIO = await this.executeStep(step, stepIO);
170
172
  }
171
173
  /* // ── OPTIONAL DEBUGGING ──
package/dist/index.js CHANGED
@@ -41,6 +41,14 @@ async function runQuery(query) {
41
41
  await withContext(() => runAskCommand(query));
42
42
  }
43
43
  // ---------------- Built-in Commands ----------------
44
+ customCommands.clear = async () => {
45
+ // Clear screen and move cursor to top-left
46
+ process.stdout.write('\x1Bc');
47
+ };
48
+ customCommands.help = async () => {
49
+ console.log(chalk.green('\n✔ SCAI Help:\n'));
50
+ console.log(program.helpInformation());
51
+ };
44
52
  customCommands.test = async () => {
45
53
  await runQuery(testQueries[0]);
46
54
  };
@@ -84,6 +92,7 @@ async function startShell() {
84
92
  console.log(chalk.yellow("Welcome to SCAI shell!") + "\n" +
85
93
  chalk.blueBright(`- Type your query directly for short commands or questions.
86
94
  - Use /command for built-in or custom commands.
95
+ - /help
87
96
  - /edit for pasting long queries, multi-line code, or anything complex,
88
97
  to open your configured editor (from $EDITOR) where you can freely paste,
89
98
  edit, and save your input before executing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scai",
3
- "version": "0.1.136",
3
+ "version": "0.1.137",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "scai": "./dist/index.js"