Skip to content

Commit

Permalink
feat: Accept optional question name to Editor#ask
Browse files Browse the repository at this point in the history
  • Loading branch information
kgilpin committed Aug 22, 2024
1 parent 03050bd commit 6c22629
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions navie/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ def context(
)
self._execute(command, log_file)

def plan(
self, issue_file, output_file, context_file=None, prompt_file=None, options=None
):
def plan(self, issue_file, output_file, context_file=None, prompt_file=None):
log_file = os.path.join(self.work_dir, "plan.log")
input_file = os.path.join(self.work_dir, "plan.txt")

Expand Down
5 changes: 3 additions & 2 deletions navie/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def apply(self, filename, replace, search=None):
def ask(
self,
question,
question_name="ask",
prompt=None,
options=None,
context=None,
Expand All @@ -75,8 +76,8 @@ def ask(
):
self._log_action("@explain", options, question)

work_dir = self._work_dir("ask")
input_file = os.path.join(work_dir, "ask.input.txt")
work_dir = self._work_dir(question_name)
input_file = os.path.join(work_dir, f"ask.input.txt")
output_file = os.path.join(work_dir, "ask.md")

def read_output(save_cache):
Expand Down
3 changes: 1 addition & 2 deletions navie/format_instructions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
def xml_format_instructions():
return """
For each change you want to make, generate a pair of tags called <original> and <modified>.
return """For each change you want to make, generate a pair of tags called <original> and <modified>.
Wrap these tags with a <change> tag that also includes a <file> tag with the file path.
Expand Down

0 comments on commit 6c22629

Please sign in to comment.