Remove the obsolete VS Code language model chat shim#187
Open
danielrobbins wants to merge 1 commit into
Open
Conversation
conflicts with current @types/vscode declarations. The original shim was added when llama-vscode needed to supply its own temporary LM chat-provider typings. That is no longer necessary because current @types/vscode releases already include the relevant language model chat APIs. Leaving the old shim in place causes duplicate declaration errors during TypeScript compilation. Properties such as modelOptions, tools, maxInputTokens, maxOutputTokens, and LanguageModelResponsePart are now defined both by @types/vscode and by the local shim, which breaks the build even though the runtime code itself is otherwise valid. This change removes the dead shim file entirely and keeps one small provider typing cleanup in llama-chat-model-provider.ts so the current tool metadata mapping aligns with the upstream VS Code types. After this cleanup, the repo compiles cleanly against the installed @types/vscode package without relying on duplicate local declarations. This cleanup is also required for the separate VS Code tool serialization fix to build cleanly. Without removing the obsolete shim, that branch still fails compilation on current @types/vscode before its behavioral changes can be validated in a normal TypeScript build.
This was referenced May 17, 2026
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.
Summary
This PR removes the obsolete VS Code language model chat shim that now conflicts with the LM chat APIs already provided by current
@types/vscode. It also serves as a prerequisite for the separate VS Code fix PRs that I will be creating.The shim was originally useful when the extension needed local fallback declarations for the VS Code LM chat provider surface. That is no longer the case. Leaving it in place causes duplicate declaration errors during TypeScript compilation, even though the runtime code is otherwise valid.
What changed
Why this is needed
With current
@types/vscode, the shim duplicates definitions that now exist upstream. That leads to compile failures around LM chat types such as:modelOptionstoolsmaxInputTokensmaxOutputTokensLanguageModelResponsePartRemoving the shim eliminates that conflict and reduces dead maintenance surface in the repo.
Scope
This PR is intentionally limited to build/type cleanup. It does not change the extension's runtime behavior, tool flow, or user-facing feature set.