Skip to content

Commit

Permalink
Removed unnecessary files.
Browse files Browse the repository at this point in the history
  • Loading branch information
afourney committed Nov 26, 2024
1 parent df23973 commit 2caf13c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ._tool_definitions import (
TOOL_FIND_NEXT,
TOOL_FIND_ON_PAGE_CTRL_F,
TOOL_OPEN_LOCAL_FILE,
TOOL_OPEN_PATH,
TOOL_PAGE_DOWN,
TOOL_PAGE_UP,
)
Expand Down Expand Up @@ -111,7 +111,7 @@ async def _generate_reply(self, cancellation_token: CancellationToken) -> Tuple[
create_result = await self._model_client.create(
messages=history + [context_message, task_message],
tools=[
TOOL_OPEN_LOCAL_FILE,
TOOL_OPEN_PATH,
TOOL_PAGE_DOWN,
TOOL_PAGE_UP,
TOOL_FIND_NEXT,
Expand All @@ -136,7 +136,7 @@ async def _generate_reply(self, cancellation_token: CancellationToken) -> Tuple[
error_str = f"File surfer encountered an error decoding JSON arguments: {e}"
return False, error_str

if tool_name == "open_local_file":
if tool_name == "open_path":
path = arguments["path"]
self._browser.open_path(path)
elif tool_name == "page_up":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def set_path(self, path: str) -> None:
path = os.path.abspath(os.path.join(os.path.dirname(self.path), path))
elif os.path.isdir(self.path):
path = os.path.abspath(os.path.join(self.path, path))
# If neither a file or a directory, take it verbatim

self.history.append((path, time.time()))
self._open_path(path)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from autogen_core.components.tools import ParametersSchema, ToolSchema

TOOL_OPEN_LOCAL_FILE = ToolSchema(
name="open_local_file",
description="Open a local file at a path in the text-based browser and return current viewport content.",
TOOL_OPEN_PATH = ToolSchema(
name="open_path",
description="Open a local file or directory at a path in the text-based file browser and return current viewport content.",
parameters=ParametersSchema(
type="object",
properties={
Expand Down

This file was deleted.

0 comments on commit 2caf13c

Please sign in to comment.