devwing 0.1.17 → 0.1.18
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 +20 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2693,19 +2693,16 @@ async function showToolCall(tool, args) {
|
|
|
2693
2693
|
console.log(chalk7.yellow(` ${icon} ${chalk7.bold(tool)}`) + chalk7.dim(" \u2014 requires permission"));
|
|
2694
2694
|
if (args) console.log(chalk7.dim(` ${args}`));
|
|
2695
2695
|
console.log();
|
|
2696
|
-
const
|
|
2697
|
-
const
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
);
|
|
2707
|
-
});
|
|
2708
|
-
if (answer !== "y" && answer !== "yes") {
|
|
2696
|
+
const label = tool === "write_file" ? `Write ${args}` : tool === "run_command" ? `Run: ${args}` : tool === "git_commit" ? `Create git commit` : tool === "delete_file" ? `Delete ${args}` : `Execute ${tool}`;
|
|
2697
|
+
const { allowed } = await inquirer5.prompt([
|
|
2698
|
+
{
|
|
2699
|
+
type: "confirm",
|
|
2700
|
+
name: "allowed",
|
|
2701
|
+
message: `${chalk7.bold.yellow("DevWing")} wants to ${chalk7.white(label)}`,
|
|
2702
|
+
default: true
|
|
2703
|
+
}
|
|
2704
|
+
]);
|
|
2705
|
+
if (!allowed) {
|
|
2709
2706
|
console.log(chalk7.dim(" \u2717 Skipped"));
|
|
2710
2707
|
throw Object.assign(new Error("TOOL_SKIPPED"), { skipped: true });
|
|
2711
2708
|
}
|
|
@@ -2778,7 +2775,7 @@ function getVersion() {
|
|
|
2778
2775
|
continue;
|
|
2779
2776
|
}
|
|
2780
2777
|
}
|
|
2781
|
-
return "0.1.
|
|
2778
|
+
return "0.1.18";
|
|
2782
2779
|
}
|
|
2783
2780
|
var DEMO_USER2 = {
|
|
2784
2781
|
id: "usr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
@@ -3072,16 +3069,18 @@ var InteractiveSession = class {
|
|
|
3072
3069
|
}
|
|
3073
3070
|
console.log();
|
|
3074
3071
|
if (this.isDemo) {
|
|
3075
|
-
this.
|
|
3072
|
+
this.isBusy = true;
|
|
3073
|
+
this.rl.close();
|
|
3076
3074
|
try {
|
|
3077
3075
|
await demoPromptCommand(input, { ...this.options, mode: this.currentMode });
|
|
3078
|
-
|
|
3079
|
-
|
|
3076
|
+
this.conversationHistory.push(
|
|
3077
|
+
{ role: "user", content: input, timestamp: /* @__PURE__ */ new Date() },
|
|
3078
|
+
{ role: "assistant", content: "[demo response]", timestamp: /* @__PURE__ */ new Date() }
|
|
3079
|
+
);
|
|
3080
|
+
} catch (error) {
|
|
3081
|
+
logger.error(error.message || "Command failed");
|
|
3080
3082
|
}
|
|
3081
|
-
this.
|
|
3082
|
-
{ role: "user", content: input, timestamp: /* @__PURE__ */ new Date() },
|
|
3083
|
-
{ role: "assistant", content: "[demo response]", timestamp: /* @__PURE__ */ new Date() }
|
|
3084
|
-
);
|
|
3083
|
+
this.recreateReadline();
|
|
3085
3084
|
return;
|
|
3086
3085
|
}
|
|
3087
3086
|
if (!this.sessionContext) {
|