chore: use primitives instead of typing imports and fixes completion … (#149)

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
This commit is contained in:
Adrian Cole
2024-10-16 09:41:37 +11:00
committed by GitHub
parent e687b0b3bc
commit c247c8eb30
53 changed files with 235 additions and 257 deletions
+4 -5
View File
@@ -3,7 +3,6 @@ import re
import subprocess
import time
from pathlib import Path
from typing import Dict, List
from exchange import Message
from goose.toolkit.base import Toolkit, tool
@@ -35,9 +34,9 @@ class Developer(Toolkit):
We also include some default shell strategies in the prompt, such as using ripgrep
"""
def __init__(self, *args: object, **kwargs: Dict[str, object]) -> None:
def __init__(self, *args: object, **kwargs: dict[str, object]) -> None:
super().__init__(*args, **kwargs)
self.timestamps: Dict[str, float] = {}
self.timestamps: dict[str, float] = {}
def system(self) -> str:
"""Retrieve system configuration details for developer"""
@@ -55,7 +54,7 @@ class Developer(Toolkit):
return system_prompt
@tool
def update_plan(self, tasks: List[dict]) -> List[dict]:
def update_plan(self, tasks: list[dict]) -> list[dict]:
"""
Update the plan by overwriting all current tasks
@@ -63,7 +62,7 @@ class Developer(Toolkit):
shown to the user directly, you do not need to reiterate it
Args:
tasks (List(dict)): The list of tasks, where each task is a dictionary
tasks (list(dict)): The list of tasks, where each task is a dictionary
with a key for the task "description" and the task "status". The status
MUST be one of "planned", "complete", "failed", "in-progress".