diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-09 12:10:45 -0400 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-09 12:10:45 -0400 |
commit | 8303a2a5eb0724cc4224998cef9008b16898a7fb (patch) | |
tree | 3a14a65db64c9e0398b055a50c8f63ef0c1a3de6 /continuedev/src/continuedev/server | |
parent | 2a1a22dcf5180d7224c417e79e5b975954da3a44 (diff) | |
download | sncontinue-8303a2a5eb0724cc4224998cef9008b16898a7fb.tar.gz sncontinue-8303a2a5eb0724cc4224998cef9008b16898a7fb.tar.bz2 sncontinue-8303a2a5eb0724cc4224998cef9008b16898a7fb.zip |
fixed final (query) step in CreatePipelineRecipe
Diffstat (limited to 'continuedev/src/continuedev/server')
-rw-r--r-- | continuedev/src/continuedev/server/ide.py | 5 | ||||
-rw-r--r-- | continuedev/src/continuedev/server/ide_protocol.py | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/server/ide.py b/continuedev/src/continuedev/server/ide.py index 007eb2b4..5826f15f 100644 --- a/continuedev/src/continuedev/server/ide.py +++ b/continuedev/src/continuedev/server/ide.py @@ -1,5 +1,6 @@ # This is a separate server from server/main.py import asyncio +from functools import cached_property import json import os from typing import Any, Dict, List, Type, TypeVar, Union @@ -199,6 +200,10 @@ class IdeProtocolServer(AbstractIdeProtocolServer): resp = await self._send_and_receive_json({}, WorkspaceDirectoryResponse, "workspaceDirectory") return resp.workspaceDirectory + @cached_property + def workspace_directory(self) -> str: + return asyncio.run(self.getWorkspaceDirectory()) + async def getHighlightedCode(self) -> List[RangeInFile]: resp = await self._send_and_receive_json({}, HighlightedCodeResponse, "highlightedCode") return resp.highlightedCode diff --git a/continuedev/src/continuedev/server/ide_protocol.py b/continuedev/src/continuedev/server/ide_protocol.py index 4622d6ff..a937ad75 100644 --- a/continuedev/src/continuedev/server/ide_protocol.py +++ b/continuedev/src/continuedev/server/ide_protocol.py @@ -1,5 +1,5 @@ from typing import Any, List -from abc import ABC, abstractmethod +from abc import ABC, abstractmethod, abstractproperty from ..models.main import Traceback from ..models.filesystem_edit import FileEdit, FileSystemEdit, EditDiff @@ -90,3 +90,7 @@ class AbstractIdeProtocolServer(ABC): @abstractmethod async def runCommand(self, command: str) -> str: """Run a command""" + + @abstractproperty + def workspace_directory(self) -> str: + """Get the workspace directory""" |