Skip to content

Remove the obsolete VS Code language model chat shim#187

Open
danielrobbins wants to merge 1 commit into
ggml-org:masterfrom
danielrobbins:fix/chat-provider-shim
Open

Remove the obsolete VS Code language model chat shim#187
danielrobbins wants to merge 1 commit into
ggml-org:masterfrom
danielrobbins:fix/chat-provider-shim

Conversation

@danielrobbins
Copy link
Copy Markdown

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

  • Removed the old local LM chat shim declarations
  • Kept the small related typing cleanup in the chat provider so the current tool mapping aligns with the upstream VS Code types
  • Verified that the project still compiles cleanly after the shim is removed

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:

  • modelOptions
  • tools
  • maxInputTokens
  • maxOutputTokens
  • LanguageModelResponsePart

Removing 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant