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

Add copilot queries to query history #510

Merged
merged 21 commits into from
Feb 18, 2025
Merged

Conversation

lossyrob
Copy link
Contributor

This PR adds a feature where notifications are sent to VSCode each time a query is executed by the copilot.

It also adds a feature where the MessageServer is able to handle request responses and errors. This was implemented as I originally implemented the query history messages as requests, but move to notifications.

Also, a PR GitHub action was added to the project, along with a docker-compose that brings up a local postgres instance for integration tests that can be used locally and is used in the PR tests.

It also refactored a few things:

  • How AsyncRunner is instantiated and passed around
  • RpcRequestContext and RpcNotificationContext were removed as they could just use base class functionality, which utilizes the server to implement the send_* methods. Web*Context overrides the base class behavior because a particular session is needed and the server implementation doesn't have that detail
  • Adds a test_v2 project to hold new pytest tests.
  • Tweaks the system prompt for the copilot.
  • Adds type annotations to various places to trigger editor type error help
  • Formatting changes

…texts.

This includes getting rid of RpcRequestContext/RpcNotificationContext, which just uses base class functionality. Web*Context overrides the base class behavior because a particular session is needed and the server implementation doesn't have that detail.
Also add type annotations various places to trigger editor type error help. Formatting changes.
@lossyrob lossyrob requested review from a team as code owners February 14, 2025 15:51
@lossyrob lossyrob force-pushed the feature/chat-query-history branch from 24b2cb1 to 107446a Compare February 14, 2025 16:20
Copy link
Member

@mmcfarland mmcfarland left a comment

Choose a reason for hiding this comment

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

Changes all look good and sensible, and having easy integration tests running with docker compose is a nice QoL upgrade. I do have a bunch of errors when running the v1 tests, though

FAILED (failures=3, errors=130)

@lossyrob lossyrob force-pushed the feature/chat-query-history branch from 107446a to fca7712 Compare February 14, 2025 16:23
@lossyrob lossyrob force-pushed the feature/chat-query-history branch from fca7712 to 22eeae9 Compare February 14, 2025 16:36
@lossyrob lossyrob force-pushed the feature/chat-query-history branch 2 times, most recently from 712e4f7 to 826dcdb Compare February 14, 2025 18:11
@lossyrob lossyrob force-pushed the feature/chat-query-history branch from 826dcdb to 3525c27 Compare February 14, 2025 18:20
This was applicable when pytest_asyncio was used; we are using the AsyncRunner to execute async code and so do not need pytest_asyncio
@lossyrob lossyrob force-pushed the feature/chat-query-history branch from c24a14c to f619fd6 Compare February 14, 2025 21:10
@lossyrob lossyrob force-pushed the feature/chat-query-history branch from f619fd6 to 47ded48 Compare February 14, 2025 21:14
Copy link
Member

@mmcfarland mmcfarland left a comment

Choose a reason for hiding this comment

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

Great updates.

@lossyrob lossyrob merged commit 84088d3 into main Feb 18, 2025
2 checks passed
@lossyrob lossyrob deleted the feature/chat-query-history branch February 18, 2025 15:12
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