-
Notifications
You must be signed in to change notification settings - Fork 7
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
Enhance Webview Communication and Context Handling #213
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Refactored JavaScript communication to use more efficient methods. - Introduced sendToWebView method for improved payload handling. - Updated action handling to align with new communication structure.
- Updated action constants for improved readability and functionality. - Adjusted constants to better reflect the actions they represent. - Removed unnecessary prefixes from action strings for cleaner integration.
- Introduced a new conversation request handler to the action factory. - Updated ActionHandlerFactory to manage new conversations effectively. - This change enhances the communication capabilities of the webview.
- Remove unnecessary JS callback execution during initialization. - Add error handling when copying Python resources on Windows. - Improve logging for better debugging of the Python copy process.
- Adjusted page index calculation to ensure it starts at 1 or higher. - Prevents potential negative paging when requesting messages. - Enhanced overall message retrieval reliability.
- Refactor handlers to include command in payloads sent. - Update action methods in various request handlers for consistency. - Improve error handling and payload structures across different classes.
- Refactor LoadConversationRequestHandler to load messages asynchronously. - Update LoadHistoryMessagesRequestHandler to change page index retrieval. - Adjust payload structure for message reload with updated mappings.
- Refactored functions to return lists instead of strings for context. - Updated MAX_CONTEXT_TOKENS to be configurable based on limits. - Enhanced token counting logic for improved performance.
- Added CompletableFuture for handling asynchronous tasks in Browser class - Enhanced CompletionProvider to log completion messages and handle exceptions - Updated InlineCompletionService to include manual trigger flag and logging improvements
- Modified accept method calls to include editor parameter - Ensured consistency in service usage across actions - Improved clarity and maintainability of code
- Refactored `postEvent` method to include `Browser` instance for webview communication - Added `isManualTrigger` field to `Agent` class for manual trigger tracking - Imported additional classes for project and browser integration in `Agent` class
kagami-l
approved these changes
Nov 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements related to webview communication and context handling:
These changes collectively enhance the reliability and performance of the webview interaction.