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

fix(context-agent): add status callbacks back #6479

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

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Dec 28, 2024

The statusCallback method was removed by #6469 by accident. This PR is to add the callback function to the Deep Cody Handler by passing delegate to computeContext so that the context agent (deep cody) can send its status update to the webview.

Test plan

The changes in #6451 should be working again:

Screen.Recording.2024-12-27.at.12.31.03.AM.mov

Added delegate.postMessageInProgress({ speaker: 'assistant', model: this.modelId }) before streamAssistantResponse is invoked so that the context would show up in the UI before we stream the response to webview:

Screen.Recording.2024-12-27.at.6.09.54.PM.mov

Changelog

The setStatusCallback code was removed by #6469 by accident. This change is to add it back so the context agent (deep cody) can send its processing status back to webview

1. Added a `postMessageCallback` parameter to the `DeepCodyHandler` constructor to allow for posting empty messages during the context retrieval process.
2. Updated the `DeepCodyHandler` to set the status callback on the `DeepCodyAgent` instance, allowing for the posting of empty messages during the context retrieval process.
3. Updated the `AgentTools` interface to include the `postMessageCallback` parameter, ensuring that it is passed to the `DeepCodyHandler` constructor.
4. Updated the `ChatController` to pass the `postEmptyMessageInProgress` callback to the `DeepCodyHandler` constructor, enabling the posting of empty messages during the context retrieval process.
@abeatrix abeatrix requested review from beyang and a team December 28, 2024 00:29
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.

1 participant