coding-tool-x 3.6.6 → 3.6.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/CHANGELOG.md +7 -0
- package/dist/web/assets/{Analytics-CcGKjDkP.js → Analytics-CKycBI0G.js} +1 -1
- package/dist/web/assets/{ConfigTemplates-DPOa1w5D.js → ConfigTemplates-CACLQb8e.js} +1 -1
- package/dist/web/assets/{Home-BP1LxGtp.js → Home-Bk6sP5Ed.js} +1 -1
- package/dist/web/assets/{PluginManager-BVbHUdey.js → PluginManager-CQJl_uso.js} +1 -1
- package/dist/web/assets/{ProjectList-BQrz2FKo.js → ProjectList-DSkvQFEP.js} +1 -1
- package/dist/web/assets/{SessionList-CRGer64T.js → SessionList-Czjs1GN1.js} +1 -1
- package/dist/web/assets/{SkillManager-BhJKtWYM.js → SkillManager-Cg1xZ5Cv.js} +1 -1
- package/dist/web/assets/{WorkspaceManager-pc6tpF3m.js → WorkspaceManager-COjYeKvN.js} +1 -1
- package/dist/web/assets/index-fWgvlZQx.js +2 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/src/server/services/base/proxy-utils.js +6 -3
- package/dist/web/assets/index-BsdIJwLf.js +0 -2
package/dist/web/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" href="/favicon.ico">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
7
|
<title>coding-tool-x · AI 编程工作台</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-fWgvlZQx.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/markdown-BNJfEgCA.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/vue-vendor-B5RqjEjQ.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/naive-ui-DM897mIP.js">
|
package/package.json
CHANGED
|
@@ -67,10 +67,10 @@ function redirectModel(originalModel, channel, options = {}) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* 解析代理目标 URL,避免
|
|
70
|
+
* 解析代理目标 URL,避免 API 版本段重复
|
|
71
71
|
*
|
|
72
|
-
* 当 baseUrl
|
|
73
|
-
*
|
|
72
|
+
* 当 baseUrl 和请求路径都包含同一个 API 版本段时,去掉 baseUrl 的
|
|
73
|
+
* 版本后缀,因为 http-proxy 会自动拼接 req.url。
|
|
74
74
|
*
|
|
75
75
|
* @param {string} baseUrl - 渠道配置的 base_url
|
|
76
76
|
* @param {string} requestPath - 请求路径
|
|
@@ -81,6 +81,9 @@ function resolveTargetUrl(baseUrl, requestPath) {
|
|
|
81
81
|
if (target.endsWith('/')) {
|
|
82
82
|
target = target.slice(0, -1);
|
|
83
83
|
}
|
|
84
|
+
if (target.endsWith('/v1beta') && requestPath.startsWith('/v1beta')) {
|
|
85
|
+
return target.slice(0, -7);
|
|
86
|
+
}
|
|
84
87
|
if (target.endsWith('/v1') && requestPath.startsWith('/v1')) {
|
|
85
88
|
target = target.slice(0, -3);
|
|
86
89
|
}
|