Skip to content

feat: port listDirectory from VSC #930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 9, 2025

Conversation

Hweinstock
Copy link
Contributor

@Hweinstock Hweinstock commented Apr 8, 2025

Problem

reliant on changes in #923
This tool is currently in VSC and should live in Flare.

Solution

  • port tool from VSC.
  • refactor to fit Flare Agent model.
  • add to FsToolsServer.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

this.workspace = features.workspace
}

public async queueDescription(params: ListDirectoryParams, updates: WritableStream) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What, if anything, will call this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the VSC implementation they use this to stream directly to chat. AFAIK there isn't a current implementation of this yet in Flare, but left this existing logic here to make it easier to port once it is, since it may simply involve moving this method elsewhere.

agent.addTool(fsReadTool.getSpec(), (input: FsReadParams) => fsReadTool.invoke(input))

agent.addTool(fsWriteTool.getSpec(), (input: FsWriteParams) => fsWriteTool.invoke(input))

agent.addTool(listDirectoryTool.getSpec(), (input: ListDirectoryParams) => listDirectoryTool.invoke(input))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this where we could include queueDescription if we needed rich output in the tool invocation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely, there appears to be some custom logic built around how this is invoked that will likely have to be moved within these invoke methods.

@Hweinstock Hweinstock marked this pull request as ready for review April 9, 2025 14:27
@Hweinstock Hweinstock requested a review from a team as a code owner April 9, 2025 14:27
@Hweinstock Hweinstock merged commit 7feb127 into aws:main Apr 9, 2025
10 of 11 checks passed
@Hweinstock Hweinstock deleted the agentic-chat/listDirectory branch April 9, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants