mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-13 10:45:27 +00:00
* feat(web-shell): Scope voice to composer workspace Route voice status, settings, model discovery, and streaming through the workspace that owns each main or split-view composer while preserving legacy primary behavior. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(web-shell): Keep legacy voice fallback scoped Prevent the Voice-only legacy workspace fallback from activating pre-session git polling, and cover both behaviors together. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(web-shell): Preserve active Voice capture owners Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(web-shell): Pin Voice trust and ambiguity gates Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
36 lines
1 KiB
TypeScript
36 lines
1 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Qwen
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { describe, expect, it } from 'vitest';
|
|
import type { ConfigEnv, UserConfig } from 'vite';
|
|
import viteConfig, { QUALIFIED_VOICE_STREAM_PROXY } from '../vite.config';
|
|
|
|
describe('Web Shell Voice development proxy', () => {
|
|
it('proxies only qualified Voice stream upgrades', () => {
|
|
const factory = viteConfig as (env: ConfigEnv) => UserConfig;
|
|
const config = factory({
|
|
command: 'serve',
|
|
mode: 'test',
|
|
isSsrBuild: false,
|
|
isPreview: false,
|
|
});
|
|
const proxy = config.server?.proxy;
|
|
const qualified = proxy?.[QUALIFIED_VOICE_STREAM_PROXY];
|
|
|
|
expect(qualified).not.toBeTypeOf('string');
|
|
expect(
|
|
qualified && typeof qualified !== 'string' ? qualified.ws : false,
|
|
).toBe(true);
|
|
expect(
|
|
new RegExp(QUALIFIED_VOICE_STREAM_PROXY).test(
|
|
'/workspaces/id/voice/stream',
|
|
),
|
|
).toBe(true);
|
|
expect(
|
|
new RegExp(QUALIFIED_VOICE_STREAM_PROXY).test('/voice/voiceModels.ts'),
|
|
).toBe(false);
|
|
});
|
|
});
|