diff --git a/README.md b/README.md index 1a569ed6..972a0852 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ qwen ### Terminal-Bench | Agent | Model | Accuracy | -|-----------|--------------------|----------| +| --------- | ------------------ | -------- | | Qwen Code | Qwen3-Coder-480A35 | 37.5 | ## Project Structure diff --git a/package-lock.json b/package-lock.json index 915367be..ee6cd2ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,18 @@ { "name": "@qwen-code/qwen-code", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@qwen-code/qwen-code", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "workspaces": [ "packages/*" ], + "dependencies": { + "@qwen-code/qwen-code": "^0.0.1-alpha.8" + }, "bin": { "qwen": "bundle/gemini.js" }, @@ -11936,7 +11939,7 @@ }, "packages/cli": { "name": "@qwen-code/qwen-code", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "dependencies": { "@qwen-code/qwen-code-core": "file:../core", "@types/update-notifier": "^6.0.8", @@ -12114,7 +12117,7 @@ }, "packages/core": { "name": "@qwen-code/qwen-code-core", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "dependencies": { "@google/genai": "1.8.0", "@modelcontextprotocol/sdk": "^1.11.0", @@ -12187,7 +12190,7 @@ }, "packages/vscode-ide-companion": { "name": "@qwen-code/qwen-code-vscode-ide-companion", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "dependencies": { "@modelcontextprotocol/sdk": "^1.15.1", "cors": "^2.8.5", diff --git a/package.json b/package.json index 7fae85b1..02ded52b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@qwen-code/qwen-code", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "engines": { "node": ">=20" }, @@ -8,13 +8,12 @@ "workspaces": [ "packages/*" ], - "private": "true", "repository": { "type": "git", "url": "git+http://gitlab.alibaba-inc.com/Qwen-Coder/qwen-code.git" }, "config": { - "sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.0.1-alpha.7" + "sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.0.1-alpha.8" }, "scripts": { "start": "node scripts/start.js", @@ -82,5 +81,8 @@ "typescript-eslint": "^8.30.1", "vitest": "^3.2.4", "yargs": "^18.0.0" + }, + "dependencies": { + "@qwen-code/qwen-code": "^0.0.1-alpha.8" } } diff --git a/packages/cli/package.json b/packages/cli/package.json index ae5d456a..e3e2c43f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@qwen-code/qwen-code", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "description": "Gemini CLI", "repository": { "type": "git", @@ -25,7 +25,7 @@ "dist" ], "config": { - "sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.0.1-alpha.7" + "sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.0.1-alpha.8" }, "dependencies": { "@qwen-code/qwen-code-core": "file:../core", diff --git a/packages/cli/src/ui/components/AuthDialog.test.tsx b/packages/cli/src/ui/components/AuthDialog.test.tsx index 9815fb3d..171912ee 100644 --- a/packages/cli/src/ui/components/AuthDialog.test.tsx +++ b/packages/cli/src/ui/components/AuthDialog.test.tsx @@ -165,7 +165,7 @@ describe('AuthDialog', () => { ); // Since only OpenAI is available, it should be selected by default - expect(lastFrame()).toContain('○ OpenAI'); + expect(lastFrame()).toContain('● OpenAI'); }); it('should fall back to default if GEMINI_DEFAULT_AUTH_TYPE is not set', () => { @@ -188,7 +188,7 @@ describe('AuthDialog', () => { ); // Default is OpenAI (the only option) - expect(lastFrame()).toContain('○ OpenAI'); + expect(lastFrame()).toContain('● OpenAI'); }); it('should show an error and fall back to default if GEMINI_DEFAULT_AUTH_TYPE is invalid', () => { @@ -214,7 +214,7 @@ describe('AuthDialog', () => { // Since the auth dialog doesn't show GEMINI_DEFAULT_AUTH_TYPE errors anymore, // it will just show the default OpenAI option - expect(lastFrame()).toContain('○ OpenAI'); + expect(lastFrame()).toContain('● OpenAI'); }); }); diff --git a/packages/cli/src/ui/components/AuthDialog.tsx b/packages/cli/src/ui/components/AuthDialog.tsx index 4984a1c9..5888fb7e 100644 --- a/packages/cli/src/ui/components/AuthDialog.tsx +++ b/packages/cli/src/ui/components/AuthDialog.tsx @@ -47,24 +47,27 @@ export function AuthDialog({ const [showOpenAIKeyPrompt, setShowOpenAIKeyPrompt] = useState(false); const items = [{ label: 'OpenAI', value: AuthType.USE_OPENAI }]; - const initialAuthIndex = Math.max(0, items.findIndex((item) => { - if (settings.merged.selectedAuthType) { - return item.value === settings.merged.selectedAuthType; - } + const initialAuthIndex = Math.max( + 0, + items.findIndex((item) => { + if (settings.merged.selectedAuthType) { + return item.value === settings.merged.selectedAuthType; + } - const defaultAuthType = parseDefaultAuthType( - process.env.GEMINI_DEFAULT_AUTH_TYPE, - ); - if (defaultAuthType) { - return item.value === defaultAuthType; - } + const defaultAuthType = parseDefaultAuthType( + process.env.GEMINI_DEFAULT_AUTH_TYPE, + ); + if (defaultAuthType) { + return item.value === defaultAuthType; + } - if (process.env.GEMINI_API_KEY) { - return item.value === AuthType.USE_GEMINI; - } + if (process.env.GEMINI_API_KEY) { + return item.value === AuthType.USE_GEMINI; + } - return item.value === AuthType.LOGIN_WITH_GOOGLE; - })); + return item.value === AuthType.LOGIN_WITH_GOOGLE; + }), + ); const handleAuthSelect = (authMethod: AuthType) => { const error = validateAuthMethod(authMethod); diff --git a/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx b/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx index 53bf29fa..d680a825 100644 --- a/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx +++ b/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx @@ -56,7 +56,12 @@ export function RadioButtonSelect({ showScrollArrows = false, maxItemsToShow = 10, }: RadioButtonSelectProps): React.JSX.Element { - const [activeIndex, setActiveIndex] = useState(initialIndex); + // Ensure initialIndex is within bounds + const safeInitialIndex = + items.length > 0 + ? Math.max(0, Math.min(initialIndex, items.length - 1)) + : 0; + const [activeIndex, setActiveIndex] = useState(safeInitialIndex); const [scrollOffset, setScrollOffset] = useState(0); // Ensure activeIndex is always within bounds when items change @@ -102,7 +107,11 @@ export function RadioButtonSelect({ } if (key.return) { // Add bounds check before accessing items[activeIndex] - if (activeIndex >= 0 && activeIndex < items.length && items[activeIndex]) { + if ( + activeIndex >= 0 && + activeIndex < items.length && + items[activeIndex] + ) { onSelect(items[activeIndex].value); } } @@ -118,7 +127,13 @@ export function RadioButtonSelect({ } } }, - { isActive: isFocused && items.length > 0 && activeIndex >= 0 && activeIndex < items.length }, + { + isActive: + isFocused && + items.length > 0 && + activeIndex >= 0 && + activeIndex < items.length, + }, ); const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow); diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index e82fbdad..b4959290 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -1,12 +1,12 @@ { "name": "@google/gemini-cli-core", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@google/gemini-cli-core", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "dependencies": { "@google/genai": "^1.4.0", "@modelcontextprotocol/sdk": "^1.11.0", diff --git a/packages/core/package.json b/packages/core/package.json index 299a2645..c153b202 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@qwen-code/qwen-code-core", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "description": "Qwen Code Core", "repository": { "type": "git", diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 82d1faa3..2ffd0bae 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -27,7 +27,6 @@ import { setGeminiMdFilename, GEMINI_CONFIG_DIR as GEMINI_DIR, } from '../tools/memoryTool.js'; -import { WebSearchTool } from '../tools/web-search.js'; import { GeminiClient } from '../core/client.js'; import { FileDiscoveryService } from '../services/fileDiscoveryService.js'; import { GitService } from '../services/gitService.js'; @@ -601,7 +600,7 @@ export class Config { registerCoreTool(ReadManyFilesTool, this); registerCoreTool(ShellTool, this); registerCoreTool(MemoryTool); - registerCoreTool(WebSearchTool, this); + // registerCoreTool(WebSearchTool, this); // Temporarily disabled await registry.discoverTools(); return registry; diff --git a/packages/vscode-ide-companion/package-lock.json b/packages/vscode-ide-companion/package-lock.json index 2af2a633..bca83126 100644 --- a/packages/vscode-ide-companion/package-lock.json +++ b/packages/vscode-ide-companion/package-lock.json @@ -1,12 +1,12 @@ { "name": "qwen-code-vscode", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "qwen-code-vscode", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "dependencies": { "@modelcontextprotocol/sdk": "^1.15.1", "cors": "^2.8.5", diff --git a/packages/vscode-ide-companion/package.json b/packages/vscode-ide-companion/package.json index 6775ed5b..ee9356b6 100644 --- a/packages/vscode-ide-companion/package.json +++ b/packages/vscode-ide-companion/package.json @@ -2,7 +2,7 @@ "name": "@qwen-code/qwen-code-vscode-ide-companion", "displayName": "Qwen Code VSCode IDE Companion", "description": "", - "version": "0.0.1-alpha.7", + "version": "0.0.1-alpha.8", "engines": { "vscode": "^1.101.0" },