mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 13:37:55 -05:00
Save task action and parse task properly
This commit is contained in:
@@ -258,7 +258,7 @@ class Developer(ChatWithBreakdownMixin, RelevantFilesMixin, BaseAgent):
|
||||
# There might be state leftovers from previous tasks that we need to clean here
|
||||
self.next_state.modified_files = {}
|
||||
self.set_next_steps(response, source)
|
||||
self.next_state.action = DEV_TASK_START.format({current_task_index + 1})
|
||||
self.next_state.action = DEV_TASK_START.format(current_task_index + 1)
|
||||
await telemetry.trace_code_event(
|
||||
"task-start",
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
import os
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
from argparse import ArgumentParser, ArgumentTypeError, Namespace
|
||||
from difflib import unified_diff
|
||||
@@ -489,7 +490,8 @@ async def load_convo(
|
||||
|
||||
if state.action is not None:
|
||||
if "Task" in state.action and "start" in state.action:
|
||||
task_counter = int(state.action.split("#")[1].split()[0])
|
||||
match = re.search(r"Task\s+#\s*(?:\{)?(\d+)(?:\})?", state.action)
|
||||
task_counter = int(match.group(1))
|
||||
|
||||
elif state.action == DEV_TROUBLESHOOT.format(task_counter):
|
||||
if state.iterations is not None and len(state.iterations) > 0:
|
||||
|
||||
Reference in New Issue
Block a user