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]: Adding endpoint for suggested tasks Openhands could tackle #6844

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

malhotra5
Copy link
Contributor

@malhotra5 malhotra5 commented Feb 19, 2025

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions

This PR only adds an endpoint in our backend for "suggested tasks" we could display on the frontend. Suggested tasks are those we'd like to proactively request permission from the user to resolve using Openhands. The UI for this is still undecided.

We use graphql here because we want to make the fetching process as efficient as possible (minimize number of requests).

I had Openhands test this endpoint and a sample output is included below

--------------------------------------------------

Type: TaskType.FAILING_CHECKS
Repo: All-Hands-AI/OpenHands
Number: #6418
Title: [NO MERGE] Test AWS changes
--------------------------------------------------

Type: TaskType.UNRESOLVED_COMMENTS
Repo: All-Hands-AI/OpenHands
Number: #6441
Title: Container snapshots/restore feature and other critical bug fixes
--------------------------------------------------

Type: TaskType.FAILING_CHECKS
Repo: All-Hands-AI/OpenHands
Number: #6456
Title: feat(resolver): Add support for extracting and processing text file attachments in GitHub issues
--------------------------------------------------

Type: TaskType.UNRESOLVED_COMMENTS
Repo: All-Hands-AI/OpenHands
Number: #6460
Title: Bug fixes
--------------------------------------------------

Type: TaskType.FAILING_CHECKS
Repo: All-Hands-AI/OpenHands
Number: #6511
Title: Add deprecation notices for legacy agent skills
--------------------------------------------------

Type: TaskType.FAILING_CHECKS
Repo: All-Hands-AI/OpenHands
Number: #6526
Title: Move PromptManager to agent controller level
--------------------------------------------------

Type: TaskType.UNRESOLVED_COMMENTS
Repo: All-Hands-AI/OpenHands
Number: #6526
Title: Move PromptManager to agent controller level
--------------------------------------------------

Type: TaskType.FAILING_CHECKS
Repo: All-Hands-AI/OpenHands
Number: #6530
Title: feat: add sound and browser notifications for agent state changes
--------------------------------------------------

Type: TaskType.UNRESOLVED_COMMENTS
Repo: All-Hands-AI/OpenHands
Number: #6536
Title: fix: Remove nested git repositories before adding files in SWE-bench
--------------------------------------------------

Type: TaskType.UNRESOLVED_COMMENTS
Repo: All-Hands-AI/OpenHands
Number: #6572
Title: Changed Dockerfile template so using ubuntu:22.04 as runtime base image does not have docker build error
-----

Link of any specific issues this addresses


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:eb6eb8b-nikolaik   --name openhands-app-eb6eb8b   docker.all-hands.dev/all-hands-ai/openhands:eb6eb8b

@enyst
Copy link
Collaborator

enyst commented Feb 20, 2025

At a quick look, this looks like it would work locally, but I'm not sure. Could you please confirm or not?

Just curious, how did OpenHands agent test, in what setup?

Copy link
Collaborator

@rbren rbren left a comment

Choose a reason for hiding this comment

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

One issue I'm realizing here is that we don't have a repo list sorted by pushed_at, so we don't know which repos to focus on :/

Any ideas on how to retrieve the top 5 most relevant repos that the user has connected? When I connect my personal acct with ~500 repos, openhands really struggles

query = """
query GetSuggestedTasks($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
pullRequests(first: 100, states: [OPEN]) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should filter for PRs that were opened by the authenticated user (if that's not already happening)

Copy link
Contributor

Choose a reason for hiding this comment

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

@OpenHands please filter for PRs that were opened by the authenticated user

Copy link

Choose a reason for hiding this comment

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

I'm working on a fix! @neubig can track my progress at all-hands.dev

@rbren
Copy link
Collaborator

rbren commented Feb 20, 2025

I wonder if another option is to do this query across all repos, looking for PRs owned by the user, or issues assigned to them

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.

5 participants