mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-01-05 16:39:14 +00:00
Compare commits
2 Commits
chore/cach
...
v0.0.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5726c2fd7 | ||
|
|
5af25b2600 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -105,7 +105,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm run preflight
|
npm run preflight
|
||||||
npm run test:integration:sandbox:none
|
npm run test:integration:sandbox:none
|
||||||
npm run test:integration:sandbox:docker
|
# npm run test:integration:sandbox:docker
|
||||||
env:
|
env:
|
||||||
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
|
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
|
||||||
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
|
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
|
||||||
|
|||||||
12
package-lock.json
generated
12
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@qwen-code/qwen-code",
|
"name": "@qwen-code/qwen-code",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@qwen-code/qwen-code",
|
"name": "@qwen-code/qwen-code",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
@@ -12512,7 +12512,7 @@
|
|||||||
},
|
},
|
||||||
"packages/cli": {
|
"packages/cli": {
|
||||||
"name": "@qwen-code/qwen-code",
|
"name": "@qwen-code/qwen-code",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/genai": "1.9.0",
|
"@google/genai": "1.9.0",
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
@@ -12696,7 +12696,7 @@
|
|||||||
},
|
},
|
||||||
"packages/core": {
|
"packages/core": {
|
||||||
"name": "@qwen-code/qwen-code-core",
|
"name": "@qwen-code/qwen-code-core",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/genai": "1.13.0",
|
"@google/genai": "1.13.0",
|
||||||
"@modelcontextprotocol/sdk": "^1.11.0",
|
"@modelcontextprotocol/sdk": "^1.11.0",
|
||||||
@@ -12861,7 +12861,7 @@
|
|||||||
},
|
},
|
||||||
"packages/test-utils": {
|
"packages/test-utils": {
|
||||||
"name": "@qwen-code/qwen-code-test-utils",
|
"name": "@qwen-code/qwen-code-test-utils",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
@@ -12872,7 +12872,7 @@
|
|||||||
},
|
},
|
||||||
"packages/vscode-ide-companion": {
|
"packages/vscode-ide-companion": {
|
||||||
"name": "qwen-code-vscode-ide-companion",
|
"name": "qwen-code-vscode-ide-companion",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"license": "LICENSE",
|
"license": "LICENSE",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/sdk": "^1.15.1",
|
"@modelcontextprotocol/sdk": "^1.15.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@qwen-code/qwen-code",
|
"name": "@qwen-code/qwen-code",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.0.0"
|
"node": ">=20.0.0"
|
||||||
},
|
},
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"url": "git+https://github.com/QwenLM/qwen-code.git"
|
"url": "git+https://github.com/QwenLM/qwen-code.git"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.9"
|
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.10"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node scripts/start.js",
|
"start": "node scripts/start.js",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@qwen-code/qwen-code",
|
"name": "@qwen-code/qwen-code",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"description": "Qwen Code",
|
"description": "Qwen Code",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.9"
|
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.10"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/genai": "1.9.0",
|
"@google/genai": "1.9.0",
|
||||||
|
|||||||
@@ -523,41 +523,6 @@ export const SETTINGS_SCHEMA = {
|
|||||||
default: undefined as Record<string, unknown> | undefined,
|
default: undefined as Record<string, unknown> | undefined,
|
||||||
description: 'Content generator settings.',
|
description: 'Content generator settings.',
|
||||||
showInDialog: false,
|
showInDialog: false,
|
||||||
properties: {
|
|
||||||
timeout: {
|
|
||||||
type: 'number',
|
|
||||||
label: 'Timeout',
|
|
||||||
category: 'Content Generator',
|
|
||||||
requiresRestart: false,
|
|
||||||
default: undefined as number | undefined,
|
|
||||||
description: 'Request timeout in milliseconds.',
|
|
||||||
parentKey: 'contentGenerator',
|
|
||||||
childKey: 'timeout',
|
|
||||||
showInDialog: true,
|
|
||||||
},
|
|
||||||
maxRetries: {
|
|
||||||
type: 'number',
|
|
||||||
label: 'Max Retries',
|
|
||||||
category: 'Content Generator',
|
|
||||||
requiresRestart: false,
|
|
||||||
default: undefined as number | undefined,
|
|
||||||
description: 'Maximum number of retries for failed requests.',
|
|
||||||
parentKey: 'contentGenerator',
|
|
||||||
childKey: 'maxRetries',
|
|
||||||
showInDialog: true,
|
|
||||||
},
|
|
||||||
disableCacheControl: {
|
|
||||||
type: 'boolean',
|
|
||||||
label: 'Disable Cache Control',
|
|
||||||
category: 'Content Generator',
|
|
||||||
requiresRestart: false,
|
|
||||||
default: false,
|
|
||||||
description: 'Disable cache control for DashScope providers.',
|
|
||||||
parentKey: 'contentGenerator',
|
|
||||||
childKey: 'disableCacheControl',
|
|
||||||
showInDialog: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
enableOpenAILogging: {
|
enableOpenAILogging: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@qwen-code/qwen-code-core",
|
"name": "@qwen-code/qwen-code-core",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"description": "Qwen Code Core",
|
"description": "Qwen Code Core",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -217,7 +217,6 @@ export interface ConfigParameters {
|
|||||||
contentGenerator?: {
|
contentGenerator?: {
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
maxRetries?: number;
|
maxRetries?: number;
|
||||||
disableCacheControl?: boolean;
|
|
||||||
samplingParams?: {
|
samplingParams?: {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
};
|
};
|
||||||
@@ -303,7 +302,6 @@ export class Config {
|
|||||||
private readonly contentGenerator?: {
|
private readonly contentGenerator?: {
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
maxRetries?: number;
|
maxRetries?: number;
|
||||||
disableCacheControl?: boolean;
|
|
||||||
samplingParams?: Record<string, unknown>;
|
samplingParams?: Record<string, unknown>;
|
||||||
};
|
};
|
||||||
private readonly cliVersion?: string;
|
private readonly cliVersion?: string;
|
||||||
@@ -803,10 +801,6 @@ export class Config {
|
|||||||
return this.contentGenerator?.maxRetries;
|
return this.contentGenerator?.maxRetries;
|
||||||
}
|
}
|
||||||
|
|
||||||
getContentGeneratorDisableCacheControl(): boolean | undefined {
|
|
||||||
return this.contentGenerator?.disableCacheControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
getContentGeneratorSamplingParams(): ContentGeneratorConfig['samplingParams'] {
|
getContentGeneratorSamplingParams(): ContentGeneratorConfig['samplingParams'] {
|
||||||
return this.contentGenerator?.samplingParams as
|
return this.contentGenerator?.samplingParams as
|
||||||
| ContentGeneratorConfig['samplingParams']
|
| ContentGeneratorConfig['samplingParams']
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ describe('createContentGeneratorConfig', () => {
|
|||||||
getSamplingParams: vi.fn().mockReturnValue(undefined),
|
getSamplingParams: vi.fn().mockReturnValue(undefined),
|
||||||
getContentGeneratorTimeout: vi.fn().mockReturnValue(undefined),
|
getContentGeneratorTimeout: vi.fn().mockReturnValue(undefined),
|
||||||
getContentGeneratorMaxRetries: vi.fn().mockReturnValue(undefined),
|
getContentGeneratorMaxRetries: vi.fn().mockReturnValue(undefined),
|
||||||
getContentGeneratorDisableCacheControl: vi.fn().mockReturnValue(undefined),
|
|
||||||
getContentGeneratorSamplingParams: vi.fn().mockReturnValue(undefined),
|
getContentGeneratorSamplingParams: vi.fn().mockReturnValue(undefined),
|
||||||
getCliVersion: vi.fn().mockReturnValue('1.0.0'),
|
getCliVersion: vi.fn().mockReturnValue('1.0.0'),
|
||||||
} as unknown as Config;
|
} as unknown as Config;
|
||||||
|
|||||||
@@ -62,8 +62,6 @@ export type ContentGeneratorConfig = {
|
|||||||
timeout?: number;
|
timeout?: number;
|
||||||
// Maximum retries for failed requests
|
// Maximum retries for failed requests
|
||||||
maxRetries?: number;
|
maxRetries?: number;
|
||||||
// Disable cache control for DashScope providers
|
|
||||||
disableCacheControl?: boolean;
|
|
||||||
samplingParams?: {
|
samplingParams?: {
|
||||||
top_p?: number;
|
top_p?: number;
|
||||||
top_k?: number;
|
top_k?: number;
|
||||||
@@ -101,7 +99,6 @@ export function createContentGeneratorConfig(
|
|||||||
enableOpenAILogging: config.getEnableOpenAILogging(),
|
enableOpenAILogging: config.getEnableOpenAILogging(),
|
||||||
timeout: config.getContentGeneratorTimeout(),
|
timeout: config.getContentGeneratorTimeout(),
|
||||||
maxRetries: config.getContentGeneratorMaxRetries(),
|
maxRetries: config.getContentGeneratorMaxRetries(),
|
||||||
disableCacheControl: config.getContentGeneratorDisableCacheControl(),
|
|
||||||
samplingParams: config.getContentGeneratorSamplingParams(),
|
samplingParams: config.getContentGeneratorSamplingParams(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -212,17 +212,6 @@ export class OpenAIContentGenerator implements ContentGenerator {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if cache control should be disabled based on configuration.
|
|
||||||
*
|
|
||||||
* @returns true if cache control should be disabled, false otherwise
|
|
||||||
*/
|
|
||||||
private shouldDisableCacheControl(): boolean {
|
|
||||||
return (
|
|
||||||
this.config.getContentGeneratorConfig()?.disableCacheControl === true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build metadata object for OpenAI API requests.
|
* Build metadata object for OpenAI API requests.
|
||||||
*
|
*
|
||||||
@@ -253,7 +242,7 @@ export class OpenAIContentGenerator implements ContentGenerator {
|
|||||||
|
|
||||||
// Add cache control to system and last messages for DashScope providers
|
// Add cache control to system and last messages for DashScope providers
|
||||||
// Only add cache control to system message for non-streaming requests
|
// Only add cache control to system message for non-streaming requests
|
||||||
if (this.isDashScopeProvider() && !this.shouldDisableCacheControl()) {
|
if (this.isDashScopeProvider()) {
|
||||||
messages = this.addDashScopeCacheControl(
|
messages = this.addDashScopeCacheControl(
|
||||||
messages,
|
messages,
|
||||||
streaming ? 'both' : 'system',
|
streaming ? 'both' : 'system',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@qwen-code/qwen-code-test-utils",
|
"name": "@qwen-code/qwen-code-test-utils",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "qwen-code-vscode-ide-companion",
|
"name": "qwen-code-vscode-ide-companion",
|
||||||
"displayName": "Qwen Code Companion",
|
"displayName": "Qwen Code Companion",
|
||||||
"description": "Enable Qwen Code with direct access to your VS Code workspace.",
|
"description": "Enable Qwen Code with direct access to your VS Code workspace.",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"publisher": "qwenlm",
|
"publisher": "qwenlm",
|
||||||
"icon": "assets/icon.png",
|
"icon": "assets/icon.png",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user