@jcy2387/dsh-conversation-ui 0.1.7-rc.2 → 0.1.7-rc.2.1
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 +1 -1
- package/README.md +1 -1
- package/lib/client.js +89 -78
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client/TypewriterAssistantNodeView.tsx +36 -10
package/README.en.md
CHANGED
|
@@ -53,7 +53,7 @@ A Codex-style conversation UI enhancement plugin for DeepSeek Harness (DSH): the
|
|
|
53
53
|
Published package:
|
|
54
54
|
|
|
55
55
|
```sh
|
|
56
|
-
dsh plugin --profile web add @jcy2387/dsh-conversation-ui@0.1.7-rc.2
|
|
56
|
+
dsh plugin --profile web add @jcy2387/dsh-conversation-ui@0.1.7-rc.2.1
|
|
57
57
|
dsh web
|
|
58
58
|
```
|
|
59
59
|
|
package/README.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -438,50 +438,50 @@ window.__ModuleLoader__.load({
|
|
|
438
438
|
tag.textContent = css$2;
|
|
439
439
|
}
|
|
440
440
|
var TypewriterAssistantNodeView_module_css_default = {
|
|
441
|
-
"turnFoldRow": "Sp5wgW_turnFoldRow",
|
|
442
|
-
"nestedToolSemanticIcon": "Sp5wgW_nestedToolSemanticIcon",
|
|
443
|
-
"streamSemanticIcon": "Sp5wgW_streamSemanticIcon",
|
|
444
|
-
"thinkLeading": "Sp5wgW_thinkLeading",
|
|
445
|
-
"stopped": "Sp5wgW_stopped",
|
|
446
|
-
"disclosureLeading": "Sp5wgW_disclosureLeading",
|
|
447
441
|
"thinkTitle": "Sp5wgW_thinkTitle",
|
|
448
|
-
"
|
|
449
|
-
"
|
|
450
|
-
"
|
|
451
|
-
"
|
|
442
|
+
"disclosureTitle": "Sp5wgW_disclosureTitle",
|
|
443
|
+
"root": "Sp5wgW_root",
|
|
444
|
+
"eventRow": "Sp5wgW_eventRow",
|
|
445
|
+
"toolGroupHeader": "Sp5wgW_toolGroupHeader",
|
|
446
|
+
"disclosureLeading": "Sp5wgW_disclosureLeading",
|
|
452
447
|
"turnWaiting": "Sp5wgW_turnWaiting",
|
|
453
|
-
"
|
|
454
|
-
"dsh-conversation-ui-think-sweep": "Sp5wgW_dsh-conversation-ui-think-sweep",
|
|
455
|
-
"thinkSummary": "Sp5wgW_thinkSummary",
|
|
448
|
+
"visuallyHidden": "Sp5wgW_visuallyHidden",
|
|
456
449
|
"disclosureRoot": "Sp5wgW_disclosureRoot",
|
|
457
|
-
"disclosureTitle": "Sp5wgW_disclosureTitle",
|
|
458
|
-
"dsh-codex-stream-enter": "Sp5wgW_dsh-codex-stream-enter",
|
|
459
|
-
"markdownFlow": "Sp5wgW_markdownFlow",
|
|
460
|
-
"reasoningDisclosure": "Sp5wgW_reasoningDisclosure",
|
|
461
450
|
"think": "Sp5wgW_think",
|
|
462
|
-
"
|
|
463
|
-
"
|
|
464
|
-
"
|
|
465
|
-
"
|
|
466
|
-
"visuallyHidden": "Sp5wgW_visuallyHidden",
|
|
467
|
-
"toolGroupHeaderIcon": "Sp5wgW_toolGroupHeaderIcon",
|
|
468
|
-
"body": "Sp5wgW_body",
|
|
469
|
-
"thinkSeparator": "Sp5wgW_thinkSeparator",
|
|
451
|
+
"toolGroupHeaderLabel": "Sp5wgW_toolGroupHeaderLabel",
|
|
452
|
+
"toolGroupHeaderGlyph": "Sp5wgW_toolGroupHeaderGlyph",
|
|
453
|
+
"reasoningText": "Sp5wgW_reasoningText",
|
|
454
|
+
"turnFoldLabel": "Sp5wgW_turnFoldLabel",
|
|
470
455
|
"toolGroupAnchor": "Sp5wgW_toolGroupAnchor",
|
|
456
|
+
"streamSemanticIcon": "Sp5wgW_streamSemanticIcon",
|
|
471
457
|
"disclosureRow": "Sp5wgW_disclosureRow",
|
|
472
|
-
"toolGroupHeaderChevron": "Sp5wgW_toolGroupHeaderChevron",
|
|
473
|
-
"thinkRow": "Sp5wgW_thinkRow",
|
|
474
|
-
"toolGroupHeader": "Sp5wgW_toolGroupHeader",
|
|
475
|
-
"root": "Sp5wgW_root",
|
|
476
|
-
"toolGroupContent": "Sp5wgW_toolGroupContent",
|
|
477
458
|
"reasoningSummary": "Sp5wgW_reasoningSummary",
|
|
478
|
-
"
|
|
479
|
-
"
|
|
480
|
-
"
|
|
481
|
-
"
|
|
459
|
+
"turnPrelude": "Sp5wgW_turnPrelude",
|
|
460
|
+
"dsh-codex-stream-enter": "Sp5wgW_dsh-codex-stream-enter",
|
|
461
|
+
"nestedToolSemanticIcon": "Sp5wgW_nestedToolSemanticIcon",
|
|
462
|
+
"disclosureTrailing": "Sp5wgW_disclosureTrailing",
|
|
463
|
+
"thinkSummary": "Sp5wgW_thinkSummary",
|
|
464
|
+
"thinkRow": "Sp5wgW_thinkRow",
|
|
465
|
+
"thinkSeparator": "Sp5wgW_thinkSeparator",
|
|
466
|
+
"turnFoldButton": "Sp5wgW_turnFoldButton",
|
|
482
467
|
"follow": "Sp5wgW_follow",
|
|
483
|
-
"
|
|
484
|
-
"
|
|
468
|
+
"thinkLeading": "Sp5wgW_thinkLeading",
|
|
469
|
+
"stopped": "Sp5wgW_stopped",
|
|
470
|
+
"thinkBody": "Sp5wgW_thinkBody",
|
|
471
|
+
"turnFoldRow": "Sp5wgW_turnFoldRow",
|
|
472
|
+
"toolSemanticIcon": "Sp5wgW_toolSemanticIcon",
|
|
473
|
+
"toolGroupHeaderIcon": "Sp5wgW_toolGroupHeaderIcon",
|
|
474
|
+
"dsh-turn-waiting-shimmer": "Sp5wgW_dsh-turn-waiting-shimmer",
|
|
475
|
+
"toolGroupHeaderChevron": "Sp5wgW_toolGroupHeaderChevron",
|
|
476
|
+
"reasoningDisclosure": "Sp5wgW_reasoningDisclosure",
|
|
477
|
+
"disclosureContent": "Sp5wgW_disclosureContent",
|
|
478
|
+
"dsh-conversation-ui-think-sweep": "Sp5wgW_dsh-conversation-ui-think-sweep",
|
|
479
|
+
"markdownFlow": "Sp5wgW_markdownFlow",
|
|
480
|
+
"toolGroupFrame": "Sp5wgW_toolGroupFrame",
|
|
481
|
+
"editStats": "Sp5wgW_editStats",
|
|
482
|
+
"body": "Sp5wgW_body",
|
|
483
|
+
"toolGroupContent": "Sp5wgW_toolGroupContent",
|
|
484
|
+
"thinkChevron": "Sp5wgW_thinkChevron"
|
|
485
485
|
};
|
|
486
486
|
//#endregion
|
|
487
487
|
//#region src/client/FollowHost.tsx
|
|
@@ -835,7 +835,7 @@ window.__ModuleLoader__.load({
|
|
|
835
835
|
* commits when the frame rate is degraded. Settled text uses the full Markdown
|
|
836
836
|
* pipeline.
|
|
837
837
|
*/
|
|
838
|
-
const TypewriterAssistantNodeView = (0, react.memo)(function TypewriterAssistantNodeView({ mode = DEFAULT_CONVERSATION_CONFIG.mode, preset = DEFAULT_CONVERSATION_CONFIG.preset, revealCharsPerSec = DEFAULT_CONVERSATION_CONFIG.revealCharsPerSec, scrollSpeedPxPerSec = DEFAULT_CONVERSATION_CONFIG.scrollSpeedPxPerSec, maxScrollSpeedPxPerSec = DEFAULT_CONVERSATION_CONFIG.maxScrollSpeedPxPerSec, thinkAutoExpand = DEFAULT_CONVERSATION_SETTINGS.thinkAutoExpand, node, turnProcess, useTurnData, useSession, openFile, renderMessageImages, fileMentions, t }) {
|
|
838
|
+
const TypewriterAssistantNodeView = (0, react.memo)(function TypewriterAssistantNodeView({ mode = DEFAULT_CONVERSATION_CONFIG.mode, preset = DEFAULT_CONVERSATION_CONFIG.preset, revealCharsPerSec = DEFAULT_CONVERSATION_CONFIG.revealCharsPerSec, scrollSpeedPxPerSec = DEFAULT_CONVERSATION_CONFIG.scrollSpeedPxPerSec, maxScrollSpeedPxPerSec = DEFAULT_CONVERSATION_CONFIG.maxScrollSpeedPxPerSec, thinkAutoExpand = DEFAULT_CONVERSATION_SETTINGS.thinkAutoExpand, node, groupPart, turnProcess, useTurnData, useSession, openFile, renderMessageImages, fileMentions, t }) {
|
|
839
839
|
const data = node.data;
|
|
840
840
|
const streaming = data.status === "running";
|
|
841
841
|
const reducedMotion = usePrefersReducedMotion();
|
|
@@ -872,7 +872,8 @@ window.__ModuleLoader__.load({
|
|
|
872
872
|
},
|
|
873
873
|
footnotes: t("markdown.footnotes")
|
|
874
874
|
}), [t]);
|
|
875
|
-
const
|
|
875
|
+
const blocks = (0, react.useMemo)(() => groupPart === "reasoning" ? data.blocks.filter((block) => block.kind === "reasoning") : groupPart === "response" ? data.blocks.filter((block) => block.kind !== "reasoning") : data.blocks, [data.blocks, groupPart]);
|
|
876
|
+
const hasVisible = streaming || data.status === "interrupted" || blocks.some((block) => block.kind !== "tool-call");
|
|
876
877
|
const fallbackControl = ownsFallbackProcessControl(node, turnProcess, fallbackGate);
|
|
877
878
|
const fallbackMember = isFallbackProcessMember(node, turnProcess, fallbackGate);
|
|
878
879
|
const reasoningHidden = (turnProcess?.foldable === true || fallbackControl) && turnProcess?.spec.answerStep === data.step && turnProcess.spec.inlineReasoning && !turnProcess.open;
|
|
@@ -887,14 +888,24 @@ window.__ModuleLoader__.load({
|
|
|
887
888
|
}, [guardRef, seatRef]);
|
|
888
889
|
if (!hasVisible) return null;
|
|
889
890
|
const rendered = [];
|
|
890
|
-
const last =
|
|
891
|
+
const last = blocks.length - 1;
|
|
891
892
|
let lastFollow = -1;
|
|
892
|
-
for (let index = 0; index <
|
|
893
|
-
const kind =
|
|
893
|
+
for (let index = 0; index < blocks.length; index += 1) {
|
|
894
|
+
const kind = blocks[index]?.kind;
|
|
894
895
|
if (kind === "text" || kind === "reasoning") lastFollow = index;
|
|
895
896
|
}
|
|
896
|
-
|
|
897
|
-
|
|
897
|
+
let nodeTailBlock;
|
|
898
|
+
for (let index = data.blocks.length - 1; index >= 0; index -= 1) {
|
|
899
|
+
const kind = data.blocks[index]?.kind;
|
|
900
|
+
if (kind === "text" || kind === "reasoning") {
|
|
901
|
+
nodeTailBlock = data.blocks[index];
|
|
902
|
+
break;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
const followsTail = lastFollow >= 0 && lastFollow === last && blocks[lastFollow] === nodeTailBlock;
|
|
906
|
+
const stoppedHere = data.status === "interrupted" && (groupPart === void 0 || groupPart === "response" || !data.blocks.some((block) => block !== void 0 && block.kind !== "reasoning" && block.kind !== "tool-call"));
|
|
907
|
+
for (let index = 0; index < blocks.length; index += 1) {
|
|
908
|
+
const block = blocks[index];
|
|
898
909
|
if (block === void 0) continue;
|
|
899
910
|
switch (block.kind) {
|
|
900
911
|
case "text":
|
|
@@ -933,8 +944,8 @@ window.__ModuleLoader__.load({
|
|
|
933
944
|
case "image": {
|
|
934
945
|
const start = index;
|
|
935
946
|
const group = [block];
|
|
936
|
-
while (index + 1 <
|
|
937
|
-
const next =
|
|
947
|
+
while (index + 1 < blocks.length) {
|
|
948
|
+
const next = blocks[index + 1];
|
|
938
949
|
if (next === void 0 || next.kind !== "image") break;
|
|
939
950
|
group.push(next);
|
|
940
951
|
index += 1;
|
|
@@ -960,13 +971,13 @@ window.__ModuleLoader__.load({
|
|
|
960
971
|
"data-stream-phase": phase,
|
|
961
972
|
"data-streaming": streaming || void 0,
|
|
962
973
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FollowHost, {
|
|
963
|
-
active: streaming && !reducedMotion,
|
|
974
|
+
active: streaming && !reducedMotion && followsTail,
|
|
964
975
|
speedCpsRef: rootSpeedRef,
|
|
965
976
|
minSpeedPxPerSec: scrollSpeedPxPerSec,
|
|
966
977
|
maxSpeedPxPerSec: maxScrollSpeedPxPerSec,
|
|
967
978
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
968
979
|
className: TypewriterAssistantNodeView_module_css_default.body,
|
|
969
|
-
children: [rendered,
|
|
980
|
+
children: [rendered, stoppedHere && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
970
981
|
className: TypewriterAssistantNodeView_module_css_default.stopped,
|
|
971
982
|
children: t("message.stopped")
|
|
972
983
|
})]
|
|
@@ -2035,30 +2046,30 @@ window.__ModuleLoader__.load({
|
|
|
2035
2046
|
tag.textContent = css$1;
|
|
2036
2047
|
}
|
|
2037
2048
|
var ConversationCard_module_css_default = {
|
|
2049
|
+
"metadata": "XFnqVW_metadata",
|
|
2050
|
+
"header": "XFnqVW_header",
|
|
2051
|
+
"card": "XFnqVW_card",
|
|
2052
|
+
"name": "XFnqVW_name",
|
|
2038
2053
|
"label": "XFnqVW_label",
|
|
2039
|
-
"
|
|
2040
|
-
"updateRow": "XFnqVW_updateRow",
|
|
2054
|
+
"update": "XFnqVW_update",
|
|
2041
2055
|
"updateCopy": "XFnqVW_updateCopy",
|
|
2056
|
+
"save": "XFnqVW_save",
|
|
2057
|
+
"updateRow": "XFnqVW_updateRow",
|
|
2058
|
+
"footer": "XFnqVW_footer",
|
|
2059
|
+
"discard": "XFnqVW_discard",
|
|
2042
2060
|
"field": "XFnqVW_field",
|
|
2043
|
-
"
|
|
2061
|
+
"hint": "XFnqVW_hint",
|
|
2062
|
+
"toggle": "XFnqVW_toggle",
|
|
2063
|
+
"failed": "XFnqVW_failed",
|
|
2064
|
+
"cardOpen": "XFnqVW_cardOpen",
|
|
2065
|
+
"headText": "XFnqVW_headText",
|
|
2066
|
+
"description": "XFnqVW_description",
|
|
2044
2067
|
"version": "XFnqVW_version",
|
|
2045
|
-
"name": "XFnqVW_name",
|
|
2046
2068
|
"pending": "XFnqVW_pending",
|
|
2047
|
-
"
|
|
2048
|
-
"card": "XFnqVW_card",
|
|
2049
|
-
"description": "XFnqVW_description",
|
|
2050
|
-
"metadata": "XFnqVW_metadata",
|
|
2069
|
+
"fieldHead": "XFnqVW_fieldHead",
|
|
2051
2070
|
"failure": "XFnqVW_failure",
|
|
2052
2071
|
"readOnly": "XFnqVW_readOnly",
|
|
2053
|
-
"
|
|
2054
|
-
"body": "XFnqVW_body",
|
|
2055
|
-
"footer": "XFnqVW_footer",
|
|
2056
|
-
"save": "XFnqVW_save",
|
|
2057
|
-
"fieldHead": "XFnqVW_fieldHead",
|
|
2058
|
-
"failed": "XFnqVW_failed",
|
|
2059
|
-
"discard": "XFnqVW_discard",
|
|
2060
|
-
"headText": "XFnqVW_headText",
|
|
2061
|
-
"hint": "XFnqVW_hint"
|
|
2072
|
+
"body": "XFnqVW_body"
|
|
2062
2073
|
};
|
|
2063
2074
|
//#endregion
|
|
2064
2075
|
//#region src/client/ConversationCard.tsx
|
|
@@ -3279,24 +3290,24 @@ window.__ModuleLoader__.load({
|
|
|
3279
3290
|
tag.textContent = css;
|
|
3280
3291
|
}
|
|
3281
3292
|
var DeliverablesCard_module_css_default = {
|
|
3282
|
-
"
|
|
3283
|
-
"added": "sLyncq_added",
|
|
3284
|
-
"headerIcon": "sLyncq_headerIcon",
|
|
3285
|
-
"filePath": "sLyncq_filePath",
|
|
3286
|
-
"root": "sLyncq_root",
|
|
3287
|
-
"title": "sLyncq_title",
|
|
3288
|
-
"removed": "sLyncq_removed",
|
|
3289
|
-
"list": "sLyncq_list",
|
|
3290
|
-
"fileName": "sLyncq_fileName",
|
|
3293
|
+
"parentPath": "sLyncq_parentPath",
|
|
3291
3294
|
"stats": "sLyncq_stats",
|
|
3295
|
+
"subtitle": "sLyncq_subtitle",
|
|
3292
3296
|
"heading": "sLyncq_heading",
|
|
3297
|
+
"root": "sLyncq_root",
|
|
3298
|
+
"headerIcon": "sLyncq_headerIcon",
|
|
3299
|
+
"added": "sLyncq_added",
|
|
3300
|
+
"title": "sLyncq_title",
|
|
3301
|
+
"websitePath": "sLyncq_websitePath",
|
|
3302
|
+
"header": "sLyncq_header",
|
|
3303
|
+
"filePath": "sLyncq_filePath",
|
|
3293
3304
|
"item": "sLyncq_item",
|
|
3294
|
-
"
|
|
3305
|
+
"fileName": "sLyncq_fileName",
|
|
3306
|
+
"external": "sLyncq_external",
|
|
3307
|
+
"removed": "sLyncq_removed",
|
|
3295
3308
|
"moreIcon": "sLyncq_moreIcon",
|
|
3296
|
-
"
|
|
3297
|
-
"more": "sLyncq_more"
|
|
3298
|
-
"websitePath": "sLyncq_websitePath",
|
|
3299
|
-
"external": "sLyncq_external"
|
|
3309
|
+
"list": "sLyncq_list",
|
|
3310
|
+
"more": "sLyncq_more"
|
|
3300
3311
|
};
|
|
3301
3312
|
//#endregion
|
|
3302
3313
|
//#region src/client/DeliverablesCard.tsx
|