@deepseek-ai/dsh-client-ui-conversation 0.1.3-alpha.2 → 0.1.5-alpha.2
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.i18n.yaml +2 -2
- package/README.md +6 -4
- package/README.zh.md +6 -4
- package/lib/client.js +266 -127
- package/lib/types/client/contract/input.d.ts +1 -1
- package/lib/types/client/contract/records.d.ts +4 -3
- package/lib/types/client/contract/request-inspection.d.ts +43 -9
- package/lib/types/client/contract/slots.d.ts +29 -4
- package/lib/types/client/contract/system-prompt.d.ts +35 -0
- package/lib/types/client/conversation/assembly.d.ts +13 -3
- package/lib/types/client/index.d.ts +3 -2
- package/lib/types/client/input/submission-policy.d.ts +22 -17
- package/lib/types/client/locales.d.ts +4 -0
- package/lib/types/client/skeleton/ConversationPanel.d.ts +9 -0
- package/lib/types/client/skeleton/InputBar.d.ts +1 -1
- package/package.json +36 -36
package/lib/client.js
CHANGED
|
@@ -828,34 +828,120 @@ window.__ModuleLoader__.load({
|
|
|
828
828
|
//#endregion
|
|
829
829
|
//#region lib/types/client/contract/request-inspection.js
|
|
830
830
|
/**
|
|
831
|
-
* Canonicalize one request header
|
|
831
|
+
* Canonicalize one request header against the system node in force and
|
|
832
|
+
* classify the model-visible prompt change.
|
|
832
833
|
* @param previous - Prompt from the preceding loaded request header, when available.
|
|
833
834
|
* @param event - Durable full request header to inspect.
|
|
835
|
+
* @param system - Effective nonempty system prompt after loaded surface replacements; empty when removed.
|
|
836
|
+
* An in-history update already presented its text at its own position, so the header reports no system change for it.
|
|
834
837
|
* @returns The canonical prompt and an initial/system/tool change when it can be established.
|
|
835
838
|
*/
|
|
836
|
-
function inspectRequestPrompt(previous, event) {
|
|
839
|
+
function inspectRequestPrompt(previous, event, system) {
|
|
837
840
|
const header = event.data.header;
|
|
838
841
|
const rawTools = header.tools;
|
|
839
842
|
const prompt = {
|
|
840
843
|
config: header.config,
|
|
841
|
-
system:
|
|
844
|
+
system: system?.text ?? "",
|
|
842
845
|
tools: Array.isArray(rawTools) ? rawTools : []
|
|
843
846
|
};
|
|
844
847
|
if (previous === void 0 && event.data.reason !== "initial") return { prompt };
|
|
845
|
-
const systemChanged = previous !== void 0 && previous.system !== prompt.system;
|
|
848
|
+
const systemChanged = previous !== void 0 && previous.system !== prompt.system && system?.update !== true;
|
|
846
849
|
const toolsChanged = previous !== void 0 && JSON.stringify(previous.tools) !== JSON.stringify(prompt.tools);
|
|
847
850
|
if (previous !== void 0 && !systemChanged && !toolsChanged) return { prompt };
|
|
851
|
+
const origin = system !== void 0 && (previous === void 0 || systemChanged) ? system : event;
|
|
848
852
|
return {
|
|
849
853
|
prompt,
|
|
850
854
|
change: {
|
|
851
|
-
seq:
|
|
852
|
-
time:
|
|
855
|
+
seq: origin.seq,
|
|
856
|
+
time: origin.time,
|
|
853
857
|
kind: previous === void 0 ? "initial" : systemChanged && toolsChanged ? "system-and-tools" : systemChanged ? "system" : "tools",
|
|
854
858
|
...previous === void 0 ? {} : { previous }
|
|
855
859
|
}
|
|
856
860
|
};
|
|
857
861
|
}
|
|
858
862
|
//#endregion
|
|
863
|
+
//#region ../../core/session/src/surface.ts
|
|
864
|
+
/** Runtime counterpart of the message-producing event union. */
|
|
865
|
+
const SURFACE_EVENT_TYPES = new Set([
|
|
866
|
+
"system/message",
|
|
867
|
+
"user/message",
|
|
868
|
+
"assistant/message",
|
|
869
|
+
"tool/result"
|
|
870
|
+
]);
|
|
871
|
+
/**
|
|
872
|
+
* Narrow an event to a surface-eligible event carrying its required marker.
|
|
873
|
+
* @param event - event to test.
|
|
874
|
+
* @returns true when both the type and marker identify a surface event.
|
|
875
|
+
*/
|
|
876
|
+
function isSurfaceEvent(event) {
|
|
877
|
+
if (!SURFACE_EVENT_TYPES.has(event.type)) return false;
|
|
878
|
+
return event.surfaceOp !== void 0;
|
|
879
|
+
}
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region lib/types/client/contract/system-prompt.js
|
|
882
|
+
/**
|
|
883
|
+
* Apply a system event or positional replacement without retaining ordinary messages.
|
|
884
|
+
* Replacement positions inherit their start endpoint, not their chronological seq.
|
|
885
|
+
* Unknown older endpoint order withholds the prompt until prepend replay resolves it.
|
|
886
|
+
* @param previous - Interpretation at the preceding relevant event in the loaded window.
|
|
887
|
+
* @param event - System message or surface replacement already admitted by Session.
|
|
888
|
+
* @returns Immutable surviving system facts and the effective nonempty prompt.
|
|
889
|
+
*/
|
|
890
|
+
function inspectSystemPrompt(previous, event) {
|
|
891
|
+
const op = isSurfaceEvent(event) ? event.surfaceOp : void 0;
|
|
892
|
+
const firstSeq = previous?.firstSeq ?? event.seq;
|
|
893
|
+
let nodes = previous?.nodes ?? [];
|
|
894
|
+
let replacements = previous?.replacements ?? /* @__PURE__ */ new Map();
|
|
895
|
+
const unknownEndpoint = (seq) => seq < firstSeq && !replacements.has(seq);
|
|
896
|
+
const uncertain = previous?.uncertain === true || op !== void 0 && op !== "append" && (unknownEndpoint(op.startSeq) || unknownEndpoint(op.endSeq));
|
|
897
|
+
if (uncertain) return {
|
|
898
|
+
firstSeq,
|
|
899
|
+
uncertain,
|
|
900
|
+
nodes: [],
|
|
901
|
+
replacements: /* @__PURE__ */ new Map(),
|
|
902
|
+
effective: void 0,
|
|
903
|
+
introduced: void 0
|
|
904
|
+
};
|
|
905
|
+
let position = event.seq;
|
|
906
|
+
if (op !== void 0 && op !== "append") {
|
|
907
|
+
position = replacements.get(op.startSeq) ?? op.startSeq;
|
|
908
|
+
const end = replacements.get(op.endSeq) ?? op.endSeq;
|
|
909
|
+
nodes = nodes.filter((item) => item.position < position || item.position > end);
|
|
910
|
+
const retained = new Map([...replacements].filter(([, value]) => value < position || value > end));
|
|
911
|
+
retained.set(event.seq, position);
|
|
912
|
+
replacements = retained;
|
|
913
|
+
}
|
|
914
|
+
const introduced = event.type === "system/message" ? {
|
|
915
|
+
seq: event.seq,
|
|
916
|
+
time: event.time,
|
|
917
|
+
turn: event.data.turn,
|
|
918
|
+
step: event.data.step,
|
|
919
|
+
text: event.data.message.content.flatMap((block) => block.type === "text" ? [block.text] : []).join(""),
|
|
920
|
+
update: op === "append" && previous?.nodes.some((item) => item.node.text !== "") === true
|
|
921
|
+
} : void 0;
|
|
922
|
+
if (introduced !== void 0) nodes = [...nodes, {
|
|
923
|
+
position,
|
|
924
|
+
node: introduced
|
|
925
|
+
}].sort((a, b) => a.position - b.position);
|
|
926
|
+
const surviving = nodes.findLast((item) => item.node.text !== "")?.node;
|
|
927
|
+
const effective = surviving === previous?.nodes.findLast((item) => item.node.text !== "")?.node ? previous?.effective : introduced !== void 0 && introduced === surviving ? introduced : {
|
|
928
|
+
seq: event.seq,
|
|
929
|
+
time: event.time,
|
|
930
|
+
turn: surviving?.turn ?? 0,
|
|
931
|
+
step: surviving?.step ?? 0,
|
|
932
|
+
text: surviving?.text ?? "",
|
|
933
|
+
update: false
|
|
934
|
+
};
|
|
935
|
+
return {
|
|
936
|
+
firstSeq,
|
|
937
|
+
uncertain,
|
|
938
|
+
nodes,
|
|
939
|
+
replacements,
|
|
940
|
+
effective,
|
|
941
|
+
introduced
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
//#endregion
|
|
859
945
|
//#region lib/types/client/contract/conversation.js
|
|
860
946
|
/**
|
|
861
947
|
* Build a stable collision-free key for one Definition-local business identity.
|
|
@@ -2581,17 +2667,28 @@ window.__ModuleLoader__.load({
|
|
|
2581
2667
|
return this.images.seed(sessionId, attachment, url);
|
|
2582
2668
|
}
|
|
2583
2669
|
/**
|
|
2584
|
-
*
|
|
2670
|
+
* Interpret a system message or surface replacement for target-owned prompt Definitions.
|
|
2671
|
+
* @param previous - System facts at the preceding relevant loaded event.
|
|
2672
|
+
* @param event - Durable system message or positional replacement.
|
|
2673
|
+
* @returns Immutable prompt interpretation at this event.
|
|
2674
|
+
*/
|
|
2675
|
+
inspectSystemPrompt(previous, event) {
|
|
2676
|
+
return inspectSystemPrompt(previous, event);
|
|
2677
|
+
}
|
|
2678
|
+
/**
|
|
2679
|
+
* Canonicalize one `request/header` event against the previous prompt state
|
|
2680
|
+
* and the `system/message` node in force.
|
|
2585
2681
|
*
|
|
2586
2682
|
* A pure interpretation shared by the Chat and Trajectory Definitions, exposed
|
|
2587
2683
|
* as a service method because cross-plugin value imports are forbidden in
|
|
2588
2684
|
* client bundles.
|
|
2589
2685
|
* @param previous - prompt recorded by the preceding loaded header, if any.
|
|
2590
2686
|
* @param event - the `request/header` session event to interpret.
|
|
2687
|
+
* @param system - effective prompt after loaded surface replacements, if any.
|
|
2591
2688
|
* @returns the canonical prompt snapshot and any model-visible change.
|
|
2592
2689
|
*/
|
|
2593
|
-
inspectRequestPrompt(previous, event) {
|
|
2594
|
-
return inspectRequestPrompt(previous, event);
|
|
2690
|
+
inspectRequestPrompt(previous, event, system) {
|
|
2691
|
+
return inspectRequestPrompt(previous, event, system);
|
|
2595
2692
|
}
|
|
2596
2693
|
drop(record, releaseScope) {
|
|
2597
2694
|
if (this.bindings.get(record.source.sessionId) !== record) return;
|
|
@@ -13461,17 +13558,34 @@ window.__ModuleLoader__.load({
|
|
|
13461
13558
|
//#endregion
|
|
13462
13559
|
//#region lib/types/client/input/submission-policy.js
|
|
13463
13560
|
/**
|
|
13464
|
-
* Composer submission policy. It owns the live busy-Enter
|
|
13465
|
-
*
|
|
13466
|
-
*
|
|
13561
|
+
* Composer submission policy. It owns the live busy-Enter preference and
|
|
13562
|
+
* resolves submission gestures into queue/steer delivery modes; Host and
|
|
13563
|
+
* Agent keep the actual delivery-window authority.
|
|
13467
13564
|
*/
|
|
13468
13565
|
/**
|
|
13469
|
-
*
|
|
13470
|
-
*
|
|
13471
|
-
*
|
|
13566
|
+
* Resolve one submission gesture against the busy-Enter preference. Plain
|
|
13567
|
+
* Enter and the primary Send button share the `enter` gesture, so the button
|
|
13568
|
+
* delivers exactly what Enter would. Direct `steer` is intentionally
|
|
13569
|
+
* best-effort: AgentLoop turns a closed-window submission into the next waking
|
|
13570
|
+
* Queue item.
|
|
13571
|
+
* @param preferred - the live busy-Enter preference.
|
|
13572
|
+
* @param running - whether the addressed agent currently reports busy.
|
|
13573
|
+
* @param gesture - plain Enter (or the Send button) or the Cmd/Ctrl-accelerated chord.
|
|
13574
|
+
* @param steeringAvailable - whether this session transport supports steering.
|
|
13575
|
+
* @returns Queue outside steer-capable busy state; otherwise the preferred mode or its opposite.
|
|
13576
|
+
*/
|
|
13577
|
+
function resolveSubmitMode(preferred, running, gesture, steeringAvailable) {
|
|
13578
|
+
if (!running || !steeringAvailable) return "queue";
|
|
13579
|
+
if (gesture === "enter") return preferred;
|
|
13580
|
+
return preferred === "queue" ? "steer" : "queue";
|
|
13581
|
+
}
|
|
13582
|
+
/**
|
|
13583
|
+
* Busy-Enter preference shared by the composer bar inject face and its
|
|
13584
|
+
* Settings row: one live store the bar's submission gestures and Send label
|
|
13585
|
+
* read, backed by the Host user-settings document when one is composed.
|
|
13472
13586
|
*/
|
|
13473
13587
|
var ComposerSubmissionPolicy = class {
|
|
13474
|
-
/** Reactive preference source for the Settings row. */
|
|
13588
|
+
/** Reactive preference source for the composer bar and the Settings row. */
|
|
13475
13589
|
busyEnter = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(DEFAULT_BUSY_ENTER_BEHAVIOR);
|
|
13476
13590
|
host;
|
|
13477
13591
|
/**
|
|
@@ -13490,21 +13604,8 @@ window.__ModuleLoader__.load({
|
|
|
13490
13604
|
}
|
|
13491
13605
|
}
|
|
13492
13606
|
/**
|
|
13493
|
-
*
|
|
13494
|
-
*
|
|
13495
|
-
* @param gesture - plain Enter or the Cmd/Ctrl-accelerated chord.
|
|
13496
|
-
* @param steeringAvailable - whether this session transport supports steering.
|
|
13497
|
-
* @returns Queue outside steer-capable busy state; otherwise the preferred mode or its opposite.
|
|
13498
|
-
*/
|
|
13499
|
-
resolve(running, gesture, steeringAvailable) {
|
|
13500
|
-
if (!running || !steeringAvailable) return "queue";
|
|
13501
|
-
const preferred = this.busyEnter.getSnapshot();
|
|
13502
|
-
if (gesture === "enter") return preferred;
|
|
13503
|
-
return preferred === "queue" ? "steer" : "queue";
|
|
13504
|
-
}
|
|
13505
|
-
/**
|
|
13506
|
-
* Change the plain-Enter behavior used during busy state; the live value
|
|
13507
|
-
* publishes before the durable write starts.
|
|
13607
|
+
* Change the busy-state submission behavior; the live value publishes
|
|
13608
|
+
* before the durable write starts.
|
|
13508
13609
|
* @param behavior - Queue or Steer.
|
|
13509
13610
|
*/
|
|
13510
13611
|
setBusyEnter(behavior) {
|
|
@@ -13535,15 +13636,17 @@ window.__ModuleLoader__.load({
|
|
|
13535
13636
|
"hint.goal": "输入目标,智能体将持续执行",
|
|
13536
13637
|
"hint.goal.active": "当前目标进行中。可输入 edit 修改 / pause 暂停 / resume 继续 / clear 清除",
|
|
13537
13638
|
"placeholder.plan": PLAN_NEXT_ACTION_ZH,
|
|
13538
|
-
"placeholder.default": "
|
|
13639
|
+
"placeholder.default": "发消息或创建任务, / 调用指令, @ 文件或对话",
|
|
13539
13640
|
"placeholder.unavailable": "会话不可用",
|
|
13540
13641
|
"placeholder.parentOffline": "父会话已离线,无法继续发送;仍可停止当前运行",
|
|
13541
|
-
"placeholder.hero": "
|
|
13642
|
+
"placeholder.hero": "描述你想要构建的内容, / 调用指令, @ 文件或对话",
|
|
13542
13643
|
"placeholder.workspace": "选择一个工作区开始",
|
|
13543
13644
|
"placeholder.steerQueue": "Cmd/Ctrl+Enter 插话发送全部排队消息",
|
|
13544
13645
|
"input.commands": "指令",
|
|
13545
13646
|
"input.stop": "停止生成",
|
|
13546
13647
|
"input.send": "发送消息",
|
|
13648
|
+
"input.send.queue": "排队发送",
|
|
13649
|
+
"input.send.steer": "插话发送",
|
|
13547
13650
|
"input.accessMode": "访问模式,当前:{name}",
|
|
13548
13651
|
"attachment.pending": "待发送附件",
|
|
13549
13652
|
"attachment.scrollLeft": "向左滚动附件",
|
|
@@ -13582,10 +13685,10 @@ window.__ModuleLoader__.load({
|
|
|
13582
13685
|
"context.aria": "上下文已用 {percent}",
|
|
13583
13686
|
"context.used": "上下文已用",
|
|
13584
13687
|
"context.system": "系统提示词",
|
|
13585
|
-
"context.tools": "
|
|
13688
|
+
"context.tools": "工具定义",
|
|
13586
13689
|
"context.messages": "对话消息",
|
|
13587
|
-
"settings.enter.title": "
|
|
13588
|
-
"settings.enter.description": "
|
|
13690
|
+
"settings.enter.title": "繁忙时的发送行为",
|
|
13691
|
+
"settings.enter.description": "智能体运行时 Enter 键和发送按钮的行为;Cmd/Ctrl+Enter 使用另一行为",
|
|
13589
13692
|
"settings.enter.queue": "排队发送",
|
|
13590
13693
|
"settings.enter.steer": "插话发送",
|
|
13591
13694
|
"access.preset.readOnly": "仅可查看",
|
|
@@ -13695,15 +13798,17 @@ window.__ModuleLoader__.load({
|
|
|
13695
13798
|
"hint.goal": "describe the objective for a long-running task",
|
|
13696
13799
|
"hint.goal.active": "goal active — edit / pause / resume / clear",
|
|
13697
13800
|
"placeholder.plan": PLAN_NEXT_ACTION_EN,
|
|
13698
|
-
"placeholder.default": "Message or run a task
|
|
13801
|
+
"placeholder.default": "Message or run a task, / commands, @ files or sessions",
|
|
13699
13802
|
"placeholder.unavailable": "Session unavailable",
|
|
13700
13803
|
"placeholder.parentOffline": "Parent session offline; sending is unavailable but you can still stop the run",
|
|
13701
|
-
"placeholder.hero": "Describe what you want to build
|
|
13804
|
+
"placeholder.hero": "Describe what you want to build, / commands, @ files or sessions",
|
|
13702
13805
|
"placeholder.workspace": "Choose a workspace to start",
|
|
13703
13806
|
"placeholder.steerQueue": "Cmd/Ctrl+Enter steers all queued messages",
|
|
13704
13807
|
"input.commands": "Commands",
|
|
13705
13808
|
"input.stop": "Stop generating",
|
|
13706
13809
|
"input.send": "Send message",
|
|
13810
|
+
"input.send.queue": "Queue message",
|
|
13811
|
+
"input.send.steer": "Steer message",
|
|
13707
13812
|
"input.accessMode": "Access mode, current: {name}",
|
|
13708
13813
|
"attachment.pending": "Pending attachments",
|
|
13709
13814
|
"attachment.scrollLeft": "Scroll attachments left",
|
|
@@ -13742,10 +13847,10 @@ window.__ModuleLoader__.load({
|
|
|
13742
13847
|
"context.aria": "{percent} of context used",
|
|
13743
13848
|
"context.used": "of context used",
|
|
13744
13849
|
"context.system": "System prompt",
|
|
13745
|
-
"context.tools": "
|
|
13850
|
+
"context.tools": "Tool definitions",
|
|
13746
13851
|
"context.messages": "Messages",
|
|
13747
|
-
"settings.enter.title": "
|
|
13748
|
-
"settings.enter.description": "
|
|
13852
|
+
"settings.enter.title": "Send behavior while busy",
|
|
13853
|
+
"settings.enter.description": "What Enter and the Send button do while the agent is running; Cmd/Ctrl+Enter uses the other behavior",
|
|
13749
13854
|
"settings.enter.queue": "Queue",
|
|
13750
13855
|
"settings.enter.steer": "Steer",
|
|
13751
13856
|
"access.preset.readOnly": "Read Only",
|
|
@@ -13921,7 +14026,10 @@ window.__ModuleLoader__.load({
|
|
|
13921
14026
|
(0, react_jsx_runtime.jsx)("span", {
|
|
13922
14027
|
className: QueueDock_module_css_default.fileIcon,
|
|
13923
14028
|
"aria-hidden": true,
|
|
13924
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
14029
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.FileTypeIcon, {
|
|
14030
|
+
path: attachment.name,
|
|
14031
|
+
size: 16
|
|
14032
|
+
})
|
|
13925
14033
|
}),
|
|
13926
14034
|
(0, react_jsx_runtime.jsx)("span", {
|
|
13927
14035
|
className: QueueDock_module_css_default.fileName,
|
|
@@ -14388,7 +14496,7 @@ window.__ModuleLoader__.load({
|
|
|
14388
14496
|
}
|
|
14389
14497
|
//#endregion
|
|
14390
14498
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-conversation/src/client/skeleton/HeroShell.module.css.mjs
|
|
14391
|
-
const css$5 = ".pXSMma_root{justify-content:center;align-items:center;min-width:0;height:100%;padding:0 24px;display:flex}.pXSMma_stack{width:100%;max-width:var(--dsh-composer-card-max-width);flex-direction:column;align-items:stretch;gap:12px;display:flex;overflow:visible}.pXSMma_headline{color:var(--dsw-alias-label-primary);
|
|
14499
|
+
const css$5 = ".pXSMma_root{justify-content:center;align-items:center;min-width:0;height:100%;padding:0 24px;display:flex}.pXSMma_stack{width:100%;max-width:var(--dsh-composer-card-max-width);flex-direction:column;align-items:stretch;gap:12px;display:flex;overflow:visible}.pXSMma_headline{color:var(--dsw-alias-label-primary);flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 10px;font-size:26px;font-weight:500;line-height:32px;display:flex}.pXSMma_titleGroup{flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 7px;min-width:0;display:flex}.pXSMma_previewBadge{border:.5px solid var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-state-business-tertiary);color:var(--dsw-alias-label-primary-bluish);font-family:var(--ds-font-family-code);white-space:nowrap;border-radius:24px;align-self:flex-start;margin-top:2px;padding:1px 7px 0;font-size:12px;font-weight:500;line-height:18px}.pXSMma_fishHitbox{flex:none;justify-content:center;align-items:center;display:inline-flex}.pXSMma_fish{transform-origin:50% 60%;color:var(--dsw-alias-label-primary);display:block;overflow:visible}@keyframes pXSMma_hero-fish-swim{0%,to{transform:none}35%{transform:rotate(-4deg)translate(-.4px,-.9px)}70%{transform:rotate(1.6deg)translate(.3px,.2px)}}@media (hover:hover) and (prefers-reduced-motion:no-preference){.pXSMma_fishHitbox:hover .pXSMma_fish{animation:1.6s ease-in-out infinite pXSMma_hero-fish-swim}}.pXSMma_body{flex-direction:column;gap:12px;min-width:0;display:flex;position:relative;overflow:visible}.pXSMma_body>*{z-index:1;position:relative}.pXSMma_body>.pXSMma_workspaceRow{z-index:10;align-items:center;min-width:0;padding-left:8px;display:flex}.pXSMma_workspace{max-width:min(100%,360px);min-height:28px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:16px;align-items:center;gap:4px;padding:0 8px;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.pXSMma_workspace:not(:disabled):hover,.pXSMma_workspace[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.pXSMma_workspace:disabled{cursor:default}.pXSMma_folder{color:var(--dsw-alias-label-primary);flex:none}.pXSMma_workspaceLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.pXSMma_chevron{color:var(--dsw-alias-label-caption);flex:none}.pXSMma_modalInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);width:100%;height:44px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:22px;outline:none;padding:7px 14px;font-size:14px;font-weight:400;line-height:22px}.pXSMma_modalInput::placeholder{color:var(--dsw-alias-label-caption)}.pXSMma_modalInput:disabled{color:var(--dsw-alias-label-dimmed)}.pXSMma_modalAction{min-width:72px}.pXSMma_modalError{color:var(--dsw-alias-state-error-primary);margin-top:8px;font-size:12px;line-height:18px}";
|
|
14392
14500
|
const tagId$5 = "@deepseek-ai/dsh-client-ui-conversation/HeroShell.module.css";
|
|
14393
14501
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
|
|
14394
14502
|
const tag = document.createElement("style");
|
|
@@ -14404,7 +14512,6 @@ window.__ModuleLoader__.load({
|
|
|
14404
14512
|
"fishHitbox": "pXSMma_fishHitbox",
|
|
14405
14513
|
"folder": "pXSMma_folder",
|
|
14406
14514
|
"headline": "pXSMma_headline",
|
|
14407
|
-
"headlineText": "pXSMma_headlineText",
|
|
14408
14515
|
"hero-fish-swim": "pXSMma_hero-fish-swim",
|
|
14409
14516
|
"modalAction": "pXSMma_modalAction",
|
|
14410
14517
|
"modalError": "pXSMma_modalError",
|
|
@@ -14412,6 +14519,7 @@ window.__ModuleLoader__.load({
|
|
|
14412
14519
|
"previewBadge": "pXSMma_previewBadge",
|
|
14413
14520
|
"root": "pXSMma_root",
|
|
14414
14521
|
"stack": "pXSMma_stack",
|
|
14522
|
+
"titleGroup": "pXSMma_titleGroup",
|
|
14415
14523
|
"workspace": "pXSMma_workspace",
|
|
14416
14524
|
"workspaceLabel": "pXSMma_workspaceLabel",
|
|
14417
14525
|
"workspaceRow": "pXSMma_workspaceRow"
|
|
@@ -14516,36 +14624,32 @@ window.__ModuleLoader__.load({
|
|
|
14516
14624
|
className: HeroShell_module_css_default.stack,
|
|
14517
14625
|
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
14518
14626
|
className: HeroShell_module_css_default.headline,
|
|
14519
|
-
children: [
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
14534
|
-
className: HeroShell_module_css_default.headlineText,
|
|
14535
|
-
children: t("hero.headline")
|
|
14536
|
-
}),
|
|
14537
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
14627
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
14628
|
+
className: HeroShell_module_css_default.fishHitbox,
|
|
14629
|
+
onMouseEnter: () => {
|
|
14630
|
+
if (window.matchMedia("(hover: hover) and (prefers-reduced-motion: no-preference)").matches) setHovering(true);
|
|
14631
|
+
},
|
|
14632
|
+
onMouseLeave: () => {
|
|
14633
|
+
setHovering(false);
|
|
14634
|
+
},
|
|
14635
|
+
children: renderSlot("conversation.hero.brand.mark", {
|
|
14636
|
+
size: 34,
|
|
14637
|
+
className: HeroShell_module_css_default.fish
|
|
14638
|
+
}, { fallback: (0, react_jsx_runtime.jsx)(HeroFish, { hovering }) })
|
|
14639
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
14640
|
+
className: HeroShell_module_css_default.titleGroup,
|
|
14641
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("hero.headline") }), (0, react_jsx_runtime.jsx)("span", {
|
|
14538
14642
|
className: HeroShell_module_css_default.previewBadge,
|
|
14539
14643
|
children: t("hero.preview")
|
|
14540
|
-
})
|
|
14541
|
-
]
|
|
14644
|
+
})]
|
|
14645
|
+
})]
|
|
14542
14646
|
}), (0, react_jsx_runtime.jsx)("div", { className: HeroShell_module_css_default.body })]
|
|
14543
14647
|
}), children]
|
|
14544
14648
|
});
|
|
14545
14649
|
}
|
|
14546
14650
|
//#endregion
|
|
14547
14651
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-conversation/src/client/skeleton/ConversationRoot.module.css.mjs
|
|
14548
|
-
const css$4 = ".wSkVaW_root{background:var(--dsw-alias-bg-base);--dsh-chat-content-width:var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,0px) * .64), 920px));--dsh-composer-card-max-width:calc(var(--dsh-chat-content-width) + 32px);--dsh-composer-side-clearance:16px;--dsh-composer-dock-inset:8px;flex-direction:column;min-width:0;height:100%;display:flex;position:relative}.wSkVaW_header{border-bottom
|
|
14652
|
+
const css$4 = ".wSkVaW_root{background:var(--dsw-alias-bg-base);--dsh-chat-content-width:var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,0px) * .64), 920px));--dsh-composer-card-max-width:calc(var(--dsh-chat-content-width) + 32px);--dsh-composer-side-clearance:16px;--dsh-composer-dock-inset:8px;flex-direction:column;min-width:0;height:100%;display:flex;position:relative}.wSkVaW_header{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;min-height:76px;padding:10px 28px 0 20px}.wSkVaW_headerHidden{display:none}.wSkVaW_titleRow{align-items:center;gap:0;min-height:30px;display:flex}.wSkVaW_titleCluster{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.wSkVaW_crumbs{white-space:nowrap;align-items:center;gap:4px;min-width:0;display:flex;overflow:hidden}.wSkVaW_crumbSeg{align-items:center;gap:4px;min-width:0;display:inline-flex}.wSkVaW_crumbSep{color:var(--dsw-alias-label-caption);font-size:14px;line-height:20px}.wSkVaW_crumb{max-width:220px;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:none;border-radius:12px;padding:4px 8px;font-size:14px;line-height:20px;overflow:hidden}.wSkVaW_crumbSubagent{font-size:12px;line-height:18px}.wSkVaW_crumb:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.wSkVaW_crumbCurrent{color:var(--dsw-alias-label-primary);cursor:default;font-weight:500}.wSkVaW_headerActions{flex:none;align-items:center;gap:8px;display:flex}.wSkVaW_headerUtilities{flex:none;align-items:center;gap:8px;margin-left:20px;display:flex}.wSkVaW_headerUtilities:empty{display:none}.wSkVaW_headerCorner{flex:none;align-items:center;margin-left:8px;margin-right:-16px;display:flex}.wSkVaW_headerCorner:empty{display:none}.wSkVaW_tabs{z-index:1;gap:36px;margin-top:10px;padding-left:8px;display:flex;position:relative}.wSkVaW_tab{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.wSkVaW_tab:after{content:\"\";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.wSkVaW_tabActive{color:var(--dsw-alias-state-business-primary)}.wSkVaW_tabActive:after{background:var(--dsw-alias-state-business-primary)}.wSkVaW_viewArea{flex-direction:column;flex:1;min-height:0;display:flex}.wSkVaW_widthHandle{z-index:8;width:min(40px, calc((100% - var(--dsh-chat-content-width)) / 2 - 24px - 24px));cursor:col-resize;position:absolute;top:0;bottom:0}.wSkVaW_widthHandle[data-side=left]{right:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.wSkVaW_widthHandle[data-side=right]{left:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.wSkVaW_widthHandle:after{content:\"\";background:linear-gradient(to bottom, transparent calc(var(--dsh-width-handle-pointer-y,50%) - 52px), var(--dsw-alias-scrollbar-hover-l1) calc(var(--dsh-width-handle-pointer-y,50%) - 12px), var(--dsw-alias-scrollbar-hover-l1) calc(var(--dsh-width-handle-pointer-y,50%) + 12px), transparent calc(var(--dsh-width-handle-pointer-y,50%) + 52px));opacity:0;pointer-events:none;border-radius:3px;width:3px;position:absolute;top:0;bottom:0}.wSkVaW_widthHandle[data-side=left]:after{right:16px}.wSkVaW_widthHandle[data-side=right]:after{left:16px}.wSkVaW_widthHandle:hover:after,.wSkVaW_widthHandle[data-dragging]:after{opacity:1}.wSkVaW_root:has([data-conversation-composer-overlay]) .wSkVaW_widthHandle{display:none}.wSkVaW_composerStack{--dsh-composer-stack-gap:6px;gap:var(--dsh-composer-stack-gap);flex-direction:column;display:flex}.wSkVaW_composerSeat{--dsh-composer-text-max-height:336px;flex-direction:column;flex:none;display:flex}.wSkVaW_root[data-phase=active]{overflow:hidden}.wSkVaW_root[data-phase=active] .wSkVaW_header{flex:none}.wSkVaW_body{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.wSkVaW_scrollBody{scrollbar-gutter:stable;flex-direction:column;flex:1;min-height:0;margin-right:2px;display:flex;overflow-y:auto}.wSkVaW_scrollBody::-webkit-scrollbar-track{margin:2px}.wSkVaW_root[data-phase=active] .wSkVaW_viewArea{flex:1 0 auto;min-height:auto}.wSkVaW_root[data-phase=active] .wSkVaW_composerSeat{z-index:7;background:linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-bg-base) 0%, transparent) 0px, var(--dsw-alias-bg-base) 36px);position:sticky;bottom:0}.wSkVaW_root[data-phase=active] .wSkVaW_composerSeat:has([data-trigger-menu]){z-index:9}.wSkVaW_scrollBody:has([data-conversation-composer-overlay]){scrollbar-gutter:auto;position:relative;overflow:hidden auto}.wSkVaW_scrollBody:has([data-conversation-composer-overlay])>[data-slot=conversation\\.session]>.wSkVaW_viewArea{flex:1 1 0;min-height:0;overflow:hidden}.wSkVaW_scrollBody:has([data-conversation-composer-overlay])>.wSkVaW_composerSeat{right:var(--dsh-scrollbar-width);position:absolute;bottom:0;left:0}.wSkVaW_composerHero{width:min(calc(var(--dsh-composer-card-max-width) + 2 * var(--dsh-composer-side-clearance)), 100%);z-index:1;align-self:center;gap:8px;padding-bottom:32px}.wSkVaW_heroWorkspaceRow{align-items:center;gap:2px;min-width:0;margin-top:4px;padding:0 16px 0 20px;display:flex}.wSkVaW_root[data-phase=hero] .wSkVaW_scrollBody{justify-content:center;overflow-y:auto}.wSkVaW_root[data-phase=settling] .wSkVaW_composerSeat{visibility:hidden}";
|
|
14549
14653
|
const tagId$4 = "@deepseek-ai/dsh-client-ui-conversation/ConversationRoot.module.css";
|
|
14550
14654
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
14551
14655
|
const tag = document.createElement("style");
|
|
@@ -14567,6 +14671,7 @@ window.__ModuleLoader__.load({
|
|
|
14567
14671
|
"crumbs": "wSkVaW_crumbs",
|
|
14568
14672
|
"header": "wSkVaW_header",
|
|
14569
14673
|
"headerActions": "wSkVaW_headerActions",
|
|
14674
|
+
"headerCorner": "wSkVaW_headerCorner",
|
|
14570
14675
|
"headerHidden": "wSkVaW_headerHidden",
|
|
14571
14676
|
"headerUtilities": "wSkVaW_headerUtilities",
|
|
14572
14677
|
"heroWorkspaceRow": "wSkVaW_heroWorkspaceRow",
|
|
@@ -14860,6 +14965,16 @@ window.__ModuleLoader__.load({
|
|
|
14860
14965
|
});
|
|
14861
14966
|
}
|
|
14862
14967
|
//#endregion
|
|
14968
|
+
//#region lib/types/client/skeleton/ConversationPanel.js
|
|
14969
|
+
/**
|
|
14970
|
+
* Render the Conversation with optional current-Session binding.
|
|
14971
|
+
* @param props - main-slot inputs and the declared Conversation renderer.
|
|
14972
|
+
* @returns the Conversation subtree.
|
|
14973
|
+
*/
|
|
14974
|
+
function ConversationPanel({ renderSlot }) {
|
|
14975
|
+
return renderSlot("main.conversation", {});
|
|
14976
|
+
}
|
|
14977
|
+
//#endregion
|
|
14863
14978
|
//#region lib/types/client/view-selection.js
|
|
14864
14979
|
const DEFAULT_VIEW_ID = "chat";
|
|
14865
14980
|
/**
|
|
@@ -14916,49 +15031,57 @@ window.__ModuleLoader__.load({
|
|
|
14916
15031
|
"aria-hidden": hideChrome || void 0,
|
|
14917
15032
|
children: !hideChrome && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
14918
15033
|
className: ConversationRoot_module_css_default.titleRow,
|
|
14919
|
-
children: [
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
15034
|
+
children: [
|
|
15035
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
15036
|
+
className: ConversationRoot_module_css_default.titleCluster,
|
|
15037
|
+
children: [(0, react_jsx_runtime.jsxs)("nav", {
|
|
15038
|
+
className: ConversationRoot_module_css_default.crumbs,
|
|
15039
|
+
"aria-label": t("session.hierarchy"),
|
|
15040
|
+
children: [ancestry.map((summary, index) => {
|
|
15041
|
+
const last = index === ancestry.length - 1;
|
|
15042
|
+
const title = (0, react_jsx_runtime.jsx)("button", {
|
|
15043
|
+
type: "button",
|
|
15044
|
+
className: clsx(ConversationRoot_module_css_default.crumb, summary.subagent && ConversationRoot_module_css_default.crumbSubagent, last && ConversationRoot_module_css_default.crumbCurrent),
|
|
15045
|
+
disabled: last,
|
|
15046
|
+
onClick: () => {
|
|
15047
|
+
open(summary.id);
|
|
15048
|
+
},
|
|
15049
|
+
children: summary.displayTitle
|
|
15050
|
+
});
|
|
15051
|
+
const lineage = last || summary.subagent;
|
|
15052
|
+
const lineageOwner = {
|
|
15053
|
+
lineageSessionId: summary.id,
|
|
15054
|
+
displayTitle: summary.displayTitle,
|
|
15055
|
+
...last ? {} : { openTitle: () => {
|
|
15056
|
+
open(summary.id);
|
|
15057
|
+
} }
|
|
15058
|
+
};
|
|
15059
|
+
return (0, react_jsx_runtime.jsxs)("span", {
|
|
15060
|
+
className: ConversationRoot_module_css_default.crumbSeg,
|
|
15061
|
+
children: [index > 0 && (0, react_jsx_runtime.jsx)("span", {
|
|
15062
|
+
className: ConversationRoot_module_css_default.crumbSep,
|
|
15063
|
+
children: "/"
|
|
15064
|
+
}), lineage ? summary.subagent ? renderSlot("conversation.session.header.lineage", lineageOwner, { fallback: title }) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [title, renderSlot("conversation.session.header.lineage", lineageOwner, { fallback: null })] }) : title]
|
|
15065
|
+
}, summary.id);
|
|
15066
|
+
}), ancestry.length === 0 && (0, react_jsx_runtime.jsx)("span", {
|
|
15067
|
+
className: ConversationRoot_module_css_default.crumbCurrent,
|
|
15068
|
+
children: sessionId
|
|
15069
|
+
})]
|
|
15070
|
+
}), (0, react_jsx_runtime.jsx)("div", {
|
|
15071
|
+
className: ConversationRoot_module_css_default.headerActions,
|
|
15072
|
+
children: renderSlot("conversation.session.header.actions", {})
|
|
14953
15073
|
})]
|
|
14954
|
-
}),
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
15074
|
+
}),
|
|
15075
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
15076
|
+
className: ConversationRoot_module_css_default.headerUtilities,
|
|
15077
|
+
children: renderSlot("conversation.session.header.utilities", {})
|
|
15078
|
+
}),
|
|
15079
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
15080
|
+
className: ConversationRoot_module_css_default.headerCorner,
|
|
15081
|
+
"data-conversation-header-corner": "",
|
|
15082
|
+
children: renderSlot("conversation.session.header.corner", {})
|
|
15083
|
+
})
|
|
15084
|
+
]
|
|
14962
15085
|
}), tabs.length > 1 && (0, react_jsx_runtime.jsx)("div", {
|
|
14963
15086
|
className: ConversationRoot_module_css_default.tabs,
|
|
14964
15087
|
role: "tablist",
|
|
@@ -15631,7 +15754,7 @@ window.__ModuleLoader__.load({
|
|
|
15631
15754
|
}
|
|
15632
15755
|
//#endregion
|
|
15633
15756
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css.mjs
|
|
15634
|
-
const css$1 = ".uV2eYG_root{padding:0 var(--dsh-composer-side-clearance) 8px;flex-direction:column;align-items:center;display:flex}.uV2eYG_hero{padding:0 var(--dsh-composer-side-clearance)}.uV2eYG_notice{width:100%;max-width:var(--dsh-composer-card-max-width);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);border-radius:8px;margin-bottom:6px;padding:4px 8px;font-size:12px;line-height:18px}.uV2eYG_card{box-sizing:border-box;width:100%;max-width:var(--dsh-composer-card-max-width);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);background:var(--dsw-specific-input-major);box-shadow:var(--dsw-elevation-soft);font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px));--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border:0;border-radius:22px;flex-direction:column;gap:12px;padding-top:
|
|
15757
|
+
const css$1 = ".uV2eYG_root{padding:0 var(--dsh-composer-side-clearance) 8px;flex-direction:column;align-items:center;display:flex}.uV2eYG_root:has([data-composer-stats]){padding-bottom:4px}.uV2eYG_hero{padding:0 var(--dsh-composer-side-clearance)}.uV2eYG_notice{width:100%;max-width:var(--dsh-composer-card-max-width);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);border-radius:8px;margin-bottom:6px;padding:4px 8px;font-size:12px;line-height:18px}.uV2eYG_card{box-sizing:border-box;width:100%;max-width:var(--dsh-composer-card-max-width);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);background:var(--dsw-specific-input-major);box-shadow:var(--dsw-elevation-soft);font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px));--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border:0;border-radius:22px;flex-direction:column;gap:12px;padding-top:8px;display:flex;position:relative}.uV2eYG_cardWorkspaceTrigger{--dsw-elevation-stroke-color:transparent;cursor:pointer}.uV2eYG_cardWorkspaceTrigger:after{content:\"\";background:var(--dsw-alias-border-l4);pointer-events:none;border-radius:22px;transition:background-color .1s;position:absolute;inset:-1px;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='22' ry='22' stroke='black' stroke-width='2' stroke-dasharray='4 4'/%3E%3C/svg%3E\");mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='22' ry='22' stroke='black' stroke-width='2' stroke-dasharray='4 4'/%3E%3C/svg%3E\")}.uV2eYG_cardWorkspaceTrigger :disabled{pointer-events:none}.uV2eYG_cardWorkspaceTrigger:hover:after{background:var(--dsw-alias-state-business-primary)}.uV2eYG_accessory{align-items:center;gap:8px;padding:10px 12px 0;display:flex}.uV2eYG_overlayAnchor{height:0;position:absolute;inset:0 0 auto}.uV2eYG_scroll{max-height:var(--dsh-composer-text-max-height);margin-right:4px;overflow-y:auto}.uV2eYG_scroll::-webkit-scrollbar-track{margin-top:8px}.uV2eYG_grow{position:relative}.uV2eYG_pending{corner-shape:round;background:var(--dsw-alias-state-business-primary);border-radius:50%;width:8px;height:8px;animation:1s ease-in-out infinite alternate uV2eYG_input-pending}@keyframes uV2eYG_input-pending{0%{opacity:.35}to{opacity:1}}.uV2eYG_input{box-sizing:border-box;min-height:36px;font-family:var(--dsw-font-family);font-size:inherit;line-height:inherit;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);outline:none;padding:4px 8px 0 14px}.uV2eYG_input p{margin:0}.uV2eYG_input p:last-child:after{content:var(--dsh-composer-hint);color:var(--dsw-alias-label-caption)}.uV2eYG_placeholder{color:var(--dsw-alias-label-caption);white-space:nowrap;text-overflow:ellipsis;pointer-events:none;user-select:none;position:absolute;inset:4px 8px auto 14px;overflow:hidden}.uV2eYG_inputDisabled{color:var(--dsw-alias-label-tertiary);cursor:not-allowed}.uV2eYG_input[aria-haspopup=menu]{cursor:pointer}.uV2eYG_hero .uV2eYG_input{min-height:52px}.uV2eYG_hero .uV2eYG_placeholder{white-space:normal;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box}.uV2eYG_row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;min-width:0;padding:2px 8px 6px;display:flex;container-type:inline-size}.uV2eYG_tools,.uV2eYG_modes,.uV2eYG_trailing{align-items:center;min-width:0;display:flex}.uV2eYG_tools,.uV2eYG_modes{gap:12px}.uV2eYG_trailing{flex:none;gap:12px;margin-left:auto}.uV2eYG_add{corner-shape:round;background:var(--dsw-specific-selector);width:28px;height:28px;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:999px;flex:none;place-items:center;display:grid}.uV2eYG_add:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.uV2eYG_add:disabled{opacity:.5;cursor:default}.uV2eYG_select{max-width:220px;height:28px;color:var(--dsw-alias-label-secondary);white-space:nowrap;cursor:pointer;appearance:none;background-color:#0000;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2381858C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 4px center;background-repeat:no-repeat;background-size:12px 12px;border:none;border-radius:8px;outline:none;padding:0 20px 0 8px;font-size:13px;font-weight:500;line-height:20px}.uV2eYG_select:hover:not(:disabled){background-color:var(--dsw-alias-interactive-bg-hover)}.uV2eYG_select:disabled{opacity:.5;cursor:default}.uV2eYG_primary{corner-shape:round;background:var(--dsw-alias-button-info-fill);color:#fff;cursor:pointer;border:none;border-radius:999px;flex:none;place-items:center;width:34px;height:34px;transition:background-color .1s;display:grid;transform:translateY(-2px)}.uV2eYG_primary:hover:not(:disabled){background:var(--dsw-alias-button-info-hover)}.uV2eYG_primary:disabled{opacity:.4;cursor:default}.uV2eYG_retry{color:inherit;cursor:pointer;background:0 0;border:1px solid;border-radius:4px;margin-left:8px;padding:1px 8px;font-size:12px}";
|
|
15635
15758
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-conversation/InputBar.module.css";
|
|
15636
15759
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
15637
15760
|
const tag = document.createElement("style");
|
|
@@ -15680,9 +15803,10 @@ window.__ModuleLoader__.load({
|
|
|
15680
15803
|
* The no-session state renders the SAME div inert as the Workspace-picker
|
|
15681
15804
|
* trigger instead of a parallel tree.
|
|
15682
15805
|
*/
|
|
15683
|
-
const InputBar = (0, react.memo)(function InputBar({ useSession, useInput, inputActions, keyboard, addFiles, removeAttachment, resolveDraftAttachments, retryFileUpload,
|
|
15806
|
+
const InputBar = (0, react.memo)(function InputBar({ useSession, useInput, inputActions, keyboard, addFiles, removeAttachment, resolveDraftAttachments, retryFileUpload, toggleCommandMenu, stop, command, t, renderSlot, useBusyEnter, useFileUploads, useNotices, useLexicon, useMenuLauncher, useProjection, sessionId, variant, disabled: inert = false, blocked, workspacePickerOpen = false, onRequestWorkspace, placeholder, accessory }) {
|
|
15684
15807
|
const input = useInput((s) => s);
|
|
15685
15808
|
const notice = useNotices((s) => s);
|
|
15809
|
+
const busyEnter = useBusyEnter((s) => s);
|
|
15686
15810
|
const commandMenuOpen = useMenuLauncher((source) => source === "command");
|
|
15687
15811
|
const promptError = useSession((s) => s.promptError) ?? null;
|
|
15688
15812
|
const running = useSession((s) => s.running) ?? false;
|
|
@@ -15828,7 +15952,7 @@ window.__ModuleLoader__.load({
|
|
|
15828
15952
|
canSteerQueue,
|
|
15829
15953
|
running,
|
|
15830
15954
|
steeringAvailable,
|
|
15831
|
-
|
|
15955
|
+
busyEnter,
|
|
15832
15956
|
intakeFiles,
|
|
15833
15957
|
uploadsPending,
|
|
15834
15958
|
showToast,
|
|
@@ -15840,7 +15964,7 @@ window.__ModuleLoader__.load({
|
|
|
15840
15964
|
canSteerQueue,
|
|
15841
15965
|
running,
|
|
15842
15966
|
steeringAvailable,
|
|
15843
|
-
|
|
15967
|
+
busyEnter,
|
|
15844
15968
|
intakeFiles,
|
|
15845
15969
|
uploadsPending,
|
|
15846
15970
|
showToast,
|
|
@@ -15868,7 +15992,7 @@ window.__ModuleLoader__.load({
|
|
|
15868
15992
|
g.showToast(g.t("file.stillUploading"));
|
|
15869
15993
|
return;
|
|
15870
15994
|
}
|
|
15871
|
-
keyboard.submit(
|
|
15995
|
+
keyboard.submit(resolveSubmitMode(g.busyEnter, g.running, accelerated ? "accelerated" : "enter", g.steeringAvailable));
|
|
15872
15996
|
},
|
|
15873
15997
|
intakeFiles: (files) => {
|
|
15874
15998
|
gate.current.intakeFiles(files);
|
|
@@ -15894,16 +16018,19 @@ window.__ModuleLoader__.load({
|
|
|
15894
16018
|
}
|
|
15895
16019
|
};
|
|
15896
16020
|
const primaryStops = running && subagent === null && (empty || blocked !== void 0);
|
|
16021
|
+
const primaryDisabled = primaryStops ? stop === void 0 : empty || disabled || machineBusy || uploadsPending;
|
|
15897
16022
|
const interruptible = running && continuable;
|
|
15898
|
-
const
|
|
16023
|
+
const primarySubmitMode = resolveSubmitMode(busyEnter, running, "enter", steeringAvailable);
|
|
16024
|
+
const plainMessageDraft = !empty && input?.phase === "plain" && !draft.trimStart().startsWith("/");
|
|
16025
|
+
const primaryLabel = primaryStops ? t("input.stop") : running && steeringAvailable && !disabled && !uploadsPending && plainMessageDraft ? t(primarySubmitMode === "steer" ? "input.send.steer" : "input.send.queue") : t("input.send");
|
|
15899
16026
|
const onPrimary = () => {
|
|
15900
16027
|
if (primaryStops) {
|
|
15901
16028
|
stop?.();
|
|
15902
16029
|
return;
|
|
15903
16030
|
}
|
|
15904
|
-
if (
|
|
16031
|
+
if (keyboard === void 0) return;
|
|
15905
16032
|
/* v8 ignore next -- defensive: the primary button is disabled for empty, disabled, and pending-upload states. */
|
|
15906
|
-
if (!empty && !disabled && !machineBusy && !uploadsPending)
|
|
16033
|
+
if (!empty && !disabled && !machineBusy && !uploadsPending) keyboard.submit(primarySubmitMode);
|
|
15907
16034
|
};
|
|
15908
16035
|
const accessSelect = command === void 0 ? null : (0, react_jsx_runtime.jsx)(PermissionSelect, {
|
|
15909
16036
|
value: permissions,
|
|
@@ -15989,7 +16116,7 @@ window.__ModuleLoader__.load({
|
|
|
15989
16116
|
onKeyDown: workspaceTrigger ? onWorkspaceKeyDown : void 0,
|
|
15990
16117
|
style: hint === null ? void 0 : { "--dsh-composer-hint": JSON.stringify(hint) }
|
|
15991
16118
|
}),
|
|
15992
|
-
|
|
16119
|
+
draft === "" && attachments.length === 0 && !claimActive && (0, react_jsx_runtime.jsx)("div", {
|
|
15993
16120
|
"aria-hidden": true,
|
|
15994
16121
|
className: InputBar_module_css_default.placeholder,
|
|
15995
16122
|
"data-composer-placeholder": true,
|
|
@@ -16063,6 +16190,7 @@ window.__ModuleLoader__.load({
|
|
|
16063
16190
|
label: t("input.stop"),
|
|
16064
16191
|
side: "top",
|
|
16065
16192
|
delayMs: 500,
|
|
16193
|
+
disabled: stop === void 0,
|
|
16066
16194
|
children: (0, react_jsx_runtime.jsx)("button", {
|
|
16067
16195
|
type: "button",
|
|
16068
16196
|
className: InputBar_module_css_default.primary,
|
|
@@ -16090,11 +16218,12 @@ window.__ModuleLoader__.load({
|
|
|
16090
16218
|
label: primaryLabel,
|
|
16091
16219
|
side: "top",
|
|
16092
16220
|
delayMs: 500,
|
|
16221
|
+
disabled: primaryDisabled,
|
|
16093
16222
|
children: (0, react_jsx_runtime.jsx)("button", {
|
|
16094
16223
|
type: "button",
|
|
16095
16224
|
className: InputBar_module_css_default.primary,
|
|
16096
16225
|
"aria-label": primaryLabel,
|
|
16097
|
-
disabled:
|
|
16226
|
+
disabled: primaryDisabled,
|
|
16098
16227
|
onMouseDown: keepFocus,
|
|
16099
16228
|
onClick: onPrimary,
|
|
16100
16229
|
children: primaryStops ? (0, react_jsx_runtime.jsx)("svg", {
|
|
@@ -16478,7 +16607,7 @@ window.__ModuleLoader__.load({
|
|
|
16478
16607
|
}
|
|
16479
16608
|
});
|
|
16480
16609
|
const registerConversationRoot = () => slots.register({
|
|
16481
|
-
name: "conversation",
|
|
16610
|
+
name: "main.conversation",
|
|
16482
16611
|
locale: NS,
|
|
16483
16612
|
children: {
|
|
16484
16613
|
"conversation.session": {
|
|
@@ -16516,8 +16645,7 @@ window.__ModuleLoader__.load({
|
|
|
16516
16645
|
},
|
|
16517
16646
|
inject: (sessionId) => ({
|
|
16518
16647
|
hooks: { composerBlock: sessionId === void 0 ? ABSENT_BLOCK : composerBlocks.storeFor(sessionId) },
|
|
16519
|
-
selectWorkspace:
|
|
16520
|
-
const nextId = await workspaceNavigation.connectWorkspace(workspaceId);
|
|
16648
|
+
selectWorkspace: (workspaceId) => workspaceNavigation.openWorkspace(workspaceId, (nextId) => {
|
|
16521
16649
|
if (sessionId !== void 0 && nextId !== sessionId) {
|
|
16522
16650
|
const from = inputHub.shell(sessionId);
|
|
16523
16651
|
const draft = from.snapshot.draft;
|
|
@@ -16533,8 +16661,7 @@ window.__ModuleLoader__.load({
|
|
|
16533
16661
|
if (attachmentIds.length > 0) for (const id of attachmentIds) from.removeAttachment(id);
|
|
16534
16662
|
}
|
|
16535
16663
|
}
|
|
16536
|
-
|
|
16537
|
-
}
|
|
16664
|
+
})
|
|
16538
16665
|
})
|
|
16539
16666
|
}, ConversationRoot);
|
|
16540
16667
|
const registerConversationSession = () => slots.register({
|
|
@@ -16568,13 +16695,17 @@ window.__ModuleLoader__.load({
|
|
|
16568
16695
|
"conversation.session.header.utilities": {
|
|
16569
16696
|
kind: "list",
|
|
16570
16697
|
scope: "session"
|
|
16698
|
+
},
|
|
16699
|
+
"conversation.session.header.corner": {
|
|
16700
|
+
kind: "single",
|
|
16701
|
+
scope: "session"
|
|
16571
16702
|
}
|
|
16572
16703
|
},
|
|
16573
16704
|
store: conversationStore,
|
|
16574
16705
|
inject: (sessionId, actions) => ({
|
|
16575
16706
|
hooks: { conversationViews },
|
|
16576
16707
|
open: (id) => {
|
|
16577
|
-
|
|
16708
|
+
workspaceNavigation.openSession(id);
|
|
16578
16709
|
},
|
|
16579
16710
|
selectView: (view) => {
|
|
16580
16711
|
activateView(sessionId, view);
|
|
@@ -16622,11 +16753,11 @@ window.__ModuleLoader__.load({
|
|
|
16622
16753
|
removeAttachment: void 0,
|
|
16623
16754
|
resolveDraftAttachments: void 0,
|
|
16624
16755
|
retryFileUpload: void 0,
|
|
16625
|
-
resolveSubmitMode: (running, gesture, steeringAvailable) => submissionPolicy.resolve(running, gesture, steeringAvailable),
|
|
16626
16756
|
toggleCommandMenu: void 0,
|
|
16627
16757
|
stop: void 0,
|
|
16628
16758
|
command: void 0,
|
|
16629
16759
|
hooks: {
|
|
16760
|
+
busyEnter: submissionPolicy.busyEnter,
|
|
16630
16761
|
fileUploads: ABSENT_FILE_UPLOADS,
|
|
16631
16762
|
notices: ABSENT_NOTICES,
|
|
16632
16763
|
lexicon: ABSENT_LEXICON,
|
|
@@ -16656,7 +16787,6 @@ window.__ModuleLoader__.load({
|
|
|
16656
16787
|
retryFileUpload: (id) => {
|
|
16657
16788
|
if (sessions.binding(sessionId) !== void 0) conversation.retryFileUpload(sessionId, id);
|
|
16658
16789
|
},
|
|
16659
|
-
resolveSubmitMode: (running, gesture, steeringAvailable) => submissionPolicy.resolve(running, gesture, steeringAvailable),
|
|
16660
16790
|
toggleCommandMenu: inputTriggers === void 0 ? void 0 : (selection) => {
|
|
16661
16791
|
shell.dismissPopup();
|
|
16662
16792
|
const snapshot = shell.snapshot;
|
|
@@ -16681,6 +16811,7 @@ window.__ModuleLoader__.load({
|
|
|
16681
16811
|
return result.ok && result.value.matched;
|
|
16682
16812
|
},
|
|
16683
16813
|
hooks: {
|
|
16814
|
+
busyEnter: submissionPolicy.busyEnter,
|
|
16684
16815
|
fileUploads: conversation.fileUploads,
|
|
16685
16816
|
notices: shell.notices,
|
|
16686
16817
|
lexicon: shell.lexicon,
|
|
@@ -16689,7 +16820,15 @@ window.__ModuleLoader__.load({
|
|
|
16689
16820
|
};
|
|
16690
16821
|
}
|
|
16691
16822
|
}, InputBar);
|
|
16692
|
-
slots.inject("
|
|
16823
|
+
slots.inject("main", function* () {
|
|
16824
|
+
yield slots.register({
|
|
16825
|
+
name: "main",
|
|
16826
|
+
key: "conversation",
|
|
16827
|
+
children: { "main.conversation": {
|
|
16828
|
+
kind: "single",
|
|
16829
|
+
scope: "session-maybe"
|
|
16830
|
+
} }
|
|
16831
|
+
}, ConversationPanel);
|
|
16693
16832
|
yield registerConversationRoot();
|
|
16694
16833
|
yield registerConversationSession();
|
|
16695
16834
|
yield registerConversationHeader();
|