Skip to content

Commit fd427d6

Browse files
chore(copilot): trim explanatory comments to stay within the mutation-gate line limit
1 parent 72b091c commit fd427d6

3 files changed

Lines changed: 1 addition & 9 deletions

File tree

‎src/core/config/ProviderSettingsManager.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,7 @@ export class ProviderSettingsManager {
595595
continue
596596
}
597597

598-
// Try to build an API handler to get model information. It is used only for
599-
// that, and some handlers (VS Code LM, GitHub Copilot) register host listeners,
600-
// so release it whether filtering succeeds or fails.
598+
// Try to build an API handler to get model information
601599
let apiHandler: ReturnType<typeof buildApiHandler> | undefined
602600
try {
603601
apiHandler = buildApiHandler(configs[name])

‎src/core/webview/generateSystemPrompt.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ export const generateSystemPrompt = async (provider: ClineProvider, message: Web
4949
// info beforehand would build the preview from fallback metadata with different
5050
// tool guidance than the runtime path (which fetches before tool construction).
5151
let modelInfo: ModelInfo | undefined
52-
// Built only to read model metadata. Some handlers (VS Code LM, GitHub Copilot) register
53-
// host listeners, so release it however this ends: success, timeout, or error.
5452
let tempApiHandler: ReturnType<typeof buildApiHandler> | undefined
5553
try {
5654
tempApiHandler = buildApiHandler(apiConfiguration)

‎src/core/webview/webviewMessageHandler.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,10 +1566,6 @@ export const webviewMessageHandler = async (
15661566
}
15671567
const viewState = getGitHubCopilotViewState(provider)
15681568
const changesAtStart = viewState.changes
1569-
// A refresh is out of date once a sign-in has moved the view on, or once a newer
1570-
// refresh for the same view has started: two overlapping refreshes see the same
1571-
// `changes`, so only the per-view refresh sequence can stop the older one, if it
1572-
// finishes last, from overwriting the newer list (or error).
15731569
const refreshId = ++viewState.refreshId
15741570
const isOutOfDate = () => viewState.changes !== changesAtStart || viewState.refreshId !== refreshId
15751571
try {

0 commit comments

Comments
 (0)