@gxp-dev/tools 2.0.74 → 2.0.75
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/bin/lib/commands/init.js
CHANGED
|
@@ -506,14 +506,19 @@ async function runInteractiveConfig(projectPath, initialName, isLocal = false) {
|
|
|
506
506
|
|
|
507
507
|
// If an AI agent was chosen, it becomes the last step — skip starting the
|
|
508
508
|
// dev server. The agent is responsible for driving the rest of the session.
|
|
509
|
+
//
|
|
510
|
+
// Print the project-ready summary BEFORE we hand stdin/stdout to the agent
|
|
511
|
+
// so the user sees "setup complete, here's how to start the dev server"
|
|
512
|
+
// up front. Once the agent owns the terminal the init script is done — it
|
|
513
|
+
// won't print anything else on the way out.
|
|
509
514
|
if (selectedProvider) {
|
|
515
|
+
printFinalInstructions(projectPath, appName, sslSetup, isLocal)
|
|
510
516
|
await launchInteractiveAISession(
|
|
511
517
|
projectPath,
|
|
512
518
|
appName,
|
|
513
519
|
description,
|
|
514
520
|
selectedProvider,
|
|
515
521
|
)
|
|
516
|
-
printFinalInstructions(projectPath, appName, sslSetup, isLocal)
|
|
517
522
|
return null
|
|
518
523
|
}
|
|
519
524
|
|
|
@@ -1069,10 +1069,13 @@ function launchInteractiveAISession(
|
|
|
1069
1069
|
console.log(" implement. Exit the agent when you're done.")
|
|
1070
1070
|
console.log("")
|
|
1071
1071
|
|
|
1072
|
+
// Do NOT pass shell: true here. The initial prompt contains backticks,
|
|
1073
|
+
// parentheses, and quotes; going through /bin/sh -c would require
|
|
1074
|
+
// shell-escaping every special character. Without shell: true, spawn
|
|
1075
|
+
// execs the binary directly and the argv is delivered as-is.
|
|
1072
1076
|
const child = spawn(command, args, {
|
|
1073
1077
|
cwd: projectPath,
|
|
1074
1078
|
stdio: "inherit",
|
|
1075
|
-
shell: true,
|
|
1076
1079
|
})
|
|
1077
1080
|
|
|
1078
1081
|
child.on("close", (code) => {
|