@eddyskywalker/dsh-chatgpt-subscription 0.6.0 → 0.6.8
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 +2 -0
- package/README.md +3 -3
- package/lib/client.js +200 -242
- package/lib/client.js.map +1 -1
- package/lib/index.js +86 -11
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
- package/lib/types/client/kimi-code/locales.d.ts +23 -2
- package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -1
- package/lib/types/client/workbuddy/locales.d.ts +12 -90
- package/lib/types/client/workbuddy/locales.d.ts.map +1 -1
- package/lib/types/client/workbuddy/styles.d.ts +8 -4
- package/lib/types/client/workbuddy/styles.d.ts.map +1 -1
- package/lib/types/host/kimi-code/mapper.d.ts +40 -3
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
- package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -1
- package/lib/types/host/workbuddy/adapter.d.ts.map +1 -1
- package/lib/types/shared/kimi-code-contracts.d.ts +8 -0
- package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
- package/lib/types/shared/workbuddy-contracts.d.ts +6 -0
- package/lib/types/shared/workbuddy-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -13972,6 +13972,16 @@ function isToolResultMessage$1(message) {
|
|
|
13972
13972
|
* so a `system` message used as a tool-declaration carrier must stay
|
|
13973
13973
|
* content-less: adding text to it would both move that text to the front of the
|
|
13974
13974
|
* request and give the declaration a `content` field the service forbids.
|
|
13975
|
+
*
|
|
13976
|
+
* Cache-stability invariant: the system prompt is the head of the prefix the
|
|
13977
|
+
* service caches, so this function must be a pure, order-stable fold of its
|
|
13978
|
+
* inputs. `options.system` always leads and message text follows in history
|
|
13979
|
+
* order — never re-sorted, never re-dated, never decorated with per-turn
|
|
13980
|
+
* metadata. Any value that changes turn-over-turn belongs in a trailing user
|
|
13981
|
+
* message (where the harness's time/snapshot injectors already put it), not in
|
|
13982
|
+
* this head, because one changed byte here invalidates the whole cached prefix
|
|
13983
|
+
* and collapses the hit rate. `trackPrefixStability` fingerprints this exact
|
|
13984
|
+
* string so a drift is attributed rather than silent.
|
|
13975
13985
|
*/
|
|
13976
13986
|
function leadingSystemText$1(options) {
|
|
13977
13987
|
const parts = [];
|
|
@@ -14409,18 +14419,17 @@ function buildOpenAIRequest(options, images = NO_RESOLVED_IMAGES$1, preserveThin
|
|
|
14409
14419
|
/**
|
|
14410
14420
|
* Stable identifier for the conversation this request belongs to.
|
|
14411
14421
|
*
|
|
14412
|
-
*
|
|
14413
|
-
*
|
|
14414
|
-
*
|
|
14422
|
+
* The key is derived from the session identifier alone — never from message
|
|
14423
|
+
* content. The official agent keys its cache on the conversation (its
|
|
14424
|
+
* sessionId) so the key survives context compaction and multimodal churn
|
|
14425
|
+
* byte-for-byte. Deriving it from the first user message (as a fallback once
|
|
14426
|
+
* did) produces a key that CHANGES the moment compaction rewrites that first
|
|
14427
|
+
* message, silently re-routing the whole session to a cold cache entry and
|
|
14428
|
+
* collapsing the hit rate. A session that has no identity yet sends no key at
|
|
14429
|
+
* all rather than a key that will drift.
|
|
14415
14430
|
*/
|
|
14416
14431
|
function promptCacheKey(options) {
|
|
14417
14432
|
if (typeof options.sessionId === "string" && options.sessionId.trim() !== "") return `dsh-${options.sessionId.trim()}`;
|
|
14418
|
-
for (const message of options.messages) {
|
|
14419
|
-
if (message.role !== "user") continue;
|
|
14420
|
-
const text = textOf$1(message.content);
|
|
14421
|
-
if (text === "") continue;
|
|
14422
|
-
return `dsh-${createHash("sha256").update(text).digest("hex").slice(0, 32)}`;
|
|
14423
|
-
}
|
|
14424
14433
|
}
|
|
14425
14434
|
function anthropicUserContent(message, images) {
|
|
14426
14435
|
if (!Array.isArray(message.content)) return [];
|
|
@@ -14561,6 +14570,7 @@ function buildAnthropicRequest(options, images = NO_RESOLVED_IMAGES$1, _media =
|
|
|
14561
14570
|
}
|
|
14562
14571
|
/** Build the body for whichever endpoint serves `wire`. */
|
|
14563
14572
|
function buildRequest(options, wire, images = NO_RESOLVED_IMAGES$1, preserveThinking = preserveThinkingEnabled(), media = {}) {
|
|
14573
|
+
recordDriftCause(trackPrefixStability(options));
|
|
14564
14574
|
return wire === "anthropic" ? buildAnthropicRequest(options, images, media) : buildOpenAIRequest(options, images, preserveThinking, media);
|
|
14565
14575
|
}
|
|
14566
14576
|
/**
|
|
@@ -14943,6 +14953,65 @@ function processAnthropicStreamLine(line, state) {
|
|
|
14943
14953
|
if (type === "error") throw new LlmError(`Kimi Code stream error: ${asString$4((isRecord$4(event.error) ? event.error : {}).message) ?? "unknown error"}`, "PROVIDER_ERROR");
|
|
14944
14954
|
return out;
|
|
14945
14955
|
}
|
|
14956
|
+
/**
|
|
14957
|
+
* A short, stable fingerprint of one prefix-breaking input.
|
|
14958
|
+
*
|
|
14959
|
+
* The prefix cache is invalidated as a whole whenever the system prompt or the
|
|
14960
|
+
* tool list changes, so these are hashed (not stored verbatim) and compared
|
|
14961
|
+
* request-over-request. A 32-bit FNV-1a keeps this dependency-free; collisions
|
|
14962
|
+
* only ever produce a missed *diagnostic*, never a wrong request.
|
|
14963
|
+
*/
|
|
14964
|
+
function fingerprint(text) {
|
|
14965
|
+
let hash = 2166136261;
|
|
14966
|
+
for (let index = 0; index < text.length; index++) {
|
|
14967
|
+
hash ^= text.charCodeAt(index);
|
|
14968
|
+
hash = Math.imul(hash, 16777619);
|
|
14969
|
+
}
|
|
14970
|
+
return (hash >>> 0).toString(16);
|
|
14971
|
+
}
|
|
14972
|
+
let lastPrefixSnapshot = {
|
|
14973
|
+
systemPromptHash: null,
|
|
14974
|
+
toolsHash: null,
|
|
14975
|
+
cacheKey: null
|
|
14976
|
+
};
|
|
14977
|
+
/**
|
|
14978
|
+
* Fingerprint the current request's stability inputs and diff them against the
|
|
14979
|
+
* last request. Called once per request build; the result is read back when the
|
|
14980
|
+
* stream reports usage so a low-or-zero cache read can be explained.
|
|
14981
|
+
*/
|
|
14982
|
+
function trackPrefixStability(options) {
|
|
14983
|
+
const systemText = leadingSystemText$1(options) ?? "";
|
|
14984
|
+
const systemPromptHash = systemText === "" ? null : fingerprint(systemText);
|
|
14985
|
+
const tools = options.tools ?? [];
|
|
14986
|
+
const toolsHash = tools.length === 0 ? null : fingerprint(JSON.stringify(tools.map((tool) => [
|
|
14987
|
+
tool.name,
|
|
14988
|
+
tool.description ?? "",
|
|
14989
|
+
tool.parameters ?? {}
|
|
14990
|
+
])));
|
|
14991
|
+
const cacheKey = promptCacheKey(options) ?? null;
|
|
14992
|
+
const previous = lastPrefixSnapshot;
|
|
14993
|
+
lastPrefixSnapshot = {
|
|
14994
|
+
systemPromptHash,
|
|
14995
|
+
toolsHash,
|
|
14996
|
+
cacheKey
|
|
14997
|
+
};
|
|
14998
|
+
if (previous.systemPromptHash === null && previous.toolsHash === null && previous.cacheKey === null) return "first-request";
|
|
14999
|
+
if (cacheKey === null) return "cold-key";
|
|
15000
|
+
if (previous.cacheKey !== cacheKey) return "cache-key";
|
|
15001
|
+
if (previous.systemPromptHash !== systemPromptHash) return "system-prompt";
|
|
15002
|
+
if (previous.toolsHash !== toolsHash) return "tools";
|
|
15003
|
+
return "stable";
|
|
15004
|
+
}
|
|
15005
|
+
/** Last recorded drift cause, for the status surface. */
|
|
15006
|
+
let lastDriftCause = "first-request";
|
|
15007
|
+
/** Record the cause computed for the in-flight request. */
|
|
15008
|
+
function recordDriftCause(cause) {
|
|
15009
|
+
lastDriftCause = cause;
|
|
15010
|
+
}
|
|
15011
|
+
/** The cause attributed to the most recent request. */
|
|
15012
|
+
function getLastDriftCause() {
|
|
15013
|
+
return lastDriftCause;
|
|
15014
|
+
}
|
|
14946
15015
|
let cacheStats = {
|
|
14947
15016
|
requests: 0,
|
|
14948
15017
|
cachedTokens: 0,
|
|
@@ -15687,7 +15756,11 @@ async function getKimiCodeWebStatus(store, modelSettings, preferences, options =
|
|
|
15687
15756
|
/** Rolling cache totals, or null while no request has reported usage yet. */
|
|
15688
15757
|
function cacheStatsOrNull() {
|
|
15689
15758
|
const stats = getCacheStats();
|
|
15690
|
-
|
|
15759
|
+
if (stats.requests === 0) return null;
|
|
15760
|
+
return {
|
|
15761
|
+
...stats,
|
|
15762
|
+
lastDrift: getLastDriftCause()
|
|
15763
|
+
};
|
|
15691
15764
|
}
|
|
15692
15765
|
/** Register the Kimi Code settings routes under `/kimi-code/api`. */
|
|
15693
15766
|
function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options = {}, accountPool = options.accountPool) {
|
|
@@ -19666,7 +19739,6 @@ var WorkBuddyAdapter = class extends LlmAdapter {
|
|
|
19666
19739
|
provider: prov,
|
|
19667
19740
|
id: model.id,
|
|
19668
19741
|
name: model.name,
|
|
19669
|
-
description: model.description || void 0,
|
|
19670
19742
|
inputModalities: model.supportsImage ? ["text", "image"] : ["text"]
|
|
19671
19743
|
}));
|
|
19672
19744
|
}
|
|
@@ -20007,6 +20079,9 @@ var WorkBuddyAccountPool = class extends AccountPoolCore {
|
|
|
20007
20079
|
...account.nickname === void 0 ? {} : { nickname: account.nickname },
|
|
20008
20080
|
...account.uin === void 0 ? {} : { uin: account.uin },
|
|
20009
20081
|
...account.sourceFile === void 0 ? {} : { sourceFile: account.sourceFile },
|
|
20082
|
+
...account.credentials.domain === "" ? {} : { domain: account.credentials.domain },
|
|
20083
|
+
...account.credentials.backend === "" ? {} : { backend: account.credentials.backend },
|
|
20084
|
+
...account.credentials.accountType === void 0 ? {} : { accountType: account.credentials.accountType },
|
|
20010
20085
|
...account.credentials.expiresAt > 0 ? {} : { expiresAt: void 0 }
|
|
20011
20086
|
}),
|
|
20012
20087
|
preferAccountId: () => options.selection?.().selectedAccountId ?? null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAe/D,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAiBD,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;
|
|
1
|
+
{"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAe/D,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAiBD,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAyDD,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAspBhG"}
|
|
@@ -90,6 +90,13 @@ export declare const zh: {
|
|
|
90
90
|
readonly cacheOutput: "输出 tokens";
|
|
91
91
|
readonly cacheRequests: "请求数";
|
|
92
92
|
readonly cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。";
|
|
93
|
+
readonly cacheDrift: "最近前缀状态";
|
|
94
|
+
readonly cacheDriftFirst: "首个请求(缓存为空)";
|
|
95
|
+
readonly cacheDriftStable: "稳定(前缀未变)";
|
|
96
|
+
readonly cacheDriftSystemPrompt: "系统提示已变化(缓存失效)";
|
|
97
|
+
readonly cacheDriftTools: "工具列表已变化(缓存失效)";
|
|
98
|
+
readonly cacheDriftCacheKey: "缓存键已变化(会话切换)";
|
|
99
|
+
readonly cacheDriftColdKey: "未发送缓存键(无法命中)";
|
|
93
100
|
readonly preserveThinking: "保留思考 (Preserved Thinking)";
|
|
94
101
|
readonly preserveOn: "已开启(官方默认):跨轮保留 reasoning_content,多轮工具调用更连贯,但思考 token 也计入输出。";
|
|
95
102
|
readonly preserveOff: "已关闭:不要求服务回传推理内容。可设置 DSH_KIMI_CODE_PRESERVE_THINKING=0 关闭。";
|
|
@@ -224,6 +231,13 @@ export declare const dictionaries: {
|
|
|
224
231
|
readonly cacheOutput: "输出 tokens";
|
|
225
232
|
readonly cacheRequests: "请求数";
|
|
226
233
|
readonly cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。";
|
|
234
|
+
readonly cacheDrift: "最近前缀状态";
|
|
235
|
+
readonly cacheDriftFirst: "首个请求(缓存为空)";
|
|
236
|
+
readonly cacheDriftStable: "稳定(前缀未变)";
|
|
237
|
+
readonly cacheDriftSystemPrompt: "系统提示已变化(缓存失效)";
|
|
238
|
+
readonly cacheDriftTools: "工具列表已变化(缓存失效)";
|
|
239
|
+
readonly cacheDriftCacheKey: "缓存键已变化(会话切换)";
|
|
240
|
+
readonly cacheDriftColdKey: "未发送缓存键(无法命中)";
|
|
227
241
|
readonly preserveThinking: "保留思考 (Preserved Thinking)";
|
|
228
242
|
readonly preserveOn: "已开启(官方默认):跨轮保留 reasoning_content,多轮工具调用更连贯,但思考 token 也计入输出。";
|
|
229
243
|
readonly preserveOff: "已关闭:不要求服务回传推理内容。可设置 DSH_KIMI_CODE_PRESERVE_THINKING=0 关闭。";
|
|
@@ -356,6 +370,13 @@ export declare const dictionaries: {
|
|
|
356
370
|
readonly cacheOutput: "输出 tokens";
|
|
357
371
|
readonly cacheRequests: "请求数";
|
|
358
372
|
readonly cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。";
|
|
373
|
+
readonly cacheDrift: "最近前缀状态";
|
|
374
|
+
readonly cacheDriftFirst: "首个请求(缓存为空)";
|
|
375
|
+
readonly cacheDriftStable: "稳定(前缀未变)";
|
|
376
|
+
readonly cacheDriftSystemPrompt: "系统提示已变化(缓存失效)";
|
|
377
|
+
readonly cacheDriftTools: "工具列表已变化(缓存失效)";
|
|
378
|
+
readonly cacheDriftCacheKey: "缓存键已变化(会话切换)";
|
|
379
|
+
readonly cacheDriftColdKey: "未发送缓存键(无法命中)";
|
|
359
380
|
readonly preserveThinking: "保留思考 (Preserved Thinking)";
|
|
360
381
|
readonly preserveOn: "已开启(官方默认):跨轮保留 reasoning_content,多轮工具调用更连贯,但思考 token 也计入输出。";
|
|
361
382
|
readonly preserveOff: "已关闭:不要求服务回传推理内容。可设置 DSH_KIMI_CODE_PRESERVE_THINKING=0 关闭。";
|
|
@@ -397,8 +418,8 @@ export declare const dictionaries: {
|
|
|
397
418
|
readonly lastUsed: string;
|
|
398
419
|
readonly accountId: string;
|
|
399
420
|
};
|
|
400
|
-
en: Record<"tokens" | "title" | "pageDesc" | "account" | "signedIn" | "signedOut" | "
|
|
401
|
-
'en-US': Record<"tokens" | "title" | "pageDesc" | "account" | "signedIn" | "signedOut" | "
|
|
421
|
+
en: Record<"tokens" | "title" | "pageDesc" | "account" | "signedIn" | "signedOut" | "nickname" | "email" | "plan" | "planUnknown" | "region" | "regionMainland" | "regionGlobal" | "authenticatedAt" | "storage" | "storageNotice" | "refreshRejected" | "signIn" | "signInAgain" | "signingIn" | "signOut" | "cancelSignIn" | "deviceCodeSection" | "deviceCodeHint" | "openSignInPage" | "copyCode" | "copied" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "connection" | "provider" | "providerValue" | "oauthHost" | "codingEndpoint" | "connectionState" | "connected" | "untested" | "testConnection" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "modelsSection" | "enableProvider" | "modelsHint" | "refreshCatalog" | "refreshingCatalog" | "selectAll" | "unselectAll" | "wireAnthropic" | "wireOpenai" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "effortLow" | "effortHigh" | "effortMax" | "effortNone" | "contextWindowSection" | "contextWindowHint" | "contextWindowPlan" | "save" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheOutput" | "cacheRequests" | "cacheHint" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftTools" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaSection" | "quotaDesc" | "refreshQuota" | "refreshingQuota" | "quotaEmpty" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "quotaUnlimited" | "updatedAt" | "resetAt" | "loading" | "loginFailed" | "requests" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "expires" | "lastUsed" | "accountId", string>;
|
|
422
|
+
'en-US': Record<"tokens" | "title" | "pageDesc" | "account" | "signedIn" | "signedOut" | "nickname" | "email" | "plan" | "planUnknown" | "region" | "regionMainland" | "regionGlobal" | "authenticatedAt" | "storage" | "storageNotice" | "refreshRejected" | "signIn" | "signInAgain" | "signingIn" | "signOut" | "cancelSignIn" | "deviceCodeSection" | "deviceCodeHint" | "openSignInPage" | "copyCode" | "copied" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "connection" | "provider" | "providerValue" | "oauthHost" | "codingEndpoint" | "connectionState" | "connected" | "untested" | "testConnection" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "modelsSection" | "enableProvider" | "modelsHint" | "refreshCatalog" | "refreshingCatalog" | "selectAll" | "unselectAll" | "wireAnthropic" | "wireOpenai" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "effortLow" | "effortHigh" | "effortMax" | "effortNone" | "contextWindowSection" | "contextWindowHint" | "contextWindowPlan" | "save" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheOutput" | "cacheRequests" | "cacheHint" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftTools" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaSection" | "quotaDesc" | "refreshQuota" | "refreshingQuota" | "quotaEmpty" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "quotaUnlimited" | "updatedAt" | "resetAt" | "loading" | "loginFailed" | "requests" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "expires" | "lastUsed" | "accountId", string>;
|
|
402
423
|
};
|
|
403
424
|
export type KimiCodeLocaleKey = keyof typeof zh;
|
|
404
425
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAE3C,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAE3C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwHL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAuHrC,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkBuddySection.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/WorkBuddySection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,KAAK,EAEV,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,qCAAqC,CAAA;AAuB5C,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;
|
|
1
|
+
{"version":3,"file":"WorkBuddySection.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/WorkBuddySection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,KAAK,EAEV,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,qCAAqC,CAAA;AAuB5C,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AA4ED,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAuBD,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAInD;AAED,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAIxD;AAED,+EAA+E;AAC/E,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,wBAAwB,CAAA;IAC/B,4DAA4D;IAC5D,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,oBAAoB,EAAE,GAAG,qBAAqB,EAAE,CAY9F;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,EACvD,MAAM,EAAE,oBAAoB,EAAE,GAC7B,wBAAwB,GAAG,IAAI,CAIjC;AAYD,wBAAgB,gBAAgB,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CA2qBjG"}
|
|
@@ -3,41 +3,28 @@ export declare const zh: {
|
|
|
3
3
|
readonly title: "WorkBuddy";
|
|
4
4
|
readonly pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。";
|
|
5
5
|
readonly account: "账号";
|
|
6
|
-
readonly noAccounts: "
|
|
7
|
-
readonly signedIn: "已找到凭据";
|
|
6
|
+
readonly noAccounts: "暂无账号。点击右上角「添加账号」完成浏览器授权,或登录 CodeBuddy 桌面端后重新扫描;桌面账号只能从本插件隐藏,绝不删除 CodeBuddy 的原凭据。";
|
|
8
7
|
readonly signedOut: "未找到凭据";
|
|
9
8
|
readonly nickname: "昵称";
|
|
10
|
-
readonly uid: "账号 ID";
|
|
11
9
|
readonly uin: "UIN";
|
|
12
10
|
readonly region: "区域";
|
|
13
11
|
readonly regionCn: "国区";
|
|
14
12
|
readonly regionIntl: "国际区";
|
|
15
13
|
readonly accountType: "账号类型";
|
|
16
|
-
readonly backend: "后端地址";
|
|
17
|
-
readonly domain: "认证域名";
|
|
18
|
-
readonly tokenExpires: "登录态有效期";
|
|
19
|
-
readonly tokenExpired: "已过期";
|
|
20
14
|
readonly sourceFile: "凭据文件";
|
|
21
15
|
readonly authDirectory: "凭据目录";
|
|
22
16
|
readonly storage: "凭据存储";
|
|
23
17
|
readonly storageNotice: "桌面端账号仍读取 CodeBuddy 自己的凭据文件,插件不会删除这些文件;通过这里添加的账号保存在系统加密存储中(Windows DPAPI / macOS Keychain / Linux Secret Service),token 不进入浏览器。";
|
|
24
|
-
readonly notFoundTitle: "未找到 WorkBuddy 账号";
|
|
25
|
-
readonly notFoundHint: "可安装并登录 CodeBuddy 后重新扫描,也可以直接点击下方「添加国区账号」或「添加国际区账号」完成浏览器授权。";
|
|
26
18
|
readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
|
|
27
19
|
readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
|
|
28
20
|
readonly rescan: "重新扫描";
|
|
29
21
|
readonly rescanning: "扫描中...";
|
|
30
|
-
readonly accounts: "
|
|
31
|
-
readonly accountsHint: "按账号地区分组。插件添加的账号可删除;CodeBuddy 桌面账号只能从本插件隐藏,绝不删除桌面端原凭据。点击账号会切换模型目录、额度和后续对话。";
|
|
32
|
-
readonly useAccount: "使用此账号";
|
|
33
|
-
readonly selectedAccount: "当前账号";
|
|
22
|
+
readonly accounts: "账号管理";
|
|
34
23
|
readonly addCnAccount: "添加国区账号";
|
|
35
24
|
readonly addIntlAccount: "添加国际区账号";
|
|
36
25
|
readonly authorizing: "授权中…";
|
|
37
26
|
readonly loginWaiting: "请在新打开的浏览器页面完成登录与授权。";
|
|
38
27
|
readonly loginFailed: "账号授权失败";
|
|
39
|
-
readonly pluginAccount: "插件账号";
|
|
40
|
-
readonly desktopAccount: "桌面账号";
|
|
41
28
|
readonly encryptedStorage: "系统加密存储";
|
|
42
29
|
readonly hiddenAccount: "已隐藏";
|
|
43
30
|
readonly hideAccount: "从插件隐藏";
|
|
@@ -96,41 +83,28 @@ export declare const en: {
|
|
|
96
83
|
readonly title: "WorkBuddy";
|
|
97
84
|
readonly pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.";
|
|
98
85
|
readonly account: "Account";
|
|
99
|
-
readonly noAccounts: "No accounts yet. Add
|
|
100
|
-
readonly signedIn: "Credential found";
|
|
86
|
+
readonly noAccounts: "No accounts yet. Use “Add account” above to authorize, or sign in with the CodeBuddy desktop client and rescan; desktop accounts can only be hidden here, never removed from CodeBuddy.";
|
|
101
87
|
readonly signedOut: "No credential found";
|
|
102
88
|
readonly nickname: "Nickname";
|
|
103
|
-
readonly uid: "Account ID";
|
|
104
89
|
readonly uin: "UIN";
|
|
105
90
|
readonly region: "Region";
|
|
106
91
|
readonly regionCn: "China";
|
|
107
92
|
readonly regionIntl: "International";
|
|
108
93
|
readonly accountType: "Account type";
|
|
109
|
-
readonly backend: "Backend";
|
|
110
|
-
readonly domain: "Auth domain";
|
|
111
|
-
readonly tokenExpires: "Sign-in valid until";
|
|
112
|
-
readonly tokenExpired: "Expired";
|
|
113
94
|
readonly sourceFile: "Credential file";
|
|
114
95
|
readonly authDirectory: "Credential directory";
|
|
115
96
|
readonly storage: "Credential storage";
|
|
116
97
|
readonly storageNotice: "Desktop accounts continue to use CodeBuddy’s credential files, which this plugin never deletes. Accounts added here use encrypted OS storage (Windows DPAPI, macOS Keychain, or Linux Secret Service); tokens never enter the browser.";
|
|
117
|
-
readonly notFoundTitle: "No WorkBuddy account found";
|
|
118
|
-
readonly notFoundHint: "Install and sign in to CodeBuddy and rescan, or use “Add China account” / “Add international account” below to authorize in the browser.";
|
|
119
98
|
readonly routeUnreachable: "The WorkBuddy settings route could not be read";
|
|
120
99
|
readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
|
|
121
100
|
readonly rescan: "Rescan";
|
|
122
101
|
readonly rescanning: "Scanning...";
|
|
123
|
-
readonly accounts: "
|
|
124
|
-
readonly accountsHint: "Accounts are grouped by region. Plugin-managed accounts can be deleted; CodeBuddy desktop accounts can only be hidden from this plugin and their source files are never deleted. Selecting one switches models, quota, and chats.";
|
|
125
|
-
readonly useAccount: "Use this account";
|
|
126
|
-
readonly selectedAccount: "Selected account";
|
|
102
|
+
readonly accounts: "Account Management";
|
|
127
103
|
readonly addCnAccount: "Add China account";
|
|
128
104
|
readonly addIntlAccount: "Add international account";
|
|
129
105
|
readonly authorizing: "Authorizing…";
|
|
130
106
|
readonly loginWaiting: "Complete sign-in and authorization in the newly opened browser page.";
|
|
131
107
|
readonly loginFailed: "Account authorization failed";
|
|
132
|
-
readonly pluginAccount: "Plugin account";
|
|
133
|
-
readonly desktopAccount: "Desktop account";
|
|
134
108
|
readonly encryptedStorage: "Encrypted OS storage";
|
|
135
109
|
readonly hiddenAccount: "Hidden";
|
|
136
110
|
readonly hideAccount: "Hide from plugin";
|
|
@@ -190,41 +164,28 @@ export declare const dictionaries: {
|
|
|
190
164
|
readonly title: "WorkBuddy";
|
|
191
165
|
readonly pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。";
|
|
192
166
|
readonly account: "账号";
|
|
193
|
-
readonly noAccounts: "
|
|
194
|
-
readonly signedIn: "已找到凭据";
|
|
167
|
+
readonly noAccounts: "暂无账号。点击右上角「添加账号」完成浏览器授权,或登录 CodeBuddy 桌面端后重新扫描;桌面账号只能从本插件隐藏,绝不删除 CodeBuddy 的原凭据。";
|
|
195
168
|
readonly signedOut: "未找到凭据";
|
|
196
169
|
readonly nickname: "昵称";
|
|
197
|
-
readonly uid: "账号 ID";
|
|
198
170
|
readonly uin: "UIN";
|
|
199
171
|
readonly region: "区域";
|
|
200
172
|
readonly regionCn: "国区";
|
|
201
173
|
readonly regionIntl: "国际区";
|
|
202
174
|
readonly accountType: "账号类型";
|
|
203
|
-
readonly backend: "后端地址";
|
|
204
|
-
readonly domain: "认证域名";
|
|
205
|
-
readonly tokenExpires: "登录态有效期";
|
|
206
|
-
readonly tokenExpired: "已过期";
|
|
207
175
|
readonly sourceFile: "凭据文件";
|
|
208
176
|
readonly authDirectory: "凭据目录";
|
|
209
177
|
readonly storage: "凭据存储";
|
|
210
178
|
readonly storageNotice: "桌面端账号仍读取 CodeBuddy 自己的凭据文件,插件不会删除这些文件;通过这里添加的账号保存在系统加密存储中(Windows DPAPI / macOS Keychain / Linux Secret Service),token 不进入浏览器。";
|
|
211
|
-
readonly notFoundTitle: "未找到 WorkBuddy 账号";
|
|
212
|
-
readonly notFoundHint: "可安装并登录 CodeBuddy 后重新扫描,也可以直接点击下方「添加国区账号」或「添加国际区账号」完成浏览器授权。";
|
|
213
179
|
readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
|
|
214
180
|
readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
|
|
215
181
|
readonly rescan: "重新扫描";
|
|
216
182
|
readonly rescanning: "扫描中...";
|
|
217
|
-
readonly accounts: "
|
|
218
|
-
readonly accountsHint: "按账号地区分组。插件添加的账号可删除;CodeBuddy 桌面账号只能从本插件隐藏,绝不删除桌面端原凭据。点击账号会切换模型目录、额度和后续对话。";
|
|
219
|
-
readonly useAccount: "使用此账号";
|
|
220
|
-
readonly selectedAccount: "当前账号";
|
|
183
|
+
readonly accounts: "账号管理";
|
|
221
184
|
readonly addCnAccount: "添加国区账号";
|
|
222
185
|
readonly addIntlAccount: "添加国际区账号";
|
|
223
186
|
readonly authorizing: "授权中…";
|
|
224
187
|
readonly loginWaiting: "请在新打开的浏览器页面完成登录与授权。";
|
|
225
188
|
readonly loginFailed: "账号授权失败";
|
|
226
|
-
readonly pluginAccount: "插件账号";
|
|
227
|
-
readonly desktopAccount: "桌面账号";
|
|
228
189
|
readonly encryptedStorage: "系统加密存储";
|
|
229
190
|
readonly hiddenAccount: "已隐藏";
|
|
230
191
|
readonly hideAccount: "从插件隐藏";
|
|
@@ -283,41 +244,28 @@ export declare const dictionaries: {
|
|
|
283
244
|
readonly title: "WorkBuddy";
|
|
284
245
|
readonly pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。";
|
|
285
246
|
readonly account: "账号";
|
|
286
|
-
readonly noAccounts: "
|
|
287
|
-
readonly signedIn: "已找到凭据";
|
|
247
|
+
readonly noAccounts: "暂无账号。点击右上角「添加账号」完成浏览器授权,或登录 CodeBuddy 桌面端后重新扫描;桌面账号只能从本插件隐藏,绝不删除 CodeBuddy 的原凭据。";
|
|
288
248
|
readonly signedOut: "未找到凭据";
|
|
289
249
|
readonly nickname: "昵称";
|
|
290
|
-
readonly uid: "账号 ID";
|
|
291
250
|
readonly uin: "UIN";
|
|
292
251
|
readonly region: "区域";
|
|
293
252
|
readonly regionCn: "国区";
|
|
294
253
|
readonly regionIntl: "国际区";
|
|
295
254
|
readonly accountType: "账号类型";
|
|
296
|
-
readonly backend: "后端地址";
|
|
297
|
-
readonly domain: "认证域名";
|
|
298
|
-
readonly tokenExpires: "登录态有效期";
|
|
299
|
-
readonly tokenExpired: "已过期";
|
|
300
255
|
readonly sourceFile: "凭据文件";
|
|
301
256
|
readonly authDirectory: "凭据目录";
|
|
302
257
|
readonly storage: "凭据存储";
|
|
303
258
|
readonly storageNotice: "桌面端账号仍读取 CodeBuddy 自己的凭据文件,插件不会删除这些文件;通过这里添加的账号保存在系统加密存储中(Windows DPAPI / macOS Keychain / Linux Secret Service),token 不进入浏览器。";
|
|
304
|
-
readonly notFoundTitle: "未找到 WorkBuddy 账号";
|
|
305
|
-
readonly notFoundHint: "可安装并登录 CodeBuddy 后重新扫描,也可以直接点击下方「添加国区账号」或「添加国际区账号」完成浏览器授权。";
|
|
306
259
|
readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
|
|
307
260
|
readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
|
|
308
261
|
readonly rescan: "重新扫描";
|
|
309
262
|
readonly rescanning: "扫描中...";
|
|
310
|
-
readonly accounts: "
|
|
311
|
-
readonly accountsHint: "按账号地区分组。插件添加的账号可删除;CodeBuddy 桌面账号只能从本插件隐藏,绝不删除桌面端原凭据。点击账号会切换模型目录、额度和后续对话。";
|
|
312
|
-
readonly useAccount: "使用此账号";
|
|
313
|
-
readonly selectedAccount: "当前账号";
|
|
263
|
+
readonly accounts: "账号管理";
|
|
314
264
|
readonly addCnAccount: "添加国区账号";
|
|
315
265
|
readonly addIntlAccount: "添加国际区账号";
|
|
316
266
|
readonly authorizing: "授权中…";
|
|
317
267
|
readonly loginWaiting: "请在新打开的浏览器页面完成登录与授权。";
|
|
318
268
|
readonly loginFailed: "账号授权失败";
|
|
319
|
-
readonly pluginAccount: "插件账号";
|
|
320
|
-
readonly desktopAccount: "桌面账号";
|
|
321
269
|
readonly encryptedStorage: "系统加密存储";
|
|
322
270
|
readonly hiddenAccount: "已隐藏";
|
|
323
271
|
readonly hideAccount: "从插件隐藏";
|
|
@@ -376,41 +324,28 @@ export declare const dictionaries: {
|
|
|
376
324
|
readonly title: "WorkBuddy";
|
|
377
325
|
readonly pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.";
|
|
378
326
|
readonly account: "Account";
|
|
379
|
-
readonly noAccounts: "No accounts yet. Add
|
|
380
|
-
readonly signedIn: "Credential found";
|
|
327
|
+
readonly noAccounts: "No accounts yet. Use “Add account” above to authorize, or sign in with the CodeBuddy desktop client and rescan; desktop accounts can only be hidden here, never removed from CodeBuddy.";
|
|
381
328
|
readonly signedOut: "No credential found";
|
|
382
329
|
readonly nickname: "Nickname";
|
|
383
|
-
readonly uid: "Account ID";
|
|
384
330
|
readonly uin: "UIN";
|
|
385
331
|
readonly region: "Region";
|
|
386
332
|
readonly regionCn: "China";
|
|
387
333
|
readonly regionIntl: "International";
|
|
388
334
|
readonly accountType: "Account type";
|
|
389
|
-
readonly backend: "Backend";
|
|
390
|
-
readonly domain: "Auth domain";
|
|
391
|
-
readonly tokenExpires: "Sign-in valid until";
|
|
392
|
-
readonly tokenExpired: "Expired";
|
|
393
335
|
readonly sourceFile: "Credential file";
|
|
394
336
|
readonly authDirectory: "Credential directory";
|
|
395
337
|
readonly storage: "Credential storage";
|
|
396
338
|
readonly storageNotice: "Desktop accounts continue to use CodeBuddy’s credential files, which this plugin never deletes. Accounts added here use encrypted OS storage (Windows DPAPI, macOS Keychain, or Linux Secret Service); tokens never enter the browser.";
|
|
397
|
-
readonly notFoundTitle: "No WorkBuddy account found";
|
|
398
|
-
readonly notFoundHint: "Install and sign in to CodeBuddy and rescan, or use “Add China account” / “Add international account” below to authorize in the browser.";
|
|
399
339
|
readonly routeUnreachable: "The WorkBuddy settings route could not be read";
|
|
400
340
|
readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
|
|
401
341
|
readonly rescan: "Rescan";
|
|
402
342
|
readonly rescanning: "Scanning...";
|
|
403
|
-
readonly accounts: "
|
|
404
|
-
readonly accountsHint: "Accounts are grouped by region. Plugin-managed accounts can be deleted; CodeBuddy desktop accounts can only be hidden from this plugin and their source files are never deleted. Selecting one switches models, quota, and chats.";
|
|
405
|
-
readonly useAccount: "Use this account";
|
|
406
|
-
readonly selectedAccount: "Selected account";
|
|
343
|
+
readonly accounts: "Account Management";
|
|
407
344
|
readonly addCnAccount: "Add China account";
|
|
408
345
|
readonly addIntlAccount: "Add international account";
|
|
409
346
|
readonly authorizing: "Authorizing…";
|
|
410
347
|
readonly loginWaiting: "Complete sign-in and authorization in the newly opened browser page.";
|
|
411
348
|
readonly loginFailed: "Account authorization failed";
|
|
412
|
-
readonly pluginAccount: "Plugin account";
|
|
413
|
-
readonly desktopAccount: "Desktop account";
|
|
414
349
|
readonly encryptedStorage: "Encrypted OS storage";
|
|
415
350
|
readonly hiddenAccount: "Hidden";
|
|
416
351
|
readonly hideAccount: "Hide from plugin";
|
|
@@ -469,41 +404,28 @@ export declare const dictionaries: {
|
|
|
469
404
|
readonly title: "WorkBuddy";
|
|
470
405
|
readonly pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.";
|
|
471
406
|
readonly account: "Account";
|
|
472
|
-
readonly noAccounts: "No accounts yet. Add
|
|
473
|
-
readonly signedIn: "Credential found";
|
|
407
|
+
readonly noAccounts: "No accounts yet. Use “Add account” above to authorize, or sign in with the CodeBuddy desktop client and rescan; desktop accounts can only be hidden here, never removed from CodeBuddy.";
|
|
474
408
|
readonly signedOut: "No credential found";
|
|
475
409
|
readonly nickname: "Nickname";
|
|
476
|
-
readonly uid: "Account ID";
|
|
477
410
|
readonly uin: "UIN";
|
|
478
411
|
readonly region: "Region";
|
|
479
412
|
readonly regionCn: "China";
|
|
480
413
|
readonly regionIntl: "International";
|
|
481
414
|
readonly accountType: "Account type";
|
|
482
|
-
readonly backend: "Backend";
|
|
483
|
-
readonly domain: "Auth domain";
|
|
484
|
-
readonly tokenExpires: "Sign-in valid until";
|
|
485
|
-
readonly tokenExpired: "Expired";
|
|
486
415
|
readonly sourceFile: "Credential file";
|
|
487
416
|
readonly authDirectory: "Credential directory";
|
|
488
417
|
readonly storage: "Credential storage";
|
|
489
418
|
readonly storageNotice: "Desktop accounts continue to use CodeBuddy’s credential files, which this plugin never deletes. Accounts added here use encrypted OS storage (Windows DPAPI, macOS Keychain, or Linux Secret Service); tokens never enter the browser.";
|
|
490
|
-
readonly notFoundTitle: "No WorkBuddy account found";
|
|
491
|
-
readonly notFoundHint: "Install and sign in to CodeBuddy and rescan, or use “Add China account” / “Add international account” below to authorize in the browser.";
|
|
492
419
|
readonly routeUnreachable: "The WorkBuddy settings route could not be read";
|
|
493
420
|
readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
|
|
494
421
|
readonly rescan: "Rescan";
|
|
495
422
|
readonly rescanning: "Scanning...";
|
|
496
|
-
readonly accounts: "
|
|
497
|
-
readonly accountsHint: "Accounts are grouped by region. Plugin-managed accounts can be deleted; CodeBuddy desktop accounts can only be hidden from this plugin and their source files are never deleted. Selecting one switches models, quota, and chats.";
|
|
498
|
-
readonly useAccount: "Use this account";
|
|
499
|
-
readonly selectedAccount: "Selected account";
|
|
423
|
+
readonly accounts: "Account Management";
|
|
500
424
|
readonly addCnAccount: "Add China account";
|
|
501
425
|
readonly addIntlAccount: "Add international account";
|
|
502
426
|
readonly authorizing: "Authorizing…";
|
|
503
427
|
readonly loginWaiting: "Complete sign-in and authorization in the newly opened browser page.";
|
|
504
428
|
readonly loginFailed: "Account authorization failed";
|
|
505
|
-
readonly pluginAccount: "Plugin account";
|
|
506
|
-
readonly desktopAccount: "Desktop account";
|
|
507
429
|
readonly encryptedStorage: "Encrypted OS storage";
|
|
508
430
|
readonly hiddenAccount: "Hidden";
|
|
509
431
|
readonly hideAccount: "Hide from plugin";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAE3C,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAE3C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EL,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -2,10 +2,14 @@ export declare const STYLE_ID = "dsh-workbuddy-settings-style";
|
|
|
2
2
|
/**
|
|
3
3
|
* WorkBuddy-only additions to the shared settings design system.
|
|
4
4
|
*
|
|
5
|
-
* The base control styles (`.dsha-page`, `.dsha-group`, `.dsha-models`,
|
|
6
|
-
* from the stylesheet the sibling routes install,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* The base control styles (`.dsha-page`, `.dsha-group`, `.dsha-models`, the
|
|
6
|
+
* account card, …) come from the stylesheet the sibling routes install, in the
|
|
7
|
+
* same order the client installs them, so this file declares only what stays
|
|
8
|
+
* unique to this card: the mono credential paths and the login-progress line.
|
|
9
|
+
*
|
|
10
|
+
* Everything this tab used to declare locally — the per-model capability line
|
|
11
|
+
* and the account-region headings — is gone: the model pill is name-only like
|
|
12
|
+
* every sibling tab, and the account card is the shared one.
|
|
9
13
|
*/
|
|
10
14
|
export declare function installWorkBuddyStyles(): void;
|
|
11
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,iCAAiC,CAAA;AAEtD
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,iCAAiC,CAAA;AAEtD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAW7C"}
|
|
@@ -279,9 +279,14 @@ export declare function buildOpenAIRequest(options: GenerateOptions, images?: Re
|
|
|
279
279
|
/**
|
|
280
280
|
* Stable identifier for the conversation this request belongs to.
|
|
281
281
|
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
282
|
+
* The key is derived from the session identifier alone — never from message
|
|
283
|
+
* content. The official agent keys its cache on the conversation (its
|
|
284
|
+
* sessionId) so the key survives context compaction and multimodal churn
|
|
285
|
+
* byte-for-byte. Deriving it from the first user message (as a fallback once
|
|
286
|
+
* did) produces a key that CHANGES the moment compaction rewrites that first
|
|
287
|
+
* message, silently re-routing the whole session to a cold cache entry and
|
|
288
|
+
* collapsing the hit rate. A session that has no identity yet sends no key at
|
|
289
|
+
* all rather than a key that will drift.
|
|
285
290
|
*/
|
|
286
291
|
export declare function promptCacheKey(options: GenerateOptions): string | undefined;
|
|
287
292
|
/** Build one `/v1/messages` body. */
|
|
@@ -340,6 +345,38 @@ export declare function createStreamState(wire: KimiCodeWire): KimiCodeStreamSta
|
|
|
340
345
|
export declare function processOpenAIStreamLine(line: string, state: KimiCodeStreamState): StreamChunk[];
|
|
341
346
|
/** Feed one SSE `data:` payload from `/v1/messages`. */
|
|
342
347
|
export declare function processAnthropicStreamLine(line: string, state: KimiCodeStreamState): StreamChunk[];
|
|
348
|
+
/**
|
|
349
|
+
* The prefix-breaking inputs of the previous request, kept so a cache miss can
|
|
350
|
+
* be attributed to the change that caused it rather than guessed at.
|
|
351
|
+
*
|
|
352
|
+
* kimi-code's own agent tracks exactly this pair (its `systemPromptHash` /
|
|
353
|
+
* `toolsHash` telemetry) for the same reason: a bare hit ratio cannot say
|
|
354
|
+
* *why* a turn went cold, but a diff of the stability inputs can.
|
|
355
|
+
*/
|
|
356
|
+
export interface PrefixStabilitySnapshot {
|
|
357
|
+
systemPromptHash: string | null;
|
|
358
|
+
toolsHash: string | null;
|
|
359
|
+
cacheKey: string | null;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Which stability input changed relative to the previous request, if any.
|
|
363
|
+
*
|
|
364
|
+
* `'stable'` means the prefix should have held; a miss then points at the
|
|
365
|
+
* service or at content below the head. Anything else names the input that
|
|
366
|
+
* broke the prefix. `'cold-key'` means no cache key was sent, so the request
|
|
367
|
+
* could not be routed to the warm entry at all.
|
|
368
|
+
*/
|
|
369
|
+
export type PrefixDriftCause = 'first-request' | 'stable' | 'system-prompt' | 'tools' | 'cache-key' | 'cold-key';
|
|
370
|
+
/**
|
|
371
|
+
* Fingerprint the current request's stability inputs and diff them against the
|
|
372
|
+
* last request. Called once per request build; the result is read back when the
|
|
373
|
+
* stream reports usage so a low-or-zero cache read can be explained.
|
|
374
|
+
*/
|
|
375
|
+
export declare function trackPrefixStability(options: GenerateOptions): PrefixDriftCause;
|
|
376
|
+
/** Record the cause computed for the in-flight request. */
|
|
377
|
+
export declare function recordDriftCause(cause: PrefixDriftCause): void;
|
|
378
|
+
/** The cause attributed to the most recent request. */
|
|
379
|
+
export declare function getLastDriftCause(): PrefixDriftCause;
|
|
343
380
|
/**
|
|
344
381
|
* Rolling per-process view of how well the prefix cache is working.
|
|
345
382
|
*
|