Skip to content
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

feat: read only active resources in the agent loop #560

Merged
merged 8 commits into from
Jan 9, 2025

Conversation

salman1993
Copy link
Collaborator

@salman1993 salman1993 commented Jan 8, 2025

MCP servers (such as gdrive) list out 100s of files so reading each file in the agent loop leads to context limit exceeded errors. we make this change to only read 'active' files, i.e. files that have been viewed by the user using the developer system. It's unclear whether this will work well with other MCP servers cause this requires other MCP servers to use the priority annotation on the resource as well which may be less widely used.

Copy link

github-actions bot commented Jan 8, 2025

Desktop App for this PR

The following build is available for testing:

The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder.

This link is provided by nightly.link and will work even if you're not logged into GitHub.

Copy link

github-actions bot commented Jan 8, 2025

Desktop App for this PR

The following build is available for testing:

The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder.

This link is provided by nightly.link and will work even if you're not logged into GitHub.

@salman1993 salman1993 requested a review from Copilot January 8, 2025 19:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

crates/goose/src/agents/capabilities.rs:209

  • [nitpick] Using unwrap_or with a default value of 0.0 for priority might not be appropriate. Ensure that 0.0 is a valid default or handle the None case more appropriately.
resource.priority().unwrap_or(0.0),

crates/goose/src/agents/capabilities.rs Outdated Show resolved Hide resolved
@salman1993 salman1993 requested a review from baxen January 8, 2025 21:50
Copy link

github-actions bot commented Jan 8, 2025

Desktop App for this PR

The following build is available for testing:

The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder.

This link is provided by nightly.link and will work even if you're not logged into GitHub.

Copy link
Collaborator

@baxen baxen left a comment

Choose a reason for hiding this comment

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

Looks great, code is much cleaner.

I'm missing where we only include "active" (priority=1) resources in the agent status though?

crates/goose/src/agents/default.rs Outdated Show resolved Hide resolved
@salman1993 salman1993 requested a review from kalvinnchau January 9, 2025 16:07
Copy link

github-actions bot commented Jan 9, 2025

Desktop App for this PR

The following build is available for testing:

The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder.

This link is provided by nightly.link and will work even if you're not logged into GitHub.

@salman1993
Copy link
Collaborator Author

salman1993 commented Jan 9, 2025

Looks great, code is much cleaner.

I'm missing where we only include "active" (priority=1) resources in the agent status though?

good catch, had it in earlier commit but copy/paste removed it

@salman1993 salman1993 merged commit 3e0ce19 into v1.0 Jan 9, 2025
6 checks passed
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.

2 participants