* refactor(core): move codingPlan constants from cli to core package
Extract Coding Plan region configs, model templates, and utility
functions into packages/core/src/constants/ so both CLI and VSCode
extension can import from a shared source of truth.
* refactor(cli): import codingPlan constants from core instead of local path
Update all CLI files to import CodingPlanRegion, CODING_PLAN_ENV_KEY,
and related utilities from @qwen-code/qwen-code-core, replacing the
local ../../constants/codingPlan.js imports.
* feat(vscode-ide-companion): replace login flow with provider setup via VSCode Settings
Replace the OAuth-based login command with a settings-driven provider
configuration flow. Users now configure Coding Plan or API Key providers
through VSCode Settings (qwen-code.*), which auto-syncs to
~/.qwen/settings.json.
- Rename login command to auth, opening VSCode Settings panel
- Add /auth2 interactive flow (QuickPick + InputBox)
- Add ProviderSetupForm onboarding component with inline config
- Add bidirectional sync between VSCode settings and ~/.qwen/settings.json
- Add settingsWriter service for direct settings.json read/write
- Add VSCode configuration schema (provider, apiKey, region, model, etc.)
- Update all login/session messages to use auth terminology
* refactor(vscode-ide-companion): rename auth2→auth, remove dead code, fix sync guard
- Rename auth2 to auth for all message types, handlers, and slash command
- Remove unused InfoBanner.tsx (128 lines, no references)
- Remove dead openProviderSettings handler (no callers)
- Remove redundant qwen-code.baseUrl VSCode setting (already in modelProviders)
- Replace unreliable setTimeout(500) sync guard with await Promise.all + finally
- Clean up old authHandler/setAuthHandler in favor of authInteractiveHandler
* refactor(vscode-ide-companion): remove dead VSCode Settings plumbing, simplify sync
- Remove qwen-code.modelProviders and qwen-code.model from package.json
(model switching handled by chat UI's /model command, not VSCode Settings)
- Remove connectWithSettings message handler and plumbing
(no webview component sends this message type)
- Remove handleConnectWithSettings method from WebViewProvider
- Simplify syncVSCodeSettingsToQwenConfig: only sync provider/apiKey/region
- Simplify syncQwenConfigToVSCodeSettings: only populate provider/apiKey/region
- Simplify QwenSettingsForVSCode interface: remove modelProviders and model
- Improve Onboarding UI: logo above card, better hierarchy, arrow icon on button
* fix(vscode-ide-companion): add missing vscode.workspace mock in test
Add onDidChangeConfiguration and getConfiguration to the vscode.workspace
mock in WebViewProvider.test.ts to fix CI test failures.
* fix(vscode-ide-companion): clean up stale coding plan state, add auth cancel handling, add tests
- Clear CODING_PLAN_ENV_KEY and codingPlan metadata when switching to api-key mode
- Add authCancelled notification when QuickPick/InputBox is dismissed
- ProviderSetupForm resets button state on authCancelled
- syncVSCodeSettingsToQwenConfig returns false for api-key mode (no-op)
- Fix Onboarding vertical centering (flex-1 min-h-0)
- Import from @qwen-code/qwen-code-core top-level instead of deep paths
- Add tests: settingsWriter, ProviderSetupForm cancel, AuthMessageHandler cancel, WebViewProvider sync
- Fix redundant ternary in pick() helper
* fix(vscode-ide-companion): force center Onboarding against parent override
Parent container uses [&>*]:items-start and [&>*]:text-left which overrides
Tailwind classes. Use inline style for alignItems/justifyContent/textAlign
to ensure Onboarding is always centered both horizontally and vertically.
* fix(vscode-ide-companion): bundle onboarding logo
* test(vscode-ide-companion): add png loader to bundle test
* fix(vscode-ide-companion/webview): avoid redundant auth sync reconnects
* fix(vscode-ide-companion/webview): fix auth sync typecheck
* docs(vscode-ide-companion): clarify auth restoration flow
* fix(webui): use bracket access for permission drawer plan content
* fix(vscode-ide-companion): guard authSuccess emission on actual auth state
After reconnecting in handleAuthInteractive, doInitializeAgentConnection
may return without throwing even when credentials are rejected (it sends
authState:false internally and returns early). Previously we unconditionally
emitted authSuccess, which contradicted the failed auth state and could
briefly show a success toast before re-opening the auth flow.
Now we check this.authState after reconnection: only emit authSuccess when
authentication actually succeeded, otherwise emit authError with a clear
credentials message.
Addresses review feedback from PR #3398.
* fix(vscode): address auth setup review feedback
* fix(vscode-ide-companion): guard concurrent auth flows, merge model providers
- Add authFlowActive mutex and autoAuthTimer to WebViewProvider so
startInteractiveAuth() cancels the deferred auto-auth timeout,
preventing two overlapping QuickPick flows from a single command.
- Change writeModelProvidersConfig() to merge new entries with existing
non-target models (different envKey) instead of replacing the entire
array, preserving unrelated providers like Coding Plan.
* fix(vscode-ide-companion): handle apiKey clearing as de-auth signal, fix auto-auth race, clean imports
- Add clearPersistedAuth() to settingsWriter.ts: removes selectedType,
API keys, and coding plan metadata from ~/.qwen/settings.json
- Config change handler now detects empty apiKey with active agent and
triggers de-auth: clear credentials, disconnect, update authState
- Auto-auth timer callback now properly sets authFlowActive mutex to
prevent concurrent auth flows with startInteractiveAuth()
- Add test covering the de-auth path (clearPersistedAuth + disconnect)
- Fix import formatting in 7 CLI files (spacing, trailing commas)
- Remove duplicate comment in attemptAuthStateRestoration()
* fix(vscode-ide-companion): scope de-auth to apiKey changes only
The previous de-auth logic triggered on any auth-related setting change
where syncVSCodeSettingsToQwenConfig() returned false. For api-key
providers this is the normal path (interactive auth owns config), so
changing codingPlanRegion or provider would incorrectly wipe OPENAI_API_KEY.
Now the de-auth branch only fires when e.affectsConfiguration('qwen-code.apiKey')
is true AND the value is empty, preventing false-positive credential clearing.
Add regression test: non-apiKey setting changes on an api-key provider
must not trigger clearPersistedAuth or disconnect.
* fix(vscode-ide-companion): add disconnect to mock type to fix CI typecheck
The hoisted mockQwenAgentManagerInstances type was missing the
disconnect property, causing TS2339 in the de-auth test assertions.
The vsce package was causing ESM module resolution errors when building
locally due to a dependency cycle between ansi-regex (ESM-only in v6)
and strip-ansi (CommonJS) pulled in by @textlint/linter-formatter.
CI already installs vsce globally before packaging, so this change
aligns local builds with CI behavior. Developers should install vsce
globally: npm install -g @vscode/vsce
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Update all packages from 0.13.x to 0.14.0
- Update sandbox image URI to 0.14.0
This prepares the 0.14.0 release with updated version numbers
across all workspace packages.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Flip the context key logic from negative (`doesNotSupportSecondarySidebar`) to
positive (`supportsSecondarySidebar`) so that the secondary sidebar container is
only declared when the VS Code version is known to support it. This prevents the
"container 'qwen-code-secondary' does not exist" warning on older versions and
avoids accidentally relocating other extensions' views to the Explorer container.
Closes#2432Closes#2416
Made-with: Cursor
Adopt Claude Code's approach for webview view registration:
- Use mutual-exclusive sidebar/secondary sidebar with `when` conditions
- Detect secondary sidebar support via VS Code version >= 1.106
- Share single ChatWebviewViewProvider instance across both view IDs
- Only set context key when secondary sidebar is NOT supported
- Pass supportsSecondarySidebar as closure variable to commands
Additional fixes:
- Fix WebViewContent.generate() to accept both Webview and WebviewPanel
- Fix permission handler leak (cancel old promise before new)
- Fix double diff command execution in resolve callback
- Add initializationPromise dedup for auth-restore races
- Add attachToView() for sidebar/secondary sidebar hosting
- Add missing AskUserQuestionResponseMessage import
Co-authored-by: buaoyezz <buaoyezz@users.noreply.github.com>
- Use consistent kebab-case prefix 'qwen-code.' for all view IDs
- Update package.json views and viewsContainers to match new naming
- Add fine-grained activationEvents for views and commands
- Add test verifying all three view positions are registered correctly
This ensures consistent naming across commands, views, and containers.
- Add extractSessionListItems() utility for robust ACP response parsing
- Refactor getSessionList() and getSessionListPaged() to use the new utility
- Add openNewChatTabCommand to create new session when opening chat tab
- Add comprehensive test coverage for session list extraction
Co-authored-by: ZZAoYe <zzbuaoye@gmail.com>
All chat positions (sidebar, editor tab, panel, secondary sidebar) are now
available simultaneously. Remove the old chat.location configuration and
setChatLocation commands. Add focusChat, newConversation, and showLogs commands.
Refactor ChatWebviewViewProvider to use lazy factory pattern and move webview
files into providers/ subdirectory.
Add JSON Schema generation for settings.json files to provide IntelliSense
and validation support in VS Code. The schema is automatically generated
from the internal SETTINGS_SCHEMA definition during the build process.
- Add generate-settings-schema.ts script to convert TypeScript schema to JSON Schema
- Add jsonValidation contribution to vscode-ide-companion package.json
- Include schemas directory in .vscodeignore for packaging
- Integrate schema generation into build process
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Remove duplicate webui build in vscode-ide-companion (fixes double build)
- Fix misleading [watch] log messages in esbuild.js (only show in watch mode)
- Update vite-plugin-dts to ^4.5.4 for TypeScript 5.8+ support
- Update baseline-browser-mapping to ^2.9.19 to silence outdated data warnings
- Fix vitest config to use @qwen-code/qwen-code-core instead of old gemini-cli-core
- Add resolve.alias in cli vitest.config.ts for source-based testing
- Add npm run dev script for running from TypeScript source without build
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>