-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(vscode): force fresh ACP session on new-session action #2874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a0b1f01
fix(vscode-ide-companion/session): force fresh sessions for new chats
yiliang114 35b3dd5
fix(vscode): remove core runtime imports from webview bundle
yiliang114 9f317e8
fix(vscode): reset context usage display on new session (#2847)
yiliang114 ee4caeb
fix(vscode-ide-companion/webview): reset state on new session
yiliang114 f457124
test(vscode-ide-companion/webview): cover stale conversation reset
yiliang114 434e9c3
fix(vscode): remove webview token limit runtime import
yiliang114 772b8f0
chore(merge): sync main into fix/2847-vscode-new-session-minimal
yiliang114 0191647
Merge branch 'fix/2847-vscode-new-session-minimal' into fix/2847-vsco…
yiliang114 c2f3c96
Merge pull request #2875 from QwenLM/fix/2847-vscode-new-session-rese…
tanzhenxin 9b4368e
fix(vscode): fully reset state for explicit new session
yiliang114 a408f5f
Merge remote-tracking branch 'origin/main' into fix/2847-vscode-new-s…
yiliang114 f27a0d9
fix(vscode-ide-companion/webview): clear residual state on new session
yiliang114 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
49 changes: 49 additions & 0 deletions
49
packages/vscode-ide-companion/src/utils/imageSupport.bundle.test.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2025 Qwen Team | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| import esbuild from 'esbuild'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { describe, expect, it } from 'vitest'; | ||
|
|
||
| describe('imageSupport browser bundling', () => { | ||
| it('does not leave qwen-code-core runtime imports in the webview bundle', async () => { | ||
| const result = await esbuild.build({ | ||
| entryPoints: [ | ||
| fileURLToPath(new URL('./imageSupport.ts', import.meta.url)), | ||
| ], | ||
| bundle: true, | ||
| format: 'iife', | ||
| platform: 'browser', | ||
| write: false, | ||
| logLevel: 'silent', | ||
| external: ['@qwen-code/qwen-code-core'], | ||
| }); | ||
|
|
||
| const output = result.outputFiles[0]?.text ?? ''; | ||
|
|
||
| expect(output).not.toContain('@qwen-code/qwen-code-core'); | ||
| expect(output).not.toContain('supportedImageFormats.js'); | ||
| }); | ||
|
|
||
| it('does not leave qwen-code-core runtime imports in the App webview bundle', async () => { | ||
| const result = await esbuild.build({ | ||
| entryPoints: [ | ||
| fileURLToPath(new URL('../webview/App.tsx', import.meta.url)), | ||
| ], | ||
| bundle: true, | ||
| format: 'iife', | ||
| platform: 'browser', | ||
| write: false, | ||
| logLevel: 'silent', | ||
| external: ['@qwen-code/qwen-code-core'], | ||
| }); | ||
|
|
||
| const output = result.outputFiles[0]?.text ?? ''; | ||
|
|
||
| expect(output).not.toContain('@qwen-code/qwen-code-core'); | ||
| expect(output).not.toContain('tokenLimits.js'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.