-
Notifications
You must be signed in to change notification settings - Fork 22
[LSP] Message Id tag #866
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
[LSP] Message Id tag #866
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
send a message id with the lsp logs for the client to know when it will receive a specific type of message
currently only telling the client when it start testing a candidate, and when it finds the best candidate, later we can add more to it.
this can be used in the future to implement steps or timeline of the optimization which we discussed before
PR Type
Enhancement
Description
Add LSP message IDs to logs
Propagate IDs through code and text messages
Make task_id optional in execution context
Parse and serialize message_id in LSP messages
Diagram Walkthrough
File Walkthrough
console.py
code_print supports LSP message IDscodeflash/cli_cmds/console.py
lsp_message_idparam tocode_print.message_idtoLspCodeMessage.beta.py
Optional task_id in execution context usagecodeflash/lsp/beta.py
getattr(params, "task_id", None)in two handlers.execution_contextrobust to missing task_id.lsp_logger.py
Logger parses and forwards LSP message IDscodeflash/lsp/lsp_logger.py
message_idtoLspMessageTags.id:tags intoLSPMessageId.message_idwhen serializingLspTextMessage.lsp_message.py
LSP message model gains message_id enumcodeflash/lsp/lsp_message.py
LSPMessageIdenum.message_idtoLspMessagebase.function_optimizer.py
Emit message IDs for candidates and bestcodeflash/optimization/function_optimizer.py
LSPMessageId.CANDIDATEID to candidate code prints.BEST_CANDIDATEID to best candidate print.