Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ qwen
### Terminal-Bench

| Agent | Model | Accuracy |
|-----------|--------------------|----------|
| --------- | ------------------ | -------- |
| Qwen Code | Qwen3-Coder-480A35 | 37.5 |

## Project Structure
Expand Down
13 changes: 8 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"name": "@qwen-code/qwen-code",
"version": "0.0.1-alpha.7",
"version": "0.0.1-alpha.8",
"engines": {
"node": ">=20"
},
"type": "module",
"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",
Expand Down Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/ui/components/AuthDialog.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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');
});
});

Expand Down
33 changes: 18 additions & 15 deletions packages/cli/src/ui/components/AuthDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
21 changes: 18 additions & 3 deletions packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ export function RadioButtonSelect<T>({
showScrollArrows = false,
maxItemsToShow = 10,
}: RadioButtonSelectProps<T>): 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
Expand Down Expand Up @@ -102,7 +107,11 @@ export function RadioButtonSelect<T>({
}
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);
}
}
Expand All @@ -118,7 +127,13 @@ export function RadioButtonSelect<T>({
}
}
},
{ 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);
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-ide-companion/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/vscode-ide-companion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down