diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-09-29 18:49:40 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-09-29 18:49:40 -0700 |
commit | 8ac15184aaa30d13bf168ff5123a12fb7a2dd39f (patch) | |
tree | fc63458b529592f6350f52089bb5cace0bbbe07b /continuedev | |
parent | bb1e2adcfda95ead98689d4f36915d4ac49f0a01 (diff) | |
download | sncontinue-8ac15184aaa30d13bf168ff5123a12fb7a2dd39f.tar.gz sncontinue-8ac15184aaa30d13bf168ff5123a12fb7a2dd39f.tar.bz2 sncontinue-8ac15184aaa30d13bf168ff5123a12fb7a2dd39f.zip |
feat: :loud_sound: add context to dev data loggign
Diffstat (limited to 'continuedev')
-rw-r--r-- | continuedev/src/continuedev/core/autopilot.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/continuedev/src/continuedev/core/autopilot.py b/continuedev/src/continuedev/core/autopilot.py index 9ebf288b..9f2338ff 100644 --- a/continuedev/src/continuedev/core/autopilot.py +++ b/continuedev/src/continuedev/core/autopilot.py @@ -2,6 +2,7 @@ import json import os import time import traceback +import uuid from functools import cached_property from typing import Callable, Coroutine, Dict, List, Optional @@ -380,11 +381,27 @@ class Autopilot(ContinueBaseModel): # last_depth = self.history.timeline[i].depth # i -= 1 + # Log the context and step to dev data + context_used = await self.context_manager.get_selected_items() posthog_logger.capture_event( "step run", {"step_name": step.name, "params": step.dict()} ) + step_id = uuid.uuid4().hex dev_data_logger.capture( - "step_run", {"step_name": step.name, "params": step.dict()} + "step_run", + {"step_name": step.name, "params": step.dict(), "step_id": step_id}, + ) + dev_data_logger.capture( + "context_used", + { + "context": list( + map( + lambda item: item.dict(), + context_used, + ) + ), + "step_id": step_id, + }, ) if not is_future_step: @@ -402,7 +419,7 @@ class Autopilot(ContinueBaseModel): step=step, observation=None, depth=self._step_depth, - context_used=await self.context_manager.get_selected_items(), + context_used=context_used, ) ) |