@eddyskywalker/dsh-chatgpt-subscription 0.22.0 → 0.23.0
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 +19 -0
- package/README.md +5 -2
- package/lib/client.js +100 -17
- package/lib/client.js.map +1 -1
- package/lib/index.js +385 -520
- package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts.map +1 -1
- package/lib/types/client/glm-coding-plan/locales.d.ts +8 -11
- package/lib/types/client/glm-coding-plan/locales.d.ts.map +1 -1
- package/lib/types/client/ollama/OllamaSection.d.ts.map +1 -1
- package/lib/types/client/ollama/api.d.ts +13 -0
- package/lib/types/client/ollama/api.d.ts.map +1 -1
- package/lib/types/client/ollama/locales.d.ts +24 -0
- package/lib/types/client/ollama/locales.d.ts.map +1 -1
- package/lib/types/client/step-code/locales.d.ts +2 -2
- package/lib/types/host/glm-coding-plan/adapter.d.ts +1 -14
- package/lib/types/host/glm-coding-plan/adapter.d.ts.map +1 -1
- package/lib/types/host/glm-coding-plan/client.d.ts.map +1 -1
- package/lib/types/host/glm-coding-plan/types.d.ts +0 -10
- package/lib/types/host/glm-coding-plan/types.d.ts.map +1 -1
- package/lib/types/host/ollama/adapter.d.ts +26 -2
- package/lib/types/host/ollama/adapter.d.ts.map +1 -1
- package/lib/types/host/ollama/client.d.ts +16 -1
- package/lib/types/host/ollama/client.d.ts.map +1 -1
- package/lib/types/host/ollama/routes.d.ts +1 -1
- package/lib/types/host/ollama/routes.d.ts.map +1 -1
- package/lib/types/host/ollama/types.d.ts +74 -8
- package/lib/types/host/ollama/types.d.ts.map +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/ollama-contracts.d.ts +30 -0
- package/lib/types/shared/ollama-contracts.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/types/host/glm-coding-plan/signing.d.ts +0 -323
- package/lib/types/host/glm-coding-plan/signing.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlmCodingPlanSection.d.ts","sourceRoot":"","sources":["../../../../src/client/glm-coding-plan/GlmCodingPlanSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAA2B,KAAK,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAOtG,wBAAgB,oBAAoB,CAAC,EAAE,aAAa,EAAE,GAAE,yBAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"GlmCodingPlanSection.d.ts","sourceRoot":"","sources":["../../../../src/client/glm-coding-plan/GlmCodingPlanSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAA2B,KAAK,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAOtG,wBAAgB,oBAAoB,CAAC,EAAE,aAAa,EAAE,GAAE,yBAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwazG"}
|
|
@@ -82,7 +82,7 @@ export declare const zh: {
|
|
|
82
82
|
readonly saved: "已保存";
|
|
83
83
|
readonly invalidCapacity: "容量格式无效:{value}";
|
|
84
84
|
readonly quotaSection: "用量与配额";
|
|
85
|
-
readonly quotaDesc: "数据来自 Coding Plan
|
|
85
|
+
readonly quotaDesc: "数据来自 Coding Plan 的配额接口,页面可见时最多每 60 秒刷新一次。";
|
|
86
86
|
readonly quotaRefresh: "刷新用量";
|
|
87
87
|
readonly quotaRefreshing: "刷新中...";
|
|
88
88
|
readonly quotaSignedOut: "未登录,先在上方完成登录授权。";
|
|
@@ -92,14 +92,13 @@ export declare const zh: {
|
|
|
92
92
|
readonly quotaRenews: "续费时间";
|
|
93
93
|
readonly quotaReadAt: "读取时间";
|
|
94
94
|
readonly quotaSources: "数据源";
|
|
95
|
-
readonly quotaWindowNames: "窗口名按窗口长度本地化(5 小时 / 1 周 / 1 月),不在本页硬编码;每个账号自己的进度条画在它的账号卡片里。";
|
|
96
95
|
readonly quotaRefreshingNote: "正在后台刷新配额,下方是上一次读到的数字。";
|
|
97
96
|
readonly quotaErrorLabel: "配额读取失败";
|
|
98
97
|
readonly quotaAllowance: "额度类型";
|
|
99
98
|
readonly quotaAllowancePlan: "付费套餐";
|
|
100
99
|
readonly quotaAllowanceFreeTrial: "免费体验额度";
|
|
101
100
|
readonly quotaAllowanceUnknown: "未判定";
|
|
102
|
-
readonly quotaAllowanceHint: "
|
|
101
|
+
readonly quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。";
|
|
103
102
|
readonly accountPool: string;
|
|
104
103
|
readonly addAccount: string;
|
|
105
104
|
readonly accountCount: string;
|
|
@@ -208,7 +207,7 @@ export declare const dictionaries: {
|
|
|
208
207
|
readonly saved: "已保存";
|
|
209
208
|
readonly invalidCapacity: "容量格式无效:{value}";
|
|
210
209
|
readonly quotaSection: "用量与配额";
|
|
211
|
-
readonly quotaDesc: "数据来自 Coding Plan
|
|
210
|
+
readonly quotaDesc: "数据来自 Coding Plan 的配额接口,页面可见时最多每 60 秒刷新一次。";
|
|
212
211
|
readonly quotaRefresh: "刷新用量";
|
|
213
212
|
readonly quotaRefreshing: "刷新中...";
|
|
214
213
|
readonly quotaSignedOut: "未登录,先在上方完成登录授权。";
|
|
@@ -218,14 +217,13 @@ export declare const dictionaries: {
|
|
|
218
217
|
readonly quotaRenews: "续费时间";
|
|
219
218
|
readonly quotaReadAt: "读取时间";
|
|
220
219
|
readonly quotaSources: "数据源";
|
|
221
|
-
readonly quotaWindowNames: "窗口名按窗口长度本地化(5 小时 / 1 周 / 1 月),不在本页硬编码;每个账号自己的进度条画在它的账号卡片里。";
|
|
222
220
|
readonly quotaRefreshingNote: "正在后台刷新配额,下方是上一次读到的数字。";
|
|
223
221
|
readonly quotaErrorLabel: "配额读取失败";
|
|
224
222
|
readonly quotaAllowance: "额度类型";
|
|
225
223
|
readonly quotaAllowancePlan: "付费套餐";
|
|
226
224
|
readonly quotaAllowanceFreeTrial: "免费体验额度";
|
|
227
225
|
readonly quotaAllowanceUnknown: "未判定";
|
|
228
|
-
readonly quotaAllowanceHint: "
|
|
226
|
+
readonly quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。";
|
|
229
227
|
readonly accountPool: string;
|
|
230
228
|
readonly addAccount: string;
|
|
231
229
|
readonly accountCount: string;
|
|
@@ -332,7 +330,7 @@ export declare const dictionaries: {
|
|
|
332
330
|
readonly saved: "已保存";
|
|
333
331
|
readonly invalidCapacity: "容量格式无效:{value}";
|
|
334
332
|
readonly quotaSection: "用量与配额";
|
|
335
|
-
readonly quotaDesc: "数据来自 Coding Plan
|
|
333
|
+
readonly quotaDesc: "数据来自 Coding Plan 的配额接口,页面可见时最多每 60 秒刷新一次。";
|
|
336
334
|
readonly quotaRefresh: "刷新用量";
|
|
337
335
|
readonly quotaRefreshing: "刷新中...";
|
|
338
336
|
readonly quotaSignedOut: "未登录,先在上方完成登录授权。";
|
|
@@ -342,14 +340,13 @@ export declare const dictionaries: {
|
|
|
342
340
|
readonly quotaRenews: "续费时间";
|
|
343
341
|
readonly quotaReadAt: "读取时间";
|
|
344
342
|
readonly quotaSources: "数据源";
|
|
345
|
-
readonly quotaWindowNames: "窗口名按窗口长度本地化(5 小时 / 1 周 / 1 月),不在本页硬编码;每个账号自己的进度条画在它的账号卡片里。";
|
|
346
343
|
readonly quotaRefreshingNote: "正在后台刷新配额,下方是上一次读到的数字。";
|
|
347
344
|
readonly quotaErrorLabel: "配额读取失败";
|
|
348
345
|
readonly quotaAllowance: "额度类型";
|
|
349
346
|
readonly quotaAllowancePlan: "付费套餐";
|
|
350
347
|
readonly quotaAllowanceFreeTrial: "免费体验额度";
|
|
351
348
|
readonly quotaAllowanceUnknown: "未判定";
|
|
352
|
-
readonly quotaAllowanceHint: "
|
|
349
|
+
readonly quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。";
|
|
353
350
|
readonly accountPool: string;
|
|
354
351
|
readonly addAccount: string;
|
|
355
352
|
readonly accountCount: string;
|
|
@@ -381,8 +378,8 @@ export declare const dictionaries: {
|
|
|
381
378
|
readonly quotaFactsScope: string;
|
|
382
379
|
readonly composerLabel: string;
|
|
383
380
|
};
|
|
384
|
-
en: Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptSecretUnavailable" | "adoptDecryptFailed" | "adoptTokenExpired" | "adoptExchangeFailed" | "adoptNotAZcodeLogin" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaPlanLevel" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "
|
|
385
|
-
'en-US': Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptSecretUnavailable" | "adoptDecryptFailed" | "adoptTokenExpired" | "adoptExchangeFailed" | "adoptNotAZcodeLogin" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaPlanLevel" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "
|
|
381
|
+
en: Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptSecretUnavailable" | "adoptDecryptFailed" | "adoptTokenExpired" | "adoptExchangeFailed" | "adoptNotAZcodeLogin" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaPlanLevel" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "quotaRefreshingNote" | "quotaErrorLabel" | "quotaAllowance" | "quotaAllowancePlan" | "quotaAllowanceFreeTrial" | "quotaAllowanceUnknown" | "quotaAllowanceHint", string>;
|
|
382
|
+
'en-US': Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptSecretUnavailable" | "adoptDecryptFailed" | "adoptTokenExpired" | "adoptExchangeFailed" | "adoptNotAZcodeLogin" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaPlanLevel" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "quotaRefreshingNote" | "quotaErrorLabel" | "quotaAllowance" | "quotaAllowancePlan" | "quotaAllowanceFreeTrial" | "quotaAllowanceUnknown" | "quotaAllowanceHint", string>;
|
|
386
383
|
};
|
|
387
384
|
export type GlmCodingPlanLocaleKey = keyof typeof zh;
|
|
388
385
|
/** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/glm-coding-plan/locales.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAEvH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,wBAAwB,CAAA;AAEvD,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/glm-coding-plan/locales.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,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
|
|
1
|
-
{"version":3,"file":"OllamaSection.d.ts","sourceRoot":"","sources":["../../../../src/client/ollama/OllamaSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"OllamaSection.d.ts","sourceRoot":"","sources":["../../../../src/client/ollama/OllamaSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AA6B/D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAuR9D"}
|
|
@@ -22,6 +22,19 @@ export declare class OllamaApi {
|
|
|
22
22
|
refreshCatalog(): Promise<{
|
|
23
23
|
models: unknown[];
|
|
24
24
|
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Store the default thinking level, answering with the refreshed status.
|
|
27
|
+
*
|
|
28
|
+
* '/settings' replies with the stored settings document rather than with the
|
|
29
|
+
* status the card renders, so the status is re-read behind the write. That is
|
|
30
|
+
* the same shape {@link refreshCatalog} needs, and it is why the return type is
|
|
31
|
+
* a status: handing the settings document to the renderer would blank the
|
|
32
|
+
* model list the user just configured.
|
|
33
|
+
*
|
|
34
|
+
* null is a real value ('do not specify'), not an absent one, so it is sent
|
|
35
|
+
* explicitly rather than left out of the body.
|
|
36
|
+
*/
|
|
37
|
+
setDefaultReasoningEffort(effort: string | null): Promise<OllamaWebStatus>;
|
|
25
38
|
/**
|
|
26
39
|
* Replace the enabled-model selection.
|
|
27
40
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/client/ollama/api.ts"],"names":[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;IAI3B,cAAc,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;IAIhD;;;;;;;;;;;OAWG;IACH,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC;IAK1E;;;;;;OAMG;IACH,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC;QAAE,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;KAAE,CAAC;CAGlG"}
|
|
@@ -29,6 +29,10 @@ export declare const zh: {
|
|
|
29
29
|
readonly selectAll: "全选";
|
|
30
30
|
readonly unselectAll: "全不选";
|
|
31
31
|
readonly noneSelected: "未选择任何模型,该线路不会出现在模型选择器中。";
|
|
32
|
+
readonly enhanced: "增强功能";
|
|
33
|
+
readonly defaultReasoningEffort: "默认思考档位";
|
|
34
|
+
readonly defaultReasoningEffortHint: "只对支持思考控制的模型生效。具体可选档位由模型自身决定:gpt-oss 一类只接受 low / medium / high,deepseek-r1 一类只有开或关,其余模型不接受思考控制,Host 会按模型形态收敛。选「不指定」时使用模型自身的默认值。";
|
|
35
|
+
readonly defaultEffortAuto: "不指定";
|
|
32
36
|
readonly limitsSection: "能力边界";
|
|
33
37
|
readonly limitsHint: "以下为 Ollama Cloud 官方文档列出的限制,本线路不会绕过:";
|
|
34
38
|
readonly limitNoStateful: "不支持 Responses 的有状态会话(仅无状态形式)。";
|
|
@@ -102,6 +106,10 @@ export declare const en: {
|
|
|
102
106
|
readonly selectAll: "Select all";
|
|
103
107
|
readonly unselectAll: "Clear all";
|
|
104
108
|
readonly noneSelected: "No models are selected, so this line will not appear in the model picker.";
|
|
109
|
+
readonly enhanced: "Enhanced";
|
|
110
|
+
readonly defaultReasoningEffort: "Default thinking level";
|
|
111
|
+
readonly defaultReasoningEffortHint: "Applies only to models that accept thinking control. The levels a model can take are its own: the gpt-oss family takes low / medium / high, the deepseek-r1 family takes only on or off, and the rest take no thinking control at all — the Host narrows the stored level to what the target model accepts. Choose \"Do not specify\" to leave each model on its own default.";
|
|
112
|
+
readonly defaultEffortAuto: "Do not specify";
|
|
105
113
|
readonly limitsSection: "Documented limits";
|
|
106
114
|
readonly limitsHint: "Ollama Cloud documents these limits; this line does not work around them:";
|
|
107
115
|
readonly limitNoStateful: "No stateful Responses (stateless only).";
|
|
@@ -176,6 +184,10 @@ export declare const dictionaries: {
|
|
|
176
184
|
readonly selectAll: "全选";
|
|
177
185
|
readonly unselectAll: "全不选";
|
|
178
186
|
readonly noneSelected: "未选择任何模型,该线路不会出现在模型选择器中。";
|
|
187
|
+
readonly enhanced: "增强功能";
|
|
188
|
+
readonly defaultReasoningEffort: "默认思考档位";
|
|
189
|
+
readonly defaultReasoningEffortHint: "只对支持思考控制的模型生效。具体可选档位由模型自身决定:gpt-oss 一类只接受 low / medium / high,deepseek-r1 一类只有开或关,其余模型不接受思考控制,Host 会按模型形态收敛。选「不指定」时使用模型自身的默认值。";
|
|
190
|
+
readonly defaultEffortAuto: "不指定";
|
|
179
191
|
readonly limitsSection: "能力边界";
|
|
180
192
|
readonly limitsHint: "以下为 Ollama Cloud 官方文档列出的限制,本线路不会绕过:";
|
|
181
193
|
readonly limitNoStateful: "不支持 Responses 的有状态会话(仅无状态形式)。";
|
|
@@ -249,6 +261,10 @@ export declare const dictionaries: {
|
|
|
249
261
|
readonly selectAll: "全选";
|
|
250
262
|
readonly unselectAll: "全不选";
|
|
251
263
|
readonly noneSelected: "未选择任何模型,该线路不会出现在模型选择器中。";
|
|
264
|
+
readonly enhanced: "增强功能";
|
|
265
|
+
readonly defaultReasoningEffort: "默认思考档位";
|
|
266
|
+
readonly defaultReasoningEffortHint: "只对支持思考控制的模型生效。具体可选档位由模型自身决定:gpt-oss 一类只接受 low / medium / high,deepseek-r1 一类只有开或关,其余模型不接受思考控制,Host 会按模型形态收敛。选「不指定」时使用模型自身的默认值。";
|
|
267
|
+
readonly defaultEffortAuto: "不指定";
|
|
252
268
|
readonly limitsSection: "能力边界";
|
|
253
269
|
readonly limitsHint: "以下为 Ollama Cloud 官方文档列出的限制,本线路不会绕过:";
|
|
254
270
|
readonly limitNoStateful: "不支持 Responses 的有状态会话(仅无状态形式)。";
|
|
@@ -322,6 +338,10 @@ export declare const dictionaries: {
|
|
|
322
338
|
readonly selectAll: "Select all";
|
|
323
339
|
readonly unselectAll: "Clear all";
|
|
324
340
|
readonly noneSelected: "No models are selected, so this line will not appear in the model picker.";
|
|
341
|
+
readonly enhanced: "Enhanced";
|
|
342
|
+
readonly defaultReasoningEffort: "Default thinking level";
|
|
343
|
+
readonly defaultReasoningEffortHint: "Applies only to models that accept thinking control. The levels a model can take are its own: the gpt-oss family takes low / medium / high, the deepseek-r1 family takes only on or off, and the rest take no thinking control at all — the Host narrows the stored level to what the target model accepts. Choose \"Do not specify\" to leave each model on its own default.";
|
|
344
|
+
readonly defaultEffortAuto: "Do not specify";
|
|
325
345
|
readonly limitsSection: "Documented limits";
|
|
326
346
|
readonly limitsHint: "Ollama Cloud documents these limits; this line does not work around them:";
|
|
327
347
|
readonly limitNoStateful: "No stateful Responses (stateless only).";
|
|
@@ -395,6 +415,10 @@ export declare const dictionaries: {
|
|
|
395
415
|
readonly selectAll: "Select all";
|
|
396
416
|
readonly unselectAll: "Clear all";
|
|
397
417
|
readonly noneSelected: "No models are selected, so this line will not appear in the model picker.";
|
|
418
|
+
readonly enhanced: "Enhanced";
|
|
419
|
+
readonly defaultReasoningEffort: "Default thinking level";
|
|
420
|
+
readonly defaultReasoningEffortHint: "Applies only to models that accept thinking control. The levels a model can take are its own: the gpt-oss family takes low / medium / high, the deepseek-r1 family takes only on or off, and the rest take no thinking control at all — the Host narrows the stored level to what the target model accepts. Choose \"Do not specify\" to leave each model on its own default.";
|
|
421
|
+
readonly defaultEffortAuto: "Do not specify";
|
|
398
422
|
readonly limitsSection: "Documented limits";
|
|
399
423
|
readonly limitsHint: "Ollama Cloud documents these limits; this line does not work around them:";
|
|
400
424
|
readonly limitNoStateful: "No stateful Responses (stateless only).";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/ollama/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,eAAe,CAAA;AAErC,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/ollama/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,eAAe,CAAA;AAErC,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDL,CAAA;AAIV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -597,8 +597,8 @@ export declare const dictionaries: {
|
|
|
597
597
|
readonly quotaFactsScope: string;
|
|
598
598
|
readonly composerLabel: string;
|
|
599
599
|
};
|
|
600
|
-
en: Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheRequests" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "
|
|
601
|
-
'en-US': Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheRequests" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "
|
|
600
|
+
en: Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheRequests" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "quotaRefreshingNote" | "quotaErrorLabel" | "profile" | "cacheRequestParams" | "moreNotes" | "profileStepPlan" | "profileStepPlanOversea" | "profilePlatformCn" | "profilePlatformOversea" | "profileHint" | "profileHintExtra" | "adoptInvalidCredentials" | "adoptUnsupportedShape" | "adoptNotAStepcodeLogin" | "modelsHintExtra" | "enabledModelIdsSemantics" | "defaultEffort" | "defaultEffortHint" | "defaultEffortHintExtra" | "defaultEffortModel" | "effortMinimal" | "contextWindowHintExtra" | "quotaPlanFamily" | "quotaRegion" | "quotaWindowNames" | "quotaNoReset" | "quotaUsedUnknown" | "quotaKindWindowed" | "quotaKindCredit" | "quotaKindUnknown" | "quotaKindHint" | "quotaWindowFiveHour" | "quotaWindowWeekly" | "quotaWindowCredit" | "quotaBucketTotal" | "quotaBucketRemaining" | "quotaBucketExpires" | "quotaBucketResets" | "quotaCredentialSection" | "quotaCredentialSource" | "quotaCredentialFoot" | "quotaCredentialNone" | "quotaCredentialAuto" | "quotaCredentialManual" | "quotaCredentialAccount" | "quotaCredentialExpires" | "quotaCredentialError" | "quotaCredentialPasswordSection" | "quotaCredentialAccountPlaceholder" | "quotaCredentialPasswordPlaceholder" | "quotaCredentialPasswordSubmit" | "quotaCredentialPasswordSubmitting" | "quotaCredentialAccountEmpty" | "quotaCredentialPasswordEmpty" | "quotaCredentialManualSection" | "quotaCredentialTokenPlaceholder" | "quotaCredentialTokenSubmit" | "quotaCredentialTokenSubmitting" | "quotaCredentialTokenEmpty" | "quotaCredentialClear" | "quotaCredentialClearing" | "cacheStatScope" | "cacheFieldOrder" | "cacheReadTokens" | "cacheMissedTokens" | "cacheWriteNote" | "cacheWriteNoteValue" | "cacheWriteNoteHint" | "cacheRequestParamsHint" | "cacheRequestParamsNote" | "cacheRequestParamsOnHint" | "cachePricingNote" | "cacheHitRatioUnavailable", string>;
|
|
601
|
+
'en-US': Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheRequests" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "adoptedBadge" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "adopt" | "region" | "regionCn" | "regionIntl" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "restartLogin" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptFallback" | "testSuccessAccount" | "testSuccessModel" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaPlan" | "quotaRenews" | "quotaReadAt" | "quotaSources" | "quotaRefreshingNote" | "quotaErrorLabel" | "profile" | "cacheRequestParams" | "moreNotes" | "profileStepPlan" | "profileStepPlanOversea" | "profilePlatformCn" | "profilePlatformOversea" | "profileHint" | "profileHintExtra" | "adoptInvalidCredentials" | "adoptUnsupportedShape" | "adoptNotAStepcodeLogin" | "modelsHintExtra" | "enabledModelIdsSemantics" | "defaultEffort" | "defaultEffortHint" | "defaultEffortHintExtra" | "defaultEffortModel" | "effortMinimal" | "contextWindowHintExtra" | "quotaPlanFamily" | "quotaRegion" | "quotaWindowNames" | "quotaNoReset" | "quotaUsedUnknown" | "quotaKindWindowed" | "quotaKindCredit" | "quotaKindUnknown" | "quotaKindHint" | "quotaWindowFiveHour" | "quotaWindowWeekly" | "quotaWindowCredit" | "quotaBucketTotal" | "quotaBucketRemaining" | "quotaBucketExpires" | "quotaBucketResets" | "quotaCredentialSection" | "quotaCredentialSource" | "quotaCredentialFoot" | "quotaCredentialNone" | "quotaCredentialAuto" | "quotaCredentialManual" | "quotaCredentialAccount" | "quotaCredentialExpires" | "quotaCredentialError" | "quotaCredentialPasswordSection" | "quotaCredentialAccountPlaceholder" | "quotaCredentialPasswordPlaceholder" | "quotaCredentialPasswordSubmit" | "quotaCredentialPasswordSubmitting" | "quotaCredentialAccountEmpty" | "quotaCredentialPasswordEmpty" | "quotaCredentialManualSection" | "quotaCredentialTokenPlaceholder" | "quotaCredentialTokenSubmit" | "quotaCredentialTokenSubmitting" | "quotaCredentialTokenEmpty" | "quotaCredentialClear" | "quotaCredentialClearing" | "cacheStatScope" | "cacheFieldOrder" | "cacheReadTokens" | "cacheMissedTokens" | "cacheWriteNote" | "cacheWriteNoteValue" | "cacheWriteNoteHint" | "cacheRequestParamsHint" | "cacheRequestParamsNote" | "cacheRequestParamsOnHint" | "cachePricingNote" | "cacheHitRatioUnavailable", string>;
|
|
602
602
|
};
|
|
603
603
|
export type StepCodeLocaleKey = keyof typeof zh;
|
|
604
604
|
/**
|
|
@@ -10,14 +10,11 @@
|
|
|
10
10
|
* Chat Completions 线,`null`(目录没有转录过的 id)**拒绝这个模型**——挑错的表现是
|
|
11
11
|
* 1212 `WRONG_METHOD`,比直接拒绝更难排查。
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* 另外两件事也刻意留在这里而不是散进两个 mapper:
|
|
14
14
|
*
|
|
15
15
|
* - **ladder 由本层传入**:`glmEffortForLadder` / `buildChatRequest` 只收敛,不查目录。
|
|
16
16
|
* 梯子来自 `GlmModelOption.reasoningEfforts`,空数组 = 该模型完全不发思考控制
|
|
17
17
|
* (**有意语义**,不是 bug)。
|
|
18
|
-
* - **签名层就地合并**:`applyGlmClientSigning` 门控关闭时原样返回、零网络请求,
|
|
19
|
-
* 所以这里不写任何 `if`。sessionId 在一个适配器实例的生命周期内固定复用,
|
|
20
|
-
* 每次新生成会让 PoW seed 与签名串都变。
|
|
21
18
|
* - **冷却键看状态码 429 与正文里的重置时刻**,而不是只看 `code`。冻结的错误码表里
|
|
22
19
|
* 七条 429 有五条是额度类(`USAGE_LIMIT` / `PLAN_LIMIT` / `NO_BALANCE` / `PLAN_EXPIRED` /
|
|
23
20
|
* `MODEL_NOT_IN_PLAN`),它们不可重试,而「`code === 'RATE_LIMIT'` 才冷却」会让
|
|
@@ -125,16 +122,6 @@ export declare class GlmCodingPlanAdapter extends LlmAdapter {
|
|
|
125
122
|
private readonly preferences;
|
|
126
123
|
private readonly accountPool;
|
|
127
124
|
private readonly options;
|
|
128
|
-
/**
|
|
129
|
-
* 签名器:每个适配器实例一个。
|
|
130
|
-
*
|
|
131
|
-
* 握手结果与私钥按凭据缓存,而一个池里可以同时有两区多个账号,所以做成实例级而不是模块级单例。
|
|
132
|
-
* 默认门控关闭时它从不被用到(`applyGlmClientSigning` 直接原样返回),
|
|
133
|
-
* 换凭据时也不需要手动清——因为它按 `apiKey` 派生缓存键。
|
|
134
|
-
*/
|
|
135
|
-
private readonly signer;
|
|
136
|
-
/** 一个实例内固定复用的会话 id;每次新生成都会改变 PoW seed 与签名串。 */
|
|
137
|
-
private readonly signingSessionId;
|
|
138
125
|
constructor(store?: GlmCodingPlanCredentialStore, modelSettings?: GlmCodingPlanModelSettingsStore, preferences?: GlmCodingPlanPreferenceStore, options?: GlmCodingPlanAdapterOptions);
|
|
139
126
|
providerInfo(provider: string): LlmProviderInfo;
|
|
140
127
|
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/glm-coding-plan/adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/glm-coding-plan/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,UAAU,EAIV,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAI7B,OAAO,EAA4B,KAAK,eAAe,IAAI,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAGrH,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AAQpC,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAuB3B,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAG/B,KAAK,4BAA4B,EAClC,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAA;AAEnF;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC,EAAE;IAChD,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,EAAE,CAAA;IACx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AAmB,GAAG,IAAI,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,mBAAmB,GAAG,IAAI,CAGvF;AAED,mCAAmC;AACnC,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAUhE;AAED,qCAAqC;AACrC,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAerC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,iBAAiB,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GACxE,OAAO,CAAC,YAAY,CAAC,CAkFvB"}
|
|
@@ -288,14 +288,6 @@ export declare const DEFAULT_CONTEXT_WINDOW = 128000;
|
|
|
288
288
|
* 而冒用官方客户端身份既不诚实也可能构成违约。
|
|
289
289
|
*/
|
|
290
290
|
export declare const USER_AGENT = "dsh-chatgpt-subscription (+https://github.com/Aa728848/dsh-chatgpt-subscription)";
|
|
291
|
-
/**
|
|
292
|
-
* 签名层默认关闭(计划 D5、R2,证据等级 C)。
|
|
293
|
-
*
|
|
294
|
-
* 唯一有实测记录的项目做过 A/B 对照:带签名与不带签名的响应**完全一致**(都是 429/1113),
|
|
295
|
-
* 从未观察到服务端因为缺签名而拒绝请求。既然没有任何证据表明缺签名会被拒,
|
|
296
|
-
* 默认开启一个逆向来的签名算法只会平白增加故障面,所以默认关、能力门控。
|
|
297
|
-
*/
|
|
298
|
-
export declare const CLIENT_SIGNING_DEFAULT_ENABLED = false;
|
|
299
291
|
/**
|
|
300
292
|
* 平台级业务错误码(逐条沿用 `9ad8a53` 的实测转录,证据等级 A)。
|
|
301
293
|
*
|
|
@@ -392,8 +384,6 @@ export declare function cliPollUrl(flowId: string, env?: NodeJS.ProcessEnv): str
|
|
|
392
384
|
export declare function desktopLoginRelayUrl(appVersion: string, env?: NodeJS.ProcessEnv): string;
|
|
393
385
|
/** 本线路创建 Key 时用的名字(可覆盖,默认值刻意不同于官方客户端的 key 名)。 */
|
|
394
386
|
export declare function keyName(env?: NodeJS.ProcessEnv): string;
|
|
395
|
-
/** 签名层是否被显式打开;默认关闭(证据等级 C,见 `CLIENT_SIGNING_DEFAULT_ENABLED`)。 */
|
|
396
|
-
export declare function clientSigningEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
397
387
|
/** 认不出区域时的默认部署。国际区是本仓库的历史默认值(沿用 `9ad8a53` 的 `regionForBaseUrl`)。 */
|
|
398
388
|
export declare const DEFAULT_REGION: GlmRegion;
|
|
399
389
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/glm-coding-plan/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA;AAOjH,eAAO,MAAM,WAAW,oBAA8B,CAAA;AACtD,eAAO,MAAM,aAAa,sCAAgC,CAAA;AAE1D,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB,+BAAwB,CAAA;AAMvD,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,kBAAkB,EAAE,OAAO,GAAG,WAAW,CAAA;IACzC,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;GAKG;AACH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AdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
2
|
import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
|
|
3
3
|
import { type GenerateOptions } from '../common/llm-compat.ts';
|
|
4
|
-
import { type OllamaCatalogModel } from './types.ts';
|
|
4
|
+
import { type OllamaCatalogModel, type OllamaThinkingCapability } from './types.ts';
|
|
5
5
|
import { FileCredentialStore, FileModelSettingsStore, type OllamaCredentials } from './token-store.ts';
|
|
6
6
|
import { OllamaAccountPool } from './account-pool.ts';
|
|
7
7
|
import { type OllamaRequest } from './client.ts';
|
|
@@ -31,6 +31,16 @@ export declare class OllamaAdapter extends LlmAdapter {
|
|
|
31
31
|
* than minting pool state that would outlive the process.
|
|
32
32
|
*/
|
|
33
33
|
private readonly accountPool;
|
|
34
|
+
/**
|
|
35
|
+
* What `/api/show` has already said, per model id.
|
|
36
|
+
*
|
|
37
|
+
* Only a successful read is remembered. A failed one is a transient condition
|
|
38
|
+
* (no key, a 500, a proxy), and caching it would pin every model to the
|
|
39
|
+
* fallback ladder for the life of the process - so it is asked again next time.
|
|
40
|
+
*/
|
|
41
|
+
private readonly thinkingCache;
|
|
42
|
+
/** Probes currently in flight, so one model asked twice at once is read once. */
|
|
43
|
+
private readonly thinkingProbes;
|
|
34
44
|
constructor(store?: FileCredentialStore, modelSettings?: FileModelSettingsStore, options?: OllamaAdapterOptions, accountPool?: OllamaAccountPool);
|
|
35
45
|
providerInfo(provider: string): LlmProviderInfo;
|
|
36
46
|
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
@@ -47,6 +57,14 @@ export declare class OllamaAdapter extends LlmAdapter {
|
|
|
47
57
|
private catalog;
|
|
48
58
|
/** Any usable key, for the catalog call; the pool decides real routing later. */
|
|
49
59
|
private anyCredentials;
|
|
60
|
+
/**
|
|
61
|
+
* What this model says about its own thinking, read once and remembered.
|
|
62
|
+
*
|
|
63
|
+
* Never throws and never rejects: an adapter that cannot reach `/api/show`
|
|
64
|
+
* (no key stored yet, service down) is a line that still resolves models and
|
|
65
|
+
* still chats, one step behind on the ladder.
|
|
66
|
+
*/
|
|
67
|
+
private thinkingCapability;
|
|
50
68
|
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
51
69
|
resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
52
70
|
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
@@ -57,5 +75,11 @@ export declare class OllamaAdapter extends LlmAdapter {
|
|
|
57
75
|
* Project DSH's request shape onto Ollama's, per surface.
|
|
58
76
|
* Consumes the canonical Message vocabulary produced by normalizeGenerateOptions.
|
|
59
77
|
*/
|
|
60
|
-
export declare function toOllamaRequest(options: GenerateOptions, attachments?: Pick<AttachmentStore, 'readImage'>, signal?: AbortSignal
|
|
78
|
+
export declare function toOllamaRequest(options: GenerateOptions, attachments?: Pick<AttachmentStore, 'readImage'>, signal?: AbortSignal,
|
|
79
|
+
/**
|
|
80
|
+
* What the target model says about its own thinking, when it was read. Passed
|
|
81
|
+
* in rather than looked up here because this is a pure projection: it must not
|
|
82
|
+
* spend a network read to decide what one request may send.
|
|
83
|
+
*/
|
|
84
|
+
declared?: OllamaThinkingCapability): Promise<Omit<OllamaRequest, 'signal'>>;
|
|
61
85
|
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/ollama/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/ollama/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EAIV,KAAK,eAAe,IAAI,sBAAsB,EAC9C,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACx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AmB,IAAI,mBAAmB;IAI1C,mBAAmB,IAAI,SAAS;IAIhC,OAAO,CAAC,QAAQ;IAIhB;;;;;;;OAOG;YACW,OAAO;IAiBrB,iFAAiF;YACnE,cAAc;IAS5B;;;;;;OAMG;YACW,kBAAkB;IAyB1B,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAqB/D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgCpG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAO/F,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,aAAa,CAAC,WAAW,CAAC;YAU3D,aAAa;CAwL7B;AAsND;;;GAGG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,eAAe,EACxB,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,EAChD,MAAM,CAAC,EAAE,WAAW;AACpB;;;;GAIG;AACH,QAAQ,CAAC,EAAE,wBAAwB,GAClC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAqGxC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OllamaCatalogModel, type OllamaWire } from './types.ts';
|
|
1
|
+
import { type OllamaCatalogModel, type OllamaThinkingCapability, type OllamaWire } from './types.ts';
|
|
2
2
|
import type { OllamaCredentials } from './token-store.ts';
|
|
3
3
|
import type { StreamActivity } from '../common/idle-watchdog.ts';
|
|
4
4
|
/** One message on the wire, in either surface's shape. */
|
|
@@ -148,4 +148,19 @@ export declare function loadCatalog(fetchFn: typeof fetch, credentials: OllamaCr
|
|
|
148
148
|
export declare function fetchCatalog(fetchFn: typeof fetch, credentials: OllamaCredentials): Promise<OllamaCatalogResult>;
|
|
149
149
|
/** The OpenAI-compatible model list, for callers that prefer that surface's view. */
|
|
150
150
|
export declare function loadOpenAIModels(fetchFn: typeof fetch, credentials: OllamaCredentials): Promise<string[]>;
|
|
151
|
+
/**
|
|
152
|
+
* Read what one model says about its own thinking.
|
|
153
|
+
*
|
|
154
|
+
* `POST /api/show` is the only place a model states the values `think` accepts,
|
|
155
|
+
* and the ladder this line offers has to be exactly those values: DSH rejects an
|
|
156
|
+
* effort that is not on the ladder before a request is built, and the service
|
|
157
|
+
* rejects a `think` it does not know. So the metadata, not a prefix list, is
|
|
158
|
+
* what the picker is built from.
|
|
159
|
+
*
|
|
160
|
+
* Returns undefined rather than throwing for every way this can fail - no key, a
|
|
161
|
+
* 401, a 500, a proxy's HTML where JSON was promised, a document that is not
|
|
162
|
+
* `/api/show`. The caller falls back to what it already knew about the model,
|
|
163
|
+
* and a failed probe must never be what breaks a turn.
|
|
164
|
+
*/
|
|
165
|
+
export declare function fetchModelThinking(fetchFn: typeof fetch, credentials: OllamaCredentials, modelId: string): Promise<OllamaThinkingCapability | undefined>;
|
|
151
166
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/ollama/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/ollama/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EAChB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,MAAM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IAC5B,qFAAqF;IACrF,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,OAAO,KAAK,EACrB,WAAW,EAAE,iBAAiB,GAC7B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE/B;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,OAAO,KAAK,EACrB,WAAW,EAAE,iBAAiB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CA6C9B;AAED,qFAAqF;AACrF,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,OAAO,KAAK,EACrB,WAAW,EAAE,iBAAiB,GAC7B,OAAO,CAAC,MAAM,EAAE,CAAC,CAkBnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,OAAO,KAAK,EACrB,WAAW,EAAE,iBAAiB,EAC9B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC,CA6C/C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import type { OllamaAccountPool } from './account-pool.ts';
|
|
3
3
|
import type { FileModelSettingsStore } from './token-store.ts';
|
|
4
|
-
import type
|
|
4
|
+
import { type OllamaWebStatus } from '../../shared/ollama-contracts.ts';
|
|
5
5
|
/** Where a user creates the keys this line stores. */
|
|
6
6
|
export declare const OLLAMA_KEYS_URL = "https://ollama.com/settings/keys";
|
|
7
7
|
export interface OllamaRouteOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/ollama/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,kBAAkB,CAAA;AAEjF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/ollama/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,kBAAkB,CAAA;AAEjF,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAA;AAIzC,sDAAsD;AACtD,eAAO,MAAM,eAAe,qCAAqC,CAAA;AAyCjE,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,iBAAiB,CAAA;IAC9B,aAAa,EAAE,sBAAsB,CAAA;IACrC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB;AA+BD,gEAAgE;AAChE,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC,CA0B9F;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,IAAI,CA6O1F"}
|