yingclaw 2.0.0 → 2.0.1
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 +4 -4
- package/lib/desktop.js +15 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ claw code
|
|
|
40
40
|
```bash
|
|
41
41
|
claw desktop
|
|
42
42
|
```
|
|
43
|
-
将当前模型配置写入 Claude Desktop 的第三方推理(Cowork on 3P)本地配置。macOS
|
|
43
|
+
将当前模型配置写入 Claude Desktop 的第三方推理(Cowork on 3P)本地配置。macOS 会自动重启并打开 Claude 桌面应用;Windows 需要手动重新打开。如果配置未生效,请完全退出 Claude Desktop 后重新打开。
|
|
44
44
|
|
|
45
45
|
恢复 Claude Code 终端默认配置:
|
|
46
46
|
```bash
|
|
@@ -124,10 +124,10 @@ npm uninstall -g yingclaw
|
|
|
124
124
|
|
|
125
125
|
`claw desktop` 会额外写入 Claude Desktop 第三方推理配置:
|
|
126
126
|
|
|
127
|
-
- macOS:`~/Library/Application Support/Claude-3p/
|
|
128
|
-
- Windows:`%
|
|
127
|
+
- macOS:`~/Library/Application Support/Claude-3p/configLibrary/`
|
|
128
|
+
- Windows:`%LOCALAPPDATA%\Claude-3p\configLibrary`
|
|
129
129
|
|
|
130
|
-
写入的 `enterpriseConfig` 使用 `inferenceProvider=gateway`、`inferenceGatewayAuthScheme=bearer
|
|
130
|
+
写入的 `enterpriseConfig` 使用 `inferenceProvider=gateway`、`inferenceGatewayAuthScheme=bearer`,并把可用于 Claude 桌面的模型路由写入 `inferenceModels`。DeepSeek 的终端模型仍使用 `deepseek-v4-pro[1m]` / `deepseek-v4-flash`;Claude 桌面应用会使用 DeepSeek 支持的 Anthropic 路由名:`claude-sonnet-4-5`、`claude-opus-4-5`、`claude-haiku-4-5`。
|
|
131
131
|
|
|
132
132
|
## License
|
|
133
133
|
|
package/lib/desktop.js
CHANGED
|
@@ -45,11 +45,24 @@ function readJsonFile(file) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
function
|
|
48
|
+
function isDeepSeekConfig(config) {
|
|
49
|
+
const baseUrl = normalizeAnthropicBaseUrl(config.baseUrl);
|
|
50
|
+
return config.provider === 'deepseek' || baseUrl === 'https://api.deepseek.com/anthropic';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getDesktopGatewayModels(config) {
|
|
54
|
+
if (isDeepSeekConfig(config)) {
|
|
55
|
+
return ['claude-sonnet-4-5', 'claude-opus-4-5', 'claude-haiku-4-5'];
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
const list = Array.isArray(config.availableModels) && config.availableModels.length > 0
|
|
50
59
|
? [config.model, config.fastModel, ...config.availableModels]
|
|
51
60
|
: [config.model, config.fastModel];
|
|
52
|
-
return
|
|
61
|
+
return list.filter(Boolean);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function collectModels(config) {
|
|
65
|
+
return [...new Set(getDesktopGatewayModels(config))];
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
// 按官方 schema:所有值必须是字符串(包括布尔、数组都序列化)
|