-
Notifications
You must be signed in to change notification settings - Fork 22
[LSP] Task execution context vars and cancellation abort checkpoints (CF-766) #849
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
base: main
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
⚡️ Codeflash found optimizations for this PR📄 101% (1.01x) speedup for
|
PR Type
Enhancement, Bug fix
Description
Introduce singleton LSP server instance
Add per-task execution context vars
Implement cancellation abort checkpoints
Simplify server feature handlers' signatures
Diagram Walkthrough
File Walkthrough
beta.py
Feature handlers refactor with context and cancel
codeflash/lsp/beta.py
CodeflashServerSingleton
usage.task_id
param and execution context manager.perform_optimization.py
Add cancellable optimization checkpoints
codeflash/lsp/features/perform_optimization.py
lsp_message.py
Propagate task_id in LSP messages
codeflash/lsp/lsp_message.py
task_id
from execution context in messages.server.py
Server singleton and context vars support
codeflash/lsp/server.py
CodeflashServerSingleton
.execution_context_vars
contextvar to server.