Open Router - Hugging Face - UI Improvement#7
Merged
Conversation
Security: - VSCode: store the provider API key in SecretStorage instead of settings.json (which syncs in plaintext). Migrate + clear any legacy value, deprecate the codesetu.apiKey setting, cache the key in memory and refresh on change. - JetBrains: store the API key in PasswordSafe instead of the plaintext settings XML, with one-time migration off the legacy field. JetBrains chat correctness: - Include workspace skill/check bodies in the system message (were loaded then silently dropped). - Keep multi-turn conversation history instead of single-turn. - Capture editor context on the EDT; load workspace instructions inside a read action. - Skip malformed SSE chunks instead of aborting the whole stream. VSCode chat UX: - Show the real configured provider/model in the composer; remove the non-functional model/reasoning/plugins/permissions/plan/goal controls. - Render assistant messages as HTML-escaped markdown (code fences, inline code, bold, lists) with no XSS surface. - Trim transcript history to a char budget; drop the optimistic user turn on error so retries don't stack two user messages. - Exclude likely-secret files (.env, keys, secrets/) from the auto-collected workspace snippets. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Core: - Add HuggingFaceProvider (extends OpenAICompatibleProvider): default base URL https://router.huggingface.co/v1, HF_TOKEN auth, default chat model. Register in the factory, exports, and diagnostics. It does not send Sarvam's reasoning_effort (which HF-served models reject). VS Code: - Add "huggingface" to the provider enum and the Setup Provider picker (router default + hf_... token prompt, key stored in SecretStorage). - Add a "CodeSetu: Select Model" command and make the composer model chip clickable: a curated list of reliably-served HF chat models plus an "Enter a custom model id..." option; writes codesetu.model and updates the chip live. JetBrains (provider backend): - Add ProviderKind.HUGGING_FACE; gate reasoning_effort to Sarvam only in the provider client so HF / OpenAI-compatible models don't get an unsupported field. Docs: README provider list, prerequisites, and settings updated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add CodeSetuModelCatalog with a curated list of reliably-served Hugging Face chat models. - Add an editable model ComboBox to the chat tool window header (dropdown of curated models + free-text for any custom repo id / endpoint model) that writes CodeSetuSettingsState.model, so switching models is at parity with the VS Code composer chip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Rework the Swing chat panel into a proper chat layout: - Model bar on top, transcript in the middle, and a bottom composer with a growing input and a normal-sized Send anchored bottom-right (the Send button no longer spans the full window height). - Word-wrap the transcript and input, add padding, a placeholder, and ⌘/Ctrl+Enter to send. - Add an in-flight guard (the keyboard shortcut bypasses the disabled button) and disable input/model box while a response streams. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the Swing chat tool window with a JCEF webview that reuses the exact VS Code chat design — rounded composer, clickable provider·model chip, "Include IDE context" toggle, and HTML-escaped markdown rendering of streamed replies. - webview/chat.html: shared markup/CSS/markdown JS (authored as a real resource to avoid hand-porting CSS), adapted to a JCEF bridge. - ChatTheme: maps the current IDE theme onto the --vscode-* CSS variables the design uses, so it matches light/dark. - ChatWebviewHtml: loads the template and substitutes theme, model label, and the JBCefJSQuery post-bridge. - CodeSetuToolWindowFactory: drives the page over a JBCefJSQuery bridge (sendMessage/selectModel/ready in; streamed deltas, model label, busy, errors out), with a model-picker popup, multi-turn history, EDT-safe context capture, outgoing-message buffering until the page loads, disposal, and a JCEF-unsupported fallback. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add a "Configure provider / endpoint…" entry to the model picker on both platforms so users can switch between Sarvam, OpenAI-compatible (Ollama / vLLM / local), and Hugging Face — and set the base URL, model, and API key — without leaving the chat. VS Code hands off to the Setup Provider command; JetBrains runs an inline provider/baseURL/ model/token flow and stores the token in PasswordSafe. - Compact the JetBrains JCEF chat: drop the redundant heading (the tool window already shows "CodeSetu"), and tighten padding, composer size, and icon/button sizes so it fits a narrow tool window. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Set pluginVersion (gradle.properties) and package.json to 0.2.0 and add 0.2.0 change notes covering the webview chat UI, Hugging Face provider, in-chat provider/model switching, and PasswordSafe key storage. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- ci.yml: add a JetBrains job (JDK 21 + Gradle) that runs compileKotlin, compileTestKotlin, test, and buildPlugin and uploads the zip. Kotlin was previously never built or tested on PRs (the Node scripts for apps/jetbrains are echo stubs). - release-vscode.yml: hoist OVSX_PAT to job-level env so the Open VSX publish step's `if` can actually read it (step-level env is not visible in that same step's condition, so it was always skipped). - Bump the VS Code extension to 0.2.0 (manifest + changelog) to align with the JetBrains 0.2.0 release. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Configure the JetBrains Plugin Verifier in both apps/jetbrains and apps/jetbrains-apiclient: add pluginVerifier() to the intellijPlatform dependencies and a pluginVerification block. Pin verification to the build target IDE (IC 2025.2.5) instead of recommended(), which tried to resolve an unreleased IDE (2025.3) and failed. - ci.yml: run the JetBrains job as a matrix over [jetbrains, jetbrains-apiclient] and add `verifyPlugin` to the Gradle invocation. - release-jetbrains.yml: also run `verifyPlugin` before publishing. Both plugins verify Compatible against IC-252 locally. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Establishes the CodeSetu pnpm + Gradle monorepo and the first
working
products for both IDEs: an open-source, multi-provider AI coding
assistant and a Postman-style API client.
AI coding assistant
SGLang
/ OpenRouter / local), and Hugging Face (hosted router,
dedicated
Inference Endpoints, or self-hosted TGI).
markdown-rendered
replies; inline FIM completions; selected-code actions (explain
/
refactor / tests / fix / docs); provider setup + diagnostics;
in-chat
provider/model switcher.
using the
same design as VS Code; editor actions; settings; in-chat
provider/
model switcher.
PasswordSafe — never in settings.json or plaintext XML; env-var
fallback retained.
neighborhood,
related snippets) with secret-file exclusions; workspace
skills/checks.
Shared packages
OpenAI-compatible/Sarvam/Hugging
Face clients, IDE context/prompt/diagnostics, tool registry.
API client (standalone, Postman-style)
and a
native-Kotlin apps/jetbrains-apiclient: collections,
REST/WebSocket
requests, environments, auth, importers (Postman/OpenAPI/cURL/
Insomnia/HAR), and persistence.
Tooling & CI/CD
smoke-package; a
JetBrains matrix over both plugins running build + test +
JetBrains
Plugin Verifier.
JetBrains
(Marketplace), version = major.minor + run_number, with
dry-run.
README/INSTALL/
CONTRIBUTING/SECURITY and issue/PR templates.
199 files across the assistant, API client, shared packages, and
CI.