@jaydennleemc/qwen-code-local 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -31
- package/dist/cli.js +65 -18
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,45 +33,21 @@ Qwen Code is an open-source AI agent for the terminal, optimized for [Qwen3-Code
|
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
#### Linux / macOS
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
bash -c "$(curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh)"
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
#### Windows (Run as Administrator CMD)
|
|
45
|
-
|
|
46
|
-
```cmd
|
|
47
|
-
curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\install-qwen.bat
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
> **Note**: It's recommended to restart your terminal after installation to ensure environment variables take effect.
|
|
51
|
-
|
|
52
|
-
### Manual Installation
|
|
53
|
-
|
|
54
|
-
#### Prerequisites
|
|
36
|
+
### Prerequisites
|
|
55
37
|
|
|
56
38
|
Make sure you have Node.js 20 or later installed. Download it from [nodejs.org](https://nodejs.org/en/download).
|
|
57
39
|
|
|
58
40
|
#### NPM
|
|
59
41
|
|
|
60
42
|
```bash
|
|
61
|
-
npm
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
#### Homebrew (macOS, Linux)
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
brew install qwen-code
|
|
43
|
+
npm i -g @jaydennleemc/qwen-code-local
|
|
68
44
|
```
|
|
69
45
|
|
|
70
46
|
## Quick Start
|
|
71
47
|
|
|
72
48
|
```bash
|
|
73
49
|
# Start Qwen Code (interactive)
|
|
74
|
-
qwen
|
|
50
|
+
qwen-local
|
|
75
51
|
|
|
76
52
|
# Then, in the session:
|
|
77
53
|
/help
|
|
@@ -175,7 +151,7 @@ Here is a complete example:
|
|
|
175
151
|
**Step 3:** Start Qwen Code — your configuration takes effect automatically:
|
|
176
152
|
|
|
177
153
|
```bash
|
|
178
|
-
qwen
|
|
154
|
+
qwen-local
|
|
179
155
|
```
|
|
180
156
|
|
|
181
157
|
Use the `/model` command at any time to switch between all configured models.
|
|
@@ -364,16 +340,16 @@ As an open-source terminal agent, you can use Qwen Code in four primary ways:
|
|
|
364
340
|
|
|
365
341
|
```bash
|
|
366
342
|
cd your-project/
|
|
367
|
-
qwen
|
|
343
|
+
qwen-local
|
|
368
344
|
```
|
|
369
345
|
|
|
370
|
-
Run `qwen` in your project folder to launch the interactive terminal UI. Use `@` to reference local files (for example `@src/main.ts`).
|
|
346
|
+
Run `qwen-local` in your project folder to launch the interactive terminal UI. Use `@` to reference local files (for example `@src/main.ts`).
|
|
371
347
|
|
|
372
348
|
#### Headless mode
|
|
373
349
|
|
|
374
350
|
```bash
|
|
375
351
|
cd your-project/
|
|
376
|
-
qwen -p "your question"
|
|
352
|
+
qwen-local -p "your question"
|
|
377
353
|
```
|
|
378
354
|
|
|
379
355
|
Use `-p` to run Qwen Code without the interactive UI—ideal for scripts, automation, and CI/CD. Learn more: [Headless mode](https://qwenlm.github.io/qwen-code-docs/en/users/features/headless).
|
package/dist/cli.js
CHANGED
|
@@ -157730,7 +157730,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
157730
157730
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
157731
157731
|
});
|
|
157732
157732
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
157733
|
-
const version2 = "0.12.
|
|
157733
|
+
const version2 = "0.12.7";
|
|
157734
157734
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
157735
157735
|
const baseHeaders = {
|
|
157736
157736
|
"User-Agent": userAgent2
|
|
@@ -289777,7 +289777,7 @@ var require_backend = __commonJS({
|
|
|
289777
289777
|
});
|
|
289778
289778
|
return a2._currentValue;
|
|
289779
289779
|
}, "useContext"),
|
|
289780
|
-
useEffect: /* @__PURE__ */ __name(function
|
|
289780
|
+
useEffect: /* @__PURE__ */ __name(function useEffect61(a2) {
|
|
289781
289781
|
C2();
|
|
289782
289782
|
x3.push({
|
|
289783
289783
|
primitive: "Effect",
|
|
@@ -382941,6 +382941,7 @@ __name(saveSettings, "saveSettings");
|
|
|
382941
382941
|
var DEFAULT_ENV_KEYS = {
|
|
382942
382942
|
[AuthType2.USE_OPENAI]: "OPENAI_API_KEY",
|
|
382943
382943
|
[AuthType2.USE_LM_STUDIO]: "LMSTUDIO_API_KEY",
|
|
382944
|
+
[AuthType2.USE_OLLAMA]: "OLLAMA_API_KEY",
|
|
382944
382945
|
[AuthType2.USE_ANTHROPIC]: "ANTHROPIC_API_KEY",
|
|
382945
382946
|
[AuthType2.USE_GEMINI]: "GEMINI_API_KEY",
|
|
382946
382947
|
[AuthType2.USE_VERTEX_AI]: "GOOGLE_API_KEY"
|
|
@@ -383065,6 +383066,9 @@ function validateAuthMethod(authMethod, config2) {
|
|
|
383065
383066
|
}
|
|
383066
383067
|
return null;
|
|
383067
383068
|
}
|
|
383069
|
+
if (authMethod === AuthType2.USE_OLLAMA) {
|
|
383070
|
+
return null;
|
|
383071
|
+
}
|
|
383068
383072
|
if (authMethod === AuthType2.QWEN_OAUTH) {
|
|
383069
383073
|
return null;
|
|
383070
383074
|
}
|
|
@@ -389671,7 +389675,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
389671
389675
|
// packages/cli/src/utils/version.ts
|
|
389672
389676
|
async function getCliVersion() {
|
|
389673
389677
|
const pkgJson = await getPackageJson();
|
|
389674
|
-
return "0.12.
|
|
389678
|
+
return "0.12.7";
|
|
389675
389679
|
}
|
|
389676
389680
|
__name(getCliVersion, "getCliVersion");
|
|
389677
389681
|
|
|
@@ -397235,7 +397239,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
397235
397239
|
|
|
397236
397240
|
// packages/cli/src/generated/git-commit.ts
|
|
397237
397241
|
init_esbuild_shims();
|
|
397238
|
-
var GIT_COMMIT_INFO = "
|
|
397242
|
+
var GIT_COMMIT_INFO = "dbb1e26f0";
|
|
397239
397243
|
|
|
397240
397244
|
// packages/cli/src/utils/systemInfo.ts
|
|
397241
397245
|
async function getNpmVersion() {
|
|
@@ -423921,14 +423925,14 @@ function getPrefixWidth(prefix) {
|
|
|
423921
423925
|
}
|
|
423922
423926
|
__name(getPrefixWidth, "getPrefixWidth");
|
|
423923
423927
|
function parseThinkingContent(text) {
|
|
423924
|
-
const thinkPattern = /<think(ing)
|
|
423928
|
+
const thinkPattern = /<think(?:ing)?[^>]*>([\s\S]*?)<\/think(?:ing)?[^>]*>/gi;
|
|
423925
423929
|
const matches = [...text.matchAll(thinkPattern)];
|
|
423926
423930
|
if (matches.length === 0) {
|
|
423927
423931
|
return { thinkingContent: "", mainContent: text, hasThinking: false };
|
|
423928
423932
|
}
|
|
423929
423933
|
const thinkingParts = [];
|
|
423930
423934
|
for (const match2 of matches) {
|
|
423931
|
-
const content = match2[
|
|
423935
|
+
const content = match2[1]?.trim();
|
|
423932
423936
|
if (content) {
|
|
423933
423937
|
thinkingParts.push(content);
|
|
423934
423938
|
}
|
|
@@ -423937,10 +423941,12 @@ function parseThinkingContent(text) {
|
|
|
423937
423941
|
if (!hasThinking) {
|
|
423938
423942
|
return { thinkingContent: "", mainContent: text, hasThinking: false };
|
|
423939
423943
|
}
|
|
423940
|
-
|
|
423941
|
-
const
|
|
423944
|
+
let mainContent = text;
|
|
423945
|
+
for (const match2 of matches) {
|
|
423946
|
+
mainContent = mainContent.replace(match2[0], "");
|
|
423947
|
+
}
|
|
423948
|
+
mainContent = mainContent.trim();
|
|
423942
423949
|
const thinkingContent = thinkingParts.join("\n") + "\n";
|
|
423943
|
-
const mainContent = text.slice(lastIndex).trim();
|
|
423944
423950
|
return { thinkingContent, mainContent, hasThinking };
|
|
423945
423951
|
}
|
|
423946
423952
|
__name(parseThinkingContent, "parseThinkingContent");
|
|
@@ -435853,6 +435859,7 @@ function AuthDialog() {
|
|
|
435853
435859
|
onAuthError
|
|
435854
435860
|
} = useUIActions();
|
|
435855
435861
|
const config2 = useConfig();
|
|
435862
|
+
const savedConfig = config2.getContentGeneratorConfig();
|
|
435856
435863
|
const [errorMessage, setErrorMessage] = (0, import_react83.useState)(null);
|
|
435857
435864
|
const [viewLevel, setViewLevel] = (0, import_react83.useState)("main");
|
|
435858
435865
|
const [regionIndex, setRegionIndex] = (0, import_react83.useState)(0);
|
|
@@ -435860,22 +435867,51 @@ function AuthDialog() {
|
|
|
435860
435867
|
"china" /* CHINA */
|
|
435861
435868
|
);
|
|
435862
435869
|
const [lmStudioBaseUrl, setLmStudioBaseUrl] = (0, import_react83.useState)(
|
|
435863
|
-
"http://localhost:1234/v1"
|
|
435870
|
+
savedConfig?.baseUrl?.includes("1234") ? savedConfig.baseUrl : "http://localhost:1234/v1"
|
|
435871
|
+
);
|
|
435872
|
+
const [lmStudioApiKey, setLmStudioApiKey] = (0, import_react83.useState)(
|
|
435873
|
+
savedConfig?.apiKey || ""
|
|
435864
435874
|
);
|
|
435865
|
-
const [lmStudioApiKey, setLmStudioApiKey] = (0, import_react83.useState)("");
|
|
435866
435875
|
const [lmStudioStep, setLmStudioStep] = (0, import_react83.useState)(
|
|
435867
435876
|
"baseUrl"
|
|
435868
435877
|
);
|
|
435869
435878
|
const [ollamaBaseUrl, setOllamaBaseUrl] = (0, import_react83.useState)(
|
|
435870
|
-
"http://localhost:11434/v1"
|
|
435879
|
+
savedConfig?.baseUrl?.includes("11434") ? savedConfig.baseUrl : "http://localhost:11434/v1"
|
|
435880
|
+
);
|
|
435881
|
+
const [ollamaApiKey, setOllamaApiKey] = (0, import_react83.useState)(
|
|
435882
|
+
savedConfig?.apiKey || ""
|
|
435871
435883
|
);
|
|
435872
|
-
const [ollamaApiKey, setOllamaApiKey] = (0, import_react83.useState)("");
|
|
435873
435884
|
const [ollamaStep, setOllamaStep] = (0, import_react83.useState)(
|
|
435874
435885
|
"baseUrl"
|
|
435875
435886
|
);
|
|
435876
435887
|
const [ollamaModels, setOllamaModels] = (0, import_react83.useState)([]);
|
|
435877
435888
|
const [loadingOllamaModels, setLoadingOllamaModels] = (0, import_react83.useState)(false);
|
|
435878
|
-
const [selectedOllamaModel, setSelectedOllamaModel] = (0, import_react83.useState)(
|
|
435889
|
+
const [selectedOllamaModel, setSelectedOllamaModel] = (0, import_react83.useState)(
|
|
435890
|
+
savedConfig?.model || ""
|
|
435891
|
+
);
|
|
435892
|
+
(0, import_react83.useEffect)(() => {
|
|
435893
|
+
const currentAuthType = config2.getAuthType();
|
|
435894
|
+
const contentGenConfig2 = config2.getContentGeneratorConfig();
|
|
435895
|
+
if (currentAuthType === AuthType2.USE_LM_STUDIO && contentGenConfig2) {
|
|
435896
|
+
if (contentGenConfig2.baseUrl) {
|
|
435897
|
+
setLmStudioBaseUrl(contentGenConfig2.baseUrl);
|
|
435898
|
+
}
|
|
435899
|
+
if (contentGenConfig2.apiKey) {
|
|
435900
|
+
setLmStudioApiKey(contentGenConfig2.apiKey);
|
|
435901
|
+
}
|
|
435902
|
+
}
|
|
435903
|
+
if (currentAuthType === AuthType2.USE_OLLAMA && contentGenConfig2) {
|
|
435904
|
+
if (contentGenConfig2.baseUrl) {
|
|
435905
|
+
setOllamaBaseUrl(contentGenConfig2.baseUrl);
|
|
435906
|
+
}
|
|
435907
|
+
if (contentGenConfig2.apiKey) {
|
|
435908
|
+
setOllamaApiKey(contentGenConfig2.apiKey);
|
|
435909
|
+
}
|
|
435910
|
+
if (contentGenConfig2.model) {
|
|
435911
|
+
setSelectedOllamaModel(contentGenConfig2.model);
|
|
435912
|
+
}
|
|
435913
|
+
}
|
|
435914
|
+
}, [config2]);
|
|
435879
435915
|
const mainItems = [
|
|
435880
435916
|
{
|
|
435881
435917
|
key: AuthType2.QWEN_OAUTH,
|
|
@@ -436071,11 +436107,11 @@ function AuthDialog() {
|
|
|
436071
436107
|
setLoadingOllamaModels(false);
|
|
436072
436108
|
}
|
|
436073
436109
|
}, "handleOllamaSubmit");
|
|
436074
|
-
const handleOllamaModelSelect = /* @__PURE__ */ __name(async () => {
|
|
436110
|
+
const handleOllamaModelSelect = /* @__PURE__ */ __name(async (model) => {
|
|
436075
436111
|
await onAuthSelect(AuthType2.USE_OLLAMA, {
|
|
436076
436112
|
apiKey: ollamaApiKey,
|
|
436077
436113
|
baseUrl: ollamaBaseUrl,
|
|
436078
|
-
model
|
|
436114
|
+
model
|
|
436079
436115
|
});
|
|
436080
436116
|
}, "handleOllamaModelSelect");
|
|
436081
436117
|
const handleGoBack = /* @__PURE__ */ __name(() => {
|
|
@@ -436267,7 +436303,7 @@ function AuthDialog() {
|
|
|
436267
436303
|
initialIndex: ollamaModels.indexOf(selectedOllamaModel),
|
|
436268
436304
|
onSelect: (val) => {
|
|
436269
436305
|
setSelectedOllamaModel(val);
|
|
436270
|
-
handleOllamaModelSelect();
|
|
436306
|
+
handleOllamaModelSelect(val);
|
|
436271
436307
|
},
|
|
436272
436308
|
maxItemsToShow: 5
|
|
436273
436309
|
}
|
|
@@ -443369,6 +443405,17 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem, onAuthC
|
|
|
443369
443405
|
settings.user.originalSettings
|
|
443370
443406
|
);
|
|
443371
443407
|
}
|
|
443408
|
+
if (authType === AuthType2.USE_LM_STUDIO && credentials.model) {
|
|
443409
|
+
const authTypeScope = getPersistScopeForModelSelection(settings);
|
|
443410
|
+
settings.setValue(authTypeScope, "security.auth", {
|
|
443411
|
+
selectedType: authType
|
|
443412
|
+
});
|
|
443413
|
+
settings.setValue(authTypeScope, "model.name", credentials.model);
|
|
443414
|
+
updateSettingsFilePreservingFormat(
|
|
443415
|
+
settings.user.path,
|
|
443416
|
+
settings.user.originalSettings
|
|
443417
|
+
);
|
|
443418
|
+
}
|
|
443372
443419
|
await performAuth(authType, credentials);
|
|
443373
443420
|
}
|
|
443374
443421
|
return;
|
|
@@ -456204,7 +456251,7 @@ var QwenAgent = class {
|
|
|
456204
456251
|
async initialize(args) {
|
|
456205
456252
|
this.clientCapabilities = args.clientCapabilities;
|
|
456206
456253
|
const authMethods = buildAuthMethods();
|
|
456207
|
-
const version2 = "0.12.
|
|
456254
|
+
const version2 = "0.12.7";
|
|
456208
456255
|
return {
|
|
456209
456256
|
protocolVersion: PROTOCOL_VERSION,
|
|
456210
456257
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaydennleemc/qwen-code-local",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.0.0"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "git+https://github.com/jaydennleemc/qwen-code.git"
|
|
14
14
|
},
|
|
15
15
|
"config": {
|
|
16
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.12.
|
|
16
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.12.7"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"start": "cross-env node scripts/start.js",
|