fix(copilot): Cache copilot plugin unblock UI thread and improve startup times#21415
Draft
eastwood wants to merge 1 commit intoanomalyco:devfrom
Draft
fix(copilot): Cache copilot plugin unblock UI thread and improve startup times#21415eastwood wants to merge 1 commit intoanomalyco:devfrom
eastwood wants to merge 1 commit intoanomalyco:devfrom
Conversation
eastwood
commented
Apr 8, 2026
81bf880 to
0488f5c
Compare
0488f5c to
be7579e
Compare
eastwood
commented
Apr 9, 2026
| import { CopilotModels } from "./models" | ||
|
|
||
| const log = Log.create({ service: "plugin.copilot" }) | ||
| const ttl = 60 * 60 * 1000 |
Author
There was a problem hiding this comment.
Is this too long? I figured it was a nice sweet spot without a refresh interval (which felt unnecessary)
Author
|
Can't see a correlation between broken e2e tests and my changes. Can see other PRs have these tests breaking. Will check back in a few days |
This file contains hidden or 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
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.
Issue for this PR
Closes #21296
There's a blocking call on the copilot provider setup which causes the TUI to block.
Type of change
What does this PR do?
Caches the github copilot model provider and puts the request into the background in order to unblock the TUI startup.
How did you verify your code works?
Measured via debug logs — time from process start to first TUI plugin load:
opencodev1.4.0 (before)Checklist
Notes
Apologies, I'm not well versed in this codebase and haven't had a chance to comprehensively test all side effects of this change. I acknowledge that this solution could be completely naive, but happy to take feedback and discuss further.
In the meantime, I will dogfood my version to check for edge cases.