@dsmm/dsmm 0.3.26 → 0.3.28
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.md +21 -8
- package/docs/agent-presets.md +7 -7
- package/docs/agent-teams.md +27 -0
- package/docs/compatibility.md +7 -7
- package/docs/lsp.md +10 -12
- package/docs/maintenance.md +29 -0
- package/docs/roadmap.md +25 -9
- package/docs/runtime-recovery.md +3 -3
- package/docs/testing.md +3 -1
- package/dsh-plugin.json +1 -1
- package/lib/client/NativeToolView-data.d.ts +8 -0
- package/lib/client/NativeToolView-data.js +19 -0
- package/lib/client/NativeToolView.d.ts +19 -0
- package/lib/client/NativeToolView.js +46 -0
- package/lib/client/RoleToolView-data.js +1 -1
- package/lib/client/RoleToolView-locales.d.ts +7 -0
- package/lib/client/RoleToolView-locales.js +6 -0
- package/lib/client/RoleToolView.js +2 -0
- package/lib/client/SessionProfiles.js +1 -1
- package/lib/client/children-locales.d.ts +4 -4
- package/lib/client/controller.js +20 -0
- package/lib/client/locales.d.ts +1 -0
- package/lib/client/locales.js +2 -0
- package/lib/client.js +350 -187
- package/lib/core-permission-authority.js +14 -4
- package/lib/mode.js +2 -2
- package/lib/native-admission.d.ts +5 -3
- package/lib/native-admission.js +218 -77
- package/lib/native-ownership.d.ts +3 -0
- package/lib/native-ownership.js +19 -0
- package/lib/native-subagents.d.ts +2 -1
- package/lib/native-subagents.js +4 -3
- package/lib/profile-runtime.d.ts +1 -1
- package/lib/prompts.d.ts +2 -0
- package/lib/prompts.js +14 -8
- package/lib/role-control-remote.js +19 -8
- package/lib/role-control-rpc.js +1 -1
- package/lib/role-control-types.d.ts +18 -5
- package/lib/role-identity.js +3 -19
- package/lib/role-invocation.d.ts +1 -1
- package/lib/role-policy.d.ts +11 -3
- package/lib/role-policy.js +61 -21
- package/lib/role-subagents.js +12 -5
- package/lib/session-metadata.d.ts +27 -1
- package/lib/session-metadata.js +46 -0
- package/lib/session-scope.d.ts +1 -1
- package/lib/session-scope.js +2 -2
- package/package.json +3 -1
- package/prompts/source/deepwork/general.md +19 -0
- package/prompts/source/shared/native-teams.md +11 -0
package/lib/client.js
CHANGED
|
@@ -4410,6 +4410,23 @@ var ProfilesController = class {
|
|
|
4410
4410
|
const document2 = structuredDocument(content2);
|
|
4411
4411
|
let invalidFields = this.current.invalidFields;
|
|
4412
4412
|
if (document2 !== null) {
|
|
4413
|
+
invalidFields = invalidFields.filter((field) => !/^settings\.roleRouting\..+\.(?:primary|fallbackRoutes\.\d+|levels\.(?:low|high|max))\.(?:provider|model)$/.test(field));
|
|
4414
|
+
for (const [role3, policy] of Object.entries(document2.roleRouting)) {
|
|
4415
|
+
const prefix = `settings.roleRouting.${role3}`;
|
|
4416
|
+
const routes = [];
|
|
4417
|
+
if (policy.primary !== void 0) routes.push([`${prefix}.primary`, policy.primary]);
|
|
4418
|
+
for (const [index, route3] of (policy.fallbackRoutes ?? []).entries()) {
|
|
4419
|
+
routes.push([`${prefix}.fallbackRoutes.${index}`, route3]);
|
|
4420
|
+
}
|
|
4421
|
+
for (const [level2, route3] of Object.entries(policy.levels ?? {})) {
|
|
4422
|
+
if (route3.provider !== void 0) routes.push([`${prefix}.levels.${level2}`, route3]);
|
|
4423
|
+
}
|
|
4424
|
+
for (const [path, route3] of routes) {
|
|
4425
|
+
for (const field of ["provider", "model"]) {
|
|
4426
|
+
if (route3[field].trim() === "") invalidFields.push(`${path}.${field}`);
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4429
|
+
}
|
|
4413
4430
|
for (const [key, draft2] of this.numberDrafts) {
|
|
4414
4431
|
let value = document2;
|
|
4415
4432
|
for (const segment of key.split(".")) {
|
|
@@ -4692,6 +4709,7 @@ var en = {
|
|
|
4692
4709
|
headerAppliedWithModel: "Configuration and model applied.",
|
|
4693
4710
|
headerModelChoiceChanged: "Your newer model choice was kept.",
|
|
4694
4711
|
headerActionUnavailable: "Unavailable right now. Refresh to check again.",
|
|
4712
|
+
headerRuntimeUnavailable: "This action is currently unavailable for this session.",
|
|
4695
4713
|
headerActivationRefused: "The profile could not be applied. Check its configuration and the model catalog.",
|
|
4696
4714
|
headerSelectionRefused: "The profile change could not be confirmed.",
|
|
4697
4715
|
headerIssueCode: "Reason: {code}.",
|
|
@@ -5000,6 +5018,7 @@ var zh = {
|
|
|
5000
5018
|
headerAppliedWithModel: "配置和模型已应用。",
|
|
5001
5019
|
headerModelChoiceChanged: "已保留你最新选择的模型。",
|
|
5002
5020
|
headerActionUnavailable: "此操作暂不可用,请刷新确认。",
|
|
5021
|
+
headerRuntimeUnavailable: "当前会话暂时无法执行此操作。",
|
|
5003
5022
|
headerActivationRefused: "配置无法应用,请检查其配置和模型目录。",
|
|
5004
5023
|
headerSelectionRefused: "无法确认配置更改。",
|
|
5005
5024
|
headerIssueCode: "原因:{code}。",
|
|
@@ -6178,7 +6197,7 @@ function capabilityReason(reason, t) {
|
|
|
6178
6197
|
case "module-off":
|
|
6179
6198
|
return t("sessionModuleOff");
|
|
6180
6199
|
case "runtime-unavailable":
|
|
6181
|
-
return t("
|
|
6200
|
+
return t("headerRuntimeUnavailable");
|
|
6182
6201
|
case "model-unconfigured":
|
|
6183
6202
|
return t("headerNoProfileModel");
|
|
6184
6203
|
case "model-service-unavailable":
|
|
@@ -9918,14 +9937,18 @@ function observedActualRoute(value) {
|
|
|
9918
9937
|
return { status: "unknown", reason: row.reason };
|
|
9919
9938
|
}
|
|
9920
9939
|
function roleCall(value) {
|
|
9921
|
-
const
|
|
9922
|
-
const
|
|
9923
|
-
|
|
9940
|
+
const native = typeof value === "object" && value !== null && "kind" in value && value.kind === "native";
|
|
9941
|
+
const commonKeys = ["parentSessionId", "parentAdmissionEpoch", "callId", "rootCallId", "childId", "initialRoute", "actualRoute", "phase", "delivery"];
|
|
9942
|
+
const row = object2(
|
|
9943
|
+
value,
|
|
9944
|
+
[...commonKeys, ...native ? ["kind", "toolName"] : ["role", "level", "routeSource"]],
|
|
9945
|
+
["childAdmissionEpoch", "runId", "stopReason", ...native ? ["provider", "nativeName"] : ["kind"]]
|
|
9946
|
+
);
|
|
9924
9947
|
const childId = identity(row.childId), initialRoute = observedInitialRoute(row.initialRoute), actualRoute = observedActualRoute(row.actualRoute);
|
|
9925
9948
|
const phase = choice(row.phase, ROLE_CALL_PHASES), delivery = choice(row.delivery, ROLE_CALL_DELIVERIES);
|
|
9926
9949
|
const stopReason = Object.hasOwn(row, "stopReason") ? choice(row.stopReason, ROLE_CALL_STOP_REASONS) : void 0;
|
|
9927
9950
|
if (stopReason !== void 0 && phase !== "settled") fail4();
|
|
9928
|
-
|
|
9951
|
+
const common = {
|
|
9929
9952
|
parentSessionId: identity(row.parentSessionId),
|
|
9930
9953
|
parentAdmissionEpoch: epoch2(row.parentAdmissionEpoch),
|
|
9931
9954
|
...Object.hasOwn(row, "childAdmissionEpoch") ? { childAdmissionEpoch: epoch2(row.childAdmissionEpoch) } : {},
|
|
@@ -9933,15 +9956,33 @@ function roleCall(value) {
|
|
|
9933
9956
|
rootCallId: callIdentity(row.rootCallId),
|
|
9934
9957
|
childId,
|
|
9935
9958
|
...Object.hasOwn(row, "runId") ? { runId: identity(row.runId) } : {},
|
|
9936
|
-
role: role3,
|
|
9937
|
-
level: choice(row.level, ["normal", "low", "high", "max"]),
|
|
9938
|
-
routeSource: choice(row.routeSource, DSMM_ROUTE_SOURCES),
|
|
9939
|
-
initialRoute,
|
|
9940
9959
|
actualRoute,
|
|
9941
9960
|
phase,
|
|
9942
9961
|
delivery,
|
|
9943
9962
|
...stopReason === void 0 ? {} : { stopReason }
|
|
9944
9963
|
};
|
|
9964
|
+
if (native) {
|
|
9965
|
+
if (initialRoute.status !== "unknown") fail4();
|
|
9966
|
+
return {
|
|
9967
|
+
...common,
|
|
9968
|
+
kind: "native",
|
|
9969
|
+
toolName: callIdentity(row.toolName),
|
|
9970
|
+
initialRoute,
|
|
9971
|
+
...Object.hasOwn(row, "provider") ? { provider: callIdentity(row.provider) } : {},
|
|
9972
|
+
...Object.hasOwn(row, "nativeName") ? { nativeName: callIdentity(row.nativeName) } : {}
|
|
9973
|
+
};
|
|
9974
|
+
}
|
|
9975
|
+
if (Object.hasOwn(row, "kind") && row.kind !== "role") fail4();
|
|
9976
|
+
const role3 = parseDsmmRoleId(row.role);
|
|
9977
|
+
if (role3 === "dsmm-orchestrator") fail4();
|
|
9978
|
+
return {
|
|
9979
|
+
...common,
|
|
9980
|
+
...row.kind === "role" ? { kind: "role" } : {},
|
|
9981
|
+
role: role3,
|
|
9982
|
+
level: choice(row.level, ["normal", "low", "high", "max"]),
|
|
9983
|
+
routeSource: choice(row.routeSource, DSMM_ROUTE_SOURCES),
|
|
9984
|
+
initialRoute
|
|
9985
|
+
};
|
|
9945
9986
|
}
|
|
9946
9987
|
function observationFrame(value) {
|
|
9947
9988
|
const row = object2(value, ["type", "sessionId", "admissionEpoch"], ["calls", "call", "callId"]), sessionId2 = identity(row.sessionId), admissionEpoch = epoch2(row.admissionEpoch);
|
|
@@ -10101,7 +10142,7 @@ function bindPermissionSession(source, sessions, permissions) {
|
|
|
10101
10142
|
|
|
10102
10143
|
// src/client/RoleToolView.tsx
|
|
10103
10144
|
var import_react11 = require("react");
|
|
10104
|
-
var
|
|
10145
|
+
var import_dsh_client_ui_primitives12 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
10105
10146
|
|
|
10106
10147
|
// src/client/RoleToolView-data.ts
|
|
10107
10148
|
var roleToolKeys = {
|
|
@@ -10157,7 +10198,7 @@ function actualRoleTool(toolName, meta, failed) {
|
|
|
10157
10198
|
}
|
|
10158
10199
|
}
|
|
10159
10200
|
function observedRoleTool(toolName, observation) {
|
|
10160
|
-
if (!(toolName === "dsmm_category" ? categories : roles).has(observation.role)) return void 0;
|
|
10201
|
+
if (observation.kind === "native" || !(toolName === "dsmm_category" ? categories : roles).has(observation.role)) return void 0;
|
|
10161
10202
|
return {
|
|
10162
10203
|
role: observation.role,
|
|
10163
10204
|
label: roleToolDisplay(observation.role),
|
|
@@ -10239,6 +10280,13 @@ var roleToolEn = {
|
|
|
10239
10280
|
error: "Failed",
|
|
10240
10281
|
stopped: "Interrupted",
|
|
10241
10282
|
technicalDetails: "Technical details",
|
|
10283
|
+
nativeAgent: "Native agent",
|
|
10284
|
+
nativeName: "Name",
|
|
10285
|
+
nativeId: "Child ID",
|
|
10286
|
+
nativeProvider: "Execution provider",
|
|
10287
|
+
accepted: "Accepted · completion not observed",
|
|
10288
|
+
completed: "Completed",
|
|
10289
|
+
nativeCorrelationUnavailable: "Live child correlation unavailable; native receipt only",
|
|
10242
10290
|
observation: "Route observation",
|
|
10243
10291
|
observationUnavailable: "Unavailable",
|
|
10244
10292
|
observationConnecting: "Connecting",
|
|
@@ -10284,6 +10332,13 @@ var roleToolZh = {
|
|
|
10284
10332
|
error: "失败",
|
|
10285
10333
|
stopped: "已中断",
|
|
10286
10334
|
technicalDetails: "技术详情",
|
|
10335
|
+
nativeAgent: "原生代理",
|
|
10336
|
+
nativeName: "名称",
|
|
10337
|
+
nativeId: "子代理 ID",
|
|
10338
|
+
nativeProvider: "执行提供方",
|
|
10339
|
+
accepted: "已接受 · 完成情况未观测",
|
|
10340
|
+
completed: "已完成",
|
|
10341
|
+
nativeCorrelationUnavailable: "实时子代理关联不可用;仅显示原生回执",
|
|
10287
10342
|
observation: "路由观测",
|
|
10288
10343
|
observationUnavailable: "不可用",
|
|
10289
10344
|
observationConnecting: "连接中",
|
|
@@ -10313,8 +10368,115 @@ var roleToolZh = {
|
|
|
10313
10368
|
value: "值"
|
|
10314
10369
|
};
|
|
10315
10370
|
|
|
10316
|
-
// src/client/
|
|
10371
|
+
// src/client/NativeToolView.tsx
|
|
10372
|
+
var import_dsh_client_ui_primitives11 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
10373
|
+
|
|
10374
|
+
// src/client/NativeToolView-data.ts
|
|
10375
|
+
function nativeActivationIdentity(meta) {
|
|
10376
|
+
if (meta === null || typeof meta !== "object" || Array.isArray(meta)) return void 0;
|
|
10377
|
+
const value = meta;
|
|
10378
|
+
if (value.kind !== "activation") return void 0;
|
|
10379
|
+
if (typeof value.name === "string" && value.name.trim() !== "") return { kind: "name", value: value.name };
|
|
10380
|
+
if (typeof value.subagentId === "string" && value.subagentId.trim() !== "") return { kind: "id", value: value.subagentId };
|
|
10381
|
+
return void 0;
|
|
10382
|
+
}
|
|
10383
|
+
function observedNativeTool(toolName, callId, identity2, observation) {
|
|
10384
|
+
if (identity2 === void 0 || observation?.kind !== "native" || observation.toolName !== toolName || observation.callId !== callId) return void 0;
|
|
10385
|
+
const observedIdentity = identity2.kind === "name" ? observation.nativeName : observation.childId;
|
|
10386
|
+
return observedIdentity === identity2.value ? observation : void 0;
|
|
10387
|
+
}
|
|
10388
|
+
|
|
10389
|
+
// src/client/NativeToolView.tsx
|
|
10317
10390
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
10391
|
+
function NativeToolView(props) {
|
|
10392
|
+
const { nativeView: NativeView, nativeT, t } = props;
|
|
10393
|
+
const observation = props.useRoleCalls((state2) => state2.calls.get(props.callId));
|
|
10394
|
+
const status = props.useRoleCalls((state2) => state2.status);
|
|
10395
|
+
const { expanded, toggle } = props.useDisclosure();
|
|
10396
|
+
const result = props.phase === "result" ? props.block : void 0;
|
|
10397
|
+
const identity2 = result === void 0 || result.isError || result.error != null ? void 0 : nativeActivationIdentity(result.meta);
|
|
10398
|
+
const actual = observedNativeTool(props.toolName, props.callId, identity2, observation);
|
|
10399
|
+
const settled = actual?.phase === "settled";
|
|
10400
|
+
const live = status === "live";
|
|
10401
|
+
const state = settled ? actual.stopReason === void 0 ? "accepted" : actual.stopReason === "aborted" ? "stopped" : actual.stopReason === "completed" ? "completed" : "error" : actual !== void 0 && live ? "running" : "accepted";
|
|
10402
|
+
const route3 = settled || live ? actual?.actualRoute : void 0;
|
|
10403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
10404
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NativeView, { ...props, t: nativeT }),
|
|
10405
|
+
identity2 !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-tool", "data-dsmm-native-tool": props.toolName, "data-state": state, "data-identity": "native", children: [
|
|
10406
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
10407
|
+
import_dsh_client_ui_primitives11.DisclosureRow,
|
|
10408
|
+
{
|
|
10409
|
+
title: `${t("nativeAgent")} · ${identity2.value}`,
|
|
10410
|
+
titleClassName: "dsmm-role-summary",
|
|
10411
|
+
rowClassName: "dsmm-role-heading",
|
|
10412
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.IconAgentPresetOutlineRegular, { size: 14, className: "dsmm-role-icon" }),
|
|
10413
|
+
open: expanded,
|
|
10414
|
+
expandable: true,
|
|
10415
|
+
onToggle: toggle,
|
|
10416
|
+
expandOnRowClick: true,
|
|
10417
|
+
running: state === "running",
|
|
10418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-body", children: [
|
|
10419
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", children: [
|
|
10420
|
+
t(identity2.kind === "name" ? "nativeName" : "nativeId"),
|
|
10421
|
+
": ",
|
|
10422
|
+
identity2.value
|
|
10423
|
+
] }),
|
|
10424
|
+
actual !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", children: [
|
|
10425
|
+
t("nativeId"),
|
|
10426
|
+
": ",
|
|
10427
|
+
actual.childId,
|
|
10428
|
+
actual.provider === void 0 ? "" : ` · ${t("nativeProvider")}: ${actual.provider}`
|
|
10429
|
+
] }),
|
|
10430
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", children: [
|
|
10431
|
+
t("actualRoute"),
|
|
10432
|
+
": ",
|
|
10433
|
+
route3?.status === "known" ? `${route3.route.provider}/${route3.route.model} · ${route3.route.reasoningEffort ?? t("effortUnreported")}` : t("routeUnknown")
|
|
10434
|
+
] }),
|
|
10435
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "dsmm-role-identity", "data-observation-status": actual === void 0 ? "unavailable" : status, children: actual === void 0 ? t("nativeCorrelationUnavailable") : t({ unavailable: "observationUnavailable", connecting: "observationConnecting", live: "observationLive", stale: "observationStale" }[status]) })
|
|
10436
|
+
] })
|
|
10437
|
+
}
|
|
10438
|
+
),
|
|
10439
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-actions", children: [
|
|
10440
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.StateDot, { state: state === "error" ? "error" : state === "stopped" ? "warning" : state === "completed" ? "done" : state === "running" ? "ongoing" : "idle" }),
|
|
10441
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "dsmm-role-status", role: "status", children: t(state) })
|
|
10442
|
+
] })
|
|
10443
|
+
] })
|
|
10444
|
+
] });
|
|
10445
|
+
}
|
|
10446
|
+
function registerNativeToolViews(ctx, observations) {
|
|
10447
|
+
const mounted = /* @__PURE__ */ new Map();
|
|
10448
|
+
const reconcile = () => {
|
|
10449
|
+
const entries = ctx.slots.entries("tool.call.toolview");
|
|
10450
|
+
for (const key of ["subagent", "subagent_fork"]) {
|
|
10451
|
+
const candidates = entries.filter((entry) => entry.component !== NativeToolView && entry.options.key === key);
|
|
10452
|
+
const source = candidates.sort((a, b) => (a.options.priority ?? 0) - (b.options.priority ?? 0))[0];
|
|
10453
|
+
const previous = mounted.get(key);
|
|
10454
|
+
if (previous?.source === source) continue;
|
|
10455
|
+
previous?.dispose();
|
|
10456
|
+
mounted.delete(key);
|
|
10457
|
+
if (source === void 0 || typeof source.component !== "function" || source.locale !== "conversation" || source.inject !== void 0 || source.store !== void 0 || source.children !== void 0) continue;
|
|
10458
|
+
const nativeView = source.component;
|
|
10459
|
+
const dispose = ctx.slots.register({
|
|
10460
|
+
name: "tool.call.toolview",
|
|
10461
|
+
key,
|
|
10462
|
+
priority: (source.options.priority ?? 0) - 1,
|
|
10463
|
+
locale: ROLE_TOOL_NS,
|
|
10464
|
+
inject: (sessionId2) => ({ hooks: { roleCalls: observations.source(sessionId2) }, nativeView, nativeT: ctx.locale.bind("conversation") })
|
|
10465
|
+
}, NativeToolView);
|
|
10466
|
+
mounted.set(key, { source, dispose });
|
|
10467
|
+
}
|
|
10468
|
+
};
|
|
10469
|
+
const unsubscribe = ctx.slots.subscribe("tool.call.toolview", reconcile);
|
|
10470
|
+
reconcile();
|
|
10471
|
+
return () => {
|
|
10472
|
+
unsubscribe();
|
|
10473
|
+
for (const entry of mounted.values()) entry.dispose();
|
|
10474
|
+
mounted.clear();
|
|
10475
|
+
};
|
|
10476
|
+
}
|
|
10477
|
+
|
|
10478
|
+
// src/client/RoleToolView.tsx
|
|
10479
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
10318
10480
|
var styles = `
|
|
10319
10481
|
.dsmm-role-tool{min-width:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);font-size:14px;line-height:22px}
|
|
10320
10482
|
.dsmm-role-tool .dsmm-role-heading{color:var(--dsw-alias-label-primary);height:auto;min-height:32px}
|
|
@@ -10374,7 +10536,7 @@ function RoleToolView(props) {
|
|
|
10374
10536
|
const observedStop = actual?.phase === "settled" ? actual.stopReason : void 0;
|
|
10375
10537
|
const state = result?.error?.code === "interrupted" || observedStop === "aborted" ? "stopped" : failed || observedStop !== void 0 && observedStop !== "completed" ? "error" : result === void 0 ? props.phase === "preparing" ? "preparing" : "running" : actual?.delivery === "parent" && actual.phase !== "settled" ? "background" : "result";
|
|
10376
10538
|
const isOngoing = state === "running" || props.phase === "preparing";
|
|
10377
|
-
const code = (value) => /* @__PURE__ */ (0,
|
|
10539
|
+
const code = (value) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.CodeBlock, { code: value, copyLabel: t("copy"), copiedLabel: t("copied") });
|
|
10378
10540
|
const [viewMode, setViewMode] = (0, import_react11.useState)("table");
|
|
10379
10541
|
const controlId = `dsmm-tech-${props.callId || "call"}`;
|
|
10380
10542
|
const viewOptions = [
|
|
@@ -10389,12 +10551,12 @@ function RoleToolView(props) {
|
|
|
10389
10551
|
const initialRoute = comparison?.initialRoute ?? (actual?.route === void 0 ? void 0 : { status: "known", source: "invocation-capture", route: actual.route });
|
|
10390
10552
|
const actualRoute = comparison?.liveRoute;
|
|
10391
10553
|
const routeLabel = (route3, missingEffort = false) => `${route3.provider}/${route3.model}${route3.reasoningEffort === void 0 ? missingEffort ? ` · ${t("effortUnreported")}` : "" : ` · ${route3.reasoningEffort}`}`;
|
|
10392
|
-
const collapsedContent = singleLineDesc ? /* @__PURE__ */ (0,
|
|
10393
|
-
/* @__PURE__ */ (0,
|
|
10394
|
-
/* @__PURE__ */ (0,
|
|
10554
|
+
const collapsedContent = singleLineDesc ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
10555
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-sep", "aria-hidden": "true" }),
|
|
10556
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-summary", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.TextShimmer, { active: isOngoing, children: singleLineDesc }) })
|
|
10395
10557
|
] }) : void 0;
|
|
10396
10558
|
const stateDotState = state === "error" ? "error" : state === "stopped" ? "warning" : result === void 0 ? "ongoing" : state === "background" ? "idle" : "done";
|
|
10397
|
-
return /* @__PURE__ */ (0,
|
|
10559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
10398
10560
|
"div",
|
|
10399
10561
|
{
|
|
10400
10562
|
className: "dsmm-role-tool",
|
|
@@ -10405,14 +10567,14 @@ function RoleToolView(props) {
|
|
|
10405
10567
|
"data-phase": actual?.phase,
|
|
10406
10568
|
"data-expanded": expanded ? "true" : "false",
|
|
10407
10569
|
children: [
|
|
10408
|
-
/* @__PURE__ */ (0,
|
|
10409
|
-
|
|
10570
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
10571
|
+
import_dsh_client_ui_primitives12.DisclosureRow,
|
|
10410
10572
|
{
|
|
10411
10573
|
title,
|
|
10412
10574
|
titleClassName: "dsmm-role-title",
|
|
10413
10575
|
rowClassName: "dsmm-role-heading",
|
|
10414
10576
|
contentClassName: "dsmm-role-text",
|
|
10415
|
-
icon: /* @__PURE__ */ (0,
|
|
10577
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.IconAgentPresetOutlineRegular, { size: 14, className: "dsmm-role-icon" }),
|
|
10416
10578
|
collapsedContent,
|
|
10417
10579
|
keepContentWhenOpen: true,
|
|
10418
10580
|
running: isOngoing,
|
|
@@ -10420,93 +10582,93 @@ function RoleToolView(props) {
|
|
|
10420
10582
|
expandable: true,
|
|
10421
10583
|
onToggle: toggle,
|
|
10422
10584
|
expandOnRowClick: true,
|
|
10423
|
-
children: /* @__PURE__ */ (0,
|
|
10424
|
-
/* @__PURE__ */ (0,
|
|
10425
|
-
showRequestedVsActual ? /* @__PURE__ */ (0,
|
|
10426
|
-
/* @__PURE__ */ (0,
|
|
10585
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-body", children: [
|
|
10586
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "dsmm-role-identity", children: [
|
|
10587
|
+
showRequestedVsActual ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
10588
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
|
|
10427
10589
|
t("requested"),
|
|
10428
10590
|
": "
|
|
10429
10591
|
] }),
|
|
10430
|
-
/* @__PURE__ */ (0,
|
|
10592
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
|
|
10431
10593
|
requested.target === void 0 ? t("unknown") : roleToolDisplay(requested.target),
|
|
10432
10594
|
requested.level ? ` (${requested.level})` : ""
|
|
10433
10595
|
] }),
|
|
10434
|
-
/* @__PURE__ */ (0,
|
|
10435
|
-
/* @__PURE__ */ (0,
|
|
10596
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-dim", children: " → " }),
|
|
10597
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
|
|
10436
10598
|
t("actual"),
|
|
10437
10599
|
": "
|
|
10438
10600
|
] }),
|
|
10439
|
-
/* @__PURE__ */ (0,
|
|
10601
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
|
|
10440
10602
|
roleToolDisplay(actual.role),
|
|
10441
10603
|
" (",
|
|
10442
10604
|
actual.level,
|
|
10443
10605
|
")"
|
|
10444
10606
|
] })
|
|
10445
|
-
] }) : /* @__PURE__ */ (0,
|
|
10446
|
-
actual === void 0 && /* @__PURE__ */ (0,
|
|
10607
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
|
|
10608
|
+
actual === void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
|
|
10447
10609
|
t("requested"),
|
|
10448
10610
|
": "
|
|
10449
10611
|
] }),
|
|
10450
10612
|
actual !== void 0 ? roleToolDisplay(actual.role) : requested.target === void 0 ? t("unknownTarget") : roleToolDisplay(requested.target),
|
|
10451
10613
|
(actual?.level ?? requested.level) !== void 0 && ` · ${actual?.level ?? requested.level}`,
|
|
10452
|
-
props.phase !== "preparing" && actual === void 0 && /* @__PURE__ */ (0,
|
|
10614
|
+
props.phase !== "preparing" && actual === void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
|
|
10453
10615
|
" · ",
|
|
10454
10616
|
t("actualUnknown")
|
|
10455
10617
|
] })
|
|
10456
10618
|
] }),
|
|
10457
|
-
initialRoute !== void 0 && /* @__PURE__ */ (0,
|
|
10619
|
+
initialRoute !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-model", children: [
|
|
10458
10620
|
" · ",
|
|
10459
10621
|
t("initialRoute"),
|
|
10460
10622
|
": ",
|
|
10461
10623
|
initialRoute.status === "known" ? routeLabel(initialRoute.route) : t("routeUnknown")
|
|
10462
10624
|
] }),
|
|
10463
|
-
actualRoute !== void 0 ? /* @__PURE__ */ (0,
|
|
10625
|
+
actualRoute !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-model", children: [
|
|
10464
10626
|
" · ",
|
|
10465
10627
|
t("actualRoute"),
|
|
10466
10628
|
": ",
|
|
10467
10629
|
actualRoute.status === "known" ? routeLabel(actualRoute.route, true) : t("routeUnknown")
|
|
10468
|
-
] }) : props.phase !== "preparing" && /* @__PURE__ */ (0,
|
|
10630
|
+
] }) : props.phase !== "preparing" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-model", children: [
|
|
10469
10631
|
" · ",
|
|
10470
10632
|
t("actualRoute"),
|
|
10471
10633
|
": ",
|
|
10472
10634
|
t("routeUnknown")
|
|
10473
10635
|
] })
|
|
10474
10636
|
] }),
|
|
10475
|
-
/* @__PURE__ */ (0,
|
|
10637
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "dsmm-role-identity", "data-observation-status": observationStatus, children: [
|
|
10476
10638
|
t("observation"),
|
|
10477
10639
|
": ",
|
|
10478
10640
|
t({ unavailable: "observationUnavailable", connecting: "observationConnecting", live: "observationLive", stale: "observationStale" }[observationStatus]),
|
|
10479
10641
|
observationIssue2 !== void 0 && ` · ${observationIssue2.kind}/${observationIssue2.code}`
|
|
10480
10642
|
] }),
|
|
10481
|
-
requested.description !== void 0 && /* @__PURE__ */ (0,
|
|
10482
|
-
result?.error != null && /* @__PURE__ */ (0,
|
|
10483
|
-
/* @__PURE__ */ (0,
|
|
10643
|
+
requested.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-role-task", children: requested.description }),
|
|
10644
|
+
result?.error != null && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-failure", children: [
|
|
10645
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-role-section-title", children: t("failure") }),
|
|
10484
10646
|
code(JSON.stringify(result.error, null, 2))
|
|
10485
10647
|
] }),
|
|
10486
|
-
/* @__PURE__ */ (0,
|
|
10487
|
-
/* @__PURE__ */ (0,
|
|
10488
|
-
/* @__PURE__ */ (0,
|
|
10489
|
-
/* @__PURE__ */ (0,
|
|
10490
|
-
/* @__PURE__ */ (0,
|
|
10491
|
-
/* @__PURE__ */ (0,
|
|
10492
|
-
/* @__PURE__ */ (0,
|
|
10493
|
-
/* @__PURE__ */ (0,
|
|
10648
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("details", { className: "dsmm-role-details", children: [
|
|
10649
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("summary", { children: t("technicalDetails") }),
|
|
10650
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-details-body", children: [
|
|
10651
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dsmm-role-details-header", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.SegmentedControl, { id: controlId, value: viewMode, options: viewOptions, onChange: setViewMode, label: t("viewMode"), className: "dsmm-role-view-switch" }) }),
|
|
10652
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: `${controlId}-table-panel`, role: "tabpanel", "aria-labelledby": `${controlId}-table`, hidden: viewMode !== "table", tabIndex: 0, children: viewMode === "table" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("table", { className: "dsmm-role-table", children: [
|
|
10653
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("tr", { children: [
|
|
10654
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("th", { scope: "col", children: t("property") }),
|
|
10655
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("th", { scope: "col", children: t("value") })
|
|
10494
10656
|
] }) }),
|
|
10495
|
-
/* @__PURE__ */ (0,
|
|
10496
|
-
/* @__PURE__ */ (0,
|
|
10497
|
-
/* @__PURE__ */ (0,
|
|
10657
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { children: tableRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("tr", { children: [
|
|
10658
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "dsmm-role-prop-cell", children: row.property }),
|
|
10659
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "dsmm-role-val-cell", children: row.isComplex ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "dsmm-role-cell-code", children: JSON.stringify(row.value, null, 2) }) : typeof row.value === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-cell-text", children: row.value }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: row.value === null ? "null" : row.value === void 0 ? "undefined" : String(row.value) }) })
|
|
10498
10660
|
] }, row.property)) })
|
|
10499
10661
|
] }) }),
|
|
10500
|
-
/* @__PURE__ */ (0,
|
|
10662
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: `${controlId}-json-panel`, role: "tabpanel", "aria-labelledby": `${controlId}-json`, hidden: viewMode !== "json", tabIndex: 0, children: viewMode === "json" && code(JSON.stringify(jsonData2, null, 2)) })
|
|
10501
10663
|
] })
|
|
10502
10664
|
] })
|
|
10503
10665
|
] })
|
|
10504
10666
|
}
|
|
10505
10667
|
),
|
|
10506
|
-
/* @__PURE__ */ (0,
|
|
10507
|
-
/* @__PURE__ */ (0,
|
|
10508
|
-
/* @__PURE__ */ (0,
|
|
10509
|
-
props.inspect !== void 0 && /* @__PURE__ */ (0,
|
|
10668
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-actions", children: [
|
|
10669
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.StateDot, { state: stateDotState }),
|
|
10670
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-role-status", role: "status", children: t(state) }),
|
|
10671
|
+
props.inspect !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.Button, { variant: "ghost", size: "sm", onClick: props.inspect, children: t("inspect") })
|
|
10510
10672
|
] })
|
|
10511
10673
|
]
|
|
10512
10674
|
}
|
|
@@ -10528,6 +10690,7 @@ function registerRoleToolViews(ctx, observations) {
|
|
|
10528
10690
|
locale: ROLE_TOOL_NS,
|
|
10529
10691
|
inject: (sessionId2) => ({ hooks: { roleCalls: observations.source(sessionId2) } })
|
|
10530
10692
|
}, RoleToolView));
|
|
10693
|
+
disposers.push(registerNativeToolViews(ctx, observations));
|
|
10531
10694
|
return () => {
|
|
10532
10695
|
for (const dispose of disposers.reverse()) dispose();
|
|
10533
10696
|
};
|
|
@@ -11048,16 +11211,16 @@ var ChildrenController = class {
|
|
|
11048
11211
|
|
|
11049
11212
|
// src/client/ChildrenPanel.tsx
|
|
11050
11213
|
var import_react12 = require("react");
|
|
11051
|
-
var
|
|
11052
|
-
var
|
|
11214
|
+
var import_dsh_client_ui_primitives13 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
11215
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
11053
11216
|
function ControlAvailability({ value, label, t }) {
|
|
11054
|
-
return /* @__PURE__ */ (0,
|
|
11055
|
-
/* @__PURE__ */ (0,
|
|
11217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-availability", children: [
|
|
11218
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11056
11219
|
t(label),
|
|
11057
11220
|
": ",
|
|
11058
11221
|
t(value?.enabled === true ? "enabled" : "disabled")
|
|
11059
11222
|
] }),
|
|
11060
|
-
value?.enabled !== true && /* @__PURE__ */ (0,
|
|
11223
|
+
value?.enabled !== true && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t(`reason:${value?.reason ?? "unavailable"}`) })
|
|
11061
11224
|
] });
|
|
11062
11225
|
}
|
|
11063
11226
|
function routeText(route3) {
|
|
@@ -11066,38 +11229,38 @@ function routeText(route3) {
|
|
|
11066
11229
|
function RouteComparisonDetails({ value, t }) {
|
|
11067
11230
|
const initial = value?.initialRoute, live = value?.liveRoute;
|
|
11068
11231
|
const liveReasons = { "no-own-request-header": "routeNoOwnHeader", "invalid-own-request-header": "routeInvalidOwnHeader", "not-observed": "routeNotObserved" };
|
|
11069
|
-
return /* @__PURE__ */ (0,
|
|
11070
|
-
value === void 0 && /* @__PURE__ */ (0,
|
|
11071
|
-
/* @__PURE__ */ (0,
|
|
11072
|
-
/* @__PURE__ */ (0,
|
|
11073
|
-
/* @__PURE__ */ (0,
|
|
11074
|
-
initial?.status === "known" ? /* @__PURE__ */ (0,
|
|
11075
|
-
/* @__PURE__ */ (0,
|
|
11076
|
-
/* @__PURE__ */ (0,
|
|
11232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-availability", children: [
|
|
11233
|
+
value === void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("comparisonUnobserved") }),
|
|
11234
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dl", { className: "dsmm-child-meta", children: [
|
|
11235
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("initialRoute") }),
|
|
11236
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: initial?.status === "known" ? routeText(initial.route) : t("routeUnknown") }),
|
|
11237
|
+
initial?.status === "known" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11238
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("initialRouteSource") }),
|
|
11239
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
|
|
11077
11240
|
t("routeCaptureSource"),
|
|
11078
11241
|
" · ",
|
|
11079
11242
|
initial.source
|
|
11080
11243
|
] })
|
|
11081
|
-
] }) : initial !== void 0 && /* @__PURE__ */ (0,
|
|
11082
|
-
/* @__PURE__ */ (0,
|
|
11083
|
-
/* @__PURE__ */ (0,
|
|
11244
|
+
] }) : initial !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11245
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("initialRouteReason") }),
|
|
11246
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
|
|
11084
11247
|
t("routeMissingCapture"),
|
|
11085
11248
|
" · ",
|
|
11086
11249
|
initial.reason
|
|
11087
11250
|
] })
|
|
11088
11251
|
] }),
|
|
11089
|
-
/* @__PURE__ */ (0,
|
|
11090
|
-
/* @__PURE__ */ (0,
|
|
11091
|
-
live?.status === "known" ? /* @__PURE__ */ (0,
|
|
11092
|
-
/* @__PURE__ */ (0,
|
|
11093
|
-
/* @__PURE__ */ (0,
|
|
11252
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("liveRoute") }),
|
|
11253
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: live?.status === "known" ? routeText(live.route) : t("routeUnknown") }),
|
|
11254
|
+
live?.status === "known" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11255
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("liveRouteSource") }),
|
|
11256
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
|
|
11094
11257
|
t("routeOwnHeaderSource"),
|
|
11095
11258
|
" · ",
|
|
11096
11259
|
live.source
|
|
11097
11260
|
] })
|
|
11098
|
-
] }) : live !== void 0 && /* @__PURE__ */ (0,
|
|
11099
|
-
/* @__PURE__ */ (0,
|
|
11100
|
-
/* @__PURE__ */ (0,
|
|
11261
|
+
] }) : live !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11262
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("liveRouteReason") }),
|
|
11263
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
|
|
11101
11264
|
t(liveReasons[live.reason]),
|
|
11102
11265
|
" · ",
|
|
11103
11266
|
live.reason
|
|
@@ -11107,53 +11270,53 @@ function RouteComparisonDetails({ value, t }) {
|
|
|
11107
11270
|
] });
|
|
11108
11271
|
}
|
|
11109
11272
|
function InvocationDetails({ value, t, showComparison = true }) {
|
|
11110
|
-
if (value === void 0) return /* @__PURE__ */ (0,
|
|
11111
|
-
return /* @__PURE__ */ (0,
|
|
11112
|
-
showComparison && /* @__PURE__ */ (0,
|
|
11113
|
-
/* @__PURE__ */ (0,
|
|
11114
|
-
/* @__PURE__ */ (0,
|
|
11115
|
-
/* @__PURE__ */ (0,
|
|
11273
|
+
if (value === void 0) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("invocationUnavailable") });
|
|
11274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11275
|
+
showComparison && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RouteComparisonDetails, { value: value.routeComparison, t }),
|
|
11276
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dl", { className: "dsmm-child-meta", children: [
|
|
11277
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("role") }),
|
|
11278
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
|
|
11116
11279
|
value.label,
|
|
11117
11280
|
" · ",
|
|
11118
11281
|
value.role
|
|
11119
11282
|
] }),
|
|
11120
|
-
/* @__PURE__ */ (0,
|
|
11121
|
-
/* @__PURE__ */ (0,
|
|
11122
|
-
/* @__PURE__ */ (0,
|
|
11123
|
-
/* @__PURE__ */ (0,
|
|
11124
|
-
/* @__PURE__ */ (0,
|
|
11125
|
-
/* @__PURE__ */ (0,
|
|
11126
|
-
/* @__PURE__ */ (0,
|
|
11127
|
-
/* @__PURE__ */ (0,
|
|
11128
|
-
value.runId !== void 0 && /* @__PURE__ */ (0,
|
|
11129
|
-
/* @__PURE__ */ (0,
|
|
11130
|
-
/* @__PURE__ */ (0,
|
|
11283
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("level") }),
|
|
11284
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.level }),
|
|
11285
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("mode") }),
|
|
11286
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.mode }),
|
|
11287
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("reportedRoute") }),
|
|
11288
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.route === void 0 ? t("routeUnreported") : routeText(value.route) }),
|
|
11289
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("routeSource") }),
|
|
11290
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.routeSource }),
|
|
11291
|
+
value.runId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11292
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("runId") }),
|
|
11293
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.runId })
|
|
11131
11294
|
] }),
|
|
11132
|
-
value.childId !== void 0 && /* @__PURE__ */ (0,
|
|
11133
|
-
/* @__PURE__ */ (0,
|
|
11134
|
-
/* @__PURE__ */ (0,
|
|
11295
|
+
value.childId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11296
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("childId") }),
|
|
11297
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.childId })
|
|
11135
11298
|
] }),
|
|
11136
|
-
value.jobId !== void 0 && /* @__PURE__ */ (0,
|
|
11137
|
-
/* @__PURE__ */ (0,
|
|
11138
|
-
/* @__PURE__ */ (0,
|
|
11299
|
+
value.jobId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11300
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("jobId") }),
|
|
11301
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.jobId })
|
|
11139
11302
|
] })
|
|
11140
11303
|
] })
|
|
11141
11304
|
] });
|
|
11142
11305
|
}
|
|
11143
11306
|
function Issue2({ value, t }) {
|
|
11144
11307
|
if (!value) return null;
|
|
11145
|
-
return /* @__PURE__ */ (0,
|
|
11146
|
-
/* @__PURE__ */ (0,
|
|
11147
|
-
/* @__PURE__ */ (0,
|
|
11308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-issue", role: "alert", children: [
|
|
11309
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t(value.unknown ? "unknownAction" : "error", { code: value.code }) }),
|
|
11310
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11148
11311
|
value.code,
|
|
11149
11312
|
value.field === void 0 ? "" : ` · ${t("field")}: ${value.field}`
|
|
11150
11313
|
] }),
|
|
11151
|
-
value.reason !== void 0 && /* @__PURE__ */ (0,
|
|
11314
|
+
value.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t(`reason:${value.reason}`) })
|
|
11152
11315
|
] });
|
|
11153
11316
|
}
|
|
11154
11317
|
function Outcome({ value, t }) {
|
|
11155
11318
|
if (!value) return null;
|
|
11156
|
-
return /* @__PURE__ */ (0,
|
|
11319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "dsmm-availability", role: "status", "aria-live": "polite", children: value.kind === "prompt" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("promptAccepted", { id: value.receipt.messageId }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("interruptAccepted") }) });
|
|
11157
11320
|
}
|
|
11158
11321
|
function ChildComposer({ child: child2, state, actions: actions3, t }) {
|
|
11159
11322
|
const prefix = (0, import_react12.useId)(), picker = (0, import_react12.useRef)(null), generation = state.generation, key = childActionKey(child2.id);
|
|
@@ -11162,14 +11325,14 @@ function ChildComposer({ child: child2, state, actions: actions3, t }) {
|
|
|
11162
11325
|
const canPrompt = available && enabled(state.snapshot?.capabilities.prompt) && enabled(child2.controls.prompt) && !child2.readonly && child2.mode === "continuable";
|
|
11163
11326
|
const canImages = canPrompt && enabled(state.snapshot?.capabilities.images) && !draft2.imageBusy;
|
|
11164
11327
|
const submit = canPrompt && !draft2.uncertain && !draft2.imageBusy && (draft2.text.trim() !== "" || draft2.images.length > 0) && (draft2.images.length === 0 || enabled(state.snapshot?.capabilities.images));
|
|
11165
|
-
return /* @__PURE__ */ (0,
|
|
11328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("form", { className: "dsmm-child-composer", "aria-label": t("prompt"), onSubmit: (event) => {
|
|
11166
11329
|
event.preventDefault();
|
|
11167
11330
|
if (submit) void actions3.prompt(generation, child2.id);
|
|
11168
11331
|
}, children: [
|
|
11169
|
-
!state.fresh && /* @__PURE__ */ (0,
|
|
11170
|
-
/* @__PURE__ */ (0,
|
|
11171
|
-
/* @__PURE__ */ (0,
|
|
11172
|
-
/* @__PURE__ */ (0,
|
|
11332
|
+
!state.fresh && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t(state.reading ? "reading" : "stale") }),
|
|
11333
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-field", children: [
|
|
11334
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: `${prefix}-message`, children: t("text") }),
|
|
11335
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
11173
11336
|
"textarea",
|
|
11174
11337
|
{
|
|
11175
11338
|
id: `${prefix}-message`,
|
|
@@ -11182,48 +11345,48 @@ function ChildComposer({ child: child2, state, actions: actions3, t }) {
|
|
|
11182
11345
|
}
|
|
11183
11346
|
)
|
|
11184
11347
|
] }),
|
|
11185
|
-
/* @__PURE__ */ (0,
|
|
11186
|
-
/* @__PURE__ */ (0,
|
|
11187
|
-
/* @__PURE__ */ (0,
|
|
11348
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-field", children: [
|
|
11349
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: `${prefix}-delivery`, children: t("delivery") }),
|
|
11350
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { id: `${prefix}-delivery`, value: draft2.delivery, disabled: !canPrompt, "aria-describedby": `${prefix}-delivery-hint`, onChange: (event) => {
|
|
11188
11351
|
const value = event.currentTarget.value;
|
|
11189
11352
|
if (value === "queue" || value === "steer") actions3.setDelivery(generation, child2.id, value);
|
|
11190
11353
|
}, children: [
|
|
11191
|
-
/* @__PURE__ */ (0,
|
|
11192
|
-
/* @__PURE__ */ (0,
|
|
11354
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "queue", children: t("queue") }),
|
|
11355
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "steer", children: t("steer") })
|
|
11193
11356
|
] }),
|
|
11194
|
-
/* @__PURE__ */ (0,
|
|
11357
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: `${prefix}-delivery-hint`, className: "dsmm-hint", children: t("deliveryHint") })
|
|
11195
11358
|
] }),
|
|
11196
|
-
/* @__PURE__ */ (0,
|
|
11197
|
-
/* @__PURE__ */ (0,
|
|
11198
|
-
/* @__PURE__ */ (0,
|
|
11359
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-field", children: [
|
|
11360
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: `${prefix}-images-hint`, className: "dsmm-hint", children: t("imagesHint") }),
|
|
11361
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { ref: picker, hidden: true, type: "file", accept: "image/png,image/jpeg,image/webp,image/gif", multiple: true, disabled: !canImages, "aria-label": t("images"), onChange: (event) => {
|
|
11199
11362
|
const files = Array.from(event.currentTarget.files ?? []);
|
|
11200
11363
|
event.currentTarget.value = "";
|
|
11201
11364
|
if (canImages) void actions3.addImages(generation, child2.id, files);
|
|
11202
11365
|
} }),
|
|
11203
|
-
/* @__PURE__ */ (0,
|
|
11366
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: !canImages, "aria-describedby": `${prefix}-images-hint`, onClick: () => {
|
|
11204
11367
|
if (canImages) picker.current?.click();
|
|
11205
11368
|
}, children: t("images") }),
|
|
11206
|
-
/* @__PURE__ */ (0,
|
|
11207
|
-
draft2.images.length > 0 && /* @__PURE__ */ (0,
|
|
11208
|
-
/* @__PURE__ */ (0,
|
|
11369
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: state.snapshot?.capabilities.images, label: "imageAvailability", t }),
|
|
11370
|
+
draft2.images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "dsmm-profile-list", children: draft2.images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
11371
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11209
11372
|
image.name ?? image.mediaType,
|
|
11210
11373
|
" · ",
|
|
11211
11374
|
image.mediaType
|
|
11212
11375
|
] }),
|
|
11213
|
-
/* @__PURE__ */ (0,
|
|
11376
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: pending || draft2.imageBusy, onClick: () => actions3.removeImage(generation, child2.id, image), "aria-label": `${t("removeImage")}: ${image.name ?? image.mediaType}`, children: t("removeImage") })
|
|
11214
11377
|
] }, index)) })
|
|
11215
11378
|
] }),
|
|
11216
|
-
draft2.uncertain && /* @__PURE__ */ (0,
|
|
11217
|
-
/* @__PURE__ */ (0,
|
|
11218
|
-
/* @__PURE__ */ (0,
|
|
11379
|
+
draft2.uncertain && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-warning", children: [
|
|
11380
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: `${prefix}-unknown`, children: t("unknown") }),
|
|
11381
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: !state.fresh || state.reading || pending, onClick: () => actions3.acknowledgeUnknown(generation, child2.id), children: t("acknowledge") })
|
|
11219
11382
|
] }),
|
|
11220
|
-
/* @__PURE__ */ (0,
|
|
11221
|
-
draft2.text.trim() === "" && draft2.images.length === 0 && /* @__PURE__ */ (0,
|
|
11222
|
-
draft2.images.length > 0 && !enabled(state.snapshot?.capabilities.images) && /* @__PURE__ */ (0,
|
|
11223
|
-
/* @__PURE__ */ (0,
|
|
11224
|
-
/* @__PURE__ */ (0,
|
|
11225
|
-
/* @__PURE__ */ (0,
|
|
11226
|
-
|
|
11383
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: !enabled(state.snapshot?.capabilities.prompt) ? state.snapshot?.capabilities.prompt : child2.controls.prompt, label: "promptAvailability", t }),
|
|
11384
|
+
draft2.text.trim() === "" && draft2.images.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("emptyMessage") }),
|
|
11385
|
+
draft2.images.length > 0 && !enabled(state.snapshot?.capabilities.images) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("deniedImages") }),
|
|
11386
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-actions", children: [
|
|
11387
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "submit", variant: "primary", disabled: !submit, children: t("send") }),
|
|
11388
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
11389
|
+
import_dsh_client_ui_primitives13.Button,
|
|
11227
11390
|
{
|
|
11228
11391
|
type: "button",
|
|
11229
11392
|
variant: "outline",
|
|
@@ -11233,124 +11396,124 @@ function ChildComposer({ child: child2, state, actions: actions3, t }) {
|
|
|
11233
11396
|
}
|
|
11234
11397
|
)
|
|
11235
11398
|
] }),
|
|
11236
|
-
/* @__PURE__ */ (0,
|
|
11399
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: pending ? t("pending") : draft2.imageBusy ? t("imageReading") : "" })
|
|
11237
11400
|
] });
|
|
11238
11401
|
}
|
|
11239
11402
|
function ChildDetails({ child: child2, state, actions: actions3, t, inspection = false }) {
|
|
11240
|
-
return /* @__PURE__ */ (0,
|
|
11241
|
-
/* @__PURE__ */ (0,
|
|
11242
|
-
/* @__PURE__ */ (0,
|
|
11403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("fieldset", { children: [
|
|
11404
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("legend", { children: child2.label?.trim() ? child2.label : child2.id }),
|
|
11405
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11243
11406
|
t("childId"),
|
|
11244
11407
|
": ",
|
|
11245
11408
|
child2.id
|
|
11246
11409
|
] }),
|
|
11247
|
-
/* @__PURE__ */ (0,
|
|
11410
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11248
11411
|
t("parentId"),
|
|
11249
11412
|
": ",
|
|
11250
11413
|
child2.parentSessionId
|
|
11251
11414
|
] }),
|
|
11252
|
-
/* @__PURE__ */ (0,
|
|
11415
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11253
11416
|
t("mode"),
|
|
11254
11417
|
": ",
|
|
11255
11418
|
child2.mode
|
|
11256
11419
|
] }),
|
|
11257
|
-
/* @__PURE__ */ (0,
|
|
11420
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11258
11421
|
t("activity"),
|
|
11259
11422
|
": ",
|
|
11260
11423
|
child2.activity
|
|
11261
11424
|
] }),
|
|
11262
|
-
(inspection || child2.readonly) && /* @__PURE__ */ (0,
|
|
11263
|
-
child2.mode === "one-shot" && /* @__PURE__ */ (0,
|
|
11264
|
-
/* @__PURE__ */ (0,
|
|
11265
|
-
/* @__PURE__ */ (0,
|
|
11266
|
-
(!inspection || !child2.controls.prompt.enabled) && /* @__PURE__ */ (0,
|
|
11267
|
-
(!inspection || !child2.controls.interrupt.enabled) && /* @__PURE__ */ (0,
|
|
11268
|
-
!inspection && child2.mode === "continuable" && !child2.readonly && /* @__PURE__ */ (0,
|
|
11269
|
-
!inspection && /* @__PURE__ */ (0,
|
|
11270
|
-
/* @__PURE__ */ (0,
|
|
11271
|
-
/* @__PURE__ */ (0,
|
|
11425
|
+
(inspection || child2.readonly) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("readonly") }),
|
|
11426
|
+
child2.mode === "one-shot" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("oneShot") }),
|
|
11427
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RouteComparisonDetails, { value: child2.routeComparison, t }),
|
|
11428
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InvocationDetails, { value: child2.invocation, t, showComparison: false }),
|
|
11429
|
+
(!inspection || !child2.controls.prompt.enabled) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: child2.controls.prompt, label: "promptAvailability", t }),
|
|
11430
|
+
(!inspection || !child2.controls.interrupt.enabled) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: child2.controls.interrupt, label: "interruptAvailability", t }),
|
|
11431
|
+
!inspection && child2.mode === "continuable" && !child2.readonly && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChildComposer, { child: child2, state, actions: actions3, t }),
|
|
11432
|
+
!inspection && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11433
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Issue2, { value: state.issues.get(childActionKey(child2.id)), t }),
|
|
11434
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Outcome, { value: state.outcomes.get(childActionKey(child2.id)), t })
|
|
11272
11435
|
] })
|
|
11273
11436
|
] });
|
|
11274
11437
|
}
|
|
11275
11438
|
function ChildrenPanel(props) {
|
|
11276
11439
|
const state = props.useChildren((snapshot4) => snapshot4), { t } = props, generation = state.generation;
|
|
11277
|
-
if (props.sessionId === void 0 || props.sessionId !== state.sessionId) return /* @__PURE__ */ (0,
|
|
11278
|
-
/* @__PURE__ */ (0,
|
|
11279
|
-
/* @__PURE__ */ (0,
|
|
11440
|
+
if (props.sessionId === void 0 || props.sessionId !== state.sessionId) return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-profiles dsmm-children", children: [
|
|
11441
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { children: t("title") }),
|
|
11442
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t(state.sessionId === null ? "noSession" : "foreign") })
|
|
11280
11443
|
] });
|
|
11281
11444
|
const data = state.snapshot;
|
|
11282
11445
|
const refreshingDisabled = state.reading || state.pending.size > 0 || [...state.drafts.values()].some((draft2) => draft2.imageBusy);
|
|
11283
|
-
return /* @__PURE__ */ (0,
|
|
11284
|
-
/* @__PURE__ */ (0,
|
|
11285
|
-
/* @__PURE__ */ (0,
|
|
11286
|
-
/* @__PURE__ */ (0,
|
|
11446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-profiles dsmm-children", "aria-label": t("title"), "aria-busy": state.reading, children: [
|
|
11447
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { children: t("title") }),
|
|
11448
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("description") }),
|
|
11449
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11287
11450
|
t("session"),
|
|
11288
11451
|
": ",
|
|
11289
11452
|
state.sessionId
|
|
11290
11453
|
] }),
|
|
11291
|
-
/* @__PURE__ */ (0,
|
|
11292
|
-
/* @__PURE__ */ (0,
|
|
11293
|
-
/* @__PURE__ */ (0,
|
|
11294
|
-
data !== null && /* @__PURE__ */ (0,
|
|
11295
|
-
/* @__PURE__ */ (0,
|
|
11454
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "dsmm-actions", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: refreshingDisabled, onClick: () => void props.refresh(generation), children: t("refresh") }) }),
|
|
11455
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: state.reading ? t("reading") : state.pending.size > 0 ? t("pending") : !state.fresh ? t(data === null ? "unavailable" : "stale") : "" }),
|
|
11456
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Issue2, { value: state.issue, t }),
|
|
11457
|
+
data !== null && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11458
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11296
11459
|
t("epoch"),
|
|
11297
11460
|
": ",
|
|
11298
11461
|
data.admissionEpoch
|
|
11299
11462
|
] }),
|
|
11300
|
-
/* @__PURE__ */ (0,
|
|
11301
|
-
/* @__PURE__ */ (0,
|
|
11463
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-availability", children: [
|
|
11464
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11302
11465
|
t("runtime"),
|
|
11303
11466
|
": ",
|
|
11304
11467
|
data.capabilities.runtime.binding
|
|
11305
11468
|
] }),
|
|
11306
|
-
/* @__PURE__ */ (0,
|
|
11469
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11307
11470
|
t("fence"),
|
|
11308
11471
|
": ",
|
|
11309
11472
|
t(data.capabilities.runtime.deliveryFenceReady ? "yes" : "no")
|
|
11310
11473
|
] }),
|
|
11311
|
-
/* @__PURE__ */ (0,
|
|
11474
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11312
11475
|
t("restart"),
|
|
11313
11476
|
": ",
|
|
11314
11477
|
t(data.capabilities.runtime.restartRequired ? "yes" : "no")
|
|
11315
11478
|
] }),
|
|
11316
|
-
data.capabilities.runtime.reason !== void 0 && /* @__PURE__ */ (0,
|
|
11317
|
-
/* @__PURE__ */ (0,
|
|
11318
|
-
/* @__PURE__ */ (0,
|
|
11479
|
+
data.capabilities.runtime.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("authority") }),
|
|
11480
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: data.capabilities.prompt, label: "promptAvailability", t }),
|
|
11481
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: data.capabilities.interrupt, label: "interruptAvailability", t })
|
|
11319
11482
|
] }),
|
|
11320
|
-
/* @__PURE__ */ (0,
|
|
11321
|
-
/* @__PURE__ */ (0,
|
|
11322
|
-
/* @__PURE__ */ (0,
|
|
11323
|
-
data.children.length === 0 ? /* @__PURE__ */ (0,
|
|
11483
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("backgroundHint") }),
|
|
11484
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-zone", "aria-label": t("children"), children: [
|
|
11485
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: t("children") }),
|
|
11486
|
+
data.children.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("emptyChildren") }) : data.children.map((child2) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChildDetails, { child: child2, state, actions: props, t }, child2.id))
|
|
11324
11487
|
] })
|
|
11325
11488
|
] }),
|
|
11326
|
-
/* @__PURE__ */ (0,
|
|
11327
|
-
/* @__PURE__ */ (0,
|
|
11328
|
-
/* @__PURE__ */ (0,
|
|
11329
|
-
state.descendants === null ? /* @__PURE__ */ (0,
|
|
11330
|
-
/* @__PURE__ */ (0,
|
|
11489
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-zone", "aria-label": t("descendants"), children: [
|
|
11490
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: t("descendants") }),
|
|
11491
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Issue2, { value: state.descendantIssue, t }),
|
|
11492
|
+
state.descendants === null ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("treeUnavailable") }) : state.descendants.descendants.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("emptyDescendants") }) : state.descendants.descendants.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-availability", children: [
|
|
11493
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11331
11494
|
t("depth"),
|
|
11332
11495
|
": ",
|
|
11333
11496
|
entry.depth
|
|
11334
11497
|
] }),
|
|
11335
|
-
entry.kind === "diagnostic" ? /* @__PURE__ */ (0,
|
|
11336
|
-
/* @__PURE__ */ (0,
|
|
11337
|
-
/* @__PURE__ */ (0,
|
|
11498
|
+
entry.kind === "diagnostic" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-issue", children: [
|
|
11499
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("diagnostic", { reason: entry.reason }) }),
|
|
11500
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11338
11501
|
t("childId"),
|
|
11339
11502
|
": ",
|
|
11340
11503
|
entry.id
|
|
11341
11504
|
] }),
|
|
11342
|
-
/* @__PURE__ */ (0,
|
|
11505
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11343
11506
|
t("parentId"),
|
|
11344
11507
|
": ",
|
|
11345
11508
|
entry.parentSessionId
|
|
11346
11509
|
] })
|
|
11347
|
-
] }) : /* @__PURE__ */ (0,
|
|
11348
|
-
/* @__PURE__ */ (0,
|
|
11510
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
11511
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
11349
11512
|
t("subtree"),
|
|
11350
11513
|
": ",
|
|
11351
11514
|
t(entry.hasChildren ? "yes" : "no")
|
|
11352
11515
|
] }),
|
|
11353
|
-
/* @__PURE__ */ (0,
|
|
11516
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChildDetails, { child: entry.child, state, actions: props, t, inspection: true })
|
|
11354
11517
|
] })
|
|
11355
11518
|
] }, index))
|
|
11356
11519
|
] })
|