@senguoyun/dsh-arkme 0.1.82 → 0.1.83
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/docs/ai-points-implementation.md +43 -0
- package/docs/interwoven-compact-summary-regression-2026-09-28.md +35 -0
- package/docs/interwoven-original-read-receipt-regression-2026-09-28.md +50 -0
- package/docs/personal-detail-consistency-regression-2026-09-28.md +40 -0
- package/docs/send-to-self-roles-cross-client-api-handoff-2026-09-27.md +9 -0
- package/lib/client.js +2181 -1710
- package/lib/client.js.map +1 -1
- package/lib/harness-model-client.js +123 -37
- package/lib/harness-native-selection-client.js +57 -1
- package/lib/harness-sidebar-client.js +11 -0
- package/lib/index.js +194 -56
- package/lib/persistent-extension.js +1 -1
- package/lib/{persistent-runtime-DV9Hme-U.js → persistent-runtime-B6vPAaiG.js} +507 -42
- package/lib/sdk.js +11 -0
- package/lib/types/ai-points.d.ts +61 -0
- package/lib/types/ai-points.d.ts.map +1 -0
- package/lib/types/arkme-service.d.ts +10 -0
- package/lib/types/arkme-service.d.ts.map +1 -1
- package/lib/types/billing-gateway.d.ts.map +1 -1
- package/lib/types/client/ArkmeAccountUsage.d.ts +1 -3
- package/lib/types/client/ArkmeAccountUsage.d.ts.map +1 -1
- package/lib/types/client/ArkmeArkoSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeBillingSettings.d.ts +3 -2
- package/lib/types/client/ArkmeBillingSettings.d.ts.map +1 -1
- package/lib/types/client/ArkmeDataManagementSettings.d.ts.map +1 -1
- package/lib/types/client/ArkmeDocumentComposerInput.d.ts.map +1 -1
- package/lib/types/client/ArkmeEmojiPicker.d.ts.map +1 -1
- package/lib/types/client/ArkmeInterwovenReadReceipt.d.ts +12 -0
- package/lib/types/client/ArkmeInterwovenReadReceipt.d.ts.map +1 -0
- package/lib/types/client/ArkmeModelSelect.d.ts.map +1 -1
- package/lib/types/client/ArkmeNoteDetails.d.ts.map +1 -1
- package/lib/types/client/ArkmePointsConsumption.d.ts +5 -0
- package/lib/types/client/ArkmePointsConsumption.d.ts.map +1 -0
- package/lib/types/client/ArkmeRelatedQuickNotes.d.ts.map +1 -1
- package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
- package/lib/types/client/ArkoModelMenu.d.ts.map +1 -1
- package/lib/types/client/api.d.ts +1 -1
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/interwoven-moments.d.ts.map +1 -1
- package/lib/types/client/interwoven-read-receipt-store.d.ts +32 -0
- package/lib/types/client/interwoven-read-receipt-store.d.ts.map +1 -0
- package/lib/types/client/locales/actions-en.d.ts.map +1 -1
- package/lib/types/client/locales/dynamic-en.d.ts.map +1 -1
- package/lib/types/client/self-role-presentation.d.ts +6 -1
- package/lib/types/client/self-role-presentation.d.ts.map +1 -1
- package/lib/types/client/use-personal-extension-parents.d.ts +4 -0
- package/lib/types/client/use-personal-extension-parents.d.ts.map +1 -0
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/managed-ai/adapter.d.ts +2 -1
- package/lib/types/managed-ai/adapter.d.ts.map +1 -1
- package/lib/types/managed-ai/operation.d.ts +17 -0
- package/lib/types/managed-ai/operation.d.ts.map +1 -0
- package/lib/types/managed-ai/transport.d.ts +1 -0
- package/lib/types/managed-ai/transport.d.ts.map +1 -1
- package/lib/types/record-extension-tree.d.ts +2 -0
- package/lib/types/record-extension-tree.d.ts.map +1 -1
- package/lib/types/sdk/index.d.ts +4 -0
- package/lib/types/sdk/index.d.ts.map +1 -1
- package/lib/types/services/ai-points-service.d.ts +13 -0
- package/lib/types/services/ai-points-service.d.ts.map +1 -0
- package/lib/types/services/arko-service.d.ts.map +1 -1
- package/lib/types/services/chat-service.d.ts +9 -1
- package/lib/types/services/chat-service.d.ts.map +1 -1
- package/lib/types/services/interwoven-service.d.ts +3 -1
- package/lib/types/services/interwoven-service.d.ts.map +1 -1
- package/lib/types/tools/business/account/ai-points.d.ts +4 -0
- package/lib/types/tools/business/account/ai-points.d.ts.map +1 -0
- package/lib/types/tools/business/account/index.d.ts.map +1 -1
- package/lib/types/tools/ports/profile.d.ts +3 -0
- package/lib/types/tools/ports/profile.d.ts.map +1 -1
- package/lib/types/types.d.ts +17 -3
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -154,7 +154,7 @@ Agent · 内容由 AI 生成,仅供参考|Agent · AI-generated content; verif
|
|
|
154
154
|
当前运行的任务预先占用的余额,任务完成后将返还剩余余额。|Credit reserved for running tasks. Unused credit is released when tasks finish.
|
|
155
155
|
充值|Add credit
|
|
156
156
|
余额充值|Add credit
|
|
157
|
-
|
|
157
|
+
APP 与 Arkme 3.0 共用积分,充值到账后即可使用|AI points are shared between the app and Arkme 3.0, and available once credited.
|
|
158
158
|
当前余额|Current balance
|
|
159
159
|
刷新|Refresh
|
|
160
160
|
充值套餐|Credit packages
|
|
@@ -1897,6 +1897,51 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
1897
1897
|
{v0};录音仍保留在本机,可重试或下载|{v0}; recording remains on this device. Retry or download it.
|
|
1898
1898
|
参与者: {v0}|Participants: {v0}
|
|
1899
1899
|
说话人 {v0}|Speaker {v0}
|
|
1900
|
+
|
|
1901
|
+
AI 额度|AI allowance
|
|
1902
|
+
积分|points
|
|
1903
|
+
赠送积分|Granted points
|
|
1904
|
+
充值积分|Purchased points
|
|
1905
|
+
赠送积分到期时间|Grant expires
|
|
1906
|
+
任务进行中暂占|Reserved by running tasks:
|
|
1907
|
+
积分,结束后返还未用部分|points; unused points return when the task finishes
|
|
1908
|
+
赠送 {v0} · 充值 {v1}|Granted {v0} · Purchased {v1}
|
|
1909
|
+
DSH 对话|DSH chat
|
|
1910
|
+
AI 调用|AI usage
|
|
1911
|
+
(赠送)| (Gift)
|
|
1912
|
+
(充值)| (Purchased)
|
|
1913
|
+
(赠送 {v0} · 充值 {v1})| (Gift {v0} · Purchased {v1})
|
|
1914
|
+
消费记录|Spending history
|
|
1915
|
+
模型调用|Model usage
|
|
1916
|
+
附加服务|Additional service
|
|
1917
|
+
消费月份|Spending month
|
|
1918
|
+
该月消费|Spent in selected month
|
|
1919
|
+
该月暂无积分消费|No point spending in selected month
|
|
1920
|
+
暂时无法读取|Could not load
|
|
1921
|
+
暂时无法读取消费明细。|Spending details could not be loaded.
|
|
1922
|
+
输入 Token|Input tokens
|
|
1923
|
+
输出 Token|Output tokens
|
|
1924
|
+
缓存命中|Cache hit
|
|
1925
|
+
缓存未命中|Cache miss
|
|
1926
|
+
加载失败,已有明细已保留。|Loading failed. Existing entries have been kept.
|
|
1927
|
+
积分充值|Buy points
|
|
1928
|
+
可用积分|Available points
|
|
1929
|
+
预占积分|Reserved points
|
|
1930
|
+
预占积分说明|About reserved points
|
|
1931
|
+
当前运行的任务预先占用的积分,任务完成后将返还未用积分。|Running tasks reserve points. Unused points return when the task finishes.
|
|
1932
|
+
正在加载积分…|Loading points…
|
|
1933
|
+
积分读取失败,点击重试|Points could not be loaded. Click to retry.
|
|
1934
|
+
积分加载中…|Loading points…
|
|
1935
|
+
积分读取失败|Points could not be loaded
|
|
1936
|
+
积分到账中,到账后会自动刷新可用积分。|Your points are being credited. Available points will refresh automatically.
|
|
1937
|
+
已到账,正在刷新可用积分|Credited. Refreshing available points…
|
|
1938
|
+
可用积分已刷新:|Available points refreshed:
|
|
1939
|
+
积分暂未刷新:|Points have not refreshed:
|
|
1940
|
+
刷新积分|Refresh points
|
|
1941
|
+
AI 额度 {v0}|AI allowance {v0}
|
|
1942
|
+
AI 额度充值流程|AI point purchase
|
|
1943
|
+
次调用|calls
|
|
1944
|
+
按用量扣积分 · 计费说明|Usage-based points · Pricing details
|
|
1900
1945
|
`.trim().split("\n").map((line) => {
|
|
1901
1946
|
const p = line.indexOf("|");
|
|
1902
1947
|
return [line.slice(0, p), line.slice(p + 1)];
|
|
@@ -1920,7 +1965,32 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
1920
1965
|
const translated = source;
|
|
1921
1966
|
return values === void 0 ? translated : translated.replace(/\{(\w+)\}/g, (match, key) => Object.prototype.hasOwnProperty.call(values, key) ? String(values[key]) : match);
|
|
1922
1967
|
}
|
|
1923
|
-
|
|
1968
|
+
//#endregion
|
|
1969
|
+
//#region src/ai-points.ts
|
|
1970
|
+
function pointsUnits(value) {
|
|
1971
|
+
if (!/^(?:0|[1-9]\d*)(?:\.\d{1,7})?$/.test(value)) throw new TypeError("Invalid exact AI points");
|
|
1972
|
+
const [whole = "0", fraction = ""] = value.split(".");
|
|
1973
|
+
const units = BigInt(whole) * 10000000n + BigInt(fraction.padEnd(7, "0"));
|
|
1974
|
+
if (units > 9223372036854775807n) throw new TypeError("AI points exceed accounting range");
|
|
1975
|
+
return units;
|
|
1976
|
+
}
|
|
1977
|
+
/** Display floors only; a rounded label can never overpromise spendable points. */
|
|
1978
|
+
function formatAiPoints(value) {
|
|
1979
|
+
const units = pointsUnits(value);
|
|
1980
|
+
if (units > 0n && units < 100000n) return "< 0.01";
|
|
1981
|
+
const hundredths = units / 100000n;
|
|
1982
|
+
const whole = (hundredths / 100n).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1983
|
+
const fraction = (hundredths % 100n).toString().padStart(2, "0").replace(/0+$/, "");
|
|
1984
|
+
return fraction ? `${whole}.${fraction}` : whole;
|
|
1985
|
+
}
|
|
1986
|
+
/** Existing recharge values retain their nano-CNY meaning: ¥1 = 100 points. */
|
|
1987
|
+
function nanoCnyToPoints(value) {
|
|
1988
|
+
if (!/^(?:0|[1-9]\d*)$/.test(value)) throw new TypeError("Invalid nano-CNY");
|
|
1989
|
+
const units = BigInt(value);
|
|
1990
|
+
const whole = units / 10000000n;
|
|
1991
|
+
const fraction = (units % 10000000n).toString().padStart(7, "0").replace(/0+$/, "");
|
|
1992
|
+
return fraction ? `${whole}.${fraction}` : whole.toString();
|
|
1993
|
+
}
|
|
1924
1994
|
//#endregion
|
|
1925
1995
|
//#region src/client/arkme-billing.css?inline
|
|
1926
1996
|
var arkme_billing_default = ".arkme-billing-modal-host {\n background: none;\n border: 0;\n width: 100%;\n max-width: none;\n height: 100%;\n max-height: none;\n margin: 0;\n padding: 0;\n position: fixed;\n inset: 0;\n}\n\n.arkme-billing-modal-host::backdrop {\n background: none;\n}\n\n.arkme-billing-backdrop {\n z-index: 120;\n backdrop-filter: blur(3px);\n background: #181b223d;\n place-items: center;\n padding: 28px;\n display: grid;\n position: fixed;\n inset: 0;\n}\n\n.arkme-billing-recharge-dialog, .arkme-billing-payment-dialog {\n color: #20232c;\n background: #fff;\n border: 1px solid #dedfe3;\n border-radius: 20px;\n width: min(620px, 100%);\n max-height: min(720px, 100vh - 56px);\n overflow-y: auto;\n box-shadow: 0 24px 72px #191c232e;\n}\n\n.arkme-billing-payment-dialog {\n width: min(420px, 100%);\n}\n\n.arkme-billing-dialog-header {\n border-bottom: 1px solid #ececef;\n justify-content: space-between;\n align-items: flex-start;\n gap: 18px;\n min-height: 78px;\n padding: 20px 22px 16px;\n display: flex;\n}\n\n.arkme-billing-dialog-header h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n line-height: 25px;\n}\n\n.arkme-billing-dialog-header p {\n overflow-wrap: anywhere;\n color: #8a8e96;\n margin: 4px 0 0;\n font-size: 12px;\n line-height: 18px;\n}\n\n.arkme-billing-dialog-header > button {\n color: #777c85;\n width: 32px;\n height: 32px;\n font: inherit;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 9px;\n flex: none;\n place-items: center;\n font-size: 22px;\n display: grid;\n}\n\n.arkme-billing-dialog-header > button:hover {\n color: #20232c;\n background: #f3f3f5;\n}\n\n.arkme-billing-dialog-body {\n padding: 18px 22px 22px;\n}\n\n.arkme-billing-dialog-balance {\n border-bottom: 1px solid #ececef;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n column-gap: 12px;\n min-height: 48px;\n padding: 0 2px 16px;\n display: grid;\n}\n\n.arkme-billing-dialog-balance > span {\n color: #8a8e96;\n grid-column: 1;\n font-size: 11px;\n line-height: 16px;\n}\n\n.arkme-billing-dialog-balance > strong {\n grid-column: 1;\n font-size: 22px;\n font-weight: 600;\n line-height: 28px;\n}\n\n.arkme-billing-dialog-balance > button, .arkme-billing-error > button {\n color: #626772;\n height: 30px;\n font: inherit;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 9px;\n grid-area: 1 / 2 / span 2;\n padding: 0 12px;\n font-size: 11px;\n}\n\n.arkme-billing-products-section, .arkme-billing-payment-section {\n padding-top: 17px;\n}\n\n.arkme-billing-products-section h3, .arkme-billing-payment-section h3 {\n color: #747984;\n margin: 0 0 11px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n}\n\n.arkme-billing-product-grid {\n width: 100%;\n}\n\n.arkme-billing-product-grid > button {\n color: #20232c;\n min-width: 0;\n min-height: 62px;\n font: inherit;\n text-align: left;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 11px;\n align-content: center;\n gap: 4px;\n padding: 9px 11px;\n display: grid;\n}\n\n.arkme-billing-product-grid > button:hover {\n background: #f8f8f9;\n border-color: #cfd2d8;\n}\n\n.arkme-billing-product-grid > button.is-selected {\n border-color: #75839e;\n box-shadow: 0 0 0 1px #75839e;\n}\n\n.arkme-billing-product-grid > button > span {\n white-space: nowrap;\n text-overflow: ellipsis;\n font-size: 12px;\n font-weight: 500;\n line-height: 17px;\n overflow: hidden;\n}\n\n.arkme-billing-product-grid > button > strong {\n font-size: 14px;\n font-weight: 600;\n line-height: 19px;\n}\n\n.arkme-billing-payment-actions {\n flex-wrap: wrap;\n gap: 10px;\n display: flex;\n}\n\n.arkme-billing-payment-actions > button {\n color: #333842;\n min-width: 154px;\n height: 38px;\n font: inherit;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 10px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n padding: 0 14px;\n font-size: 12px;\n display: inline-flex;\n}\n\n.arkme-billing-payment-actions > button:hover {\n background: #f7f7f8;\n border-color: #cfd3da;\n}\n\n.arkme-billing-payment-actions > button:disabled, .arkme-billing-product-grid > button:disabled {\n opacity: .48;\n cursor: default;\n}\n\n.arkme-billing-platform-icon {\n flex: none;\n width: 18px;\n height: 18px;\n}\n\n.arkme-billing-platform-icon.is-alipay {\n color: #1677ff;\n}\n\n.arkme-billing-platform-icon.is-wechat {\n color: #07c160;\n}\n\n.arkme-billing-state {\n color: #858992;\n margin: 12px 0 2px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.arkme-billing-error {\n color: #b54841;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n margin-top: 10px;\n font-size: 12px;\n line-height: 18px;\n display: flex;\n}\n\n.arkme-billing-error.is-purchase {\n justify-content: flex-start;\n}\n\n.arkme-billing-payment-content {\n text-align: center;\n justify-items: center;\n gap: 10px;\n padding: 28px 24px 18px;\n display: grid;\n}\n\n.arkme-billing-payment-content > .arkme-billing-platform-icon {\n width: 38px;\n height: 38px;\n margin-bottom: 4px;\n}\n\n.arkme-billing-payment-content > img {\n border-radius: 10px;\n width: 210px;\n height: 210px;\n}\n\n.arkme-billing-payment-content > strong {\n font-size: 14px;\n font-weight: 600;\n line-height: 21px;\n}\n\n.arkme-billing-payment-content > p {\n color: #858992;\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n}\n\n.arkme-billing-payment-content.is-paid > strong {\n color: #16794f;\n font-size: 18px;\n line-height: 25px;\n}\n\n.arkme-billing-payment-content.is-paid > .arkme-billing-error {\n justify-content: center;\n}\n\n.arkme-billing-payment-content.is-crediting > strong {\n color: #335f9e;\n}\n\n.arkme-billing-dialog-actions {\n flex-wrap: wrap;\n justify-content: center;\n gap: 9px;\n padding: 0 22px 20px;\n display: flex;\n}\n\n.arkme-billing-dialog-actions > button, .arkme-billing-primary-action {\n color: #3c424d;\n height: 34px;\n font: inherit;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 9px;\n padding: 0 14px;\n font-size: 12px;\n}\n\n.arkme-billing-dialog-actions > .arkme-billing-primary-action, .arkme-billing-payment-content > .arkme-billing-primary-action {\n color: #fff;\n background: #20232d;\n border-color: #20232d;\n}\n";
|
|
@@ -2159,6 +2229,17 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
2159
2229
|
if (capabilities.contractVersion !== 1) throw new Error(`Unsupported Arkme provider contract version ${String(capabilities.contractVersion)}`);
|
|
2160
2230
|
return capabilities;
|
|
2161
2231
|
}
|
|
2232
|
+
async aiPointsAccount(expectedAccountScope, signal) {
|
|
2233
|
+
if ((await this.capabilities(signal)).features.aiPoints !== true) throw new Error("当前 Provider 不支持 AI 积分");
|
|
2234
|
+
return this.call("account.points.query", { expectedAccountScope }, signal);
|
|
2235
|
+
}
|
|
2236
|
+
async aiPointsConsumption(expectedAccountScope, query, signal) {
|
|
2237
|
+
if ((await this.capabilities(signal)).features.aiPoints !== true) throw new Error("当前 Provider 不支持 AI 积分");
|
|
2238
|
+
return this.call("account.points.consumption", {
|
|
2239
|
+
expectedAccountScope,
|
|
2240
|
+
...query
|
|
2241
|
+
}, signal);
|
|
2242
|
+
}
|
|
2162
2243
|
async state(signal) {
|
|
2163
2244
|
return await this.call("provider.state", void 0, signal);
|
|
2164
2245
|
}
|
|
@@ -6355,18 +6436,14 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6355
6436
|
function formatArkmeBillingPrice(priceMinor, _currency) {
|
|
6356
6437
|
return `¥${(priceMinor / 100).toFixed(2)}`;
|
|
6357
6438
|
}
|
|
6358
|
-
function
|
|
6359
|
-
|
|
6360
|
-
const roundedCents = (BigInt(value) + 5000000n) / 10000000n;
|
|
6361
|
-
const whole = roundedCents / 100n;
|
|
6362
|
-
const fraction = (roundedCents % 100n).toString().padStart(2, "0");
|
|
6363
|
-
return `¥${whole.toLocaleString(arkmeIntlLocale())}.${fraction}`;
|
|
6439
|
+
function formatArkmePoints(value) {
|
|
6440
|
+
return `${formatAiPoints(nanoCnyToPoints(value))} ${tr("积分")}`;
|
|
6364
6441
|
}
|
|
6365
6442
|
function errorMessage(error) {
|
|
6366
6443
|
return error instanceof Error && error.message.trim() !== "" ? error.message : String(error);
|
|
6367
6444
|
}
|
|
6368
6445
|
function ArkmeBalanceSettingsRowView(props) {
|
|
6369
|
-
const description = props.quotaState.kind === "ready" ?
|
|
6446
|
+
const description = props.quotaState.kind === "ready" ? formatArkmePoints(props.quotaState.quota.availableNanoCny) : props.quotaState.kind === "loading" ? "正在加载积分…" : "积分读取失败,点击重试";
|
|
6370
6447
|
const reservedNanoCny = props.quotaState.kind === "ready" ? props.quotaState.quota.reservedNanoCny : void 0;
|
|
6371
6448
|
const showReserved = reservedNanoCny !== void 0 && /^(?:0|[1-9]\d*)$/.test(reservedNanoCny) && BigInt(reservedNanoCny) > 0n;
|
|
6372
6449
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6375,7 +6452,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6375
6452
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6376
6453
|
type: "button",
|
|
6377
6454
|
className: "arkme-redesign-balance-main",
|
|
6378
|
-
"aria-label": tr("
|
|
6455
|
+
"aria-label": tr("AI 额度 {v0}", { v0: description }),
|
|
6379
6456
|
onClick: props.onOpen,
|
|
6380
6457
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: description })
|
|
6381
6458
|
}),
|
|
@@ -6384,21 +6461,21 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6384
6461
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6385
6462
|
className: "arkme-redesign-reserved-title",
|
|
6386
6463
|
children: [
|
|
6387
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: tr("
|
|
6464
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: tr("预占积分") }),
|
|
6388
6465
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6389
6466
|
className: "arkme-redesign-reserved-help",
|
|
6390
6467
|
tabIndex: 0,
|
|
6391
|
-
"aria-label": tr("
|
|
6468
|
+
"aria-label": tr("预占积分说明"),
|
|
6392
6469
|
"aria-describedby": "arkme-reserved-balance-tooltip",
|
|
6393
6470
|
children: "?"
|
|
6394
6471
|
}),
|
|
6395
6472
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6396
6473
|
id: "arkme-reserved-balance-tooltip",
|
|
6397
6474
|
role: "tooltip",
|
|
6398
|
-
children: tr("
|
|
6475
|
+
children: tr("当前运行的任务预先占用的积分,任务完成后将返还未用积分。")
|
|
6399
6476
|
})
|
|
6400
6477
|
]
|
|
6401
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children:
|
|
6478
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: formatArkmePoints(reservedNanoCny) })]
|
|
6402
6479
|
}),
|
|
6403
6480
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6404
6481
|
type: "button",
|
|
@@ -6445,11 +6522,11 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6445
6522
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
6446
6523
|
role: "dialog",
|
|
6447
6524
|
"aria-modal": "true",
|
|
6448
|
-
"aria-label": tr("
|
|
6525
|
+
"aria-label": tr("积分充值"),
|
|
6449
6526
|
className: "arkme-billing-recharge-dialog",
|
|
6450
6527
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
|
|
6451
6528
|
className: "arkme-billing-dialog-header",
|
|
6452
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { children: tr("
|
|
6529
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { children: tr("积分充值") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: tr("APP 与 Arkme 3.0 共用积分,充值到账后即可使用") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6453
6530
|
type: "button",
|
|
6454
6531
|
"aria-label": tr("关闭充值弹窗"),
|
|
6455
6532
|
onClick: props.onClose,
|
|
@@ -6461,8 +6538,8 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6461
6538
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6462
6539
|
className: "arkme-billing-dialog-balance",
|
|
6463
6540
|
children: [
|
|
6464
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tr("
|
|
6465
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.quotaState.kind === "ready" ?
|
|
6541
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tr("可用积分") }),
|
|
6542
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.quotaState.kind === "ready" ? formatArkmePoints(props.quotaState.quota.availableNanoCny) : props.quotaState.kind === "loading" ? tr("正在加载…") : "读取失败" }),
|
|
6466
6543
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6467
6544
|
type: "button",
|
|
6468
6545
|
onClick: props.onRefreshQuota,
|
|
@@ -6506,10 +6583,10 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6506
6583
|
role: "radio",
|
|
6507
6584
|
"aria-checked": product.productId === props.selectedProductId,
|
|
6508
6585
|
className: product.productId === props.selectedProductId ? "is-selected" : "",
|
|
6509
|
-
title: product.
|
|
6586
|
+
title: `${formatArkmePoints(product.creditNanoCny)} · ${formatArkmeBillingPrice(product.priceMinor, product.currency)}`,
|
|
6510
6587
|
disabled: creating,
|
|
6511
6588
|
onClick: () => props.onSelectProduct(product.productId),
|
|
6512
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: product.
|
|
6589
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: formatArkmePoints(product.creditNanoCny) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: formatArkmeBillingPrice(product.priceMinor, product.currency) })]
|
|
6513
6590
|
}, product.productId))
|
|
6514
6591
|
})
|
|
6515
6592
|
]
|
|
@@ -6552,7 +6629,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6552
6629
|
const paymentAction = screen === "pending" ? props.order.paymentAction : void 0;
|
|
6553
6630
|
const qrDataUrl = paymentAction?.type === "display_qr" ? billingQrDataUrl(paymentAction.qrContent) : "";
|
|
6554
6631
|
const openUrl = paymentAction?.type === "open_url" ? paymentAction.url : "";
|
|
6555
|
-
const paidAmount =
|
|
6632
|
+
const paidAmount = formatArkmePoints(props.order.creditNanoCny);
|
|
6556
6633
|
const statusProblem = props.statusError !== "" && (screen === "pending" || screen === "crediting");
|
|
6557
6634
|
const title = statusProblem ? "正在确认支付" : screen === "crediting" ? "支付已确认" : screen === "pending" ? "完成支付" : screen === "paid" ? "支付成功" : screen === "expired" ? "支付未完成" : "订单状态";
|
|
6558
6635
|
(0, react.useEffect)(() => {
|
|
@@ -6637,19 +6714,19 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6637
6714
|
" ",
|
|
6638
6715
|
countdownText(props.order.expiresAtMillis - props.nowMillis)
|
|
6639
6716
|
] }),
|
|
6640
|
-
!statusProblem && screen === "crediting" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: tr("支付已确认,无需重复支付") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: tr("
|
|
6717
|
+
!statusProblem && screen === "crediting" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: tr("支付已确认,无需重复支付") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: tr("积分到账中,到账后会自动刷新可用积分。") })] }),
|
|
6641
6718
|
screen === "paid" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
6642
6719
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [
|
|
6643
6720
|
paidAmount,
|
|
6644
6721
|
" ",
|
|
6645
6722
|
tr("已到账")
|
|
6646
6723
|
] }),
|
|
6647
|
-
props.quotaState.kind === "loading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: tr("
|
|
6648
|
-
props.quotaState.kind === "ready" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [tr("
|
|
6724
|
+
props.quotaState.kind === "loading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: tr("已到账,正在刷新可用积分") }),
|
|
6725
|
+
props.quotaState.kind === "ready" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [tr("可用积分已刷新:"), formatArkmePoints(props.quotaState.quota.availableNanoCny)] }),
|
|
6649
6726
|
props.quotaState.kind === "error" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
6650
6727
|
className: "arkme-billing-error",
|
|
6651
6728
|
role: "alert",
|
|
6652
|
-
children: [tr("
|
|
6729
|
+
children: [tr("积分暂未刷新:"), props.quotaState.message]
|
|
6653
6730
|
})
|
|
6654
6731
|
] }),
|
|
6655
6732
|
screen === "expired" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: tr("支付凭据已过期,请重新生成。") }),
|
|
@@ -6674,7 +6751,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6674
6751
|
screen === "paid" && props.quotaState.kind === "error" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6675
6752
|
type: "button",
|
|
6676
6753
|
onClick: props.onRefreshQuota,
|
|
6677
|
-
children: tr("
|
|
6754
|
+
children: tr("刷新积分")
|
|
6678
6755
|
}),
|
|
6679
6756
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6680
6757
|
type: "button",
|
|
@@ -6715,7 +6792,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6715
6792
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dialog", {
|
|
6716
6793
|
ref,
|
|
6717
6794
|
className: "arkme-billing-modal-host",
|
|
6718
|
-
"aria-label": tr("AI
|
|
6795
|
+
"aria-label": tr("AI 额度充值流程"),
|
|
6719
6796
|
onCancel: (event) => {
|
|
6720
6797
|
event.preventDefault();
|
|
6721
6798
|
event.stopPropagation();
|
|
@@ -6724,7 +6801,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6724
6801
|
children
|
|
6725
6802
|
});
|
|
6726
6803
|
}
|
|
6727
|
-
function ArkmeBillingSettings({ active = true, renderTrigger, modal = false } = {}) {
|
|
6804
|
+
function ArkmeBillingSettings({ active = true, renderTrigger, modal = false, onCreditsChanged } = {}) {
|
|
6728
6805
|
useArkmeLocale();
|
|
6729
6806
|
const [open, setOpen] = (0, react.useState)(false);
|
|
6730
6807
|
const [quotaState, setQuotaState] = (0, react.useState)({ kind: "loading" });
|
|
@@ -6833,7 +6910,10 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6833
6910
|
setOrderStatusRetryable(false);
|
|
6834
6911
|
setOrderStatusRetryInMillis(void 0);
|
|
6835
6912
|
checkoutAttemptRef.current = checkoutAttemptAfterOrder(checkoutAttemptRef.current, latest.status);
|
|
6836
|
-
if (latest.status === "paid")
|
|
6913
|
+
if (latest.status === "paid") {
|
|
6914
|
+
loadQuota();
|
|
6915
|
+
onCreditsChanged?.();
|
|
6916
|
+
}
|
|
6837
6917
|
},
|
|
6838
6918
|
onError: (error, retry) => {
|
|
6839
6919
|
setOrderStatusError(errorMessage(error));
|
|
@@ -6847,7 +6927,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6847
6927
|
});
|
|
6848
6928
|
pollerRef.current = poller;
|
|
6849
6929
|
poller.start(nextOrder.orderId, nextOrder.expiresAtMillis, nextOrder.pollIntervalMillis, nextOrder.status);
|
|
6850
|
-
}, [loadQuota]);
|
|
6930
|
+
}, [loadQuota, onCreditsChanged]);
|
|
6851
6931
|
const createPayment = (0, react.useCallback)(async (paymentMethod, forceNew = false) => {
|
|
6852
6932
|
if (productsState.kind !== "ready") return;
|
|
6853
6933
|
const product = productsState.products.find((item) => item.enabled && item.productId === selectedProductIdRef.current);
|
|
@@ -6865,8 +6945,10 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6865
6945
|
setNowMillis(Date.now());
|
|
6866
6946
|
activateBillingPaymentAction(nextOrder.paymentAction, openPaymentUrl);
|
|
6867
6947
|
setOrder(nextOrder);
|
|
6868
|
-
if (nextOrder.status === "paid")
|
|
6869
|
-
|
|
6948
|
+
if (nextOrder.status === "paid") {
|
|
6949
|
+
loadQuota();
|
|
6950
|
+
onCreditsChanged?.();
|
|
6951
|
+
} else startPolling(nextOrder);
|
|
6870
6952
|
} catch (error) {
|
|
6871
6953
|
setPurchaseError(errorMessage(error));
|
|
6872
6954
|
} finally {
|
|
@@ -6874,6 +6956,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6874
6956
|
}
|
|
6875
6957
|
}, [
|
|
6876
6958
|
loadQuota,
|
|
6959
|
+
onCreditsChanged,
|
|
6877
6960
|
openPaymentUrl,
|
|
6878
6961
|
productsState,
|
|
6879
6962
|
startPolling
|
|
@@ -6999,7 +7082,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
6999
7082
|
}
|
|
7000
7083
|
//#endregion
|
|
7001
7084
|
//#region src/client/arkme-model-select.css?inline
|
|
7002
|
-
var arkme_model_select_default = ".arkme-model-select {\n min-width: 0;\n font-family: inherit;\n position: relative;\n}\n\n.arkme-model-select button {\n font: inherit;\n cursor: pointer;\n}\n\n.arkme-model-select button:disabled {\n opacity: .5;\n cursor: default;\n}\n\n.arkme-model-select button:focus-visible {\n outline-offset: -2px;\n outline: 2px solid #3578e5;\n}\n\n.arkme-model-trigger {\n max-width: min(360px, 45vw);\n height: 28px;\n color: var(--dsw-alias-label-secondary, #626772);\n background: none;\n border: 0;\n border-radius: 14px;\n align-items: center;\n gap: 5px;\n padding: 0 8px;\n display: flex;\n font-size: 13px !important;\n}\n\n.arkme-model-trigger > span:first-child {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.arkme-model-trigger small {\n flex-shrink: 0;\n}\n\n.arkme-model-menu {\n z-index: 30;\n box-sizing: border-box;\n border: 1px solid var(--dsw-alias-border-inverted, #e8e8eb);\n background: var(--dsw-specific-menu, #fff);\n width: max-content;\n min-width: min(280px, 100vw - 32px);\n max-width: min(420px, 100vw - 32px);\n max-height: min(400px, 100vh - 96px);\n color: var(--dsw-alias-label-primary, #20232c);\n border-radius: 12px;\n padding: 5px;\n position: absolute;\n bottom: calc(100% + 8px);\n right: 0;\n overflow-y: auto;\n box-shadow: 0 8px 30px #0002;\n}\n\n.arkme-model-group-heading {\n color: var(--dsw-alias-label-tertiary, #8a8e96);\n justify-content: space-between;\n align-items: center;\n gap: 18px;\n padding: 7px 9px 4px;\n font-size: 12px;\n display: flex;\n}\n\n.arkme-model-balance-actions {\n flex-shrink: 0;\n gap: 8px;\n display: flex;\n}\n\n.arkme-model-balance-actions button {\n color: #3478e5;\n white-space: nowrap;\n background: none;\n border: 0;\n padding: 2px 0;\n}\n\n.arkme-model-balance-actions button:hover {\n text-decoration: underline;\n}\n\n.arkme-model-option {\n width: 100%;\n min-height: 38px;\n color: inherit;\n text-align: left;\n background: none;\n border: 0;\n border-radius: 8px;\n justify-content: space-between;\n align-items: center;\n gap: 18px;\n padding: 8px 10px;\n display: flex;\n font-size: 14px !important;\n}\n\n.arkme-model-option:hover, .arkme-model-trigger:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f3f4f6);\n}\n\n.arkme-model-option > span:first-child {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.arkme-model-option small {\n color: var(--dsw-alias-label-tertiary, #8a8e96);\n font-size: 12px;\n display: block;\n}\n\n.arkme-model-status, .arkme-model-error {\n padding: 8px 10px;\n font-size: 12px;\n}\n\n.arkme-model-error {\n color: var(--dsw-alias-state-error-primary, #b54841);\n}\n\n.arkme-model-error button {\n color: inherit;\n background: none;\n border: 0;\n text-decoration: underline;\n}\n";
|
|
7085
|
+
var arkme_model_select_default = ".arkme-model-select {\n min-width: 0;\n font-family: inherit;\n position: relative;\n}\n\n.arkme-model-select button {\n font: inherit;\n cursor: pointer;\n}\n\n.arkme-model-select button:disabled {\n opacity: .5;\n cursor: default;\n}\n\n.arkme-model-select button:focus-visible {\n outline-offset: -2px;\n outline: 2px solid #3578e5;\n}\n\n.arkme-model-trigger {\n max-width: min(360px, 45vw);\n height: 28px;\n color: var(--dsw-alias-label-secondary, #626772);\n background: none;\n border: 0;\n border-radius: 14px;\n align-items: center;\n gap: 5px;\n padding: 0 8px;\n display: flex;\n font-size: 13px !important;\n}\n\n.arkme-model-trigger > span:first-child {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.arkme-model-trigger small {\n flex-shrink: 0;\n}\n\n.arkme-model-menu {\n z-index: 30;\n box-sizing: border-box;\n border: 1px solid var(--dsw-alias-border-inverted, #e8e8eb);\n background: var(--dsw-specific-menu, #fff);\n width: max-content;\n min-width: min(280px, 100vw - 32px);\n max-width: min(420px, 100vw - 32px);\n max-height: min(400px, 100vh - 96px);\n color: var(--dsw-alias-label-primary, #20232c);\n border-radius: 12px;\n padding: 5px;\n position: absolute;\n bottom: calc(100% + 8px);\n right: 0;\n overflow-y: auto;\n box-shadow: 0 8px 30px #0002;\n}\n\n.arkme-model-group-heading {\n color: var(--dsw-alias-label-tertiary, #8a8e96);\n justify-content: space-between;\n align-items: center;\n gap: 18px;\n padding: 7px 9px 4px;\n font-size: 12px;\n display: flex;\n}\n\n.arkme-model-balance-actions {\n flex-shrink: 0;\n gap: 8px;\n display: flex;\n}\n\n.arkme-model-balance-actions button {\n color: #3478e5;\n white-space: nowrap;\n background: none;\n border: 0;\n padding: 2px 0;\n}\n\n.arkme-model-balance-actions button:hover {\n text-decoration: underline;\n}\n\n.arkme-model-option {\n width: 100%;\n min-height: 38px;\n color: inherit;\n text-align: left;\n background: none;\n border: 0;\n border-radius: 8px;\n justify-content: space-between;\n align-items: center;\n gap: 18px;\n padding: 8px 10px;\n display: flex;\n font-size: 14px !important;\n}\n\n.arkme-model-option:hover, .arkme-model-trigger:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f3f4f6);\n}\n\n.arkme-model-option > span:first-child {\n overflow-wrap: anywhere;\n min-width: 0;\n}\n\n.arkme-model-option small {\n color: var(--dsw-alias-label-tertiary, #8a8e96);\n font-size: 12px;\n display: block;\n}\n\n.arkme-model-status, .arkme-model-error {\n padding: 8px 10px;\n font-size: 12px;\n}\n\n.arkme-model-error {\n color: var(--dsw-alias-state-error-primary, #b54841);\n}\n\n.arkme-model-error button {\n color: inherit;\n background: none;\n border: 0;\n text-decoration: underline;\n}\n\n.arkme-model-price {\n color: var(--dsw-alias-label-tertiary, #8a8e96);\n padding: 0 10px 8px;\n font-size: 12px;\n}\n\n.arkme-model-price summary {\n cursor: pointer;\n}\n\n.arkme-model-price small {\n overflow-wrap: anywhere;\n padding-top: 6px;\n line-height: 1.6;\n display: block;\n}\n";
|
|
7003
7086
|
//#endregion
|
|
7004
7087
|
//#region src/client/ArkmeModelSelect.tsx
|
|
7005
7088
|
function ArkmeModelSelect({ directory, locked, available }) {
|
|
@@ -7159,7 +7242,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
7159
7242
|
id: `${id}-${provider.id}`,
|
|
7160
7243
|
children: [provider.id === "arkme-managed" ? "Arkme" : provider.name, provider.id === "arkme-managed" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7161
7244
|
"aria-live": "polite",
|
|
7162
|
-
children: [" · ", quotaState.kind === "ready" ?
|
|
7245
|
+
children: [" · ", quotaState.kind === "ready" ? formatArkmePoints(quotaState.quota.availableNanoCny) : quotaState.kind === "loading" ? "积分加载中…" : "积分读取失败"]
|
|
7163
7246
|
})]
|
|
7164
7247
|
}), provider.id === "arkme-managed" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7165
7248
|
className: "arkme-model-balance-actions",
|
|
@@ -7178,7 +7261,7 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
7178
7261
|
})]
|
|
7179
7262
|
}), provider.models.map((item) => {
|
|
7180
7263
|
const selected = state.current?.provider === provider.id && state.current.model === item.id;
|
|
7181
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
7264
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
7182
7265
|
type: "button",
|
|
7183
7266
|
role: "menuitemradio",
|
|
7184
7267
|
className: "arkme-model-option",
|
|
@@ -7188,11 +7271,14 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
7188
7271
|
provider: provider.id,
|
|
7189
7272
|
model: item.id
|
|
7190
7273
|
}),
|
|
7191
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [item.name, item.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: item.description })] }), selected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7274
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [item.name, provider.id !== "arkme-managed" && item.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: item.description })] }), selected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7192
7275
|
"aria-hidden": true,
|
|
7193
7276
|
children: "✓"
|
|
7194
7277
|
})]
|
|
7195
|
-
}, item.
|
|
7278
|
+
}), provider.id === "arkme-managed" && item.description && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
7279
|
+
className: "arkme-model-price",
|
|
7280
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: tr("按用量扣积分 · 计费说明") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: item.description })]
|
|
7281
|
+
})] }, item.id);
|
|
7196
7282
|
})]
|
|
7197
7283
|
}, provider.id)),
|
|
7198
7284
|
state.status === "ready" && state.groups.every((item) => item.models.length === 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -279,6 +279,17 @@ window.__ModuleLoader__.load({
|
|
|
279
279
|
if (capabilities.contractVersion !== 1) throw new Error(`Unsupported Arkme provider contract version ${String(capabilities.contractVersion)}`);
|
|
280
280
|
return capabilities;
|
|
281
281
|
}
|
|
282
|
+
async aiPointsAccount(expectedAccountScope, signal) {
|
|
283
|
+
if ((await this.capabilities(signal)).features.aiPoints !== true) throw new Error("当前 Provider 不支持 AI 积分");
|
|
284
|
+
return this.call("account.points.query", { expectedAccountScope }, signal);
|
|
285
|
+
}
|
|
286
|
+
async aiPointsConsumption(expectedAccountScope, query, signal) {
|
|
287
|
+
if ((await this.capabilities(signal)).features.aiPoints !== true) throw new Error("当前 Provider 不支持 AI 积分");
|
|
288
|
+
return this.call("account.points.consumption", {
|
|
289
|
+
expectedAccountScope,
|
|
290
|
+
...query
|
|
291
|
+
}, signal);
|
|
292
|
+
}
|
|
282
293
|
async state(signal) {
|
|
283
294
|
return await this.call("provider.state", void 0, signal);
|
|
284
295
|
}
|
|
@@ -2553,7 +2564,7 @@ Agent · 内容由 AI 生成,仅供参考|Agent · AI-generated content; verif
|
|
|
2553
2564
|
当前运行的任务预先占用的余额,任务完成后将返还剩余余额。|Credit reserved for running tasks. Unused credit is released when tasks finish.
|
|
2554
2565
|
充值|Add credit
|
|
2555
2566
|
余额充值|Add credit
|
|
2556
|
-
|
|
2567
|
+
APP 与 Arkme 3.0 共用积分,充值到账后即可使用|AI points are shared between the app and Arkme 3.0, and available once credited.
|
|
2557
2568
|
当前余额|Current balance
|
|
2558
2569
|
刷新|Refresh
|
|
2559
2570
|
充值套餐|Credit packages
|
|
@@ -4296,6 +4307,51 @@ Arkme 用户 {v0}|Arkme user {v0}
|
|
|
4296
4307
|
{v0};录音仍保留在本机,可重试或下载|{v0}; recording remains on this device. Retry or download it.
|
|
4297
4308
|
参与者: {v0}|Participants: {v0}
|
|
4298
4309
|
说话人 {v0}|Speaker {v0}
|
|
4310
|
+
|
|
4311
|
+
AI 额度|AI allowance
|
|
4312
|
+
积分|points
|
|
4313
|
+
赠送积分|Granted points
|
|
4314
|
+
充值积分|Purchased points
|
|
4315
|
+
赠送积分到期时间|Grant expires
|
|
4316
|
+
任务进行中暂占|Reserved by running tasks:
|
|
4317
|
+
积分,结束后返还未用部分|points; unused points return when the task finishes
|
|
4318
|
+
赠送 {v0} · 充值 {v1}|Granted {v0} · Purchased {v1}
|
|
4319
|
+
DSH 对话|DSH chat
|
|
4320
|
+
AI 调用|AI usage
|
|
4321
|
+
(赠送)| (Gift)
|
|
4322
|
+
(充值)| (Purchased)
|
|
4323
|
+
(赠送 {v0} · 充值 {v1})| (Gift {v0} · Purchased {v1})
|
|
4324
|
+
消费记录|Spending history
|
|
4325
|
+
模型调用|Model usage
|
|
4326
|
+
附加服务|Additional service
|
|
4327
|
+
消费月份|Spending month
|
|
4328
|
+
该月消费|Spent in selected month
|
|
4329
|
+
该月暂无积分消费|No point spending in selected month
|
|
4330
|
+
暂时无法读取|Could not load
|
|
4331
|
+
暂时无法读取消费明细。|Spending details could not be loaded.
|
|
4332
|
+
输入 Token|Input tokens
|
|
4333
|
+
输出 Token|Output tokens
|
|
4334
|
+
缓存命中|Cache hit
|
|
4335
|
+
缓存未命中|Cache miss
|
|
4336
|
+
加载失败,已有明细已保留。|Loading failed. Existing entries have been kept.
|
|
4337
|
+
积分充值|Buy points
|
|
4338
|
+
可用积分|Available points
|
|
4339
|
+
预占积分|Reserved points
|
|
4340
|
+
预占积分说明|About reserved points
|
|
4341
|
+
当前运行的任务预先占用的积分,任务完成后将返还未用积分。|Running tasks reserve points. Unused points return when the task finishes.
|
|
4342
|
+
正在加载积分…|Loading points…
|
|
4343
|
+
积分读取失败,点击重试|Points could not be loaded. Click to retry.
|
|
4344
|
+
积分加载中…|Loading points…
|
|
4345
|
+
积分读取失败|Points could not be loaded
|
|
4346
|
+
积分到账中,到账后会自动刷新可用积分。|Your points are being credited. Available points will refresh automatically.
|
|
4347
|
+
已到账,正在刷新可用积分|Credited. Refreshing available points…
|
|
4348
|
+
可用积分已刷新:|Available points refreshed:
|
|
4349
|
+
积分暂未刷新:|Points have not refreshed:
|
|
4350
|
+
刷新积分|Refresh points
|
|
4351
|
+
AI 额度 {v0}|AI allowance {v0}
|
|
4352
|
+
AI 额度充值流程|AI point purchase
|
|
4353
|
+
次调用|calls
|
|
4354
|
+
按用量扣积分 · 计费说明|Usage-based points · Pricing details
|
|
4299
4355
|
`.trim().split("\n").map((line) => {
|
|
4300
4356
|
const p = line.indexOf("|");
|
|
4301
4357
|
return [line.slice(0, p), line.slice(p + 1)];
|
|
@@ -221,6 +221,17 @@ window.__ModuleLoader__.load({
|
|
|
221
221
|
if (capabilities.contractVersion !== 1) throw new Error(`Unsupported Arkme provider contract version ${String(capabilities.contractVersion)}`);
|
|
222
222
|
return capabilities;
|
|
223
223
|
}
|
|
224
|
+
async aiPointsAccount(expectedAccountScope, signal) {
|
|
225
|
+
if ((await this.capabilities(signal)).features.aiPoints !== true) throw new Error("当前 Provider 不支持 AI 积分");
|
|
226
|
+
return this.call("account.points.query", { expectedAccountScope }, signal);
|
|
227
|
+
}
|
|
228
|
+
async aiPointsConsumption(expectedAccountScope, query, signal) {
|
|
229
|
+
if ((await this.capabilities(signal)).features.aiPoints !== true) throw new Error("当前 Provider 不支持 AI 积分");
|
|
230
|
+
return this.call("account.points.consumption", {
|
|
231
|
+
expectedAccountScope,
|
|
232
|
+
...query
|
|
233
|
+
}, signal);
|
|
234
|
+
}
|
|
224
235
|
async state(signal) {
|
|
225
236
|
return await this.call("provider.state", void 0, signal);
|
|
226
237
|
}
|