@jingyi0605/codingns4dsh 0.2.2-beta.4 → 0.2.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/data/build/dist/client/bundle.js +62 -31
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/features/magpie-management-page.d.ts.map +1 -1
- package/data/build/dist/client/features/magpie-management-page.js +8 -1
- package/data/build/dist/client/features/magpie-management-page.js.map +1 -1
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -1
- package/data/build/dist/client/session-translation-chat.js +15 -5
- package/data/build/dist/client/session-translation-chat.js.map +1 -1
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +9 -8
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts +2 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js +10 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js +4 -3
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +58 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.js +82 -2
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +76 -5
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js +1 -1
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js.map +1 -1
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/json-rpc-process.js +6 -1
- package/data/build/dist/host/cli-adapters/json-rpc-process.js.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +9 -3
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/magpie-detection.d.ts +4 -3
- package/data/build/dist/host/cli-adapters/magpie-detection.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/magpie-detection.js +13 -7
- package/data/build/dist/host/cli-adapters/magpie-detection.js.map +1 -1
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/magpie-usage.js +87 -16
- package/data/build/dist/host/cli-adapters/magpie-usage.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +29 -4
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js +51 -12
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-performance-projection.d.ts +90 -0
- package/data/build/dist/host/cli-adapters/pi-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-performance-projection.js +7 -0
- package/data/build/dist/host/cli-adapters/pi-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-performance.d.ts +15 -0
- package/data/build/dist/host/cli-adapters/pi-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-performance.js +94 -0
- package/data/build/dist/host/cli-adapters/pi-performance.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +7 -0
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/settings.js +16 -1
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/shared/contracts/subscription.d.ts +4 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/subscription.js.map +1 -1
- package/data/build/dist/shared/contracts/version.d.ts +1 -1
- package/data/build/dist/shared/contracts/version.js +1 -1
- package/data/build/dist/shared/request-performance.d.ts +2 -1
- package/data/build/dist/shared/request-performance.d.ts.map +1 -1
- package/data/build/dist/shared/request-performance.js +1 -0
- package/data/build/dist/shared/request-performance.js.map +1 -1
- package/package.json +1 -1
- package/profile/README.md +2 -2
- package/profile/package.json +2 -2
- package/profile/version.json +1 -1
- package/version.json +1 -1
package/README.en.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
[简体中文](README.md) · **English**
|
|
13
13
|
|
|
14
|
-
**Current release `@jingyi0605/codingns4dsh@0.2.2-beta.
|
|
14
|
+
**Current release `@jingyi0605/codingns4dsh@0.2.2-beta.5`** · DSH minimum **`0.2.1-alpha.2`** (tested with `0.2.2-rc.1`; newer versions warn but do not block installation or operation) · Node **`>= 24.9`** · macOS / Linux / Windows
|
|
15
15
|
|
|
16
16
|
**[GitHub](https://github.com/jingyi0605/Codingns4DSH)** · **[npm](https://www.npmjs.com/package/@jingyi0605/codingns4dsh)** · **QQ group 1092985965** · **[WeChat / QQ QR codes](#community)**
|
|
17
17
|
|
|
@@ -225,7 +225,7 @@ The account menu shows login status, access method, connection latency and Host
|
|
|
225
225
|
### Use the Built-in Web Profile
|
|
226
226
|
|
|
227
227
|
```bash
|
|
228
|
-
dsh plugin --profile web add @jingyi0605/codingns4dsh@0.2.2-beta.
|
|
228
|
+
dsh plugin --profile web add @jingyi0605/codingns4dsh@0.2.2-beta.5
|
|
229
229
|
dsh web
|
|
230
230
|
```
|
|
231
231
|
|
|
@@ -235,7 +235,7 @@ Create a separate environment from the built-in Web profile:
|
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
237
|
dsh codingns --from-default-profile web --dump-config
|
|
238
|
-
dsh plugin --profile codingns add @jingyi0605/codingns4dsh@0.2.2-beta.
|
|
238
|
+
dsh plugin --profile codingns add @jingyi0605/codingns4dsh@0.2.2-beta.5
|
|
239
239
|
dsh codingns
|
|
240
240
|
```
|
|
241
241
|
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
**简体中文** · [English](README.en.md)
|
|
13
13
|
|
|
14
|
-
**当前版本 `@jingyi0605/codingns4dsh@0.2.2-beta.
|
|
14
|
+
**当前版本 `@jingyi0605/codingns4dsh@0.2.2-beta.5`** · DSH 最低版本 **`0.2.1-alpha.2`**(已验证 `0.2.2-rc.1`;更新版本仅告警,不阻止安装或运行)· Node **`>= 24.9`** · macOS / Linux / Windows
|
|
15
15
|
|
|
16
16
|
**[GitHub](https://github.com/jingyi0605/Codingns4DSH)** · **[npm](https://www.npmjs.com/package/@jingyi0605/codingns4dsh)** · **QQ 群 1092985965** · **[微信群 / QQ 群二维码](#交流群)**
|
|
17
17
|
|
|
@@ -244,7 +244,7 @@ DSH 原生会话的翻译默认关闭,可在会话模型选择菜单中开启
|
|
|
244
244
|
### 使用内置 Web 配置
|
|
245
245
|
|
|
246
246
|
```bash
|
|
247
|
-
dsh plugin --profile web add @jingyi0605/codingns4dsh@0.2.2-beta.
|
|
247
|
+
dsh plugin --profile web add @jingyi0605/codingns4dsh@0.2.2-beta.5
|
|
248
248
|
dsh web
|
|
249
249
|
```
|
|
250
250
|
|
|
@@ -254,7 +254,7 @@ dsh web
|
|
|
254
254
|
|
|
255
255
|
```bash
|
|
256
256
|
dsh codingns --from-default-profile web --dump-config
|
|
257
|
-
dsh plugin --profile codingns add @jingyi0605/codingns4dsh@0.2.2-beta.
|
|
257
|
+
dsh plugin --profile codingns add @jingyi0605/codingns4dsh@0.2.2-beta.5
|
|
258
258
|
dsh codingns
|
|
259
259
|
```
|
|
260
260
|
|
|
@@ -5704,7 +5704,7 @@ window.__ModuleLoader__.load({
|
|
|
5704
5704
|
return /^0\.1\.5(?:-|$)/u.test(version);
|
|
5705
5705
|
}
|
|
5706
5706
|
/** Codingns4DSH 插件自身的 npm 版本。 */
|
|
5707
|
-
const CODINGNS_VERSION = "0.2.2-beta.
|
|
5707
|
+
const CODINGNS_VERSION = "0.2.2-beta.5";
|
|
5708
5708
|
/** Accept any valid host version at or above the supported minimum. */
|
|
5709
5709
|
function isDshVersionCompatible(version) {
|
|
5710
5710
|
return isDshVersionAtLeast(version, minimumSupportedDshVersion());
|
|
@@ -21288,6 +21288,7 @@ window.__ModuleLoader__.load({
|
|
|
21288
21288
|
return {
|
|
21289
21289
|
kind: "legacy",
|
|
21290
21290
|
mount: (register) => register(),
|
|
21291
|
+
mountAssistant: (register) => register(),
|
|
21291
21292
|
projectText: exports.projectUserText,
|
|
21292
21293
|
userContent: () => null,
|
|
21293
21294
|
images: (owner, props) => owner.renderMessageImages(props)
|
|
@@ -21299,6 +21300,11 @@ window.__ModuleLoader__.load({
|
|
|
21299
21300
|
return {
|
|
21300
21301
|
kind: "factory",
|
|
21301
21302
|
mount: (register) => slots.inject("conversation.user.text.node", () => slots.inject("conversation.chat.user.images", register)),
|
|
21303
|
+
mountAssistant: (register) => {
|
|
21304
|
+
const registry = slots;
|
|
21305
|
+
if (typeof registry.entries !== "function" || typeof registry.subscribe !== "function") return register();
|
|
21306
|
+
return followPresentationEntry(registry, "conversation.chat.node", (entry) => entry.options.key === "assistant-step" && (entry.options.priority ?? 0) >= 0, (entry) => register(entry.inject));
|
|
21307
|
+
},
|
|
21302
21308
|
projectText: () => null,
|
|
21303
21309
|
userContent: (owner, content, facts) => owner.renderFactorySlot("conversation.chat.user.content", {
|
|
21304
21310
|
content,
|
|
@@ -21859,6 +21865,7 @@ window.__ModuleLoader__.load({
|
|
|
21859
21865
|
const CLAUDE_PERFORMANCE_PROJECTION = "codingnsClaudeStats";
|
|
21860
21866
|
const GROK_PERFORMANCE_PROJECTION = "codingnsGrokStats";
|
|
21861
21867
|
const GROK_CONTEXT_PROJECTION = "codingnsGrokContext";
|
|
21868
|
+
const PI_PERFORMANCE_PROJECTION = "codingnsPiStats";
|
|
21862
21869
|
// src/dsh-capabilities/client/composer-slot-selectors.ts
|
|
21863
21870
|
/** Keep DOM consumers aligned with the context presentation's owned child slots. */
|
|
21864
21871
|
function contextComposerSlotName(name) {
|
|
@@ -21960,8 +21967,8 @@ window.__ModuleLoader__.load({
|
|
|
21960
21967
|
useProjection: (key, ...args) => {
|
|
21961
21968
|
const original = props.useProjection(key, ...args);
|
|
21962
21969
|
if (key !== "sessionStats") return original;
|
|
21963
|
-
const value = props.useProjection(adapter === "grok" ? GROK_PERFORMANCE_PROJECTION : adapter === "claude-code" ? CLAUDE_PERFORMANCE_PROJECTION : CODEX_PERFORMANCE_PROJECTION, ...args);
|
|
21964
|
-
if (adapter !== "codex" && adapter !== "grok" && adapter !== "claude-code") return original;
|
|
21970
|
+
const value = props.useProjection(adapter === "grok" ? GROK_PERFORMANCE_PROJECTION : adapter === "claude-code" ? CLAUDE_PERFORMANCE_PROJECTION : adapter === "pi" ? PI_PERFORMANCE_PROJECTION : CODEX_PERFORMANCE_PROJECTION, ...args);
|
|
21971
|
+
if (adapter !== "codex" && adapter !== "grok" && adapter !== "claude-code" && adapter !== "pi") return original;
|
|
21965
21972
|
return value ?? {
|
|
21966
21973
|
turns: 0,
|
|
21967
21974
|
steps: 0,
|
|
@@ -29239,7 +29246,14 @@ window.__ModuleLoader__.load({
|
|
|
29239
29246
|
.codingns-magpie-page{--mp-topbar-pad-x:16px;--mp-topbar-pad-y:0px;--mp-leading-inset:0px;padding-left:var(--dsh-frame-leading-clearance,0px)}
|
|
29240
29247
|
.codingns-magpie-topbar{padding-right:var(--mp-topbar-pad-x);padding-left:calc(var(--mp-topbar-pad-x) + var(--mp-leading-inset))}
|
|
29241
29248
|
html[data-codingns-mobile-sidebar="on"] .codingns-magpie-page{padding-left:0;--mp-leading-inset:max(0px,calc(var(--dsh-frame-leading-clearance,0px) - 20px))}
|
|
29242
|
-
|
|
29249
|
+
/* DSH 0.2.2 narrow-screen drawer mode: the sidebar is an overlay drawer, and DSH pads a
|
|
29250
|
+
global panel's top by 48px (minus the window top clearance) so content starts below its
|
|
29251
|
+
floating toggle button. Instead of leaving that strip empty, pull the page up into it so
|
|
29252
|
+
the tab bar shares the toggle button's row, and start that row after the button via the
|
|
29253
|
+
leading clearance DSH publishes (--mp-leading-inset = clearance - topbar padding). The
|
|
29254
|
+
page is not indented as a whole. Kept after the rule above (same specificity) so it wins
|
|
29255
|
+
when both modes are active. */
|
|
29256
|
+
html [data-sidebar-drawer] .codingns-magpie-page{--mp-pull:max(0px,calc(48px - var(--dsh-frame-top-clearance,0px)));--mp-leading-inset:max(0px,calc(var(--dsh-frame-leading-clearance,0px) - 12px));padding-left:0;margin-top:calc(-1 * var(--mp-pull));height:calc(100% + var(--mp-pull))}@media(max-width:900px){.codingns-magpie-topbar{--mp-topbar-pad-x:14px;--mp-topbar-pad-y:9px}.codingns-magpie-topbar-left{margin-left:calc(-1 * var(--mp-leading-inset))}}
|
|
29243
29257
|
@media(max-width:650px){.codingns-magpie-topbar{--mp-topbar-pad-x:12px;--mp-topbar-pad-y:8px}.codingns-magpie-icon-button{width:36px;height:36px}.codingns-magpie-toolbar:not(.has-tabs){display:none}.codingns-magpie-view{padding:14px 12px 30px}.codingns-magpie-statstrip{grid-template-columns:repeat(2,minmax(0,1fr))}.codingns-magpie-statcell{padding:13px;border-left:0}.codingns-magpie-statcell:nth-child(2n){border-left:.5px solid var(--mp-line)}.codingns-magpie-statcell:nth-child(n+3){border-top:.5px solid var(--mp-line)}.codingns-magpie-statcell:last-child:nth-child(odd){grid-column:1/-1}.codingns-magpie-statcell-value{font-size:${uiFontSize(22)}}.codingns-magpie-barchart-plot{height:132px}.codingns-magpie-barchart-axis{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:0;overflow:hidden;font-size:${uiFontSize(9)}}.codingns-magpie-barchart-tick{overflow:hidden;text-overflow:clip}}
|
|
29244
29258
|
.codingns-magpie-reqlist{display:none}
|
|
29245
29259
|
.codingns-magpie-reqcard{display:flex;flex-direction:column;gap:5px;padding:11px 14px;border-top:.5px solid var(--mp-line)}
|
|
@@ -32193,7 +32207,7 @@ html[data-codingns-mobile-sidebar="on"] .codingns-magpie-page{padding-left:0;--m
|
|
|
32193
32207
|
sessionId: props.sessionId?.trim() ?? "",
|
|
32194
32208
|
adapterId,
|
|
32195
32209
|
...providerId === null ? {} : { providerId }
|
|
32196
|
-
}) : await
|
|
32210
|
+
}) : await callMagpieRpc(props.rpc, "usage/reset", { user: resetTargetUser });
|
|
32197
32211
|
if (result === null) throw new Error(t("usage.resetFailed"));
|
|
32198
32212
|
setResetResult(result.outcome);
|
|
32199
32213
|
if (adapterId !== null) invalidateSubscriptionUsageCache(subscriptionUsageCache, adapterId, providerId);
|
|
@@ -32216,7 +32230,7 @@ html[data-codingns-mobile-sidebar="on"] .codingns-magpie-page{padding-left:0;--m
|
|
|
32216
32230
|
const key = `${user}:${policy}`;
|
|
32217
32231
|
if (magpiePolicyPending !== null) return;
|
|
32218
32232
|
setMagpiePolicyPending(key);
|
|
32219
|
-
|
|
32233
|
+
callMagpieRpc(props.rpc, "usage/account/update", {
|
|
32220
32234
|
user,
|
|
32221
32235
|
policy,
|
|
32222
32236
|
enabled
|
|
@@ -32417,7 +32431,7 @@ html[data-codingns-mobile-sidebar="on"] .codingns-magpie-page{padding-left:0;--m
|
|
|
32417
32431
|
[t("usage.magpieCacheReadTokens"), formatMagpieTokenCount(usage.aggregate.cacheReadTokens) ?? t("usage.upstreamNotProvided")],
|
|
32418
32432
|
[t("usage.magpieCacheWriteTokens"), formatMagpieTokenCount(usage.aggregate.cacheWriteTokens) ?? t("usage.upstreamNotProvided")],
|
|
32419
32433
|
[t("usage.magpieTotalTokens"), formatMagpieTokenCount(sumKnownCounts(usage.aggregate.inputTokens, usage.aggregate.outputTokens))],
|
|
32420
|
-
[t("usage.magpieCacheHitRate"), formatMagpieCacheHitRate(usage.aggregate.inputTokens, usage.aggregate.cacheReadTokens) ?? t("usage.upstreamNotProvided")],
|
|
32434
|
+
[t("usage.magpieCacheHitRate"), formatMagpieCacheHitRate(usage.aggregate.inputTokens, usage.aggregate.cacheReadTokens, usage.aggregate.cacheWriteTokens, usage.aggregate.cacheUnknownTokens) ?? t("usage.upstreamNotProvided")],
|
|
32421
32435
|
[t("usage.magpieCost"), formatMagpieCost(usage.aggregate.costUsd)]
|
|
32422
32436
|
];
|
|
32423
32437
|
const sessionRows = usage.session === null ? [] : [
|
|
@@ -32428,7 +32442,7 @@ html[data-codingns-mobile-sidebar="on"] .codingns-magpie-page{padding-left:0;--m
|
|
|
32428
32442
|
[t("usage.magpieCacheReadTokens"), formatMagpieTokenCount(usage.session.cacheReadTokens) ?? t("usage.upstreamNotProvided")],
|
|
32429
32443
|
[t("usage.magpieCacheWriteTokens"), formatMagpieTokenCount(usage.session.cacheWriteTokens) ?? t("usage.upstreamNotProvided")],
|
|
32430
32444
|
[t("usage.magpieTotalTokens"), formatMagpieTokenCount(sumKnownCounts(usage.session.inputTokens, usage.session.outputTokens))],
|
|
32431
|
-
[t("usage.magpieCacheHitRate"), formatMagpieCacheHitRate(usage.session.inputTokens, usage.session.cacheReadTokens) ?? t("usage.upstreamNotProvided")],
|
|
32445
|
+
[t("usage.magpieCacheHitRate"), formatMagpieCacheHitRate(usage.session.inputTokens, usage.session.cacheReadTokens, usage.session.cacheWriteTokens, usage.session.cacheUnknownTokens) ?? t("usage.upstreamNotProvided")],
|
|
32432
32446
|
[t("usage.magpieCost"), formatMagpieCost(usage.session.costUsd)]
|
|
32433
32447
|
];
|
|
32434
32448
|
const quotas = usage.quotas ?? [];
|
|
@@ -32845,9 +32859,9 @@ html[data-codingns-mobile-sidebar="on"] .codingns-magpie-page{padding-left:0;--m
|
|
|
32845
32859
|
function formatMagpieCost(value) {
|
|
32846
32860
|
return value === null ? null : `$${value.toFixed(value >= .01 ? 2 : 4)}`;
|
|
32847
32861
|
}
|
|
32848
|
-
function formatMagpieCacheHitRate(inputTokens, cacheReadTokens) {
|
|
32849
|
-
if (inputTokens === null || cacheReadTokens === null) return null;
|
|
32850
|
-
const totalPromptTokens = inputTokens + cacheReadTokens;
|
|
32862
|
+
function formatMagpieCacheHitRate(inputTokens, cacheReadTokens, cacheWriteTokens, cacheUnknownTokens) {
|
|
32863
|
+
if (inputTokens === null || cacheReadTokens === null || cacheWriteTokens === null || cacheUnknownTokens === null) return null;
|
|
32864
|
+
const totalPromptTokens = inputTokens + cacheReadTokens + cacheWriteTokens - (cacheUnknownTokens ?? 0);
|
|
32851
32865
|
return totalPromptTokens <= 0 ? null : formatSub2ApiPercent(cacheReadTokens / totalPromptTokens * 100);
|
|
32852
32866
|
}
|
|
32853
32867
|
function sumKnownCounts(left, right) {
|
|
@@ -64960,7 +64974,8 @@ button[${ACCOUNT_ATTRIBUTE}]:focus-visible{outline:2px solid ${dshThemeColor.lab
|
|
|
64960
64974
|
} : void 0;
|
|
64961
64975
|
const mentions = fileOwner === void 0 || typeof props.fileMentions !== "function" ? void 0 : props.fileMentions(fileOwner);
|
|
64962
64976
|
const turnProcess = props.turnProcess;
|
|
64963
|
-
const
|
|
64977
|
+
const keepReplies = props.usePresentation?.((policy) => policy.foldedReplies === "all") === true;
|
|
64978
|
+
const reasoningHidden = turnProcess !== void 0 && turnProcess.foldable === true && (keepReplies ? props.groupPart !== "reasoning" : turnProcess.spec?.answerStep === data.step && turnProcess.spec?.inlineReasoning === true) && turnProcess.open !== true;
|
|
64964
64979
|
const rendered = [];
|
|
64965
64980
|
const last = blocks.length - 1;
|
|
64966
64981
|
const messageId = `turn-${data.turn}-step-${data.step}`;
|
|
@@ -65003,6 +65018,7 @@ button[${ACCOUNT_ATTRIBUTE}]:focus-visible{outline:2px solid ${dshThemeColor.lab
|
|
|
65003
65018
|
hidden: reasoningHidden,
|
|
65004
65019
|
reveal: () => turnProcess?.setOpen?.(true),
|
|
65005
65020
|
useGroupAction: props.useGroupAction,
|
|
65021
|
+
useDisclosure: props.useDisclosure,
|
|
65006
65022
|
renderFactorySlot: props.renderFactorySlot,
|
|
65007
65023
|
markdownLabels,
|
|
65008
65024
|
pathImages,
|
|
@@ -65082,7 +65098,7 @@ button[${ACCOUNT_ATTRIBUTE}]:focus-visible{outline:2px solid ${dshThemeColor.lab
|
|
|
65082
65098
|
}));
|
|
65083
65099
|
}
|
|
65084
65100
|
function AssistantReasoningBlock(props) {
|
|
65085
|
-
const
|
|
65101
|
+
const { expanded, toggle } = (props.useDisclosure ?? useReasoningDisclosure)();
|
|
65086
65102
|
const groupRef = props.useGroupAction?.(props.hidden, props.reveal);
|
|
65087
65103
|
const { record } = useOutputTranslation({
|
|
65088
65104
|
...props,
|
|
@@ -65101,7 +65117,7 @@ button[${ACCOUNT_ATTRIBUTE}]:focus-visible{outline:2px solid ${dshThemeColor.lab
|
|
|
65101
65117
|
expandable: true,
|
|
65102
65118
|
expandOnRowClick: true,
|
|
65103
65119
|
running: props.running,
|
|
65104
|
-
onToggle:
|
|
65120
|
+
onToggle: toggle,
|
|
65105
65121
|
collapsedContent: (0, react.createElement)("span", { style: {
|
|
65106
65122
|
minWidth: 0,
|
|
65107
65123
|
overflow: "hidden",
|
|
@@ -65127,6 +65143,13 @@ button[${ACCOUNT_ATTRIBUTE}]:focus-visible{outline:2px solid ${dshThemeColor.lab
|
|
|
65127
65143
|
...props.renderFactorySlot === void 0 ? {} : { renderFactorySlot: props.renderFactorySlot }
|
|
65128
65144
|
}) : null));
|
|
65129
65145
|
}
|
|
65146
|
+
function useReasoningDisclosure() {
|
|
65147
|
+
const [expanded, setExpanded] = (0, react.useState)(false);
|
|
65148
|
+
return {
|
|
65149
|
+
expanded,
|
|
65150
|
+
toggle: () => setExpanded((value) => !value)
|
|
65151
|
+
};
|
|
65152
|
+
}
|
|
65130
65153
|
/**
|
|
65131
65154
|
* 思考块展开后的正文。
|
|
65132
65155
|
*
|
|
@@ -65220,20 +65243,13 @@ button[${ACCOUNT_ATTRIBUTE}]:focus-visible{outline:2px solid ${dshThemeColor.lab
|
|
|
65220
65243
|
};
|
|
65221
65244
|
const presentation = resolution.value;
|
|
65222
65245
|
const removeRenderers = presentation.mount(() => {
|
|
65223
|
-
const renderers = [
|
|
65224
|
-
|
|
65225
|
-
|
|
65226
|
-
|
|
65227
|
-
|
|
65228
|
-
|
|
65229
|
-
|
|
65230
|
-
presentation
|
|
65231
|
-
})],
|
|
65232
|
-
["assistant-step", (props) => AssistantTranslationNodeView({
|
|
65233
|
-
...props,
|
|
65234
|
-
presentation
|
|
65235
|
-
})]
|
|
65236
|
-
];
|
|
65246
|
+
const renderers = [["user", (props) => UserMessageNodeView({
|
|
65247
|
+
...props,
|
|
65248
|
+
presentation
|
|
65249
|
+
})], ["steering", (props) => UserMessageNodeView({
|
|
65250
|
+
...props,
|
|
65251
|
+
presentation
|
|
65252
|
+
})]];
|
|
65237
65253
|
const removers = [];
|
|
65238
65254
|
try {
|
|
65239
65255
|
for (const [key, component] of renderers) removers.push(slots.inject("conversation.chat.node", () => slots.register({
|
|
@@ -65247,6 +65263,21 @@ button[${ACCOUNT_ATTRIBUTE}]:focus-visible{outline:2px solid ${dshThemeColor.lab
|
|
|
65247
65263
|
translationT
|
|
65248
65264
|
})
|
|
65249
65265
|
}, component)));
|
|
65266
|
+
removers.push(presentation.mountAssistant((nativeInject) => slots.inject("conversation.chat.node", () => slots.register({
|
|
65267
|
+
name: "conversation.chat.node",
|
|
65268
|
+
key: "assistant-step",
|
|
65269
|
+
priority: -100,
|
|
65270
|
+
locale: "chat",
|
|
65271
|
+
inject: (sessionId) => ({
|
|
65272
|
+
hooks: nativeInject?.(sessionId).hooks,
|
|
65273
|
+
services,
|
|
65274
|
+
sessionId,
|
|
65275
|
+
translationT
|
|
65276
|
+
})
|
|
65277
|
+
}, (props) => AssistantTranslationNodeView({
|
|
65278
|
+
...props,
|
|
65279
|
+
presentation
|
|
65280
|
+
})))));
|
|
65250
65281
|
} catch (error) {
|
|
65251
65282
|
for (const remove of removers.reverse()) remove();
|
|
65252
65283
|
throw error;
|
|
@@ -67406,7 +67437,7 @@ button.${settingsPromoClass.version}:focus-visible{${focusRing}}
|
|
|
67406
67437
|
return (0, react.createElement)("aside", {
|
|
67407
67438
|
className: settingsPromoClass.root,
|
|
67408
67439
|
"aria-label": t("settings.promo.sectionLabel")
|
|
67409
|
-
}, (0, react.createElement)("div", { className: settingsPromoClass.row }, (0, react.createElement)("div", { className: settingsPromoClass.brand }, (0, react.createElement)("div", { className: settingsPromoClass.headline }, (0, react.createElement)(StarBurstIcon, { className: settingsPromoClass.logo }), (0, react.createElement)("h3", { className: settingsPromoClass.title }, t("common.brand"))), versionControl ?? (0, react.createElement)("span", { className: settingsPromoClass.version }, t("settings.promo.version", { version: "0.2.2-beta.
|
|
67440
|
+
}, (0, react.createElement)("div", { className: settingsPromoClass.row }, (0, react.createElement)("div", { className: settingsPromoClass.brand }, (0, react.createElement)("div", { className: settingsPromoClass.headline }, (0, react.createElement)(StarBurstIcon, { className: settingsPromoClass.logo }), (0, react.createElement)("h3", { className: settingsPromoClass.title }, t("common.brand"))), versionControl ?? (0, react.createElement)("span", { className: settingsPromoClass.version }, t("settings.promo.version", { version: "0.2.2-beta.5" }))), (0, react.createElement)("p", { className: settingsPromoClass.text }, t("settings.promo.starHint"), (0, react.createElement)("span", {
|
|
67410
67441
|
className: settingsPromoClass.hand,
|
|
67411
67442
|
"aria-hidden": true
|
|
67412
67443
|
}, "👉")), (0, react.createElement)("a", {
|
|
@@ -67463,7 +67494,7 @@ button.${settingsPromoClass.version}:focus-visible{${focusRing}}
|
|
|
67463
67494
|
};
|
|
67464
67495
|
}
|
|
67465
67496
|
// src/client/update-store.ts
|
|
67466
|
-
const DEFAULT_PLUGIN_UPDATE_CHANNEL = "0.2.2-beta.
|
|
67497
|
+
const DEFAULT_PLUGIN_UPDATE_CHANNEL = "0.2.2-beta.5".includes("-") ? "next" : "latest";
|
|
67467
67498
|
var PluginUpdateStore = class {
|
|
67468
67499
|
rpc;
|
|
67469
67500
|
snapshot = {
|
|
@@ -80584,5 +80615,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
80584
80615
|
});
|
|
80585
80616
|
|
|
80586
80617
|
})();
|
|
80587
|
-
// codingns-client-revision:
|
|
80618
|
+
// codingns-client-revision: e627b9da29c6eef291a1bf042b69358125f84bfd58198b49aac81bead77fce87
|
|
80588
80619
|
//# sourceMappingURL=bundle.js.map
|