draftify-cli 1.0.41 → 1.0.43

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 (2) hide show
  1. package/dist/repl.js +29 -29
  2. package/package.json +1 -1
package/dist/repl.js CHANGED
@@ -865,35 +865,6 @@ async function startRepl(initialUsername) {
865
865
  // Save session locally
866
866
  const firstUserMsg = conversationHistory.find(h => h.role === "user")?.content || inputLine;
867
867
  (0, chats_1.updateChatSession)(currentSessionId, firstUserMsg, currentModel, conversationHistory);
868
- if (finalDisplayResult) {
869
- ui_1.ui.box("Draftify AI", finalDisplayResult.split("\n"));
870
- }
871
- // --- INTERACTIVE MENU FOR QUESTIONS ---
872
- if (questions.length > 0) {
873
- const { Select, Input } = require('enquirer');
874
- let answers = [];
875
- for (const q of questions) {
876
- console.log("");
877
- const prompt = new Select({
878
- name: 'answer',
879
- message: q.question,
880
- choices: [...q.options, "Provide a custom answer..."]
881
- });
882
- let answer = await prompt.run();
883
- if (answer === "Provide a custom answer...") {
884
- const customPrompt = new Input({
885
- message: 'Type your answer:'
886
- });
887
- answer = await customPrompt.run();
888
- }
889
- answers.push(`- Question: ${q.question}\n Answer: ${answer}`);
890
- }
891
- let promptAdditions = [];
892
- if (autoPrompt)
893
- promptAdditions.push(autoPrompt);
894
- promptAdditions.push("My answers to the questions:\n" + answers.join("\n"));
895
- autoPrompt = promptAdditions.join("\n\n");
896
- }
897
868
  // --- AUTONOMOUS FILE SYSTEM EXPLORATION ---
898
869
  let autoExplorationOutputs = [];
899
870
  const isSafePathLocal = (targetPath) => {
@@ -948,6 +919,35 @@ async function startRepl(initialUsername) {
948
919
  promptAdditions.push(`I executed your file system requests. Here are the results:\n${autoExplorationOutputs.join('\n\n')}`);
949
920
  autoPrompt = promptAdditions.join("\n\n");
950
921
  }
922
+ if (finalDisplayResult) {
923
+ ui_1.ui.box("Draftify AI", finalDisplayResult.split("\n"));
924
+ }
925
+ // --- INTERACTIVE MENU FOR QUESTIONS ---
926
+ if (questions.length > 0) {
927
+ const { Select, Input } = require('enquirer');
928
+ let answers = [];
929
+ for (const q of questions) {
930
+ console.log("");
931
+ const prompt = new Select({
932
+ name: 'answer',
933
+ message: q.question,
934
+ choices: [...q.options, "Provide a custom answer..."]
935
+ });
936
+ let answer = await prompt.run();
937
+ if (answer === "Provide a custom answer...") {
938
+ const customPrompt = new Input({
939
+ message: 'Type your answer:'
940
+ });
941
+ answer = await customPrompt.run();
942
+ }
943
+ answers.push(`- Question: ${q.question}\n Answer: ${answer}`);
944
+ }
945
+ let promptAdditions = [];
946
+ if (autoPrompt)
947
+ promptAdditions.push(autoPrompt);
948
+ promptAdditions.push("My answers to the questions:\n" + answers.join("\n"));
949
+ autoPrompt = promptAdditions.join("\n\n");
950
+ }
951
951
  // --- EXECUTE COMMANDS ---
952
952
  if (commandsToRun.length > 0) {
953
953
  let commandOutputs = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "draftify-cli",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "Draftify AI CLI tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {