dsh-context 0.49.4 → 0.51.0
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 +5 -4
- package/lib/client.js +902 -360
- package/lib/index.d.ts +45 -23
- package/lib/index.js +88 -55
- package/package.json +9 -4
package/lib/client.js
CHANGED
|
@@ -26,23 +26,26 @@ window.__ModuleLoader__.load({
|
|
|
26
26
|
"stats.title": "上下文统计",
|
|
27
27
|
"stats.turns": "轮次",
|
|
28
28
|
"stats.steps": "步数",
|
|
29
|
-
"stats.
|
|
30
|
-
"stats.
|
|
31
|
-
"stats.prunes": "剪枝",
|
|
29
|
+
"stats.humanInputs": "用户输入",
|
|
30
|
+
"stats.humanInputsTip": "当前会话中的用户消息与问题回答次数。",
|
|
32
31
|
"stats.toolCalls": "工具调用",
|
|
33
|
-
"stats.
|
|
32
|
+
"stats.cacheHit": "缓存命中",
|
|
34
33
|
"stats.cost": "预估费用",
|
|
35
|
-
"stats.costTip": "按
|
|
36
|
-
"stats.
|
|
34
|
+
"stats.costTip": "按 models.dev 刊例价估算整个会话的累计费用,人民币按 1 元 = 0.15 美元换算,仅供参考。",
|
|
35
|
+
"stats.costTipDeepseek": "DeepSeek 高峰时段(北京时间工作日 9:00–12:00、14:00–18:00)按挂牌价计费,其余时段半价。",
|
|
36
|
+
"stats.costPriceHead": "每百万 tokens 价格:",
|
|
37
|
+
"stats.costPriceHeadPair": "每百万 tokens 价格(高峰|空闲):",
|
|
37
38
|
"stats.costHit": "命中",
|
|
38
39
|
"stats.costMiss": "未命中",
|
|
40
|
+
"stats.costWrite": "写入",
|
|
39
41
|
"stats.costOut": "输出",
|
|
42
|
+
"stats.costUnavailable": "模型价格暂不可用(自动重试中),费用暂无法估算。",
|
|
40
43
|
"timing.title": "耗时统计",
|
|
41
44
|
"timing.total": "活跃时长",
|
|
42
45
|
"timing.ttft": "模型等待",
|
|
43
46
|
"timing.gen": "模型生成",
|
|
44
47
|
"timing.reasoning": "模型思考",
|
|
45
|
-
"timing.text": "
|
|
48
|
+
"timing.text": "模型输出",
|
|
46
49
|
"timing.toolArgs": "工具参数",
|
|
47
50
|
"timing.tools": "工具执行",
|
|
48
51
|
"timing.other": "其他开销",
|
|
@@ -50,10 +53,7 @@ window.__ModuleLoader__.load({
|
|
|
50
53
|
"timing.toolTimes": "{n}次",
|
|
51
54
|
"timing.empty": "暂无耗时数据 · 对话开始后这里会显示时长分布",
|
|
52
55
|
"tokens.title": "Token 统计",
|
|
53
|
-
"tokens.
|
|
54
|
-
"tokens.cacheRead": "缓存输入",
|
|
55
|
-
"tokens.cacheWrite": "缓存写入",
|
|
56
|
-
"tokens.uncached": "未缓存输入",
|
|
56
|
+
"tokens.total": "总用量",
|
|
57
57
|
"tokens.output": "输出",
|
|
58
58
|
"tokens.outputNote": "含思考",
|
|
59
59
|
"plugin.title": "插件信息",
|
|
@@ -73,6 +73,7 @@ window.__ModuleLoader__.load({
|
|
|
73
73
|
"placement.all": "全部",
|
|
74
74
|
"settings.gran": "趋势图 · 默认粒度",
|
|
75
75
|
"settings.mode": "趋势图 · 默认展示方式",
|
|
76
|
+
"settings.toolSort": "工具定义 · 默认排序",
|
|
76
77
|
"settings.fileSort": "文件活动 · 默认排序",
|
|
77
78
|
"settings.expand": "展开",
|
|
78
79
|
"settings.collapse": "收起",
|
|
@@ -132,6 +133,7 @@ window.__ModuleLoader__.load({
|
|
|
132
133
|
"files.hits": "{n} 处命中",
|
|
133
134
|
"files.readTip": "读取第 {a}–{b} 行",
|
|
134
135
|
"files.open": "在系统中打开",
|
|
136
|
+
"files.preview": "在侧边栏预览",
|
|
135
137
|
"files.readEst": "按调用参数 limit 估算的读取行数",
|
|
136
138
|
"files.errs": "{n} 次失败",
|
|
137
139
|
"files.form.image": "图片",
|
|
@@ -267,8 +269,10 @@ window.__ModuleLoader__.load({
|
|
|
267
269
|
"tool.jsonHide": "收起",
|
|
268
270
|
"tool.search": "按名称、描述或参数过滤…",
|
|
269
271
|
"tool.sort.size": "按大小",
|
|
272
|
+
"tool.sort.count": "按次数",
|
|
270
273
|
"tool.sort.name": "按名称",
|
|
271
|
-
"tool.sortTip": "
|
|
274
|
+
"tool.sortTip": "工具排序:按当前步骤中的调用次数(默认)、token 大小或名称",
|
|
275
|
+
"tool.hitsTip": "当前展示步骤的上下文中,该工具被调用并返回结果的次数",
|
|
272
276
|
"tool.noMatch": "没有匹配当前过滤条件的工具",
|
|
273
277
|
"rich.raw": "原文",
|
|
274
278
|
"rich.md": "Markdown",
|
|
@@ -321,17 +325,20 @@ window.__ModuleLoader__.load({
|
|
|
321
325
|
"stats.title": "Context Stats",
|
|
322
326
|
"stats.turns": "Turns",
|
|
323
327
|
"stats.steps": "Steps",
|
|
324
|
-
"stats.
|
|
325
|
-
"stats.
|
|
326
|
-
"stats.prunes": "Prunes",
|
|
328
|
+
"stats.humanInputs": "Human Inputs",
|
|
329
|
+
"stats.humanInputsTip": "User messages and question answerings in current session.",
|
|
327
330
|
"stats.toolCalls": "Tool Calls",
|
|
328
|
-
"stats.
|
|
331
|
+
"stats.cacheHit": "Cache Hit",
|
|
329
332
|
"stats.cost": "Cost",
|
|
330
|
-
"stats.costTip": "Rough cumulative cost of the whole session at
|
|
331
|
-
"stats.
|
|
333
|
+
"stats.costTip": "Rough cumulative cost of the whole session at the models.dev list prices; the CNY display converts at 1 CNY = 0.15 USD. Prices are for reference only.",
|
|
334
|
+
"stats.costTipDeepseek": "DeepSeek bills peak windows (Beijing Time weekdays 09:00–12:00, 14:00–18:00) at list price; all other hours are half price.",
|
|
335
|
+
"stats.costPriceHead": "Per-1M-token rates:",
|
|
336
|
+
"stats.costPriceHeadPair": "Per-1M-token rates (peak|off-peak):",
|
|
332
337
|
"stats.costHit": "hit",
|
|
333
338
|
"stats.costMiss": "miss",
|
|
339
|
+
"stats.costWrite": "write",
|
|
334
340
|
"stats.costOut": "output",
|
|
341
|
+
"stats.costUnavailable": "Model prices are unavailable (retrying automatically) — the cost cannot be estimated yet.",
|
|
335
342
|
"timing.title": "Timing Stats",
|
|
336
343
|
"timing.total": "Active Time",
|
|
337
344
|
"timing.ttft": "TTFT",
|
|
@@ -345,10 +352,7 @@ window.__ModuleLoader__.load({
|
|
|
345
352
|
"timing.toolTimes": "{n} runs",
|
|
346
353
|
"timing.empty": "No timing data yet — durations appear as the conversation runs",
|
|
347
354
|
"tokens.title": "Token Stats",
|
|
348
|
-
"tokens.
|
|
349
|
-
"tokens.cacheRead": "Cached Input",
|
|
350
|
-
"tokens.cacheWrite": "Cache Write",
|
|
351
|
-
"tokens.uncached": "Uncached Input",
|
|
355
|
+
"tokens.total": "Total",
|
|
352
356
|
"tokens.output": "Output",
|
|
353
357
|
"tokens.outputNote": "incl. reasoning",
|
|
354
358
|
"plugin.title": "Plugin Info",
|
|
@@ -368,6 +372,7 @@ window.__ModuleLoader__.load({
|
|
|
368
372
|
"placement.all": "All",
|
|
369
373
|
"settings.gran": "Trend Chart · Default granularity",
|
|
370
374
|
"settings.mode": "Trend Chart · Default display",
|
|
375
|
+
"settings.toolSort": "Tool Schemas · Default sort",
|
|
371
376
|
"settings.fileSort": "File Activity · Default sort",
|
|
372
377
|
"settings.expand": "Expand",
|
|
373
378
|
"settings.collapse": "Collapse",
|
|
@@ -427,6 +432,7 @@ window.__ModuleLoader__.load({
|
|
|
427
432
|
"files.hits": "{n} hits",
|
|
428
433
|
"files.readTip": "Read lines {a}–{b}",
|
|
429
434
|
"files.open": "Open on your system",
|
|
435
|
+
"files.preview": "Preview in the sidebar",
|
|
430
436
|
"files.readEst": "Lines read, estimated from the limit argument",
|
|
431
437
|
"files.errs": "{n} failed",
|
|
432
438
|
"files.form.image": "Image",
|
|
@@ -562,8 +568,10 @@ window.__ModuleLoader__.load({
|
|
|
562
568
|
"tool.jsonHide": "Collapse",
|
|
563
569
|
"tool.search": "Filter by name, description, or parameters…",
|
|
564
570
|
"tool.sort.size": "By size",
|
|
571
|
+
"tool.sort.count": "By calls",
|
|
565
572
|
"tool.sort.name": "By name",
|
|
566
|
-
"tool.sortTip": "Sort tools by
|
|
573
|
+
"tool.sortTip": "Sort tools by call count in the shown step (default), token size, or name",
|
|
574
|
+
"tool.hitsTip": "Times this tool was called and answered within the shown step’s context",
|
|
567
575
|
"tool.noMatch": "No tools match the current filter",
|
|
568
576
|
"rich.raw": "Raw",
|
|
569
577
|
"rich.md": "Markdown",
|
|
@@ -714,27 +722,27 @@ window.__ModuleLoader__.load({
|
|
|
714
722
|
const CATS = [
|
|
715
723
|
{
|
|
716
724
|
key: "system",
|
|
717
|
-
color: "
|
|
725
|
+
color: "var(--color-indigo-500)"
|
|
718
726
|
},
|
|
719
727
|
{
|
|
720
728
|
key: "tools",
|
|
721
|
-
color: "
|
|
729
|
+
color: "var(--color-amber-500)"
|
|
722
730
|
},
|
|
723
731
|
{
|
|
724
732
|
key: "user",
|
|
725
|
-
color: "
|
|
733
|
+
color: "var(--color-green-500)"
|
|
726
734
|
},
|
|
727
735
|
{
|
|
728
736
|
key: "inject",
|
|
729
|
-
color: "
|
|
737
|
+
color: "var(--color-purple-500)"
|
|
730
738
|
},
|
|
731
739
|
{
|
|
732
740
|
key: "assistant",
|
|
733
|
-
color: "
|
|
741
|
+
color: "var(--color-blue-500)"
|
|
734
742
|
},
|
|
735
743
|
{
|
|
736
744
|
key: "tool",
|
|
737
|
-
color: "
|
|
745
|
+
color: "var(--color-teal-500)"
|
|
738
746
|
}
|
|
739
747
|
];
|
|
740
748
|
/** Category key → bar color, for per-item bands (the browser's DNA mode) that bypass the CATS-order part builders. */
|
|
@@ -819,6 +827,30 @@ window.__ModuleLoader__.load({
|
|
|
819
827
|
value: Math.round(p.raw * scale)
|
|
820
828
|
}));
|
|
821
829
|
}
|
|
830
|
+
/**
|
|
831
|
+
* The Token card's billed split, by WHAT the tokens are rather than by how
|
|
832
|
+
* the provider cached them: the six composition categories share the
|
|
833
|
+
* provider-reported prompt-side total (uncached + cache read + cache write —
|
|
834
|
+
* the chat stats line's billed input) by the composition card's own
|
|
835
|
+
* estimated ratios, and the provider's exact output count closes the ring as
|
|
836
|
+
* the seventh part. Only the per-category split is estimated — every
|
|
837
|
+
* category's sum and the output figure are provider-reported, so the parts
|
|
838
|
+
* total equals the chat line's whole-session token count by construction. A
|
|
839
|
+
* zero/negative prompt total (or a hostile negative output) never invents a
|
|
840
|
+
* split: the prompt parts zero out / the output clamps at 0.
|
|
841
|
+
*/
|
|
842
|
+
function billedParts(current, breakdown, usage) {
|
|
843
|
+
const input = usage.uncachedInputTokens + usage.cacheReadTokens + usage.cacheWriteTokens;
|
|
844
|
+
const estimated = officialParts(current, breakdown);
|
|
845
|
+
return [...input > 0 ? anchoredParts(estimated, input) : estimated.map((p) => ({
|
|
846
|
+
...p,
|
|
847
|
+
value: 0
|
|
848
|
+
})), {
|
|
849
|
+
key: "output",
|
|
850
|
+
color: "var(--color-pink-500)",
|
|
851
|
+
value: Math.max(0, usage.outputTokens)
|
|
852
|
+
}];
|
|
853
|
+
}
|
|
822
854
|
//#endregion
|
|
823
855
|
//#region src/client/headline.ts
|
|
824
856
|
function headlineOf(data, pressure = null, breakdown = null) {
|
|
@@ -948,6 +980,51 @@ window.__ModuleLoader__.load({
|
|
|
948
980
|
};
|
|
949
981
|
}
|
|
950
982
|
/**
|
|
983
|
+
* The session-cost raw material, re-proved per provider/model/period/bucket
|
|
984
|
+
* (the shape the client's cost.ts prices): a branch, model, or period that
|
|
985
|
+
* is not a plain record drops whole — never a half-proved row — and bucket
|
|
986
|
+
* fields zero out via numOf, so garbage can only price as zero, never as
|
|
987
|
+
* NaN. Absent stays absent.
|
|
988
|
+
*/
|
|
989
|
+
function costOf(value) {
|
|
990
|
+
const data = asRecord(value);
|
|
991
|
+
if (data === null || Array.isArray(data)) return void 0;
|
|
992
|
+
const out = {};
|
|
993
|
+
for (const provider of Object.keys(data)) {
|
|
994
|
+
const models = asRecord(data[provider]);
|
|
995
|
+
if (models === null || Array.isArray(models)) continue;
|
|
996
|
+
const branch = {};
|
|
997
|
+
for (const model of Object.keys(models)) {
|
|
998
|
+
const periods = asRecord(models[model]);
|
|
999
|
+
if (periods === null || Array.isArray(periods)) continue;
|
|
1000
|
+
const copy = {};
|
|
1001
|
+
for (const period of ["peak", "off"]) {
|
|
1002
|
+
const b = asRecord(periods[period]);
|
|
1003
|
+
if (b === null || Array.isArray(b)) continue;
|
|
1004
|
+
copy[period] = {
|
|
1005
|
+
uncached: numOf(b.uncached),
|
|
1006
|
+
cacheRead: numOf(b.cacheRead),
|
|
1007
|
+
cacheWrite: numOf(b.cacheWrite),
|
|
1008
|
+
output: numOf(b.output)
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
branch[model] = copy;
|
|
1012
|
+
}
|
|
1013
|
+
out[provider] = branch;
|
|
1014
|
+
}
|
|
1015
|
+
return out;
|
|
1016
|
+
}
|
|
1017
|
+
/** The fast-path structural check for `cost`: every branch is a plain record (bucket fields re-prove in costOf/cost.ts). */
|
|
1018
|
+
function costFastOk(value) {
|
|
1019
|
+
if (value === void 0) return true;
|
|
1020
|
+
const data = asRecord(value);
|
|
1021
|
+
if (data === null || Array.isArray(data)) return false;
|
|
1022
|
+
return Object.keys(data).every((provider) => {
|
|
1023
|
+
const models = asRecord(data[provider]);
|
|
1024
|
+
return models !== null && !Array.isArray(models);
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
951
1028
|
* Narrow a delivered projection value to a RENDER-SAFE context timeline —
|
|
952
1029
|
* the client's no-white-screen guarantee against backend/parse failures.
|
|
953
1030
|
*
|
|
@@ -972,9 +1049,9 @@ window.__ModuleLoader__.load({
|
|
|
972
1049
|
"assistant",
|
|
973
1050
|
"tool",
|
|
974
1051
|
"total"
|
|
975
|
-
].every((k) => typeof current[k] === "number") && recordsOnly(data.requests) && recordsOnly(data.events) && recordsOnly(data.nodes) && recordsOnly(data.archive) && systemsFastOk(data.systems) && timingFastOk(data.timing)) return data;
|
|
1052
|
+
].every((k) => typeof current[k] === "number") && recordsOnly(data.requests) && recordsOnly(data.events) && recordsOnly(data.nodes) && recordsOnly(data.archive) && systemsFastOk(data.systems) && timingFastOk(data.timing) && costFastOk(data.cost)) return data;
|
|
976
1053
|
const safeCurrent = current !== null && typeof current === "object" ? current : {};
|
|
977
|
-
const cost =
|
|
1054
|
+
const cost = costOf(data.cost);
|
|
978
1055
|
const timing = timingOf(data.timing);
|
|
979
1056
|
const unsupported = unsupportedOf(data.unsupported);
|
|
980
1057
|
const counts = countsOf(data.counts);
|
|
@@ -1000,6 +1077,7 @@ window.__ModuleLoader__.load({
|
|
|
1000
1077
|
droppedNodes: numOf(data.droppedNodes),
|
|
1001
1078
|
...typeof data.images === "number" ? { images: data.images } : {},
|
|
1002
1079
|
...typeof data.toolCalls === "number" ? { toolCalls: data.toolCalls } : {},
|
|
1080
|
+
...typeof data.humanInputs === "number" ? { humanInputs: data.humanInputs } : {},
|
|
1003
1081
|
archive: objectsOf(data.archive),
|
|
1004
1082
|
...counts !== void 0 ? { counts } : {},
|
|
1005
1083
|
...last !== void 0 ? { last } : {},
|
|
@@ -1355,6 +1433,37 @@ window.__ModuleLoader__.load({
|
|
|
1355
1433
|
} catch {}
|
|
1356
1434
|
};
|
|
1357
1435
|
}
|
|
1436
|
+
/**
|
|
1437
|
+
* The right Sidebar's resource opener over `ctx.sidebarRight`, or undefined
|
|
1438
|
+
* when this harness serves no such column (every line older than 0.1.5-rc.1) or
|
|
1439
|
+
* the face is hostile — the caller then keeps its system-open degradation.
|
|
1440
|
+
* Synchronous, and it reports whether the column took the address: `openResource`
|
|
1441
|
+
* throws for a no-type-claims address or with no session surface mounted, and an
|
|
1442
|
+
* unwired preview must fall back rather than become an inert click. The face is
|
|
1443
|
+
* re-proved at call time (the service can land or be revoked across an HMR
|
|
1444
|
+
* reload), so the returned closure reads it per open.
|
|
1445
|
+
*/
|
|
1446
|
+
function openResourceVia(ctx) {
|
|
1447
|
+
const faceOf = () => {
|
|
1448
|
+
try {
|
|
1449
|
+
const face = asRecord(ctx.get("sidebarRight"));
|
|
1450
|
+
return face !== null && typeof face.openResource === "function" ? face : void 0;
|
|
1451
|
+
} catch {
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1455
|
+
if (faceOf() === void 0) return void 0;
|
|
1456
|
+
return (address) => {
|
|
1457
|
+
const face = faceOf();
|
|
1458
|
+
if (face === void 0) return false;
|
|
1459
|
+
try {
|
|
1460
|
+
face.openResource(address);
|
|
1461
|
+
return true;
|
|
1462
|
+
} catch {
|
|
1463
|
+
return false;
|
|
1464
|
+
}
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1358
1467
|
//#endregion
|
|
1359
1468
|
//#region src/client/historyPage.ts
|
|
1360
1469
|
/**
|
|
@@ -2347,7 +2456,7 @@ window.__ModuleLoader__.load({
|
|
|
2347
2456
|
className: cls,
|
|
2348
2457
|
children: props.onRetry !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2349
2458
|
type: "button",
|
|
2350
|
-
className: "lc-br-retry",
|
|
2459
|
+
className: "lc-br-retry hover:brightness-[1.15]",
|
|
2351
2460
|
onClick: props.onRetry,
|
|
2352
2461
|
children: t("detail.loadFailed")
|
|
2353
2462
|
}) : t("detail.loadFailed")
|
|
@@ -2437,7 +2546,7 @@ window.__ModuleLoader__.load({
|
|
|
2437
2546
|
if (state === "absent") return t("browser.notInLog");
|
|
2438
2547
|
if (state === "failed") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2439
2548
|
type: "button",
|
|
2440
|
-
className: "lc-br-retry",
|
|
2549
|
+
className: "lc-br-retry hover:brightness-[1.15]",
|
|
2441
2550
|
onClick: onRetry,
|
|
2442
2551
|
children: t("browser.loadFailed")
|
|
2443
2552
|
});
|
|
@@ -2463,15 +2572,17 @@ window.__ModuleLoader__.load({
|
|
|
2463
2572
|
}
|
|
2464
2573
|
/**
|
|
2465
2574
|
* Cache-hit share of billed prompt-side input (`reads` over `billed`),
|
|
2466
|
-
* TRUNCATED to
|
|
2467
|
-
* chat stats line's '缓存命中' figure and the stats board's cell
|
|
2468
|
-
* nothing was billed. The 1e-9 epsilon
|
|
2469
|
-
* token counts never sit that close to a
|
|
2575
|
+
* TRUNCATED to `decimals` places (cut, not round) — same formula as the
|
|
2576
|
+
* harness chat stats line's '缓存命中' figure and the stats board's cell
|
|
2577
|
+
* (which shows one decimal). Null when nothing was billed. The 1e-9 epsilon
|
|
2578
|
+
* absorbs only float noise (integer token counts never sit that close to a
|
|
2579
|
+
* boundary).
|
|
2470
2580
|
*/
|
|
2471
|
-
function cacheHitPercent(reads, billed) {
|
|
2581
|
+
function cacheHitPercent(reads, billed, decimals = 2) {
|
|
2472
2582
|
if (!(billed > 0)) return null;
|
|
2473
|
-
const
|
|
2474
|
-
|
|
2583
|
+
const factor = 10 ** decimals;
|
|
2584
|
+
const scaled = Math.trunc(reads / billed * 100 * factor + 1e-9);
|
|
2585
|
+
return `${Math.floor(scaled / factor)}.${String(scaled % factor).padStart(decimals, "0")}`;
|
|
2475
2586
|
}
|
|
2476
2587
|
function fmtTime(t) {
|
|
2477
2588
|
const d = new Date(t);
|
|
@@ -2783,7 +2894,7 @@ window.__ModuleLoader__.load({
|
|
|
2783
2894
|
};
|
|
2784
2895
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2785
2896
|
type: "button",
|
|
2786
|
-
className: "lc-att-item",
|
|
2897
|
+
className: "lc-att-item hover:border-(--dsw-alias-label-dimmed) hover:bg-[var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2))]",
|
|
2787
2898
|
title: error ? t("attach.loadFailed") : t("attach.open"),
|
|
2788
2899
|
onClick: activate,
|
|
2789
2900
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -3060,7 +3171,7 @@ window.__ModuleLoader__.load({
|
|
|
3060
3171
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3061
3172
|
className: "lc-br-toolctl",
|
|
3062
3173
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3063
|
-
className: "lc-br-tool-search",
|
|
3174
|
+
className: "lc-br-tool-search focus:border-(--dsw-alias-label-dimmed)",
|
|
3064
3175
|
value: props.value,
|
|
3065
3176
|
placeholder: props.placeholder,
|
|
3066
3177
|
onChange: (ev) => {
|
|
@@ -3123,7 +3234,7 @@ window.__ModuleLoader__.load({
|
|
|
3123
3234
|
className: "lc-ts-json",
|
|
3124
3235
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3125
3236
|
type: "button",
|
|
3126
|
-
className: "lc-ts-json-toggle",
|
|
3237
|
+
className: "lc-ts-json-toggle hover:text-(--dsw-alias-label-primary) hover:underline",
|
|
3127
3238
|
onClick: () => {
|
|
3128
3239
|
setJsonOpen((o) => !o);
|
|
3129
3240
|
},
|
|
@@ -3386,7 +3497,7 @@ window.__ModuleLoader__.load({
|
|
|
3386
3497
|
* context) stays a hoverable/clickable filament instead of a sub-pixel sliver. Tooltips still report true shares.
|
|
3387
3498
|
*/
|
|
3388
3499
|
const DNA_MIN_BAND = .35;
|
|
3389
|
-
function makeContextBrowser(kit, StackedBar) {
|
|
3500
|
+
function makeContextBrowser(kit, StackedBar, settings) {
|
|
3390
3501
|
const { t, fmt, fmtTime, catLabel } = kit;
|
|
3391
3502
|
const DetailNote = makeDetailNote(kit);
|
|
3392
3503
|
const nodeText = makeNodeText(kit);
|
|
@@ -3399,7 +3510,7 @@ window.__ModuleLoader__.load({
|
|
|
3399
3510
|
const [openCat, setOpenCat] = (0, react.useState)(null);
|
|
3400
3511
|
const [openElem, setOpenElem] = (0, react.useState)(null);
|
|
3401
3512
|
const [rowQuery, setRowQuery] = (0, react.useState)("");
|
|
3402
|
-
const [toolSort, setToolSort] = (0, react.useState)(
|
|
3513
|
+
const [toolSort, setToolSort] = (0, react.useState)(() => settings.defaultToolSort());
|
|
3403
3514
|
const [dna, setDna] = (0, react.useState)(false);
|
|
3404
3515
|
const [dnaKey, setDnaKey] = (0, react.useState)(null);
|
|
3405
3516
|
const onOpenCat = props.onOpenCat;
|
|
@@ -3475,6 +3586,9 @@ window.__ModuleLoader__.load({
|
|
|
3475
3586
|
const prevView = refReq !== null ? assemble(data, headers, refReq.seq) : null;
|
|
3476
3587
|
const prevByCat = prevView !== null ? byCatOf(prevView) : null;
|
|
3477
3588
|
const byCat = byCatOf(view);
|
|
3589
|
+
const toolHits = /* @__PURE__ */ new Map();
|
|
3590
|
+
for (const n of view.nodes) if (n.cat === "tool" && n.tool !== void 0) toolHits.set(n.tool, (toolHits.get(n.tool) ?? 0) + 1);
|
|
3591
|
+
const toolHitsOf = (tool) => toolHits.get(tool.name) ?? 0;
|
|
3478
3592
|
const dnaLabel = (it) => {
|
|
3479
3593
|
let base;
|
|
3480
3594
|
if (!("node" in it)) base = it.cat === "system" ? catLabel("system") : it.key.slice(5);
|
|
@@ -3539,7 +3653,7 @@ window.__ModuleLoader__.load({
|
|
|
3539
3653
|
className: "lc-br-elem" + (open ? " lc-br-elem-on" : ""),
|
|
3540
3654
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3541
3655
|
type: "button",
|
|
3542
|
-
className: "lc-br-elem-row",
|
|
3656
|
+
className: "lc-br-elem-row hover:bg-(--dsw-alias-interactive-bg-hover)",
|
|
3543
3657
|
onClick: () => {
|
|
3544
3658
|
toggleElem(key);
|
|
3545
3659
|
},
|
|
@@ -3618,13 +3732,17 @@ window.__ModuleLoader__.load({
|
|
|
3618
3732
|
const row = contentByName.get(tool.name);
|
|
3619
3733
|
if (row === void 0) return false;
|
|
3620
3734
|
return (row.description ?? "").toLowerCase().includes(q) || schemaTextOf(row.schema).toLowerCase().includes(q);
|
|
3621
|
-
}).sort((a, b) => toolSort === "size" ? b.tokens - a.tokens : a.name < b.name ? -1 : 1);
|
|
3735
|
+
}).sort((a, b) => toolSort === "count" ? toolHitsOf(b) - toolHitsOf(a) || (a.name < b.name ? -1 : 1) : toolSort === "size" ? b.tokens - a.tokens : a.name < b.name ? -1 : 1);
|
|
3622
3736
|
const toolctl = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowToolbar, {
|
|
3623
3737
|
value: rowQuery,
|
|
3624
3738
|
placeholder: t("tool.search"),
|
|
3625
3739
|
tip: t("tool.sortTip"),
|
|
3626
3740
|
onChange: setRowQuery,
|
|
3627
|
-
children: [
|
|
3741
|
+
children: [
|
|
3742
|
+
"size",
|
|
3743
|
+
"count",
|
|
3744
|
+
"name"
|
|
3745
|
+
].map((k) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3628
3746
|
type: "button",
|
|
3629
3747
|
className: "lc-gran-btn" + (toolSort === k ? " lc-gran-on" : ""),
|
|
3630
3748
|
onClick: () => {
|
|
@@ -3655,11 +3773,15 @@ window.__ModuleLoader__.load({
|
|
|
3655
3773
|
});
|
|
3656
3774
|
};
|
|
3657
3775
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [toolctl, shown.map((tool) => {
|
|
3658
|
-
const trailing = tool.plugin !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3776
|
+
const trailing = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [tool.plugin !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3659
3777
|
className: "lc-br-tag lc-br-tool-plugin",
|
|
3660
3778
|
title: tool.plugin === "<unknown-plugin>" ? t("tool.unknownTitle") : t("tool.plugin"),
|
|
3661
3779
|
children: tool.plugin === "<unknown-plugin>" ? t("tool.unknown") : tool.plugin
|
|
3662
|
-
}) : null
|
|
3780
|
+
}) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3781
|
+
className: "lc-br-hits",
|
|
3782
|
+
title: t("tool.hitsTip"),
|
|
3783
|
+
children: "×" + fmt(toolHitsOf(tool))
|
|
3784
|
+
})] });
|
|
3663
3785
|
return elemRow("tool:" + tool.name, null, tool.name, tool.tokens, void 0, toolBody(tool), false, trailing);
|
|
3664
3786
|
})] });
|
|
3665
3787
|
}
|
|
@@ -3832,7 +3954,7 @@ window.__ModuleLoader__.load({
|
|
|
3832
3954
|
className: "lc-br-cat" + (openable ? "" : " lc-br-cat-empty"),
|
|
3833
3955
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3834
3956
|
type: "button",
|
|
3835
|
-
className: "lc-br-cat-row" + (linked && props.hoverKey === c.key ? " lc-br-cat-on" : ""),
|
|
3957
|
+
className: "lc-br-cat-row hover:bg-(--dsw-alias-interactive-bg-hover)" + (linked && props.hoverKey === c.key ? " lc-br-cat-on" : ""),
|
|
3836
3958
|
/* v8 ignore start -- the handlers exist only when linked,
|
|
3837
3959
|
and linked already requires onHoverKey defined (above). */
|
|
3838
3960
|
onMouseEnter: linked ? () => {
|
|
@@ -3892,7 +4014,9 @@ window.__ModuleLoader__.load({
|
|
|
3892
4014
|
//#region src/client/components/stackedBar.tsx
|
|
3893
4015
|
/**
|
|
3894
4016
|
* Composition bar + legend; the shared hover-link tooltip is bespoke — no shared primitive reproduces the cross-segment/legend linkage —
|
|
3895
|
-
* styled through the shared `--dsw-alias-*` tokens.
|
|
4017
|
+
* styled through the shared `--dsw-alias-*` tokens. On mount the segments and the free track grow open
|
|
4018
|
+
* left to right (stackedBar.css, staggered by the capped per-piece `--lc-i` slots below, so a long DNA
|
|
4019
|
+
* band list settles fast); the reserve band stays unanimated.
|
|
3896
4020
|
*/
|
|
3897
4021
|
/**
|
|
3898
4022
|
* Mirror of dsh-compaction-basic's default `thresholdRatio` (0.8): it compacts at step boundaries once `floor(contextWindow × ratio)` is
|
|
@@ -3900,6 +4024,12 @@ window.__ModuleLoader__.load({
|
|
|
3900
4024
|
* `thresholdRatio`/`modelPolicies` should adjust it to match.
|
|
3901
4025
|
*/
|
|
3902
4026
|
const AUTO_COMPACT_RATIO = .8;
|
|
4027
|
+
/**
|
|
4028
|
+
* Entrance stagger cap: the browser's DNA bands can list dozens of items, so the grow-in cascade stops
|
|
4029
|
+
* widening after this many slots and late bands simply join within the cap (stackedBar.css delays by
|
|
4030
|
+
* `--lc-i`); the composition bar's few category segments never reach it.
|
|
4031
|
+
*/
|
|
4032
|
+
const STAGGER_CAP = 8;
|
|
3903
4033
|
function makeStackedBar(kit) {
|
|
3904
4034
|
const { t, fmt, catLabel } = kit;
|
|
3905
4035
|
return function StackedBar(props) {
|
|
@@ -3978,10 +4108,11 @@ window.__ModuleLoader__.load({
|
|
|
3978
4108
|
visible.map((p, i) => {
|
|
3979
4109
|
const on = props.hoverKey !== void 0 && (props.hoverKey === p.key || p.group !== void 0 && props.hoverKey === p.group);
|
|
3980
4110
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3981
|
-
className: "lc-stacked-seg" + (on ? " lc-stacked-seg-on" : "") + (pickKey !== void 0 ? " lc-stacked-seg-pick" : ""),
|
|
4111
|
+
className: "lc-stacked-seg animate-lc-stacked-in motion-reduce:animate-none" + (on ? " lc-stacked-seg-on" : "") + (pickKey !== void 0 ? " lc-stacked-seg-pick" : ""),
|
|
3982
4112
|
style: {
|
|
3983
4113
|
width: `${widths[i]}%`,
|
|
3984
|
-
backgroundColor: p.color
|
|
4114
|
+
backgroundColor: p.color,
|
|
4115
|
+
"--lc-i": Math.min(i, STAGGER_CAP)
|
|
3985
4116
|
},
|
|
3986
4117
|
onMouseEnter: () => {
|
|
3987
4118
|
if (props.onHoverKey !== void 0) props.onHoverKey(p.key);
|
|
@@ -3992,8 +4123,11 @@ window.__ModuleLoader__.load({
|
|
|
3992
4123
|
}, p.key);
|
|
3993
4124
|
}),
|
|
3994
4125
|
free > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3995
|
-
className: "lc-stacked-free" + (props.hoverKey === "free" ? " lc-stacked-free-on" : ""),
|
|
3996
|
-
style: {
|
|
4126
|
+
className: "lc-stacked-free animate-lc-stacked-in motion-reduce:animate-none" + (props.hoverKey === "free" ? " lc-stacked-free-on" : ""),
|
|
4127
|
+
style: {
|
|
4128
|
+
width: `${free / scale * 100}%`,
|
|
4129
|
+
"--lc-i": Math.min(visible.length, 9)
|
|
4130
|
+
},
|
|
3997
4131
|
onMouseEnter: () => {
|
|
3998
4132
|
if (props.onHoverKey !== void 0) props.onHoverKey("free");
|
|
3999
4133
|
}
|
|
@@ -4143,7 +4277,7 @@ window.__ModuleLoader__.load({
|
|
|
4143
4277
|
}),
|
|
4144
4278
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4145
4279
|
type: "button",
|
|
4146
|
-
className: "lc-error-retry",
|
|
4280
|
+
className: "lc-error-retry hover:border-(--dsw-alias-label-primary)",
|
|
4147
4281
|
onClick: () => {
|
|
4148
4282
|
this.setState({ error: null });
|
|
4149
4283
|
},
|
|
@@ -4189,11 +4323,11 @@ window.__ModuleLoader__.load({
|
|
|
4189
4323
|
* current-composition overview and the shared Context browser; rendered from the `conversation.input.overlay` slot and opened/closed
|
|
4190
4324
|
* through the per-session modal store, so the trigger flips it and no message ever enters session history.
|
|
4191
4325
|
*/
|
|
4192
|
-
function makeContextModal(ctx, kit) {
|
|
4326
|
+
function makeContextModal(ctx, kit, settings) {
|
|
4193
4327
|
const { t } = kit;
|
|
4194
4328
|
const StackedBar = makeStackedBar(kit);
|
|
4195
4329
|
const CurrentComposition = makeCurrentComposition(kit, StackedBar, makeLegend(kit));
|
|
4196
|
-
const ContextBrowser = makeContextBrowser(kit, StackedBar);
|
|
4330
|
+
const ContextBrowser = makeContextBrowser(kit, StackedBar, settings);
|
|
4197
4331
|
const ErrorBoundary = makeErrorBoundary(t);
|
|
4198
4332
|
function ContextModalBody(props) {
|
|
4199
4333
|
const sessionId = typeof props.sessionId === "string" ? props.sessionId : "";
|
|
@@ -4256,7 +4390,7 @@ window.__ModuleLoader__.load({
|
|
|
4256
4390
|
className: "lc-modal-title",
|
|
4257
4391
|
children: t("tab")
|
|
4258
4392
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4259
|
-
className: "lc-modal-close",
|
|
4393
|
+
className: "lc-modal-close hover:text-(--dsw-alias-label-primary) hover:bg-(--dsw-alias-bg-layer-2)",
|
|
4260
4394
|
"aria-label": t("cmd.close"),
|
|
4261
4395
|
onClick: close,
|
|
4262
4396
|
children: "×"
|
|
@@ -4378,7 +4512,7 @@ window.__ModuleLoader__.load({
|
|
|
4378
4512
|
portal: true,
|
|
4379
4513
|
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
4380
4514
|
type: "button",
|
|
4381
|
-
className: "lc-settings-select",
|
|
4515
|
+
className: "lc-settings-select hover:enabled:bg-(--dsw-alias-interactive-bg-hover) disabled:opacity-50 disabled:cursor-default",
|
|
4382
4516
|
disabled: props.disabled,
|
|
4383
4517
|
"aria-haspopup": "menu",
|
|
4384
4518
|
"aria-expanded": open,
|
|
@@ -4486,6 +4620,28 @@ window.__ModuleLoader__.load({
|
|
|
4486
4620
|
props.set?.("defaultTrendMode", id);
|
|
4487
4621
|
}
|
|
4488
4622
|
}),
|
|
4623
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrefRow, {
|
|
4624
|
+
label: t("settings.toolSort"),
|
|
4625
|
+
value: state.toolSort,
|
|
4626
|
+
disabled,
|
|
4627
|
+
options: [
|
|
4628
|
+
{
|
|
4629
|
+
id: "size",
|
|
4630
|
+
label: t("tool.sort.size")
|
|
4631
|
+
},
|
|
4632
|
+
{
|
|
4633
|
+
id: "count",
|
|
4634
|
+
label: t("tool.sort.count")
|
|
4635
|
+
},
|
|
4636
|
+
{
|
|
4637
|
+
id: "name",
|
|
4638
|
+
label: t("tool.sort.name")
|
|
4639
|
+
}
|
|
4640
|
+
],
|
|
4641
|
+
onPick: (id) => {
|
|
4642
|
+
props.set?.("defaultToolSort", id);
|
|
4643
|
+
}
|
|
4644
|
+
}),
|
|
4489
4645
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrefRow, {
|
|
4490
4646
|
label: t("settings.fileSort"),
|
|
4491
4647
|
value: state.fileSort,
|
|
@@ -4522,6 +4678,7 @@ window.__ModuleLoader__.load({
|
|
|
4522
4678
|
...v.defaultPlacement === "all" || v.defaultPlacement === "tab" || v.defaultPlacement === "sidebar" ? { placement: v.defaultPlacement } : {},
|
|
4523
4679
|
...v.defaultGranularity === "step" || v.defaultGranularity === "turn" ? { granularity: v.defaultGranularity } : {},
|
|
4524
4680
|
...v.defaultTrendMode === "total" || v.defaultTrendMode === "delta" ? { mode: v.defaultTrendMode } : {},
|
|
4681
|
+
...v.defaultToolSort === "size" || v.defaultToolSort === "count" || v.defaultToolSort === "name" ? { toolSort: v.defaultToolSort } : {},
|
|
4525
4682
|
...v.defaultFileSort === "count" || v.defaultFileSort === "latest" || v.defaultFileSort === "path" ? { fileSort: v.defaultFileSort } : {}
|
|
4526
4683
|
};
|
|
4527
4684
|
}
|
|
@@ -4531,13 +4688,14 @@ window.__ModuleLoader__.load({
|
|
|
4531
4688
|
placement: "all",
|
|
4532
4689
|
granularity: "step",
|
|
4533
4690
|
mode: "total",
|
|
4691
|
+
toolSort: "count",
|
|
4534
4692
|
fileSort: "count",
|
|
4535
4693
|
writable: false
|
|
4536
4694
|
};
|
|
4537
4695
|
let scope;
|
|
4538
4696
|
const listeners = /* @__PURE__ */ new Set();
|
|
4539
4697
|
const publish = (next) => {
|
|
4540
|
-
if (next.status === state.status && next.placement === state.placement && next.granularity === state.granularity && next.mode === state.mode && next.fileSort === state.fileSort && next.writable === state.writable) return;
|
|
4698
|
+
if (next.status === state.status && next.placement === state.placement && next.granularity === state.granularity && next.mode === state.mode && next.toolSort === state.toolSort && next.fileSort === state.fileSort && next.writable === state.writable) return;
|
|
4541
4699
|
state = next;
|
|
4542
4700
|
for (const listener of listeners) listener();
|
|
4543
4701
|
};
|
|
@@ -4550,6 +4708,7 @@ window.__ModuleLoader__.load({
|
|
|
4550
4708
|
placement: prefs.placement ?? (rawPlacement === void 0 ? state.placement : "all"),
|
|
4551
4709
|
granularity: prefs.granularity ?? state.granularity,
|
|
4552
4710
|
mode: prefs.mode ?? state.mode,
|
|
4711
|
+
toolSort: prefs.toolSort ?? state.toolSort,
|
|
4553
4712
|
fileSort: prefs.fileSort ?? state.fileSort,
|
|
4554
4713
|
writable: snap.writable
|
|
4555
4714
|
});
|
|
@@ -4568,6 +4727,7 @@ window.__ModuleLoader__.load({
|
|
|
4568
4727
|
defaultPlacement: () => state.placement,
|
|
4569
4728
|
defaultGranularity: () => state.granularity,
|
|
4570
4729
|
defaultTrendMode: () => state.mode,
|
|
4730
|
+
defaultToolSort: () => state.toolSort,
|
|
4571
4731
|
defaultFileSort: () => state.fileSort,
|
|
4572
4732
|
attach(bound) {
|
|
4573
4733
|
scope = bound;
|
|
@@ -4647,6 +4807,68 @@ window.__ModuleLoader__.load({
|
|
|
4647
4807
|
};
|
|
4648
4808
|
}
|
|
4649
4809
|
//#endregion
|
|
4810
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-util-workspace-path@0.1.5-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-util-workspace-path/lib/index.js
|
|
4811
|
+
/**
|
|
4812
|
+
* The `dsh-resource://file/…` address grammar: how a file is named across the
|
|
4813
|
+
* Sidebar and the resource model, built and parsed without touching a
|
|
4814
|
+
* filesystem.
|
|
4815
|
+
* @module
|
|
4816
|
+
*/
|
|
4817
|
+
/** The scheme and type every file address opens with. */
|
|
4818
|
+
const FILE_ADDRESS_PREFIX = "dsh-resource://file/";
|
|
4819
|
+
/** Component-encode one id or path segment, keeping `:` literal for drive letters. */
|
|
4820
|
+
function encodeSegment(segment) {
|
|
4821
|
+
return encodeURIComponent(segment).replace(/%3A/gi, ":");
|
|
4822
|
+
}
|
|
4823
|
+
/** Encode a `/`-separated path segment by segment. */
|
|
4824
|
+
function encodePath(path) {
|
|
4825
|
+
return path.split("/").map(encodeSegment).join("/");
|
|
4826
|
+
}
|
|
4827
|
+
/**
|
|
4828
|
+
* Build the address of a file read through one Session.
|
|
4829
|
+
* @param sessionId - the Session whose Host workspace resolves the path.
|
|
4830
|
+
* @param path - absolute or workspace-relative path; backslashes are normalized to `/`, and leading `./` prefixes are dropped.
|
|
4831
|
+
* @returns the `dsh-resource://file/session/<sessionId>/<path>` address.
|
|
4832
|
+
*/
|
|
4833
|
+
function sessionFileAddress(sessionId, path) {
|
|
4834
|
+
const normalized = path.replace(/\\/g, "/").replace(/^(?:\.\/)+/, "");
|
|
4835
|
+
return `${FILE_ADDRESS_PREFIX}session/${encodeSegment(sessionId)}/${encodePath(normalized)}`;
|
|
4836
|
+
}
|
|
4837
|
+
/**
|
|
4838
|
+
* Browser-safe Workspace path and display helpers.
|
|
4839
|
+
* @module @deepseek-ai/dsh-util-workspace-path
|
|
4840
|
+
*/
|
|
4841
|
+
/** Whether a path uses a Windows drive or UNC prefix. */
|
|
4842
|
+
function isWindowsStylePath(value) {
|
|
4843
|
+
return /^[A-Za-z]:[/\\]/.test(value) || value.startsWith("\\\\");
|
|
4844
|
+
}
|
|
4845
|
+
/**
|
|
4846
|
+
* Whether a path is absolute in either spelling the Host accepts: POSIX (`/a/b`) or Windows drive or UNC.
|
|
4847
|
+
* @param path - the path to classify.
|
|
4848
|
+
* @returns `true` for an absolute path; `false` for a Workspace-relative one.
|
|
4849
|
+
*/
|
|
4850
|
+
function isAbsoluteWorkspacePath(path) {
|
|
4851
|
+
return path.startsWith("/") || isWindowsStylePath(path);
|
|
4852
|
+
}
|
|
4853
|
+
/**
|
|
4854
|
+
* The address for a path as a caller holds it: a relative path, or an absolute
|
|
4855
|
+
* path inside the Session's workspace, becomes a `session`-scoped address; an
|
|
4856
|
+
* absolute path outside it, or one whose workspace root is unknown, keeps its
|
|
4857
|
+
* absolute path in that Session's address.
|
|
4858
|
+
* @param sessionId - the Session the path is read in.
|
|
4859
|
+
* @param cwd - that Session's workspace root, when known.
|
|
4860
|
+
* @param path - absolute or workspace-relative path, in either separator spelling.
|
|
4861
|
+
* @returns the `dsh-resource://file/…` address.
|
|
4862
|
+
*/
|
|
4863
|
+
function fileAddressFor(sessionId, cwd, path) {
|
|
4864
|
+
const normalized = path.replace(/\\/g, "/");
|
|
4865
|
+
if (!isAbsoluteWorkspacePath(normalized)) return sessionFileAddress(sessionId, normalized);
|
|
4866
|
+
const root = cwd === void 0 ? "" : cwd.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
4867
|
+
if (root !== "" && normalized === root) return sessionFileAddress(sessionId, "");
|
|
4868
|
+
if (root !== "" && normalized.startsWith(`${root}/`)) return sessionFileAddress(sessionId, normalized.slice(root.length + 1));
|
|
4869
|
+
return sessionFileAddress(sessionId, normalized);
|
|
4870
|
+
}
|
|
4871
|
+
//#endregion
|
|
4650
4872
|
//#region src/client/fileActivity.ts
|
|
4651
4873
|
/** The file's form — multimodal reads and image extensions scan apart; a trailing slash marks a directory target. */
|
|
4652
4874
|
function formOf(tool, path) {
|
|
@@ -5138,6 +5360,23 @@ window.__ModuleLoader__.load({
|
|
|
5138
5360
|
return workspace.replace(/\/+$/, "") + "/" + path.replace(/^\/+/, "");
|
|
5139
5361
|
}
|
|
5140
5362
|
/**
|
|
5363
|
+
* The right-Sidebar preview address of a real file — the session-scoped
|
|
5364
|
+
* `dsh-resource://file/…` address the shipped preview type claims, built by
|
|
5365
|
+
* the harness's own `fileAddressFor` (the files sidebar's idiom: a path under
|
|
5366
|
+
* the workspace collapses to its session-relative spelling, so every route to
|
|
5367
|
+
* one file settles on one tab). Undefined for a pathless search's PATTERN, a
|
|
5368
|
+
* directory target, a missing session, and any path the encoder rejects — the
|
|
5369
|
+
* caller falls back to the system opener or renders the name inert.
|
|
5370
|
+
*/
|
|
5371
|
+
function previewAddressOf(path, form, pattern, sessionId, workspace) {
|
|
5372
|
+
if (pattern === true || form === "dir" || sessionId === void 0 || sessionId === "") return void 0;
|
|
5373
|
+
try {
|
|
5374
|
+
return fileAddressFor(sessionId, workspace, path);
|
|
5375
|
+
} catch {
|
|
5376
|
+
return;
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
/**
|
|
5141
5380
|
* The row's display form of a path: inside the workspace (or already
|
|
5142
5381
|
* workspace-relative) it shortens to a './'-prefixed relative — an absolute
|
|
5143
5382
|
* path outside the workspace, a Windows drive path, and an already-'.'
|
|
@@ -5782,9 +6021,9 @@ window.__ModuleLoader__.load({
|
|
|
5782
6021
|
/** Fallback arc color for pressure-only nodes (no composition data), by fill ratio. */
|
|
5783
6022
|
function ringColorOf(pct) {
|
|
5784
6023
|
if (pct === null) return "var(--dsw-alias-border-l1)";
|
|
5785
|
-
if (pct >= 90) return "
|
|
5786
|
-
if (pct >= 70) return "
|
|
5787
|
-
return "
|
|
6024
|
+
if (pct >= 90) return "var(--color-red-500)";
|
|
6025
|
+
if (pct >= 70) return "var(--color-amber-500)";
|
|
6026
|
+
return "var(--color-green-500)";
|
|
5788
6027
|
}
|
|
5789
6028
|
function makeAgentGraph(ctx, kit) {
|
|
5790
6029
|
const { t, fmt, catLabel } = kit;
|
|
@@ -5909,15 +6148,14 @@ window.__ModuleLoader__.load({
|
|
|
5909
6148
|
children: [layout.links.map((link) => {
|
|
5910
6149
|
const d = `M ${link.x1} ${link.y1} L ${link.x2} ${link.y2}`;
|
|
5911
6150
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
5912
|
-
className: "lc-agents-link" + (link.running ? " lc-agents-link-live" : ""),
|
|
6151
|
+
className: "lc-agents-link stroke-[1.5px] stroke-opacity-45" + (link.running ? " lc-agents-link-live" : ""),
|
|
5913
6152
|
d,
|
|
5914
6153
|
stroke: link.color,
|
|
5915
6154
|
fill: "none"
|
|
5916
6155
|
}), link.running ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
5917
|
-
className: "lc-agents-flow",
|
|
6156
|
+
className: "lc-agents-flow animate-lc-agent-flow fill-none stroke-2",
|
|
5918
6157
|
d,
|
|
5919
|
-
stroke: link.color
|
|
5920
|
-
fill: "none"
|
|
6158
|
+
stroke: link.color
|
|
5921
6159
|
}) : null] }, link.to);
|
|
5922
6160
|
}), forest.nodes.map((node) => {
|
|
5923
6161
|
const point = layout.points.find((p) => p.id === node.id);
|
|
@@ -5975,7 +6213,7 @@ window.__ModuleLoader__.load({
|
|
|
5975
6213
|
const pct = node.head !== null ? node.head.pct : null;
|
|
5976
6214
|
const ring = 2 * Math.PI * 20;
|
|
5977
6215
|
const segs = node.head !== null ? ringSegments(node.head.parts, pct, 20, ringColorOf(pct)) : [];
|
|
5978
|
-
const cls = "lc-agent-node" + (node.isCurrent ? " lc-agent-self" : "") + (node.running ? " lc-agent-running" : "") + (node.completed && !node.running ? " lc-agent-done" : "") + (props.hovered ? " lc-agent-hover" : "") + (node.isCurrent ? "" : " lc-agent-clickable");
|
|
6216
|
+
const cls = "lc-agent-node" + (node.isCurrent ? " lc-agent-self" : "") + (node.running ? " lc-agent-running" : "") + (node.completed && !node.running ? " lc-agent-done" : "") + (props.hovered ? " lc-agent-hover" : "") + (node.isCurrent ? "" : " lc-agent-clickable") + " group/agent";
|
|
5979
6217
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
|
|
5980
6218
|
className: cls,
|
|
5981
6219
|
transform: `translate(${x}, ${y})`,
|
|
@@ -5994,23 +6232,23 @@ window.__ModuleLoader__.load({
|
|
|
5994
6232
|
},
|
|
5995
6233
|
children: [
|
|
5996
6234
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
5997
|
-
className: "lc-agent-halo",
|
|
6235
|
+
className: "lc-agent-halo fill-transparent group-hover/agent:fill-[var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2))] group-focus-visible/agent:fill-[var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2))]" + (node.running ? " animate-lc-agent-glow" : ""),
|
|
5998
6236
|
r: 35
|
|
5999
6237
|
}),
|
|
6000
6238
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
6001
|
-
className: "lc-agent-track",
|
|
6239
|
+
className: "lc-agent-track fill-(--dsw-alias-bg-layer-1) stroke-(--dsw-alias-border-l1) stroke-[1.5px]",
|
|
6002
6240
|
r: 26
|
|
6003
6241
|
}),
|
|
6004
6242
|
segs.map((seg) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
6005
|
-
className: "lc-agent-seg" + (seg.free ? " lc-agent-free" : ""),
|
|
6243
|
+
className: "lc-agent-seg fill-none stroke-9" + (seg.free ? " lc-agent-free" : ""),
|
|
6006
6244
|
r: 20,
|
|
6007
|
-
stroke: seg.free ? void 0 : seg.color,
|
|
6008
6245
|
strokeDasharray: `${seg.len} ${ring - seg.len}`,
|
|
6009
6246
|
strokeDashoffset: -seg.offset,
|
|
6247
|
+
style: { stroke: seg.free ? void 0 : seg.color },
|
|
6010
6248
|
transform: "rotate(-90)"
|
|
6011
6249
|
}, seg.key)),
|
|
6012
6250
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
6013
|
-
className: "lc-agent-pct",
|
|
6251
|
+
className: "lc-agent-pct fill-(--dsw-alias-label-primary)",
|
|
6014
6252
|
textAnchor: "middle",
|
|
6015
6253
|
dy: "0.32em",
|
|
6016
6254
|
children: pct !== null ? `${pct}%` : node.head !== null ? props.fmt(node.head.tokens) : "—"
|
|
@@ -6090,7 +6328,9 @@ window.__ModuleLoader__.load({
|
|
|
6090
6328
|
* with no value are skipped; an all-zero ring renders as one neutral track so
|
|
6091
6329
|
* the card never draws a misleading "100% of nothing" pie. The center type
|
|
6092
6330
|
* scales with the ring's size, so the label always fits inside the hole the
|
|
6093
|
-
* thin stroke leaves.
|
|
6331
|
+
* thin stroke leaves. On mount the slices sweep in one after another, growing
|
|
6332
|
+
* their dasharcs clockwise from 12 o'clock (stats.css, staggered by the
|
|
6333
|
+
* per-slice `--lc-i` slot below).
|
|
6094
6334
|
*/
|
|
6095
6335
|
/**
|
|
6096
6336
|
* The hairline divider between two slices, in dasharray units (1 unit ≈ 1% of
|
|
@@ -6123,7 +6363,7 @@ window.__ModuleLoader__.load({
|
|
|
6123
6363
|
}
|
|
6124
6364
|
const hovering = props.hoverKey !== null && props.hoverKey !== void 0 && arcs.some((a) => a.key === props.hoverKey);
|
|
6125
6365
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6126
|
-
className: "lc-donut" + (hovering ? " lc-donut-dim" : ""),
|
|
6366
|
+
className: "lc-donut @max-[240px]/lc-card:mx-auto" + (hovering ? " lc-donut-dim" : ""),
|
|
6127
6367
|
style: {
|
|
6128
6368
|
width: size,
|
|
6129
6369
|
height: size
|
|
@@ -6137,22 +6377,21 @@ window.__ModuleLoader__.load({
|
|
|
6137
6377
|
height: size,
|
|
6138
6378
|
"aria-hidden": "true",
|
|
6139
6379
|
children: arcs.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
6140
|
-
className: "lc-donut-track",
|
|
6380
|
+
className: "lc-donut-track fill-none stroke-4",
|
|
6141
6381
|
cx: "21",
|
|
6142
6382
|
cy: "21",
|
|
6143
|
-
r: "15.9155"
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
}) : arcs.map((a) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
6147
|
-
className: "lc-donut-seg" + (props.hoverKey === a.key ? " lc-donut-seg-on" : ""),
|
|
6383
|
+
r: "15.9155"
|
|
6384
|
+
}) : arcs.map((a, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
6385
|
+
className: "lc-donut-seg fill-none stroke-4 animate-lc-donut-in motion-reduce:animate-none" + (props.hoverKey === a.key ? " lc-donut-seg-on" : ""),
|
|
6148
6386
|
cx: "21",
|
|
6149
6387
|
cy: "21",
|
|
6150
6388
|
r: "15.9155",
|
|
6151
|
-
fill: "none",
|
|
6152
|
-
stroke: a.color,
|
|
6153
|
-
strokeWidth: "4",
|
|
6154
6389
|
strokeDasharray: `${a.len} ${100 - a.len}`,
|
|
6155
6390
|
strokeDashoffset: a.offset,
|
|
6391
|
+
style: {
|
|
6392
|
+
"--lc-i": i,
|
|
6393
|
+
stroke: a.color
|
|
6394
|
+
},
|
|
6156
6395
|
onMouseEnter: () => {
|
|
6157
6396
|
if (props.onHoverKey !== void 0) props.onHoverKey(a.key);
|
|
6158
6397
|
}
|
|
@@ -6284,7 +6523,7 @@ window.__ModuleLoader__.load({
|
|
|
6284
6523
|
const at = eventAt(ev);
|
|
6285
6524
|
const glyph = ev.kind === "inject" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutline16, {}) : ev.kind === "model" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutline16, {}) : EVENT_ICONS[ev.kind] || "•";
|
|
6286
6525
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6287
|
-
className: "lc-event",
|
|
6526
|
+
className: "lc-event @max-[380px]/lc-card:flex-wrap",
|
|
6288
6527
|
children: [
|
|
6289
6528
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6290
6529
|
className: "lc-event-icon lc-event-" + ev.kind,
|
|
@@ -6295,7 +6534,7 @@ window.__ModuleLoader__.load({
|
|
|
6295
6534
|
children: t("kind." + ev.kind)
|
|
6296
6535
|
}),
|
|
6297
6536
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6298
|
-
className: "lc-event-label",
|
|
6537
|
+
className: "lc-event-label flex-1 @max-[380px]/lc-card:basis-[calc(100%-92px)]",
|
|
6299
6538
|
children: label
|
|
6300
6539
|
}),
|
|
6301
6540
|
at !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6329,6 +6568,9 @@ window.__ModuleLoader__.load({
|
|
|
6329
6568
|
* Interaction mirrors the Context browser's element rows: a row click
|
|
6330
6569
|
* expands the file's own operation log; each operation is itself the click
|
|
6331
6570
|
* target that jumps to (and reveals) the exact tool result in the browser.
|
|
6571
|
+
* The file name opens the file's right-Sidebar preview where that column
|
|
6572
|
+
* exists (dsh 0.1.5-rc.1+, the shipped files-sidebar idiom), and the system
|
|
6573
|
+
* opener where it does not.
|
|
6332
6574
|
*/
|
|
6333
6575
|
function makeFileCard(kit, settings) {
|
|
6334
6576
|
const { t, fmt, fmtTime } = kit;
|
|
@@ -6450,7 +6692,7 @@ window.__ModuleLoader__.load({
|
|
|
6450
6692
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6451
6693
|
className: "lc-fa-ctl",
|
|
6452
6694
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6453
|
-
className: "lc-gran",
|
|
6695
|
+
className: "lc-gran @max-[380px]/lc-card:flex-wrap",
|
|
6454
6696
|
children: chips.map((c) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
6455
6697
|
type: "button",
|
|
6456
6698
|
className: "lc-gran-btn" + (filter === c.key ? " lc-gran-on" : "") + (c.key === "read" || c.key === "write" || c.key === "search" ? " lc-fa-chip-" + c.key : ""),
|
|
@@ -6467,7 +6709,7 @@ window.__ModuleLoader__.load({
|
|
|
6467
6709
|
})]
|
|
6468
6710
|
}, c.key))
|
|
6469
6711
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
6470
|
-
className: "lc-fa-search",
|
|
6712
|
+
className: "lc-fa-search focus:border-(--dsw-alias-label-dimmed)",
|
|
6471
6713
|
value: query,
|
|
6472
6714
|
placeholder: t("files.search"),
|
|
6473
6715
|
onChange: (ev) => {
|
|
@@ -6480,12 +6722,12 @@ window.__ModuleLoader__.load({
|
|
|
6480
6722
|
children: [
|
|
6481
6723
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("files.files", { n: activity.entries.length }) }),
|
|
6482
6724
|
activity.totals.added + activity.totals.removed > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6483
|
-
className: "lc-fa-meta-delta",
|
|
6725
|
+
className: "lc-fa-meta-delta group/tip",
|
|
6484
6726
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DeltaPair, {
|
|
6485
6727
|
added: activity.totals.added,
|
|
6486
6728
|
removed: activity.totals.removed
|
|
6487
6729
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6488
|
-
className: "lc-tip lc-fa-meta-tip",
|
|
6730
|
+
className: "lc-tip lc-fa-meta-tip group-hover/tip:opacity-100",
|
|
6489
6731
|
role: "tooltip",
|
|
6490
6732
|
children: t("files.deltaTip")
|
|
6491
6733
|
})]
|
|
@@ -6523,11 +6765,13 @@ window.__ModuleLoader__.load({
|
|
|
6523
6765
|
const base = slash >= 0 ? trimmed.slice(slash + 1) : trimmed;
|
|
6524
6766
|
const glyph = glyphOf(e.path, e.form);
|
|
6525
6767
|
const abs = e.pattern === true ? void 0 : absPathOf(e.path, props.workspace);
|
|
6768
|
+
const previewable = props.onPreview !== void 0 && e.pattern !== true && e.form !== "dir";
|
|
6769
|
+
const openable = previewable || abs !== void 0 && props.onOpen !== void 0;
|
|
6526
6770
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6527
6771
|
className: "lc-fa-item" + (open ? " lc-fa-item-on" : ""),
|
|
6528
6772
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
6529
6773
|
type: "button",
|
|
6530
|
-
className: "lc-fa-row",
|
|
6774
|
+
className: "lc-fa-row hover:bg-(--dsw-alias-interactive-bg-hover) @max-[380px]/lc-card:flex-wrap",
|
|
6531
6775
|
title: e.path,
|
|
6532
6776
|
onClick: () => {
|
|
6533
6777
|
setOpenPath(open ? null : e.path);
|
|
@@ -6547,13 +6791,14 @@ window.__ModuleLoader__.load({
|
|
|
6547
6791
|
}) : glyph.glyph
|
|
6548
6792
|
}),
|
|
6549
6793
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6550
|
-
className: "lc-fa-path",
|
|
6551
|
-
children: [dir !== "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: dir }) : null,
|
|
6552
|
-
className: "lc-fa-file",
|
|
6553
|
-
title: t("files.open"),
|
|
6794
|
+
className: "lc-fa-path flex-1 @max-[380px]/lc-card:basis-[calc(100%-46px)]",
|
|
6795
|
+
children: [dir !== "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: dir }) : null, openable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", {
|
|
6796
|
+
className: "lc-fa-file hover:underline",
|
|
6797
|
+
title: t(previewable ? "files.preview" : "files.open"),
|
|
6554
6798
|
onClick: (ev) => {
|
|
6555
6799
|
ev.stopPropagation();
|
|
6556
|
-
props.
|
|
6800
|
+
if (previewable && props.onPreview?.(e) === true) return;
|
|
6801
|
+
if (abs !== void 0) props.onOpen?.(abs);
|
|
6557
6802
|
},
|
|
6558
6803
|
children: base
|
|
6559
6804
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { children: base })]
|
|
@@ -6593,7 +6838,7 @@ window.__ModuleLoader__.load({
|
|
|
6593
6838
|
const key = `${op.seq}:${i}`;
|
|
6594
6839
|
return onLocate !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6595
6840
|
type: "button",
|
|
6596
|
-
className: "lc-fa-op lc-fa-op-link",
|
|
6841
|
+
className: "lc-fa-op lc-fa-op-link hover:bg-(--dsw-alias-interactive-bg-hover)",
|
|
6597
6842
|
title: t("files.locate"),
|
|
6598
6843
|
onClick: () => {
|
|
6599
6844
|
onLocate(op);
|
|
@@ -6664,7 +6909,7 @@ window.__ModuleLoader__.load({
|
|
|
6664
6909
|
function makePluginInfo(kit) {
|
|
6665
6910
|
const { t } = kit;
|
|
6666
6911
|
const row = (label, value, href, hint) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
6667
|
-
className: "lc-pi-row",
|
|
6912
|
+
className: "lc-pi-row group/pi",
|
|
6668
6913
|
href,
|
|
6669
6914
|
target: "_blank",
|
|
6670
6915
|
rel: "noreferrer",
|
|
@@ -6672,7 +6917,7 @@ window.__ModuleLoader__.load({
|
|
|
6672
6917
|
className: "lc-pi-label",
|
|
6673
6918
|
children: label
|
|
6674
6919
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6675
|
-
className: "lc-pi-value",
|
|
6920
|
+
className: "lc-pi-value group-hover/pi:underline",
|
|
6676
6921
|
title: hint,
|
|
6677
6922
|
children: value
|
|
6678
6923
|
})]
|
|
@@ -6680,7 +6925,7 @@ window.__ModuleLoader__.load({
|
|
|
6680
6925
|
return function PluginInfo() {
|
|
6681
6926
|
const [latest, setLatest] = (0, react.useState)(null);
|
|
6682
6927
|
(0, react.useEffect)(() => {
|
|
6683
|
-
if ("0.
|
|
6928
|
+
if ("0.51.0".includes("-dev")) return;
|
|
6684
6929
|
let on = true;
|
|
6685
6930
|
fetchLatestVersion().then((v) => {
|
|
6686
6931
|
if (on && v) setLatest(v);
|
|
@@ -6689,22 +6934,22 @@ window.__ModuleLoader__.load({
|
|
|
6689
6934
|
on = false;
|
|
6690
6935
|
};
|
|
6691
6936
|
}, []);
|
|
6692
|
-
const update = latest !== null && isNewerVersion(latest, "0.
|
|
6693
|
-
const nameText = "dsh-context (v0.
|
|
6937
|
+
const update = latest !== null && isNewerVersion(latest, "0.51.0") ? latest : null;
|
|
6938
|
+
const nameText = "dsh-context (v0.51.0)";
|
|
6694
6939
|
const nameValue = [nameText];
|
|
6695
6940
|
if (update) nameValue.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6696
6941
|
className: "lc-pi-update",
|
|
6697
6942
|
children: "↑ v" + update
|
|
6698
6943
|
}, "update"));
|
|
6699
6944
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6700
|
-
className: "lc-card",
|
|
6945
|
+
className: "lc-card flex-1 min-w-[min(360px,100%)]",
|
|
6701
6946
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6702
6947
|
className: "lc-card-title",
|
|
6703
6948
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6704
6949
|
className: "lc-card-title-text",
|
|
6705
6950
|
children: t("plugin.title")
|
|
6706
6951
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
6707
|
-
className: "lc-card-sub lc-pi-hint",
|
|
6952
|
+
className: "lc-card-sub lc-pi-hint hover:underline",
|
|
6708
6953
|
href: PLUGIN_REPO,
|
|
6709
6954
|
target: "_blank",
|
|
6710
6955
|
rel: "noreferrer",
|
|
@@ -6713,11 +6958,11 @@ window.__ModuleLoader__.load({
|
|
|
6713
6958
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6714
6959
|
className: "lc-pi-grid",
|
|
6715
6960
|
children: [
|
|
6716
|
-
row(t("plugin.name"), nameValue, PLUGIN_REPO
|
|
6961
|
+
row(t("plugin.name"), nameValue, PLUGIN_REPO, update !== null ? nameText + " ↑ v" + update : nameText),
|
|
6717
6962
|
row(t("plugin.github"), PLUGIN_REPO_SHORT, PLUGIN_REPO, PLUGIN_REPO_SHORT),
|
|
6718
6963
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
6719
6964
|
type: "button",
|
|
6720
|
-
className: "lc-pi-row lc-pi-row-btn",
|
|
6965
|
+
className: "lc-pi-row lc-pi-row-btn group/pi",
|
|
6721
6966
|
onClick: () => {
|
|
6722
6967
|
openPluginSettings();
|
|
6723
6968
|
},
|
|
@@ -6725,7 +6970,7 @@ window.__ModuleLoader__.load({
|
|
|
6725
6970
|
className: "lc-pi-label",
|
|
6726
6971
|
children: t("plugin.settings")
|
|
6727
6972
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6728
|
-
className: "lc-pi-value",
|
|
6973
|
+
className: "lc-pi-value group-hover/pi:underline",
|
|
6729
6974
|
title: t("plugin.settingsOpen"),
|
|
6730
6975
|
children: t("plugin.settingsOpen")
|
|
6731
6976
|
})]
|
|
@@ -6777,7 +7022,7 @@ window.__ModuleLoader__.load({
|
|
|
6777
7022
|
className: "lc-modal-title",
|
|
6778
7023
|
children: t("gate.title")
|
|
6779
7024
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6780
|
-
className: "lc-modal-close",
|
|
7025
|
+
className: "lc-modal-close hover:text-(--dsw-alias-label-primary) hover:bg-(--dsw-alias-bg-layer-2)",
|
|
6781
7026
|
"aria-label": t("cmd.close"),
|
|
6782
7027
|
onClick: close,
|
|
6783
7028
|
children: "×"
|
|
@@ -6820,7 +7065,7 @@ window.__ModuleLoader__.load({
|
|
|
6820
7065
|
className: "lc-gate-actions",
|
|
6821
7066
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6822
7067
|
type: "button",
|
|
6823
|
-
className: "lc-gate-ok",
|
|
7068
|
+
className: "lc-gate-ok hover:brightness-110",
|
|
6824
7069
|
onClick: close,
|
|
6825
7070
|
children: t("gate.ok")
|
|
6826
7071
|
})
|
|
@@ -6841,9 +7086,9 @@ window.__ModuleLoader__.load({
|
|
|
6841
7086
|
*/
|
|
6842
7087
|
function BriefRow(props) {
|
|
6843
7088
|
const inner = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6844
|
-
className: "lc-brief-tag",
|
|
7089
|
+
className: "lc-brief-tag group/tip",
|
|
6845
7090
|
children: [props.tag, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6846
|
-
className: "lc-tip lc-brief-tip",
|
|
7091
|
+
className: "lc-tip lc-brief-tip group-hover/tip:opacity-100",
|
|
6847
7092
|
role: "tooltip",
|
|
6848
7093
|
children: props.tagTip
|
|
6849
7094
|
})]
|
|
@@ -6859,7 +7104,7 @@ window.__ModuleLoader__.load({
|
|
|
6859
7104
|
};
|
|
6860
7105
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6861
7106
|
type: "button",
|
|
6862
|
-
className: "lc-brief-row lc-brief-row-link",
|
|
7107
|
+
className: "lc-brief-row lc-brief-row-link hover:bg-(--dsw-alias-interactive-bg-hover)",
|
|
6863
7108
|
onClick: locate,
|
|
6864
7109
|
children: inner
|
|
6865
7110
|
});
|
|
@@ -6955,7 +7200,7 @@ window.__ModuleLoader__.load({
|
|
|
6955
7200
|
const nodeChip = (n, onClick, grow = false) => {
|
|
6956
7201
|
const { tag, text } = chipParts(n, convOf(n.seq));
|
|
6957
7202
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6958
|
-
className: "lc-brief-chip" + (grow ? " lc-brief-chip-grow" : "") + (onClick !== void 0 ? " lc-brief-chip-link" : ""),
|
|
7203
|
+
className: "lc-brief-chip" + (grow ? " lc-brief-chip-grow" : "") + (onClick !== void 0 ? " lc-brief-chip-link hover:bg-(--dsw-alias-interactive-bg-hover)" : ""),
|
|
6959
7204
|
title: factTitle(tag, text) + hint,
|
|
6960
7205
|
onClick,
|
|
6961
7206
|
children: [
|
|
@@ -7146,107 +7391,331 @@ window.__ModuleLoader__.load({
|
|
|
7146
7391
|
});
|
|
7147
7392
|
}
|
|
7148
7393
|
//#endregion
|
|
7394
|
+
//#region src/shared/providers.ts
|
|
7395
|
+
/**
|
|
7396
|
+
* The provider-id seam between dsh request envelopes and the models.dev
|
|
7397
|
+
* registry: client/cost.ts resolves price-book branches through it, and
|
|
7398
|
+
* host/fold.ts uses the DeepSeek resolution to split the session-cost totals
|
|
7399
|
+
* into peak/off-peak periods. Only the renames live here — an id absent
|
|
7400
|
+
* from the table passes through verbatim.
|
|
7401
|
+
*/
|
|
7402
|
+
const MODELS_DEV_PROVIDER_IDS = {
|
|
7403
|
+
"deepseek-official": "deepseek",
|
|
7404
|
+
"kimi-coding": "moonshotai",
|
|
7405
|
+
"minimax-cn": "minimax",
|
|
7406
|
+
"zai-coding-cn": "zhipuai"
|
|
7407
|
+
};
|
|
7408
|
+
/** The models.dev provider id that prices a dsh provider (identity for unmapped ids). */
|
|
7409
|
+
function modelsDevProviderOf(dshProviderId) {
|
|
7410
|
+
return MODELS_DEV_PROVIDER_IDS[dshProviderId] ?? dshProviderId;
|
|
7411
|
+
}
|
|
7412
|
+
/** Whether a dsh provider prices through DeepSeek's period-based list (peak / half-price off-peak). */
|
|
7413
|
+
function isDeepSeekProvider(dshProviderId) {
|
|
7414
|
+
return modelsDevProviderOf(dshProviderId) === "deepseek";
|
|
7415
|
+
}
|
|
7416
|
+
//#endregion
|
|
7149
7417
|
//#region src/client/cost.ts
|
|
7150
|
-
/**
|
|
7151
|
-
const
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7418
|
+
/** 1 CNY = 0.15 USD — the fixed CNY-display conversion rate. */
|
|
7419
|
+
const USD_PER_CNY = .15;
|
|
7420
|
+
/** Off-peak DeepSeek rates are half the peak rates (the official list). */
|
|
7421
|
+
const OFF_PEAK_FACTOR = .5;
|
|
7422
|
+
/** A USD amount in the display currency (CNY divides the fixed rate). */
|
|
7423
|
+
function toCurrency(usd, currency) {
|
|
7424
|
+
return currency === "cny" ? usd / USD_PER_CNY : usd;
|
|
7425
|
+
}
|
|
7426
|
+
/** One rate triple at the half-price off-peak rate (the tooltip's `peak | off` pair). */
|
|
7427
|
+
function offPeakOf(rate) {
|
|
7428
|
+
return {
|
|
7429
|
+
hit: rate.hit * OFF_PEAK_FACTOR,
|
|
7430
|
+
miss: rate.miss * OFF_PEAK_FACTOR,
|
|
7431
|
+
write: rate.write * OFF_PEAK_FACTOR,
|
|
7432
|
+
out: rate.out * OFF_PEAK_FACTOR
|
|
7433
|
+
};
|
|
7434
|
+
}
|
|
7435
|
+
/** One book branch (a provider's models), as far as runtime can prove it. */
|
|
7436
|
+
function branchOf(book, id) {
|
|
7437
|
+
const v = book[id];
|
|
7438
|
+
return v !== null && typeof v === "object" ? v : null;
|
|
7439
|
+
}
|
|
7440
|
+
/**
|
|
7441
|
+
* One branch's model id → rates, as far as runtime can prove it: exact own
|
|
7442
|
+
* key first (the book is untrusted wire data), then case-insensitively, then
|
|
7443
|
+
* by id SUFFIX — dsh spells some models short (`k3`) where the registry
|
|
7444
|
+
* namespaces them (`kimi-k3`). Several suffix candidates (e.g. `k3` vs a
|
|
7445
|
+
* hypothetical `other-k3`) are ambiguous and price nothing.
|
|
7446
|
+
*/
|
|
7447
|
+
function lookup(models, model) {
|
|
7448
|
+
if (Object.hasOwn(models, model)) return models[model];
|
|
7449
|
+
const m = model.toLowerCase();
|
|
7450
|
+
let found = null;
|
|
7451
|
+
let seen = null;
|
|
7452
|
+
for (const id in models) {
|
|
7453
|
+
const lower = id.toLowerCase();
|
|
7454
|
+
if (lower !== m && !lower.endsWith("-" + m)) continue;
|
|
7455
|
+
if (seen !== null && seen !== lower) return null;
|
|
7456
|
+
seen = lower;
|
|
7457
|
+
found = models[id];
|
|
7175
7458
|
}
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
*
|
|
7180
|
-
* the
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7459
|
+
return found;
|
|
7460
|
+
}
|
|
7461
|
+
/**
|
|
7462
|
+
* The book's rates for one folded (provider, model) bucket, or null when
|
|
7463
|
+
* the book cannot price it: the dsh provider id resolves through
|
|
7464
|
+
* modelsDevProviderOf (unmapped ids pass through) and prices by model id —
|
|
7465
|
+
* exact, case-insensitive, or suffix; a provider the book does not carry
|
|
7466
|
+
* falls back to a cross-provider scan, priced only when exactly one branch
|
|
7467
|
+
* carries the model id.
|
|
7468
|
+
*/
|
|
7469
|
+
function priceOf(prices, provider, model) {
|
|
7470
|
+
if (prices === null || prices === void 0) return null;
|
|
7471
|
+
const direct = branchOf(prices, modelsDevProviderOf(provider));
|
|
7472
|
+
if (direct !== null) return lookup(direct, model);
|
|
7473
|
+
let found = null;
|
|
7474
|
+
for (const models of Object.values(prices)) {
|
|
7475
|
+
const rate = lookup(models, model);
|
|
7476
|
+
if (rate === null) continue;
|
|
7477
|
+
if (found !== null) return null;
|
|
7478
|
+
found = rate;
|
|
7190
7479
|
}
|
|
7191
|
-
|
|
7480
|
+
return found;
|
|
7481
|
+
}
|
|
7192
7482
|
/**
|
|
7193
7483
|
* Price the session's cumulative billed-token totals. Cache reads bill at
|
|
7194
|
-
* the hit rate
|
|
7195
|
-
* output (reasoning included)
|
|
7196
|
-
*
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7484
|
+
* the hit rate, uncached input at the miss rate, cache writes at the write
|
|
7485
|
+
* rate, output (reasoning included) at the out rate; `off` buckets (the
|
|
7486
|
+
* Host splits DeepSeek's period-based list at fold time) price at half.
|
|
7487
|
+
* Null when nothing was priced (no usage folded, no book yet, or no model
|
|
7488
|
+
* the book prices), so the cell can show a dash.
|
|
7489
|
+
*/
|
|
7490
|
+
function estimateSessionCost(usage, prices, currency) {
|
|
7491
|
+
if (usage === null || usage === void 0 || prices === null || prices === void 0) return null;
|
|
7200
7492
|
let total = 0;
|
|
7201
7493
|
let any = false;
|
|
7202
|
-
for (const
|
|
7203
|
-
const
|
|
7204
|
-
if (
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
const
|
|
7209
|
-
|
|
7210
|
-
|
|
7494
|
+
for (const provider of Object.keys(usage)) {
|
|
7495
|
+
const models = asRecord(usage[provider]);
|
|
7496
|
+
if (models === null) continue;
|
|
7497
|
+
const offPeak = isDeepSeekProvider(provider);
|
|
7498
|
+
for (const model of Object.keys(models)) {
|
|
7499
|
+
const rate = priceOf(prices, provider, model);
|
|
7500
|
+
const periods = asRecord(models[model]);
|
|
7501
|
+
if (rate === null || periods === null) continue;
|
|
7502
|
+
for (const period of ["peak", "off"]) {
|
|
7503
|
+
const bucket = asRecord(periods[period]);
|
|
7504
|
+
if (bucket === null) continue;
|
|
7505
|
+
const price = (numOf(bucket.cacheRead) * rate.hit + numOf(bucket.uncached) * rate.miss + numOf(bucket.cacheWrite) * rate.write + numOf(bucket.output) * rate.out) / 1e6;
|
|
7506
|
+
total += offPeak && period === "off" ? price * OFF_PEAK_FACTOR : price;
|
|
7507
|
+
any = true;
|
|
7508
|
+
}
|
|
7211
7509
|
}
|
|
7212
7510
|
}
|
|
7213
|
-
return any ? total : null;
|
|
7511
|
+
return any ? toCurrency(total, currency) : null;
|
|
7214
7512
|
}
|
|
7215
7513
|
function formatCost(amount, currency) {
|
|
7216
7514
|
return (currency === "cny" ? "¥" : "$") + (amount >= 1 ? amount.toFixed(2) : amount.toPrecision(2));
|
|
7217
7515
|
}
|
|
7218
|
-
/**
|
|
7219
|
-
* All priced model families for one currency, in display order, with their
|
|
7220
|
-
* peak/off-peak rate triples — the raw material of the stats-board tooltip's
|
|
7221
|
-
* price list. The numbers stay hardcoded in PRICES above; this function only
|
|
7222
|
-
* reshapes the table for display, so what the tooltip prints can never drift
|
|
7223
|
-
* from the math that prices the session.
|
|
7224
|
-
*/
|
|
7225
|
-
function sessionPrices(currency) {
|
|
7226
|
-
return ["flash", "pro"].map((id) => ({
|
|
7227
|
-
family: id === "flash" ? "deepseek-v4.1-flash / deepseek-flash" : "deepseek-v4-pro",
|
|
7228
|
-
peak: PRICES[currency][id].peak,
|
|
7229
|
-
off: PRICES[currency][id].off
|
|
7230
|
-
}));
|
|
7231
|
-
}
|
|
7232
7516
|
/** Price-list figure: the same money format as formatCost, trailing zeros trimmed (¥3.00 → ¥3, $0.0070 → $0.007). */
|
|
7233
7517
|
function formatPriceRate(amount, currency) {
|
|
7234
7518
|
return formatCost(amount, currency).replace(/0+$/, "").replace(/\.$/, "");
|
|
7235
7519
|
}
|
|
7236
7520
|
//#endregion
|
|
7521
|
+
//#region node_modules/.pnpm/@opencode-ai+models@0.0.72/node_modules/@opencode-ai/models/dist/error.js
|
|
7522
|
+
/**
|
|
7523
|
+
* The only error thrown by the models.dev client.
|
|
7524
|
+
*
|
|
7525
|
+
* - `Transport` — the fetch itself failed (network, DNS, abort). `cause` is the underlying error.
|
|
7526
|
+
* - `UnexpectedStatus` — non-2xx response. `cause` is `{ status: number }`.
|
|
7527
|
+
* - `MalformedResponse` — the body was empty or not valid JSON. `cause` is the parse error, if any.
|
|
7528
|
+
*/
|
|
7529
|
+
var ModelsDevError = class extends Error {
|
|
7530
|
+
reason;
|
|
7531
|
+
name = "ModelsDevError";
|
|
7532
|
+
constructor(reason, options) {
|
|
7533
|
+
super(reason, options);
|
|
7534
|
+
this.reason = reason;
|
|
7535
|
+
}
|
|
7536
|
+
};
|
|
7537
|
+
//#endregion
|
|
7538
|
+
//#region node_modules/.pnpm/@opencode-ai+models@0.0.72/node_modules/@opencode-ai/models/dist/client.js
|
|
7539
|
+
/**
|
|
7540
|
+
* Creates a stateless models.dev client. Every method performs exactly one
|
|
7541
|
+
* `GET` and nothing is ever cached — callers who want caching should wrap
|
|
7542
|
+
* calls with their own policy. For a no-network alternative, see the
|
|
7543
|
+
* `@opencode-ai/models/snapshot` entrypoint.
|
|
7544
|
+
*/
|
|
7545
|
+
function make(options = {}) {
|
|
7546
|
+
const baseUrl = options.baseUrl ?? "https://models.dev";
|
|
7547
|
+
const base = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
|
|
7548
|
+
const request = async (path, requestOptions) => {
|
|
7549
|
+
const fetch = options.fetch ?? globalThis.fetch;
|
|
7550
|
+
const headers = new Headers();
|
|
7551
|
+
for (const [key, value] of new Headers(options.headers)) headers.set(key, value);
|
|
7552
|
+
for (const [key, value] of new Headers(requestOptions?.headers)) headers.set(key, value);
|
|
7553
|
+
let response;
|
|
7554
|
+
try {
|
|
7555
|
+
response = await fetch(new URL(path, base), {
|
|
7556
|
+
method: "GET",
|
|
7557
|
+
headers,
|
|
7558
|
+
signal: requestOptions?.signal
|
|
7559
|
+
});
|
|
7560
|
+
} catch (cause) {
|
|
7561
|
+
throw new ModelsDevError("Transport", { cause });
|
|
7562
|
+
}
|
|
7563
|
+
if (!response.ok) {
|
|
7564
|
+
try {
|
|
7565
|
+
await response.body?.cancel();
|
|
7566
|
+
} catch {}
|
|
7567
|
+
throw new ModelsDevError("UnexpectedStatus", { cause: { status: response.status } });
|
|
7568
|
+
}
|
|
7569
|
+
let text;
|
|
7570
|
+
try {
|
|
7571
|
+
text = await response.text();
|
|
7572
|
+
} catch (cause) {
|
|
7573
|
+
throw new ModelsDevError("Transport", { cause });
|
|
7574
|
+
}
|
|
7575
|
+
if (text === "") throw new ModelsDevError("MalformedResponse");
|
|
7576
|
+
try {
|
|
7577
|
+
return JSON.parse(text);
|
|
7578
|
+
} catch (cause) {
|
|
7579
|
+
throw new ModelsDevError("MalformedResponse", { cause });
|
|
7580
|
+
}
|
|
7581
|
+
};
|
|
7582
|
+
return {
|
|
7583
|
+
/** All providers with their models, pricing, and limits (`/api.json`). */
|
|
7584
|
+
providers: (requestOptions) => request("api.json", requestOptions),
|
|
7585
|
+
/** Provider-agnostic model metadata (`/models.json`). */
|
|
7586
|
+
models: (requestOptions) => request("models.json", requestOptions),
|
|
7587
|
+
/** Providers and model metadata in a single request (`/catalog.json`). */
|
|
7588
|
+
catalog: (requestOptions) => request("catalog.json", requestOptions)
|
|
7589
|
+
};
|
|
7590
|
+
}
|
|
7591
|
+
//#endregion
|
|
7592
|
+
//#region src/client/modelPrices.ts
|
|
7593
|
+
/**
|
|
7594
|
+
* The client's model-price book (client/cost.ts prices from it): the
|
|
7595
|
+
* models.dev registry, fetched through the official @opencode-ai/models
|
|
7596
|
+
* SDK. The registry payload is untrusted wire input, so `pricesBookOf`
|
|
7597
|
+
* re-proves every field at the boundary — a non-conforming provider/model/
|
|
7598
|
+
* cost entry drops whole. The book keeps EVERY provider that prices (keyed
|
|
7599
|
+
* by the registry's own provider id), so a dsh provider id outside the
|
|
7600
|
+
* rename table still prices by direct passthrough. One fetch per page load,
|
|
7601
|
+
* kicked on first subscribe; a failure degrades to a visible state the cost
|
|
7602
|
+
* cell notes, with a backed-off automatic retry — never a spinner, and
|
|
7603
|
+
* never an unhandled rejection.
|
|
7604
|
+
*/
|
|
7605
|
+
/** One finite non-negative registry figure, or null. */
|
|
7606
|
+
function rateOf(value) {
|
|
7607
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : null;
|
|
7608
|
+
}
|
|
7609
|
+
/**
|
|
7610
|
+
* Extract the whole registry's per-model USD rates from a delivered
|
|
7611
|
+
* providers payload (`/api.json`), keyed by the registry's provider ids.
|
|
7612
|
+
* Any shape failure skips just that entry; a payload that is not a record
|
|
7613
|
+
* at all returns null (the store treats it as a failed fetch and retries).
|
|
7614
|
+
*/
|
|
7615
|
+
function pricesBookOf(value) {
|
|
7616
|
+
const data = asRecord(value);
|
|
7617
|
+
if (data === null || Array.isArray(data)) return null;
|
|
7618
|
+
const book = {};
|
|
7619
|
+
for (const providerId of Object.keys(data)) {
|
|
7620
|
+
const provider = asRecord(data[providerId]);
|
|
7621
|
+
const modelList = provider !== null ? asRecord(provider.models) : null;
|
|
7622
|
+
if (modelList === null) continue;
|
|
7623
|
+
const models = {};
|
|
7624
|
+
for (const id of Object.keys(modelList)) {
|
|
7625
|
+
const model = asRecord(modelList[id]);
|
|
7626
|
+
const cost = model !== null ? asRecord(model.cost) : null;
|
|
7627
|
+
if (cost === null) continue;
|
|
7628
|
+
const miss = rateOf(cost.input);
|
|
7629
|
+
const out = rateOf(cost.output);
|
|
7630
|
+
if (miss === null || out === null) continue;
|
|
7631
|
+
models[id] = {
|
|
7632
|
+
hit: rateOf(cost.cache_read) ?? miss,
|
|
7633
|
+
miss,
|
|
7634
|
+
write: rateOf(cost.cache_write) ?? miss,
|
|
7635
|
+
out
|
|
7636
|
+
};
|
|
7637
|
+
}
|
|
7638
|
+
if (Object.keys(models).length > 0) book[providerId] = models;
|
|
7639
|
+
}
|
|
7640
|
+
return book;
|
|
7641
|
+
}
|
|
7642
|
+
const defaultLoader = () => make().providers();
|
|
7643
|
+
/** The retry backoff base; each consecutive failure doubles the wait, capped at 3 doublings. */
|
|
7644
|
+
const RETRY_BASE_MS = 3e4;
|
|
7645
|
+
let loader = defaultLoader;
|
|
7646
|
+
let snap = {
|
|
7647
|
+
prices: null,
|
|
7648
|
+
failed: false
|
|
7649
|
+
};
|
|
7650
|
+
let inFlight = false;
|
|
7651
|
+
let failures = 0;
|
|
7652
|
+
let timer = null;
|
|
7653
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
7654
|
+
function fail() {
|
|
7655
|
+
snap = {
|
|
7656
|
+
...snap,
|
|
7657
|
+
failed: true
|
|
7658
|
+
};
|
|
7659
|
+
failures++;
|
|
7660
|
+
timer = setTimeout(() => {
|
|
7661
|
+
timer = null;
|
|
7662
|
+
fire();
|
|
7663
|
+
}, RETRY_BASE_MS * 2 ** Math.min(failures - 1, 3));
|
|
7664
|
+
}
|
|
7665
|
+
async function fire() {
|
|
7666
|
+
inFlight = true;
|
|
7667
|
+
try {
|
|
7668
|
+
const book = pricesBookOf(await loader());
|
|
7669
|
+
if (book !== null) {
|
|
7670
|
+
snap = {
|
|
7671
|
+
prices: book,
|
|
7672
|
+
failed: false
|
|
7673
|
+
};
|
|
7674
|
+
failures = 0;
|
|
7675
|
+
} else fail();
|
|
7676
|
+
} catch {
|
|
7677
|
+
fail();
|
|
7678
|
+
}
|
|
7679
|
+
inFlight = false;
|
|
7680
|
+
for (const fn of listeners) fn();
|
|
7681
|
+
}
|
|
7682
|
+
function kick() {
|
|
7683
|
+
if (snap.prices !== null || inFlight || timer !== null) return;
|
|
7684
|
+
fire();
|
|
7685
|
+
}
|
|
7686
|
+
/** The useSyncExternalStore seam: subscribing also kicks the first fetch. */
|
|
7687
|
+
const subscribeModelPrices = (fn) => {
|
|
7688
|
+
listeners.add(fn);
|
|
7689
|
+
kick();
|
|
7690
|
+
return () => {
|
|
7691
|
+
listeners.delete(fn);
|
|
7692
|
+
};
|
|
7693
|
+
};
|
|
7694
|
+
const getModelPricesSnap = () => snap;
|
|
7695
|
+
/** The stats board's read of the price book (null until the fetch lands). */
|
|
7696
|
+
function useModelPrices() {
|
|
7697
|
+
return (0, react.useSyncExternalStore)(subscribeModelPrices, getModelPricesSnap);
|
|
7698
|
+
}
|
|
7699
|
+
//#endregion
|
|
7237
7700
|
//#region src/client/components/statsContext.tsx
|
|
7238
7701
|
/**
|
|
7239
|
-
* The Context card: what the session's context IS and how it evolved —
|
|
7240
|
-
*
|
|
7241
|
-
* calls
|
|
7242
|
-
*
|
|
7243
|
-
* here is part of a spendable whole, so no pie —
|
|
7244
|
-
*
|
|
7245
|
-
*
|
|
7246
|
-
*
|
|
7247
|
-
*
|
|
7248
|
-
*
|
|
7249
|
-
*
|
|
7702
|
+
* The Context card: what the session's context IS and how it evolved — a
|
|
7703
|
+
* six-cell grid of the session's shape (turns / steps / human inputs / live
|
|
7704
|
+
* tool calls), the whole-session cache-hit rate, and the whole-session cost
|
|
7705
|
+
* estimate.
|
|
7706
|
+
* Count figures only: nothing here is part of a spendable whole, so no pie —
|
|
7707
|
+
* proportions live in the composition card, and the context-event tallies
|
|
7708
|
+
* live on the events card's kind filters (contextView.tsx). The cache-hit
|
|
7709
|
+
* cell reads the official `tokenUsage` projection — the same source and
|
|
7710
|
+
* formula as the harness chat stats line under the composer, shown with one
|
|
7711
|
+
* decimal — and dashes until a provider reports usage. The cost cell prices
|
|
7712
|
+
* the host-folded cumulative billed totals (complete session log, never
|
|
7713
|
+
* trimmed) from the models.dev price book (modelPrices.ts) in the locale's
|
|
7714
|
+
* currency; its hover bubble (a '?' marker + styled DOM tip) explains the
|
|
7715
|
+
* whole-session estimate and lists the per-1M-token rates of the models this
|
|
7716
|
+
* session actually billed, straight from the same book (cost.ts), so printed
|
|
7717
|
+
* rates can never drift from the math. A book that has not loaded (or
|
|
7718
|
+
* failed) dashes the cell and notes the outage.
|
|
7250
7719
|
*
|
|
7251
7720
|
* The counts arrive precomputed: the split-generation wire head carries them
|
|
7252
7721
|
* (shared/types.ts `TimelineCounts` — computed over the retained records),
|
|
@@ -7254,6 +7723,36 @@ window.__ModuleLoader__.load({
|
|
|
7254
7723
|
* (`countsOfRecords`). The card itself never touches the collections.
|
|
7255
7724
|
*/
|
|
7256
7725
|
/**
|
|
7726
|
+
* The rate rows for the models this session actually billed — the usage
|
|
7727
|
+
* keys priced against the book, in fold order. Hostile branches skip;
|
|
7728
|
+
* unpriced models drop (their buckets simply do not contribute). The label
|
|
7729
|
+
* carries the provider only when the session billed more than one; a model
|
|
7730
|
+
* with an off-peak bucket (DeepSeek's period-based list) shows the
|
|
7731
|
+
* peak | off-peak pair.
|
|
7732
|
+
*/
|
|
7733
|
+
function priceRowsOf(usage, prices) {
|
|
7734
|
+
if (usage === void 0 || prices === null) return [];
|
|
7735
|
+
const rows = [];
|
|
7736
|
+
const multi = Object.keys(usage).length > 1;
|
|
7737
|
+
for (const provider of Object.keys(usage)) {
|
|
7738
|
+
const models = asRecord(usage[provider]);
|
|
7739
|
+
if (models === null) continue;
|
|
7740
|
+
for (const model of Object.keys(models)) {
|
|
7741
|
+
const rate = priceOf(prices, provider, model);
|
|
7742
|
+
if (rate === null) continue;
|
|
7743
|
+
const periods = asRecord(models[model]);
|
|
7744
|
+
const off = isDeepSeekProvider(provider) && periods !== null && periods.off !== void 0 ? offPeakOf(rate) : void 0;
|
|
7745
|
+
rows.push({
|
|
7746
|
+
key: provider + "/" + model,
|
|
7747
|
+
label: multi && provider !== "" ? `${model} · ${provider}` : model,
|
|
7748
|
+
rate,
|
|
7749
|
+
...off !== void 0 ? { offRate: off } : {}
|
|
7750
|
+
});
|
|
7751
|
+
}
|
|
7752
|
+
}
|
|
7753
|
+
return rows;
|
|
7754
|
+
}
|
|
7755
|
+
/**
|
|
7257
7756
|
* The inline generation's counter derivation — the exact tally the card ran
|
|
7258
7757
|
* over the served collections before the split (distinct turn values, record
|
|
7259
7758
|
* count, per-kind event tallies). The host's split-generation counts match
|
|
@@ -7280,48 +7779,67 @@ window.__ModuleLoader__.load({
|
|
|
7280
7779
|
const { t, fmt } = kit;
|
|
7281
7780
|
return function StatsContext(props) {
|
|
7282
7781
|
const currency = props.locale === "zh" ? "cny" : "usd";
|
|
7283
|
-
const
|
|
7284
|
-
const
|
|
7285
|
-
const
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7782
|
+
const { prices, failed } = useModelPrices();
|
|
7783
|
+
const cost = estimateSessionCost(props.cost, prices, currency);
|
|
7784
|
+
const fmtRate = (usd) => formatPriceRate(toCurrency(usd, currency), currency);
|
|
7785
|
+
const rows = priceRowsOf(props.cost, prices);
|
|
7786
|
+
const deepseek = props.cost !== void 0 && Object.keys(props.cost).some((p) => isDeepSeekProvider(p));
|
|
7787
|
+
const anyPair = rows.some((r) => r.offRate !== void 0);
|
|
7788
|
+
const unpriced = rows.length === 0 && props.cost !== void 0 && Object.keys(props.cost).length > 0 && (failed || prices !== null);
|
|
7789
|
+
const costTip = [
|
|
7790
|
+
t("stats.costTip") + (deepseek ? " " + t("stats.costTipDeepseek") : ""),
|
|
7791
|
+
rows.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7792
|
+
className: "lc-stat-tip-prices",
|
|
7793
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7794
|
+
className: "lc-stat-tip-head",
|
|
7795
|
+
children: anyPair ? t("stats.costPriceHeadPair") : t("stats.costPriceHead")
|
|
7796
|
+
}), rows.map((r) => {
|
|
7797
|
+
const cells = [
|
|
7798
|
+
[
|
|
7799
|
+
t("stats.costHit"),
|
|
7800
|
+
r.rate.hit,
|
|
7801
|
+
r.offRate?.hit
|
|
7802
|
+
],
|
|
7803
|
+
[
|
|
7804
|
+
t("stats.costMiss"),
|
|
7805
|
+
r.rate.miss,
|
|
7806
|
+
r.offRate?.miss
|
|
7807
|
+
],
|
|
7808
|
+
[
|
|
7809
|
+
t("stats.costWrite"),
|
|
7810
|
+
r.rate.write,
|
|
7811
|
+
r.offRate?.write
|
|
7812
|
+
],
|
|
7813
|
+
[
|
|
7814
|
+
t("stats.costOut"),
|
|
7815
|
+
r.rate.out,
|
|
7816
|
+
r.offRate?.out
|
|
7817
|
+
]
|
|
7818
|
+
];
|
|
7819
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7820
|
+
className: "lc-stat-tip-row",
|
|
7821
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", {
|
|
7822
|
+
className: "lc-stat-tip-model",
|
|
7823
|
+
children: r.label
|
|
7824
|
+
}), cells.map(([name, peak, off]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
7825
|
+
" · ",
|
|
7826
|
+
name,
|
|
7827
|
+
" ",
|
|
7828
|
+
off === void 0 ? fmtRate(peak) : `${fmtRate(peak)}|${fmtRate(off)}`
|
|
7829
|
+
] }, name))]
|
|
7830
|
+
}, r.key);
|
|
7831
|
+
})]
|
|
7832
|
+
}, "prices") : null,
|
|
7833
|
+
unpriced ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("stats.costUnavailable") }, "unavailable") : null
|
|
7834
|
+
];
|
|
7835
|
+
const hit = props.usage === null ? null : cacheHitPercent(numOf(props.usage.cacheReadTokens), numOf(props.usage.uncachedInputTokens) + numOf(props.usage.cacheReadTokens) + numOf(props.usage.cacheWriteTokens), 1);
|
|
7318
7836
|
const cell = (label, value, tip) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7319
|
-
className: "lc-stat" + (tip === void 0 ? "" : " lc-stat-tipped"),
|
|
7837
|
+
className: "lc-stat" + (tip === void 0 ? "" : " lc-stat-tipped group/tip"),
|
|
7320
7838
|
children: [
|
|
7321
7839
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7322
7840
|
className: "lc-stat-label",
|
|
7323
7841
|
children: [label, tip !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {
|
|
7324
|
-
className: "lc-stat-q",
|
|
7842
|
+
className: "lc-stat-q group-hover/tip:text-(--dsw-alias-label-primary) group-hover/tip:border-(--dsw-alias-label-primary)",
|
|
7325
7843
|
"aria-hidden": "true",
|
|
7326
7844
|
children: "?"
|
|
7327
7845
|
})]
|
|
@@ -7331,14 +7849,14 @@ window.__ModuleLoader__.load({
|
|
|
7331
7849
|
children: typeof value === "number" ? fmt(value) : value
|
|
7332
7850
|
}),
|
|
7333
7851
|
tip !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7334
|
-
className: "lc-tip lc-stat-tip",
|
|
7852
|
+
className: "lc-tip lc-stat-tip group-hover/tip:opacity-100",
|
|
7335
7853
|
role: "tooltip",
|
|
7336
7854
|
children: tip
|
|
7337
7855
|
})
|
|
7338
7856
|
]
|
|
7339
7857
|
});
|
|
7340
7858
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7341
|
-
className: "lc-card lc-col-stats",
|
|
7859
|
+
className: "lc-card lc-col-stats flex-1 min-w-[min(360px,100%)]",
|
|
7342
7860
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7343
7861
|
className: "lc-card-title",
|
|
7344
7862
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -7346,16 +7864,14 @@ window.__ModuleLoader__.load({
|
|
|
7346
7864
|
children: t("stats.title")
|
|
7347
7865
|
})
|
|
7348
7866
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7349
|
-
className: "lc-stats",
|
|
7867
|
+
className: "lc-stats grid grid-cols-[repeat(auto-fit,minmax(108px,1fr))] gap-1.5",
|
|
7350
7868
|
children: [
|
|
7351
7869
|
cell(t("stats.turns"), props.counts.turns),
|
|
7352
7870
|
cell(t("stats.steps"), props.counts.steps),
|
|
7871
|
+
cell(t("stats.humanInputs"), props.humanInputs ?? 0, t("stats.humanInputsTip")),
|
|
7353
7872
|
cell(t("stats.toolCalls"), props.toolCalls ?? 0),
|
|
7354
|
-
cell(t("stats.
|
|
7355
|
-
cell(t("stats.cost"), cost === null ? "—" : formatCost(cost, currency), costTip)
|
|
7356
|
-
cell(t("stats.injects"), props.counts.injects),
|
|
7357
|
-
cell(t("stats.compactions"), props.counts.compactions),
|
|
7358
|
-
cell(t("stats.prunes"), props.counts.prunes)
|
|
7873
|
+
cell(t("stats.cacheHit"), hit === null ? "—" : `${hit}%`),
|
|
7874
|
+
cell(t("stats.cost"), cost === null ? "—" : formatCost(cost, currency), costTip)
|
|
7359
7875
|
]
|
|
7360
7876
|
})]
|
|
7361
7877
|
});
|
|
@@ -7376,7 +7892,7 @@ window.__ModuleLoader__.load({
|
|
|
7376
7892
|
function makeSliceList(kit) {
|
|
7377
7893
|
return function SliceList(props) {
|
|
7378
7894
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7379
|
-
className: "lc-sl",
|
|
7895
|
+
className: "lc-sl flex-auto @max-[240px]/lc-card:basis-full",
|
|
7380
7896
|
onMouseLeave: () => {
|
|
7381
7897
|
if (props.onHoverKey !== void 0) props.onHoverKey(null);
|
|
7382
7898
|
},
|
|
@@ -7433,12 +7949,12 @@ window.__ModuleLoader__.load({
|
|
|
7433
7949
|
* row numbers stay true.
|
|
7434
7950
|
*/
|
|
7435
7951
|
const COLOR = {
|
|
7436
|
-
ttft: "
|
|
7437
|
-
reasoning: "
|
|
7438
|
-
text: "
|
|
7439
|
-
toolarg: "
|
|
7440
|
-
tools: "
|
|
7441
|
-
other: "
|
|
7952
|
+
ttft: "var(--color-blue-500)",
|
|
7953
|
+
reasoning: "var(--color-violet-500)",
|
|
7954
|
+
text: "var(--color-pink-500)",
|
|
7955
|
+
toolarg: "var(--color-amber-500)",
|
|
7956
|
+
tools: "var(--color-teal-500)",
|
|
7957
|
+
other: "var(--color-slate-400)"
|
|
7442
7958
|
};
|
|
7443
7959
|
function makeStatsTiming(kit, Donut) {
|
|
7444
7960
|
const { t, fmt, fmtDuration, fmtShare } = kit;
|
|
@@ -7554,7 +8070,7 @@ window.__ModuleLoader__.load({
|
|
|
7554
8070
|
].filter((row) => !row.dim);
|
|
7555
8071
|
}
|
|
7556
8072
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7557
|
-
className: "lc-card lc-col-stats lc-col-donut",
|
|
8073
|
+
className: "lc-card lc-col-stats lc-col-donut flex-1 min-w-[min(360px,100%)]",
|
|
7558
8074
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7559
8075
|
className: "lc-card-title",
|
|
7560
8076
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -7565,7 +8081,7 @@ window.__ModuleLoader__.load({
|
|
|
7565
8081
|
className: "lc-empty",
|
|
7566
8082
|
children: t("timing.empty")
|
|
7567
8083
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7568
|
-
className: "lc-donut-row",
|
|
8084
|
+
className: "lc-donut-row flex items-center justify-start gap-3 min-w-0 @max-[320px]/lc-card:gap-2 @max-[240px]/lc-card:flex-wrap",
|
|
7569
8085
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Donut, {
|
|
7570
8086
|
segments,
|
|
7571
8087
|
size: 96,
|
|
@@ -7585,62 +8101,42 @@ window.__ModuleLoader__.load({
|
|
|
7585
8101
|
//#endregion
|
|
7586
8102
|
//#region src/client/components/statsTokens.tsx
|
|
7587
8103
|
/**
|
|
7588
|
-
* The Token card: the
|
|
7589
|
-
*
|
|
7590
|
-
*
|
|
7591
|
-
*
|
|
7592
|
-
*
|
|
7593
|
-
*
|
|
7594
|
-
* the
|
|
7595
|
-
|
|
8104
|
+
* The Token card: the session's whole billed token usage — the SAME total
|
|
8105
|
+
* the harness chat stats line shows under the composer (uncached input +
|
|
8106
|
+
* cache read + cache write + output off the official `tokenUsage`
|
|
8107
|
+
* projection) — split by WHAT the tokens are, not by how the provider
|
|
8108
|
+
* cached them. The six composition categories share the provider-reported
|
|
8109
|
+
* prompt-side total by the composition card's own estimated ratios
|
|
8110
|
+
* (billedParts), and the provider's exact output count is its own slice, so
|
|
8111
|
+
* the ring and the center figure always equal the chat line's figure by
|
|
8112
|
+
* construction. The estimated category counts carry the ≈ marker (the
|
|
8113
|
+
* composition card's convention); the center total and the output count are
|
|
8114
|
+
* exact. Zero parts stay hidden once any usage is reported; the empty state
|
|
8115
|
+
* (no provider report yet) keeps all seven rows behind a dash center.
|
|
8116
|
+
*/
|
|
8117
|
+
const NO_USAGE = {
|
|
8118
|
+
uncachedInputTokens: 0,
|
|
8119
|
+
outputTokens: 0,
|
|
8120
|
+
cacheReadTokens: 0,
|
|
8121
|
+
cacheWriteTokens: 0
|
|
8122
|
+
};
|
|
7596
8123
|
function makeStatsTokens(kit, Donut) {
|
|
7597
|
-
const { t, fmt, fmtShare } = kit;
|
|
8124
|
+
const { t, fmt, fmtShare, catLabel } = kit;
|
|
7598
8125
|
const SliceList = makeSliceList(kit);
|
|
7599
8126
|
return function StatsTokens(props) {
|
|
7600
8127
|
const [hoverKey, setHoverKey] = (0, react.useState)(null);
|
|
7601
|
-
const
|
|
7602
|
-
const
|
|
7603
|
-
const
|
|
7604
|
-
const
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
color: "#22c55e",
|
|
7611
|
-
label: t("tokens.cacheRead"),
|
|
7612
|
-
value: reads
|
|
7613
|
-
},
|
|
7614
|
-
{
|
|
7615
|
-
key: "write",
|
|
7616
|
-
color: "#f59e0b",
|
|
7617
|
-
label: t("tokens.cacheWrite"),
|
|
7618
|
-
value: writes
|
|
7619
|
-
},
|
|
7620
|
-
{
|
|
7621
|
-
key: "uncached",
|
|
7622
|
-
color: "#a855f7",
|
|
7623
|
-
label: t("tokens.uncached"),
|
|
7624
|
-
value: uncached
|
|
7625
|
-
},
|
|
7626
|
-
{
|
|
7627
|
-
key: "output",
|
|
7628
|
-
color: "#3b82f6",
|
|
7629
|
-
label: t("tokens.output"),
|
|
7630
|
-
note: t("tokens.outputNote"),
|
|
7631
|
-
value: output
|
|
7632
|
-
}
|
|
7633
|
-
];
|
|
7634
|
-
const shown = billed > 0 ? buckets.filter((b) => b.value > 0) : buckets;
|
|
7635
|
-
const rows = shown.map((b) => ({
|
|
7636
|
-
key: b.key,
|
|
7637
|
-
color: b.color,
|
|
7638
|
-
label: b.label,
|
|
7639
|
-
pct: fmtShare(b.value, billed),
|
|
7640
|
-
count: b.note === void 0 ? fmt(b.value) : `${fmt(b.value)} · ${b.note}`
|
|
8128
|
+
const total = (props.usage !== null ? numOf(props.usage.uncachedInputTokens) + numOf(props.usage.cacheReadTokens) + numOf(props.usage.cacheWriteTokens) : 0) + (props.usage !== null ? numOf(props.usage.outputTokens) : 0);
|
|
8129
|
+
const parts = billedParts(props.current, props.breakdown, props.usage ?? NO_USAGE);
|
|
8130
|
+
const shown = total > 0 ? parts.filter((p) => p.value > 0) : parts;
|
|
8131
|
+
const rows = shown.map((p) => ({
|
|
8132
|
+
key: p.key,
|
|
8133
|
+
color: p.color,
|
|
8134
|
+
label: p.key === "output" ? t("tokens.output") : catLabel(p.key),
|
|
8135
|
+
pct: fmtShare(p.value, total),
|
|
8136
|
+
count: p.key === "output" ? `${fmt(p.value)} · ${t("tokens.outputNote")}` : "≈" + fmt(p.value)
|
|
7641
8137
|
}));
|
|
7642
8138
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7643
|
-
className: "lc-card lc-col-stats lc-col-donut",
|
|
8139
|
+
className: "lc-card lc-col-stats lc-col-donut flex-1 min-w-[min(360px,100%)]",
|
|
7644
8140
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7645
8141
|
className: "lc-card-title",
|
|
7646
8142
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -7648,16 +8144,12 @@ window.__ModuleLoader__.load({
|
|
|
7648
8144
|
children: t("tokens.title")
|
|
7649
8145
|
})
|
|
7650
8146
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7651
|
-
className: "lc-donut-row",
|
|
8147
|
+
className: "lc-donut-row flex items-center justify-start gap-3 min-w-0 @max-[320px]/lc-card:gap-2 @max-[240px]/lc-card:flex-wrap",
|
|
7652
8148
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Donut, {
|
|
7653
|
-
segments: shown
|
|
7654
|
-
key: b.key,
|
|
7655
|
-
color: b.color,
|
|
7656
|
-
value: b.value
|
|
7657
|
-
})),
|
|
8149
|
+
segments: shown,
|
|
7658
8150
|
size: 96,
|
|
7659
|
-
centerTop:
|
|
7660
|
-
centerSub: t("tokens.
|
|
8151
|
+
centerTop: props.usage === null ? "—" : fmt(total),
|
|
8152
|
+
centerSub: t("tokens.total"),
|
|
7661
8153
|
hoverKey,
|
|
7662
8154
|
onHoverKey: setHoverKey
|
|
7663
8155
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SliceList, {
|
|
@@ -7673,7 +8165,8 @@ window.__ModuleLoader__.load({
|
|
|
7673
8165
|
//#region src/client/components/trendChart.tsx
|
|
7674
8166
|
/**
|
|
7675
8167
|
* Bespoke per-request history chart — no shared data-viz primitive — styled through the shared `--dsw-alias-*` tokens; helpers
|
|
7676
|
-
* aggregateByTurn/attachMarkers are shared with ContextView.
|
|
8168
|
+
* aggregateByTurn/attachMarkers are shared with ContextView. On mount each bar rises from its baseline,
|
|
8169
|
+
* staggered left to right with the cascade capped for long logs (trendChart.css, `--lc-i` slots below).
|
|
7677
8170
|
*/
|
|
7678
8171
|
/**
|
|
7679
8172
|
* Collapse per-step requests into one bar per turn — each turn is represented by its LAST step's record, tagged `stepCount` for the bar's
|
|
@@ -7730,7 +8223,8 @@ window.__ModuleLoader__.load({
|
|
|
7730
8223
|
const fmtSigned = (v) => (v > 0 ? "+" : "") + fmt(v);
|
|
7731
8224
|
const BAR_W = 14;
|
|
7732
8225
|
const BAR_GAP = 2;
|
|
7733
|
-
const
|
|
8226
|
+
const STAGGER_CAP = 20;
|
|
8227
|
+
const TURN_FILLS = ["color-mix(in srgb, var(--color-neutral-500) 12%, transparent)", "color-mix(in srgb, var(--color-neutral-500) 26%, transparent)"];
|
|
7734
8228
|
const LABEL_OVERHANG = 48;
|
|
7735
8229
|
const LABEL_GAP = 2;
|
|
7736
8230
|
const LABEL_FONT = 10;
|
|
@@ -7775,8 +8269,9 @@ window.__ModuleLoader__.load({
|
|
|
7775
8269
|
const { req, marker } = props;
|
|
7776
8270
|
const markerAt = marker !== void 0 ? eventAt(marker) : null;
|
|
7777
8271
|
const diverge = props.upPx !== void 0 && props.downPx !== void 0 && props.deltaScale !== void 0;
|
|
8272
|
+
const enterStyle = { "--lc-i": Math.min(props.enterIndex, STAGGER_CAP) };
|
|
7778
8273
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7779
|
-
className: "lc-bar" + (props.selected ? " lc-bar-selected" : "") + (props.hovered ? " lc-bar-hovered" : "") + (props.inTurn ? " lc-bar-in-turn" : ""),
|
|
8274
|
+
className: "lc-bar hover:bg-(--dsw-alias-bg-layer-2)" + (props.selected ? " lc-bar-selected" : "") + (props.hovered ? " lc-bar-hovered" : "") + (props.inTurn ? " lc-bar-in-turn" : ""),
|
|
7780
8275
|
"data-seq": req.seq,
|
|
7781
8276
|
style: { width: `${BAR_W}px` },
|
|
7782
8277
|
onClick: () => {
|
|
@@ -7790,8 +8285,11 @@ window.__ModuleLoader__.load({
|
|
|
7790
8285
|
title: "✂ " + (markerAt !== null ? markerAt + " — " : "") + eventLabel(marker),
|
|
7791
8286
|
children: "✂"
|
|
7792
8287
|
}) : null, diverge ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7793
|
-
className: "lc-bar-up",
|
|
7794
|
-
style: {
|
|
8288
|
+
className: "lc-bar-up animate-lc-bar-in motion-reduce:animate-none",
|
|
8289
|
+
style: {
|
|
8290
|
+
bottom: `${props.downPx}px`,
|
|
8291
|
+
...enterStyle
|
|
8292
|
+
},
|
|
7795
8293
|
children: CATS.map((c) => {
|
|
7796
8294
|
const d = req[c.key] || 0;
|
|
7797
8295
|
if (d <= 0) return null;
|
|
@@ -7805,8 +8303,11 @@ window.__ModuleLoader__.load({
|
|
|
7805
8303
|
}, c.key);
|
|
7806
8304
|
})
|
|
7807
8305
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7808
|
-
className: "lc-bar-down",
|
|
7809
|
-
style: {
|
|
8306
|
+
className: "lc-bar-down animate-lc-bar-in motion-reduce:animate-none",
|
|
8307
|
+
style: {
|
|
8308
|
+
top: `${props.upPx}px`,
|
|
8309
|
+
...enterStyle
|
|
8310
|
+
},
|
|
7810
8311
|
children: CATS.map((c) => {
|
|
7811
8312
|
const d = req[c.key] || 0;
|
|
7812
8313
|
if (d >= 0) return null;
|
|
@@ -7820,7 +8321,8 @@ window.__ModuleLoader__.load({
|
|
|
7820
8321
|
}, c.key);
|
|
7821
8322
|
})
|
|
7822
8323
|
})] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7823
|
-
className: "lc-bar-stack",
|
|
8324
|
+
className: "lc-bar-stack animate-lc-bar-in motion-reduce:animate-none",
|
|
8325
|
+
style: enterStyle,
|
|
7824
8326
|
children: CATS.map((c) => {
|
|
7825
8327
|
const v = req[c.key] || 0;
|
|
7826
8328
|
if (!v) return null;
|
|
@@ -8189,9 +8691,10 @@ window.__ModuleLoader__.load({
|
|
|
8189
8691
|
upPx: delta ? upPx : void 0,
|
|
8190
8692
|
downPx: delta ? downPx : void 0,
|
|
8191
8693
|
deltaScale: delta ? deltaScale : void 0,
|
|
8694
|
+
enterIndex: i,
|
|
8192
8695
|
onSelect: props.onSelect,
|
|
8193
8696
|
onHover: props.onHover
|
|
8194
|
-
}, req.seq))
|
|
8697
|
+
}, `${req.seq}:${props.granularity}`))
|
|
8195
8698
|
]
|
|
8196
8699
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8197
8700
|
className: "lc-turns",
|
|
@@ -8297,7 +8800,7 @@ window.__ModuleLoader__.load({
|
|
|
8297
8800
|
const PluginInfo = makePluginInfo(kit);
|
|
8298
8801
|
const UpgradeGate = makeUpgradeGate(kit);
|
|
8299
8802
|
const DetailNote = makeDetailNote(kit);
|
|
8300
|
-
const ContextBrowser = makeContextBrowser(kit, StackedBar);
|
|
8803
|
+
const ContextBrowser = makeContextBrowser(kit, StackedBar, settings);
|
|
8301
8804
|
const AgentGraph = makeAgentGraph(ctx, kit);
|
|
8302
8805
|
const ErrorBoundary = makeErrorBoundary(t);
|
|
8303
8806
|
function ContextViewBody(props) {
|
|
@@ -8359,6 +8862,12 @@ window.__ModuleLoader__.load({
|
|
|
8359
8862
|
}, [sessionId]);
|
|
8360
8863
|
const requests = data ? data.requests : [];
|
|
8361
8864
|
const events = data ? data.events : [];
|
|
8865
|
+
const counts = data?.counts ?? countsOfRecords(requests, events);
|
|
8866
|
+
const kindCounts = {
|
|
8867
|
+
inject: counts.injects,
|
|
8868
|
+
compaction: counts.compactions,
|
|
8869
|
+
prune: counts.prunes
|
|
8870
|
+
};
|
|
8362
8871
|
const shownEvents = pickedKinds.length === EVENT_KINDS.length ? events : events.filter((e) => pickedKinds.includes(e.kind));
|
|
8363
8872
|
const displayRequests = (0, react.useMemo)(() => granularity === "turn" ? aggregateByTurn(requests) : requests, [requests, granularity]);
|
|
8364
8873
|
const markers = (0, react.useMemo)(() => attachMarkers(displayRequests, events), [displayRequests, events]);
|
|
@@ -8436,6 +8945,16 @@ window.__ModuleLoader__.load({
|
|
|
8436
8945
|
};
|
|
8437
8946
|
}, [ctx]);
|
|
8438
8947
|
const fileOpener = (0, react.useMemo)(() => canOpenPaths ? openPathVia(ctx) : void 0, [canOpenPaths, ctx]);
|
|
8948
|
+
const previewOpener = (0, react.useMemo)(() => openResourceVia(ctx), [ctx]);
|
|
8949
|
+
const sessionKey = typeof sessionId === "string" ? sessionId : void 0;
|
|
8950
|
+
const previewFile = (0, react.useMemo)(() => previewOpener === void 0 ? void 0 : (entry) => {
|
|
8951
|
+
const address = previewAddressOf(entry.path, entry.form, entry.pattern, sessionKey, workspace);
|
|
8952
|
+
return address !== void 0 && previewOpener(address);
|
|
8953
|
+
}, [
|
|
8954
|
+
previewOpener,
|
|
8955
|
+
sessionKey,
|
|
8956
|
+
workspace
|
|
8957
|
+
]);
|
|
8439
8958
|
const locateFileOp = (0, react.useCallback)((op) => {
|
|
8440
8959
|
const seq = op.parent ?? op.seq;
|
|
8441
8960
|
const step = locateStepOf(requests, seq, op.gone);
|
|
@@ -8627,35 +9146,39 @@ window.__ModuleLoader__.load({
|
|
|
8627
9146
|
className: "lc-root",
|
|
8628
9147
|
ref: rootRef,
|
|
8629
9148
|
children: [
|
|
9149
|
+
inSidebar ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9150
|
+
className: "lc-cols lc-head",
|
|
9151
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatsContext, {
|
|
9152
|
+
counts,
|
|
9153
|
+
humanInputs: data.humanInputs,
|
|
9154
|
+
toolCalls: data.toolCalls,
|
|
9155
|
+
usage,
|
|
9156
|
+
cost: data.cost,
|
|
9157
|
+
locale: activeLocale
|
|
9158
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PluginInfo, {})]
|
|
9159
|
+
}),
|
|
8630
9160
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8631
9161
|
className: "lc-cols lc-head",
|
|
8632
|
-
children: [
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
cost: data.cost,
|
|
8638
|
-
locale: activeLocale
|
|
8639
|
-
}),
|
|
8640
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatsTokens, { usage }),
|
|
8641
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatsTiming, { timing: data.timing ?? null }),
|
|
8642
|
-
inSidebar ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PluginInfo, {})
|
|
8643
|
-
]
|
|
9162
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatsTokens, {
|
|
9163
|
+
usage,
|
|
9164
|
+
current: data.current,
|
|
9165
|
+
breakdown
|
|
9166
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatsTiming, { timing: data.timing ?? null })]
|
|
8644
9167
|
}),
|
|
8645
9168
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8646
9169
|
className: "lc-cols lc-cols-main",
|
|
8647
9170
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8648
|
-
className: "lc-col",
|
|
9171
|
+
className: "lc-col flex-1 min-w-[min(360px,100%)]",
|
|
8649
9172
|
children: [compositionCard, trendCard]
|
|
8650
9173
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8651
|
-
className: "lc-col lc-col-browser",
|
|
9174
|
+
className: "lc-col lc-col-browser flex-1 min-w-[min(360px,100%)]",
|
|
8652
9175
|
children: browserCard
|
|
8653
9176
|
})]
|
|
8654
9177
|
}),
|
|
8655
9178
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8656
9179
|
className: "lc-cols",
|
|
8657
9180
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8658
|
-
className: "lc-card lc-col",
|
|
9181
|
+
className: "lc-card lc-col flex-1 min-w-[min(360px,100%)]",
|
|
8659
9182
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8660
9183
|
className: "lc-card-title",
|
|
8661
9184
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -8663,13 +9186,20 @@ window.__ModuleLoader__.load({
|
|
|
8663
9186
|
children: t("events.title")
|
|
8664
9187
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8665
9188
|
className: "lc-kinds",
|
|
8666
|
-
children: EVENT_KINDS.map((k) =>
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
9189
|
+
children: EVENT_KINDS.map((k) => {
|
|
9190
|
+
const n = kindCounts[k];
|
|
9191
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
9192
|
+
"data-kind": k,
|
|
9193
|
+
className: "lc-gran-btn" + (pickedKinds.includes(k) ? " lc-gran-on lc-kind-" + k : ""),
|
|
9194
|
+
onClick: () => {
|
|
9195
|
+
toggleKind(k);
|
|
9196
|
+
},
|
|
9197
|
+
children: [t("kind." + k), n !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
9198
|
+
className: "lc-kind-n",
|
|
9199
|
+
children: kit.fmt(n)
|
|
9200
|
+
}) : null]
|
|
9201
|
+
}, k);
|
|
9202
|
+
})
|
|
8673
9203
|
})]
|
|
8674
9204
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EventList, {
|
|
8675
9205
|
events: shownEvents,
|
|
@@ -8680,6 +9210,7 @@ window.__ModuleLoader__.load({
|
|
|
8680
9210
|
activity: fileActivity,
|
|
8681
9211
|
scope: fileScope,
|
|
8682
9212
|
workspace,
|
|
9213
|
+
onPreview: previewFile,
|
|
8683
9214
|
onOpen: fileOpener,
|
|
8684
9215
|
onLocate: locateFileOp,
|
|
8685
9216
|
state: source.detailState,
|
|
@@ -8741,7 +9272,7 @@ window.__ModuleLoader__.load({
|
|
|
8741
9272
|
width: "16",
|
|
8742
9273
|
height: "16",
|
|
8743
9274
|
viewBox: "0 0 16 16",
|
|
8744
|
-
|
|
9275
|
+
className: "fill-none",
|
|
8745
9276
|
"aria-hidden": "true",
|
|
8746
9277
|
children: [
|
|
8747
9278
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
@@ -8750,7 +9281,7 @@ window.__ModuleLoader__.load({
|
|
|
8750
9281
|
width: "12",
|
|
8751
9282
|
height: "2",
|
|
8752
9283
|
rx: "1",
|
|
8753
|
-
|
|
9284
|
+
className: "fill-current"
|
|
8754
9285
|
}),
|
|
8755
9286
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
8756
9287
|
x: "2",
|
|
@@ -8758,7 +9289,7 @@ window.__ModuleLoader__.load({
|
|
|
8758
9289
|
width: "8.5",
|
|
8759
9290
|
height: "2",
|
|
8760
9291
|
rx: "1",
|
|
8761
|
-
|
|
9292
|
+
className: "fill-current"
|
|
8762
9293
|
}),
|
|
8763
9294
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
8764
9295
|
x: "2",
|
|
@@ -8766,7 +9297,7 @@ window.__ModuleLoader__.load({
|
|
|
8766
9297
|
width: "5.5",
|
|
8767
9298
|
height: "2",
|
|
8768
9299
|
rx: "1",
|
|
8769
|
-
|
|
9300
|
+
className: "fill-current"
|
|
8770
9301
|
})
|
|
8771
9302
|
]
|
|
8772
9303
|
});
|
|
@@ -8787,7 +9318,7 @@ window.__ModuleLoader__.load({
|
|
|
8787
9318
|
side: "bottom",
|
|
8788
9319
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
8789
9320
|
type: "button",
|
|
8790
|
-
className: "lc-jump",
|
|
9321
|
+
className: "lc-jump hover:bg-(--dsw-alias-interactive-bg-hover) hover:text-(--dsw-alias-label-secondary)",
|
|
8791
9322
|
"aria-label": t("jump.title"),
|
|
8792
9323
|
onClick: jump,
|
|
8793
9324
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(JumpIcon, {})
|
|
@@ -8993,8 +9524,19 @@ window.__ModuleLoader__.load({
|
|
|
8993
9524
|
};
|
|
8994
9525
|
}
|
|
8995
9526
|
//#endregion
|
|
9527
|
+
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/tailwind.css.mjs
|
|
9528
|
+
const css$14 = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}:root,:host{--spacing:4px;--color-red-500:oklch(63.7% .237 25.331);--color-amber-500:oklch(76.9% .188 70.08);--color-green-500:oklch(72.3% .219 149.579);--color-teal-500:oklch(70.4% .14 182.503);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-400:oklch(70.4% .04 256.788);--color-neutral-500:oklch(55.6% 0 none);--animate-lc-donut-in:lc-donut-in .45s cubic-bezier(.4, 0, .2, 1) calc(var(--lc-i,0) * 50ms) backwards;--animate-lc-stacked-in:lc-stacked-in .4s cubic-bezier(.4, 0, .2, 1) calc(var(--lc-i,0) * 40ms) backwards;--animate-lc-bar-in:lc-bar-in .35s cubic-bezier(.4, 0, .2, 1) calc(var(--lc-i,0) * 15ms) backwards;--animate-lc-agent-flow:lc-agent-flow .9s linear infinite;--animate-lc-agent-glow:lc-agent-glow 1.8s ease-in-out infinite}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.container{width:100%}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.min-w-0{min-width:0}.min-w-\\[min\\(360px\\,100\\%\\)\\]{min-width:min(360px,100%)}.flex-1{flex:1}.flex-auto{flex:auto}.shrink{flex-shrink:1}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-lc-agent-flow{animation:var(--animate-lc-agent-flow)}.animate-lc-agent-glow{animation:var(--animate-lc-agent-glow)}.animate-lc-bar-in{animation:var(--animate-lc-bar-in)}.animate-lc-donut-in{animation:var(--animate-lc-donut-in)}.animate-lc-stacked-in{animation:var(--animate-lc-stacked-in)}.resize{resize:both}.grid-cols-\\[repeat\\(auto-fit\\,minmax\\(108px\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fit,minmax(108px,1fr))}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-start{justify-content:flex-start}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-3{gap:calc(var(--spacing) * 3)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.border{border-style:var(--tw-border-style);border-width:1px}.fill-\\(--dsw-alias-bg-layer-1\\){fill:var(--dsw-alias-bg-layer-1)}.fill-\\(--dsw-alias-label-primary\\){fill:var(--dsw-alias-label-primary)}.fill-current{fill:currentColor}.fill-none{fill:none}.fill-transparent{fill:#0000}.stroke-\\(--dsw-alias-border-l1\\){stroke:var(--dsw-alias-border-l1)}.stroke-2{stroke-width:2px}.stroke-4{stroke-width:4px}.stroke-9{stroke-width:9px}.stroke-\\[1\\.5px\\]{stroke-width:1.5px}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}@media (hover:hover){.group-hover\\/agent\\:fill-\\[var\\(--dsw-alias-interactive-bg-hover\\,var\\(--dsw-alias-bg-layer-2\\)\\)\\]:is(:where(.group\\/agent):hover *){fill:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2))}.group-hover\\/pi\\:underline:is(:where(.group\\/pi):hover *){text-decoration-line:underline}.group-hover\\/tip\\:border-\\(--dsw-alias-label-primary\\):is(:where(.group\\/tip):hover *){border-color:var(--dsw-alias-label-primary)}.group-hover\\/tip\\:text-\\(--dsw-alias-label-primary\\):is(:where(.group\\/tip):hover *){color:var(--dsw-alias-label-primary)}.group-hover\\/tip\\:opacity-100:is(:where(.group\\/tip):hover *){opacity:1}}.group-focus-visible\\/agent\\:fill-\\[var\\(--dsw-alias-interactive-bg-hover\\,var\\(--dsw-alias-bg-layer-2\\)\\)\\]:is(:where(.group\\/agent):focus-visible *){fill:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2))}@media (hover:hover){.hover\\:border-\\(--dsw-alias-label-dimmed\\):hover{border-color:var(--dsw-alias-label-dimmed)}.hover\\:border-\\(--dsw-alias-label-primary\\):hover{border-color:var(--dsw-alias-label-primary)}.hover\\:bg-\\(--dsw-alias-bg-layer-2\\):hover{background-color:var(--dsw-alias-bg-layer-2)}.hover\\:bg-\\(--dsw-alias-interactive-bg-hover\\):hover{background-color:var(--dsw-alias-interactive-bg-hover)}.hover\\:bg-\\[var\\(--dsw-alias-interactive-bg-hover\\,var\\(--dsw-alias-bg-layer-2\\)\\)\\]:hover{background-color:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2))}.hover\\:text-\\(--dsw-alias-label-primary\\):hover{color:var(--dsw-alias-label-primary)}.hover\\:text-\\(--dsw-alias-label-secondary\\):hover{color:var(--dsw-alias-label-secondary)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\\:brightness-\\[1\\.15\\]:hover{--tw-brightness:brightness(1.15);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:border-\\(--dsw-alias-label-dimmed\\):focus{border-color:var(--dsw-alias-label-dimmed)}@media (hover:hover){.hover\\:enabled\\:bg-\\(--dsw-alias-interactive-bg-hover\\):hover:enabled{background-color:var(--dsw-alias-interactive-bg-hover)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-50:disabled{opacity:.5}@media (prefers-reduced-motion:reduce){.motion-reduce\\:animate-none{animation:none}}@container lc-card (width<380px){.\\@max-\\[380px\\]\\/lc-card\\:basis-\\[calc\\(100\\%-46px\\)\\]{flex-basis:calc(100% - 46px)}.\\@max-\\[380px\\]\\/lc-card\\:basis-\\[calc\\(100\\%-92px\\)\\]{flex-basis:calc(100% - 92px)}.\\@max-\\[380px\\]\\/lc-card\\:flex-wrap{flex-wrap:wrap}}@container lc-card (width<320px){.\\@max-\\[320px\\]\\/lc-card\\:gap-2{gap:calc(var(--spacing) * 2)}}@container lc-card (width<240px){.\\@max-\\[240px\\]\\/lc-card\\:mx-auto{margin-inline:auto}.\\@max-\\[240px\\]\\/lc-card\\:basis-full{flex-basis:100%}.\\@max-\\[240px\\]\\/lc-card\\:flex-wrap{flex-wrap:wrap}}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@keyframes lc-donut-in{0%{stroke-dasharray:0 100}}@keyframes lc-stacked-in{0%{transform:scaleX(0)}}@keyframes lc-bar-in{0%{transform:scaleY(0)}}@keyframes lc-agent-flow{to{stroke-dashoffset:-9px}}@keyframes lc-agent-glow{0%,to{opacity:1}50%{opacity:.4}}";
|
|
9529
|
+
const tagId$14 = "dsh-context/tailwind.css";
|
|
9530
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$14) + "]") === null) {
|
|
9531
|
+
const tag = document.createElement("style");
|
|
9532
|
+
tag.dataset.plugin = "dsh-context";
|
|
9533
|
+
tag.dataset.pluginCss = tagId$14;
|
|
9534
|
+
tag.textContent = css$14;
|
|
9535
|
+
document.head.appendChild(tag);
|
|
9536
|
+
}
|
|
9537
|
+
//#endregion
|
|
8996
9538
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/base.css.mjs
|
|
8997
|
-
const css$13 = ".lc-root{box-sizing:border-box;height:100%;color:var(--dsw-alias-label-primary);padding:16px 20px 32px;font-size:13px;overflow-y:auto}[data-sidebar-right-open] .lc-root,[data-sidebar-right-float-host] .lc-root{height:auto;padding:12px;overflow:visible}.lc-title-icon{flex:none}.lc-title-label{padding-right:30px}.lc-card{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;margin-bottom:14px;padding:14px 16px}.lc-root .lc-card{margin-bottom:7px;padding:7px 8px;container:lc-card/inline-size}.lc-root .lc-cols{gap:7px;margin-bottom:7px}.lc-card-title{flex-wrap:wrap;align-items:baseline;gap:8px;margin-bottom:10px;font-weight:600;display:flex}.lc-card-title-text{white-space:nowrap;flex:none}.lc-gran,.lc-kinds{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;gap:2px;margin-left:auto;padding:1px;display:flex}.lc-trend-ctl{align-items:center;gap:6px;margin-left:auto;display:flex}.lc-trend-ctl .lc-gran{margin-left:0}.lc-trend-adaptive{flex:none;margin-left:0}.lc-gran-btn{color:var(--dsw-alias-label-secondary);cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:5px;padding:3px 8px;font-family:inherit;font-size:11px;line-height:1}.lc-gran-btn:hover{color:var(--dsw-alias-label-primary)}.lc-gran-on,.lc-gran-on:hover{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.lc-tip{z-index:6;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);width:max-content;color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv3,0 2px 8px #0000002e);pointer-events:none;opacity:0;transition:opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:6px;padding:6px 10px;font-size:12px;position:absolute}.lc-events,.lc-fa-list{flex-direction:column;gap:2px;height:320px;display:flex;overflow-y:auto}.lc-cols{flex-wrap:wrap;gap:14px;margin-bottom:14px;display:flex}.lc-
|
|
9539
|
+
const css$13 = ".lc-root{box-sizing:border-box;height:100%;color:var(--dsw-alias-label-primary);padding:16px 20px 32px;font-size:13px;overflow-y:auto}[data-sidebar-right-open] .lc-root,[data-sidebar-right-float-host] .lc-root{height:auto;padding:12px;overflow:visible}.lc-title-icon{flex:none}.lc-title-label{padding-right:30px}.lc-card{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;margin-bottom:14px;padding:14px 16px}.lc-root .lc-card{margin-bottom:7px;padding:7px 8px;container:lc-card/inline-size}.lc-root .lc-cols{gap:7px;margin-bottom:7px}.lc-card-title{flex-wrap:wrap;align-items:baseline;gap:8px;margin-bottom:10px;font-weight:600;display:flex}.lc-card-title-text{white-space:nowrap;flex:none}.lc-gran,.lc-kinds{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;gap:2px;margin-left:auto;padding:1px;display:flex}.lc-trend-ctl{align-items:center;gap:6px;margin-left:auto;display:flex}.lc-trend-ctl .lc-gran{margin-left:0}.lc-trend-adaptive{flex:none;margin-left:0}.lc-gran-btn{color:var(--dsw-alias-label-secondary);cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:5px;padding:3px 8px;font-family:inherit;font-size:11px;line-height:1}.lc-gran-btn:hover{color:var(--dsw-alias-label-primary)}.lc-gran-on,.lc-gran-on:hover{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.lc-kind-n{font-variant-numeric:tabular-nums;opacity:.65;margin-left:4px}.lc-gran-on .lc-kind-n{opacity:.85}.lc-tip{z-index:6;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);width:max-content;color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv3,0 2px 8px #0000002e);pointer-events:none;opacity:0;transition:opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:6px;padding:6px 10px;font-size:12px;position:absolute}.lc-events,.lc-fa-list{flex-direction:column;gap:2px;height:320px;display:flex;overflow-y:auto}.lc-cols{flex-wrap:wrap;gap:14px;margin-bottom:14px;display:flex}.lc-cols>.lc-card,.lc-col>.lc-card:last-child{margin-bottom:0}.lc-col-browser{flex-direction:column;display:flex}.lc-col-browser>.lc-card{flex:1}.lc-head>.lc-card:has(.lc-stats){flex-direction:column;display:flex}.lc-head .lc-stats{flex:1;align-content:stretch}.lc-head .lc-stat{justify-content:center}.lc-empty{color:var(--dsw-alias-label-secondary);text-align:center;padding:18px 0}.lc-error{flex-direction:column;align-items:center;gap:8px;padding:40px 16px;display:flex}.lc-error-msg{font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);overflow-wrap:anywhere;border-radius:6px;max-width:100%;padding:4px 8px;font-size:12px}.lc-error-retry{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;transition:border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:6px;padding:4px 14px;font-size:12px}.lc-foot{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px}[data-conversation-scroll]:has(.lc-root)>[data-composer-seat]:not(:has([data-approval-key],[data-question-key],[data-plan-review-key])),[data-conversation-scroll]:has(.lc-root,.lc-modal-backdrop)~[data-width-handle]{display:none}";
|
|
8998
9540
|
const tagId$13 = "dsh-context/base.css";
|
|
8999
9541
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$13) + "]") === null) {
|
|
9000
9542
|
const tag = document.createElement("style");
|
|
@@ -9005,7 +9547,7 @@ window.__ModuleLoader__.load({
|
|
|
9005
9547
|
}
|
|
9006
9548
|
//#endregion
|
|
9007
9549
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/stats.css.mjs
|
|
9008
|
-
const css$12 = ".lc-
|
|
9550
|
+
const css$12 = ".lc-stat{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;flex-direction:column;gap:2px;min-width:0;padding:6px;display:flex}.lc-stats .lc-stat{padding:6px 3px}.lc-stats .lc-stat-q{margin:0;position:absolute;top:3px;right:4px}.lc-stat-label{color:var(--dsw-alias-label-secondary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;font-weight:600;overflow:hidden}.lc-stat-value{color:var(--dsw-alias-label-primary);white-space:nowrap;text-overflow:ellipsis;text-align:center;font-size:14px;font-weight:600;overflow:hidden}.lc-stat-sub{color:var(--dsw-alias-label-secondary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.lc-stat-tipped{position:relative}.lc-stat-q{text-align:center;width:11px;height:11px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);cursor:help;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:50%;margin-left:4px;font-size:9px;font-style:normal;font-weight:700;line-height:11px;display:inline-block}.lc-stat-tip{max-width:280px;font-weight:400;line-height:1.5;top:calc(100% + 6px);left:0}.lc-stat-tip-prices{border-top:1px dashed var(--dsw-alias-border-l1);margin-top:5px;padding-top:5px;display:block}.lc-stat-tip-head{font-weight:600;display:block}.lc-stat-tip-row{margin-top:2px;display:block}.lc-stat-tip-model{color:var(--dsw-alias-label-primary)}.lc-card-sub{color:var(--dsw-alias-label-secondary);margin-left:auto;font-size:12px;font-weight:400}.lc-overview-num{align-items:baseline;gap:6px;margin-bottom:8px;display:flex}.lc-overview-num>b{font-size:20px}.lc-overview-num span{color:var(--dsw-alias-label-secondary)}.lc-overview-pct{margin-left:auto;font-size:11px}.lc-overview-pct b{color:var(--dsw-alias-label-primary);margin-right:4px;font-size:20px}.lc-stat-head{color:var(--dsw-alias-label-secondary);margin:12px 0 8px;font-size:11px;font-weight:600}.lc-col-donut{flex-direction:column;display:flex}.lc-col-donut .lc-donut-row{flex:1}.lc-donut{flex:none;position:relative}.lc-donut svg{display:block}.lc-donut-track{stroke:color-mix(in srgb, var(--color-neutral-500) 18%, transparent)}.lc-donut-seg{transition:opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out)}.lc-donut-dim .lc-donut-seg{opacity:.35}.lc-donut-dim .lc-donut-seg-on{opacity:1}.lc-donut-center{pointer-events:none;text-align:center;box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;gap:1px;padding:0 7px;display:flex;position:absolute;inset:0}.lc-donut-center b{white-space:nowrap;text-overflow:ellipsis;max-width:100%;line-height:1.15;overflow:hidden}.lc-donut-center span{color:var(--dsw-alias-label-secondary);white-space:nowrap}.lc-sl{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:4px 20px;min-width:0;display:grid;overflow:hidden}.lc-sl-row{min-width:0;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:6px;flex-direction:column;gap:1px;margin:0 -6px;padding:1px 6px;font-size:12px;display:flex}.lc-sl-row-on{background:var(--dsw-alias-interactive-bg-hover)}.lc-sl-row-dim{opacity:.55}.lc-sl-main{align-items:center;gap:6px;min-width:0;display:flex}.lc-sl-dot{border-radius:2px;flex:none;width:8px;height:8px}.lc-sl-label{white-space:nowrap;text-overflow:ellipsis;flex:auto;min-width:0;font-weight:600;line-height:1.25;overflow:hidden}.lc-sl-pct{text-align:right;font-variant-numeric:tabular-nums;flex:none;min-width:34px;font-weight:700}.lc-sl-sub{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;text-overflow:ellipsis;margin-left:14px;font-size:11px;line-height:1.3;overflow:hidden}.lc-pi-grid{grid-template-columns:1fr;gap:8px;display:grid}.lc-pi-row-btn{appearance:none;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;width:100%;padding:0}.lc-pi-row{min-width:0;color:inherit;flex-direction:row;justify-content:space-between;align-items:baseline;gap:12px;text-decoration:none;display:flex}.lc-pi-hint{text-decoration:none}.lc-pi-update{color:var(--dsw-alias-state-warn-primary);white-space:nowrap;margin-left:6px;font-size:11px}.lc-pi-label{color:var(--dsw-alias-label-secondary);white-space:nowrap;text-overflow:ellipsis;flex:none;font-size:11px;font-weight:600;overflow:hidden}.lc-pi-value{min-width:0;color:var(--dsw-alias-label-primary);white-space:nowrap;text-overflow:ellipsis;text-align:right;font-size:13px;font-weight:600;overflow:hidden}.lc-pi-row-btn .lc-pi-value{font-weight:400}";
|
|
9009
9551
|
const tagId$12 = "dsh-context/stats.css";
|
|
9010
9552
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$12) + "]") === null) {
|
|
9011
9553
|
const tag = document.createElement("style");
|
|
@@ -9016,7 +9558,7 @@ window.__ModuleLoader__.load({
|
|
|
9016
9558
|
}
|
|
9017
9559
|
//#endregion
|
|
9018
9560
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/jump.css.mjs
|
|
9019
|
-
const css$11 = ".lc-jump{width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);cursor:pointer;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}.lc-jump svg{width:calc(16px + var(--dsh-content-font-delta,0px));height:calc(16px + var(--dsh-content-font-delta,0px))}
|
|
9561
|
+
const css$11 = ".lc-jump{width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);cursor:pointer;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}.lc-jump svg{width:calc(16px + var(--dsh-content-font-delta,0px));height:calc(16px + var(--dsh-content-font-delta,0px))}";
|
|
9020
9562
|
const tagId$11 = "dsh-context/jump.css";
|
|
9021
9563
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$11) + "]") === null) {
|
|
9022
9564
|
const tag = document.createElement("style");
|
|
@@ -9027,7 +9569,7 @@ window.__ModuleLoader__.load({
|
|
|
9027
9569
|
}
|
|
9028
9570
|
//#endregion
|
|
9029
9571
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/settings.css.mjs
|
|
9030
|
-
const css$10 = ".lc-settings-card{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);transition:border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:12px}.lc-settings-card:hover{border-color:var(--dsw-alias-label-dimmed)}.lc-settings-open,.lc-settings-open:hover{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.lc-settings-head{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.lc-settings-headtext{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.lc-settings-name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.lc-settings-desc{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.lc-settings-chevron{color:var(--dsw-alias-label-tertiary);transition:transform var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);flex:none}.lc-settings-open .lc-settings-chevron{transform:rotate(180deg)}.lc-settings-body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding:4px 0 12px}.lc-settings-row{align-items:center;gap:8px;padding:8px 0;display:flex}.lc-settings-label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:14px}.lc-settings-select{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.lc-settings-
|
|
9572
|
+
const css$10 = ".lc-settings-card{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);transition:border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:12px}.lc-settings-card:hover{border-color:var(--dsw-alias-label-dimmed)}.lc-settings-open,.lc-settings-open:hover{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.lc-settings-head{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.lc-settings-headtext{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.lc-settings-name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.lc-settings-desc{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.lc-settings-chevron{color:var(--dsw-alias-label-tertiary);transition:transform var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);flex:none}.lc-settings-open .lc-settings-chevron{transform:rotate(180deg)}.lc-settings-body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding:4px 0 12px}.lc-settings-row{align-items:center;gap:8px;padding:8px 0;display:flex}.lc-settings-label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:14px}.lc-settings-select{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.lc-settings-note{color:var(--dsw-alias-label-tertiary);margin:12px 0 4px;font-size:12px;line-height:1.5}";
|
|
9031
9573
|
const tagId$10 = "dsh-context/settings.css";
|
|
9032
9574
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$10) + "]") === null) {
|
|
9033
9575
|
const tag = document.createElement("style");
|
|
@@ -9038,7 +9580,7 @@ window.__ModuleLoader__.load({
|
|
|
9038
9580
|
}
|
|
9039
9581
|
//#endregion
|
|
9040
9582
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/stackedBar.css.mjs
|
|
9041
|
-
const css$9 = ".lc-stacked-wrap{width:100%;position:relative}.lc-stacked{background
|
|
9583
|
+
const css$9 = ".lc-stacked-wrap{width:100%;position:relative}.lc-stacked{background:color-mix(in srgb, var(--color-neutral-500) 18%, transparent);border-radius:5px;width:100%;display:flex;position:relative;overflow:hidden}.lc-occupied-box{border:2px solid var(--dsw-alias-label-tertiary);box-sizing:border-box;pointer-events:none;opacity:0;box-shadow:0 0 0 1px var(--dsw-alias-bg-layer-2);transition:opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:5px;position:absolute;top:0;bottom:0;left:0}.lc-occupied-box-on{opacity:1}.lc-bar-tip{z-index:5;white-space:nowrap;padding:3px 8px;bottom:calc(100% + 6px);transform:translate(-50%)}.lc-bar-tip-on{opacity:1}.lc-stacked>div{height:100%}.lc-stacked-seg-pick{cursor:pointer}.lc-stacked-seg{transition:filter var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out)}.lc-stacked-free{box-sizing:border-box;transition:box-shadow var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out)}.lc-stacked-seg,.lc-stacked-free{transform-origin:0}.lc-stacked-seg-on{filter:brightness(1.18)}.lc-reserve{z-index:1;pointer-events:auto;cursor:help;background:repeating-linear-gradient(45deg, color-mix(in srgb, var(--dsw-alias-state-warn-primary) 24%, transparent) 0 5px, transparent 5px 10px);position:absolute;top:0;bottom:0}.lc-stacked-free-on{border:2px dashed var(--dsw-alias-label-secondary);border-radius:3px}.lc-stacked-dim .lc-stacked-seg{opacity:.35}.lc-stacked-dim .lc-stacked-seg-on{opacity:1}.lc-stacked-dim .lc-stacked-free{opacity:.35}.lc-stacked-dim .lc-stacked-free-on{opacity:1}.lc-legend{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:6px 14px;margin-top:10px;display:grid}.lc-chip{min-width:0;color:var(--dsw-alias-label-primary);cursor:pointer;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:6px;align-items:center;gap:5px;padding:1px 6px;display:flex}.lc-chip-label{white-space:nowrap;text-overflow:ellipsis;min-width:0;font-weight:600;overflow:hidden}.lc-chip-nums{white-space:nowrap;flex:none;align-items:baseline;gap:6px;margin-left:auto;display:inline-flex}.lc-chip i,.lc-detail-row i{border-radius:2px;width:8px;height:8px;display:inline-block}.lc-chip i{transition:box-shadow var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out)}.lc-chip em{color:var(--dsw-alias-label-secondary);font-style:normal}.lc-chip-on{background:var(--dsw-alias-interactive-bg-hover);font-weight:600}.lc-chip-on i{box-shadow:0 0 0 1px var(--dsw-alias-brand-primary)}";
|
|
9042
9584
|
const tagId$9 = "dsh-context/stackedBar.css";
|
|
9043
9585
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$9) + "]") === null) {
|
|
9044
9586
|
const tag = document.createElement("style");
|
|
@@ -9049,7 +9591,7 @@ window.__ModuleLoader__.load({
|
|
|
9049
9591
|
}
|
|
9050
9592
|
//#endregion
|
|
9051
9593
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/trendChart.css.mjs
|
|
9052
|
-
const css$8 = ".lc-chartrow{align-items:stretch;gap:6px;display:flex}.lc-axis{box-sizing:border-box;width:40px;height:150px;color:var(--dsw-alias-label-secondary);padding-top:18px;font-size:11px;position:relative}.lc-axis span{line-height:1;position:absolute;right:0}.lc-axis-top{top:13px}.lc-axis-q3{top:41px}.lc-axis-mid{top:69px}.lc-axis-q1{top:97px}.lc-axis-bot{top:125px}.lc-chart-wrap{flex:1;min-width:0;position:relative}.lc-chart-scroll{overscroll-behavior-x:contain;scrollbar-gutter:stable;padding-bottom:var(--dsh-scrollbar-width,8px);overflow:auto hidden}.lc-chart{box-sizing:border-box;align-items:flex-end;gap:2px;width:max-content;min-width:100%;height:130px;padding-top:18px;display:flex;position:relative}.lc-grid{border-top:1px dashed var(--dsw-alias-border-l2);pointer-events:none;position:absolute;left:0;right:0}.lc-grid-top{top:18px}.lc-grid-q3{top:46px}.lc-grid-mid{top:74px}.lc-grid-q1{top:102px}.lc-grid-zero{border-top-style:solid;border-top-color
|
|
9594
|
+
const css$8 = ".lc-chartrow{align-items:stretch;gap:6px;display:flex}.lc-axis{box-sizing:border-box;width:40px;height:150px;color:var(--dsw-alias-label-secondary);padding-top:18px;font-size:11px;position:relative}.lc-axis span{line-height:1;position:absolute;right:0}.lc-axis-top{top:13px}.lc-axis-q3{top:41px}.lc-axis-mid{top:69px}.lc-axis-q1{top:97px}.lc-axis-bot{top:125px}.lc-chart-wrap{flex:1;min-width:0;position:relative}.lc-chart-scroll{overscroll-behavior-x:contain;scrollbar-gutter:stable;padding-bottom:var(--dsh-scrollbar-width,8px);overflow:auto hidden}.lc-chart{box-sizing:border-box;align-items:flex-end;gap:2px;width:max-content;min-width:100%;height:130px;padding-top:18px;display:flex;position:relative}.lc-grid{border-top:1px dashed var(--dsw-alias-border-l2);pointer-events:none;position:absolute;left:0;right:0}.lc-grid-top{top:18px}.lc-grid-q3{top:46px}.lc-grid-mid{top:74px}.lc-grid-q1{top:102px}.lc-grid-zero{border-top-style:solid;border-top-color:color-mix(in srgb, var(--color-neutral-500) 50%, transparent);top:130px}.lc-bar{cursor:pointer;outline-offset:1px;width:14px;height:100%;transition:opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), outline-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:2px;outline:1px dashed #0000;flex:none;align-items:flex-end;display:flex;position:relative}.lc-chart-dim .lc-bar{opacity:.35}.lc-chart-dim .lc-bar-in-turn{opacity:1}.lc-chart-dim .lc-turn{opacity:.35}.lc-chart-dim .lc-turn-on{opacity:1}.lc-chart-tip{z-index:5;box-sizing:border-box;overflow-wrap:break-word;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);max-width:100%;color:var(--dsw-alias-label-primary);pointer-events:none;border-radius:6px;flex-direction:column;gap:2px;padding:3px 8px;font-size:12px;display:flex;position:absolute;bottom:calc(100% + 4px);left:0;box-shadow:0 2px 8px #0000002e}.lc-chart-tip span+span{color:var(--dsw-alias-label-secondary)}.lc-bar-hovered{outline-color:var(--dsw-alias-brand-primary)}.lc-bar-selected{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.lc-bar-in-turn{background:color-mix(in srgb, var(--color-neutral-500) 14%, transparent)}.lc-bar-stack{flex-direction:column-reverse;width:100%;display:flex}.lc-bar-stack>div{width:100%}.lc-bar-stack,.lc-bar-up,.lc-bar-down{transform-origin:50% 100%}.lc-bar-down{transform-origin:50% 0}.lc-bar-stack>div:first-child{border-radius:0 0 2px 2px}.lc-bar-stack>div:last-child{border-radius:2px 2px 0 0}.lc-bar-stack>div:only-child{border-radius:2px}.lc-bar-up,.lc-bar-down{width:100%;display:flex;position:absolute;left:0}.lc-bar-up{flex-direction:column-reverse}.lc-bar-down{flex-direction:column}.lc-bar-up>div,.lc-bar-down>div{width:100%}.lc-bar-up>div:last-child{border-radius:2px 2px 0 0}.lc-bar-down>div:last-child{border-radius:0 0 2px 2px}.lc-cat-seg{transition:filter var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out)}.lc-chart[data-catdim] .lc-cat-seg{opacity:.35}.lc-chart[data-catdim=system] .lc-cat-seg[data-cat=system],.lc-chart[data-catdim=tools] .lc-cat-seg[data-cat=tools],.lc-chart[data-catdim=user] .lc-cat-seg[data-cat=user],.lc-chart[data-catdim=inject] .lc-cat-seg[data-cat=inject],.lc-chart[data-catdim=assistant] .lc-cat-seg[data-cat=assistant],.lc-chart[data-catdim=tool] .lc-cat-seg[data-cat=tool]{opacity:1;filter:brightness(1.18)}.lc-bar-marker{color:var(--dsw-alias-state-warn-primary);font-size:11px;position:absolute;top:-16px;left:50%;transform:translate(-50%)}.lc-turns{gap:2px;width:max-content;min-width:100%;margin-top:4px;display:flex;overflow:hidden}.lc-turn{box-sizing:border-box;text-align:center;color:var(--dsw-alias-label-secondary);white-space:nowrap;cursor:pointer;height:14px;transition:filter var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:3px;flex:none;font-size:10px;font-weight:600;line-height:14px}.lc-turn-on{filter:brightness(1.35);color:var(--dsw-alias-label-primary)}.lc-turn-label{display:inline-block}";
|
|
9053
9595
|
const tagId$8 = "dsh-context/trendChart.css";
|
|
9054
9596
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$8) + "]") === null) {
|
|
9055
9597
|
const tag = document.createElement("style");
|
|
@@ -9060,7 +9602,7 @@ window.__ModuleLoader__.load({
|
|
|
9060
9602
|
}
|
|
9061
9603
|
//#endregion
|
|
9062
9604
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/requestDetail.css.mjs
|
|
9063
|
-
const css$7 = ".lc-detail{border-top:1px solid var(--dsw-alias-border-l1);margin-top:12px;padding-top:12px}.lc-detail-head{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:6px 8px;margin-bottom:10px;display:flex}.lc-detail-head b{color:var(--dsw-alias-label-primary);font-size:13px}.lc-detail-time{font-variant-numeric:tabular-nums;white-space:nowrap;margin-left:auto;font-size:12px}.lc-detail-marker{color:var(--dsw-alias-state-warn-primary);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent);border-radius:6px;padding:1px 7px;font-size:11px}.lc-detail-tag{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);border-radius:4px;padding:0 6px;font-size:11px}.lc-detail-metric{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--dsw-alias-label-primary);background:color-mix(in srgb, var(--dsw-alias-label-secondary) 14%, transparent);border-radius:6px;padding:2px 8px;font-size:12px;font-weight:600}.lc-detail-metric-up{color:var(--dsw-alias-state-success-primary);background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 15%, transparent)}.lc-detail-metric-down{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 15%, transparent)}.lc-detail-rows{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:4px 24px;margin-top:10px;display:grid}.lc-brief{flex-direction:column;gap:2px;min-height:76px;margin:-4px 0 10px;display:flex}.lc-brief-row{min-width:0;color:var(--dsw-alias-label-primary);text-align:left;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;margin-left:-6px;margin-right:-6px;padding:3px 6px;font-family:inherit;font-size:12px;line-height:1.5;display:flex}
|
|
9605
|
+
const css$7 = ".lc-detail{border-top:1px solid var(--dsw-alias-border-l1);margin-top:12px;padding-top:12px}.lc-detail-head{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:6px 8px;margin-bottom:10px;display:flex}.lc-detail-head b{color:var(--dsw-alias-label-primary);font-size:13px}.lc-detail-time{font-variant-numeric:tabular-nums;white-space:nowrap;margin-left:auto;font-size:12px}.lc-detail-marker{color:var(--dsw-alias-state-warn-primary);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent);border-radius:6px;padding:1px 7px;font-size:11px}.lc-detail-tag{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);border-radius:4px;padding:0 6px;font-size:11px}.lc-detail-metric{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--dsw-alias-label-primary);background:color-mix(in srgb, var(--dsw-alias-label-secondary) 14%, transparent);border-radius:6px;padding:2px 8px;font-size:12px;font-weight:600}.lc-detail-metric-up{color:var(--dsw-alias-state-success-primary);background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 15%, transparent)}.lc-detail-metric-down{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 15%, transparent)}.lc-detail-rows{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:4px 24px;margin-top:10px;display:grid}.lc-brief{flex-direction:column;gap:2px;min-height:76px;margin:-4px 0 10px;display:flex}.lc-brief-row{min-width:0;color:var(--dsw-alias-label-primary);text-align:left;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;margin-left:-6px;margin-right:-6px;padding:3px 6px;font-family:inherit;font-size:12px;line-height:1.5;display:flex}button.lc-brief-row-link{cursor:pointer}.lc-brief-tag{box-sizing:border-box;text-align:center;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);min-width:56px;color:var(--dsw-alias-label-secondary);border-radius:4px;flex:none;padding:0 6px;font-size:11px;position:relative}.lc-brief-tip{white-space:normal;text-align:left;max-width:240px;font-weight:400;line-height:1.5;bottom:calc(100% + 6px);left:0}.lc-brief-text{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.lc-brief-empty{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-tertiary);flex:1;overflow:hidden}.lc-brief-fact{box-sizing:border-box;text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);max-width:160px;color:var(--dsw-alias-label-secondary);border-radius:4px;flex:none;padding:0 6px;font-size:11px;overflow:hidden}.lc-brief-chip{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);min-width:0;max-width:260px;color:var(--dsw-alias-label-primary);transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:5px;align-items:center;gap:5px;padding:0 7px;font-size:12px;display:inline-flex;overflow:hidden}.lc-brief-chip-grow{flex:1;max-width:none}.lc-brief-chip-tag{text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);max-width:120px;color:var(--dsw-alias-label-secondary);border-radius:4px;flex:none;padding:0 6px;font-size:11px;overflow:hidden}.lc-brief-chip-text{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.lc-brief-chip-link{cursor:pointer}.lc-brief-more{color:var(--dsw-alias-label-secondary);flex:none;font-size:11px}.lc-detail-row{transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:4px;align-items:center;gap:8px;margin:-1px -4px;padding:1px 4px;display:flex}.lc-detail-row i{transition:box-shadow var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out)}.lc-detail-row-on{background:var(--dsw-alias-interactive-bg-hover)}.lc-detail-row-on i{box-shadow:0 0 0 1px var(--dsw-alias-brand-primary)}.lc-detail-row-on .lc-detail-label{font-weight:600}.lc-detail-label{white-space:nowrap;min-width:70px;color:var(--dsw-alias-label-secondary)}.lc-bar-track{background:color-mix(in srgb, var(--color-neutral-500) 18%, transparent);border-radius:3px;flex:1;height:5px;display:block;position:relative;overflow:hidden}.lc-bar-fill{border-radius:3px;height:100%;display:block}.lc-bar-zero{border-left:1px solid color-mix(in srgb, var(--color-neutral-500) 45%, transparent);position:absolute;top:0;bottom:0;left:50%}.lc-bar-fill-up,.lc-bar-fill-down{height:100%;display:block;position:absolute;top:0}.lc-bar-fill-up{border-radius:0 3px 3px 0;left:50%}.lc-bar-fill-down{border-radius:3px 0 0 3px;right:50%}.lc-detail-num{text-align:right;font-variant-numeric:tabular-nums;width:52px}.lc-detail-num-up{color:var(--dsw-alias-state-success-primary)}.lc-detail-num-down{color:var(--dsw-alias-state-error-primary)}.lc-detail-pct{text-align:right;width:34px;color:var(--dsw-alias-label-secondary)}";
|
|
9064
9606
|
const tagId$7 = "dsh-context/requestDetail.css";
|
|
9065
9607
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$7) + "]") === null) {
|
|
9066
9608
|
const tag = document.createElement("style");
|
|
@@ -9071,7 +9613,7 @@ window.__ModuleLoader__.load({
|
|
|
9071
9613
|
}
|
|
9072
9614
|
//#endregion
|
|
9073
9615
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/events.css.mjs
|
|
9074
|
-
const css$6 = ".lc-event{align-items:center;gap:8px;padding:3px 0;display:flex}.lc-event-icon{text-align:center;width:18px;color:var(--dsw-alias-state-warn-primary)}.lc-event-icon.lc-event-inject{color
|
|
9616
|
+
const css$6 = ".lc-event{align-items:center;gap:8px;padding:3px 0;display:flex}.lc-event-icon{text-align:center;width:18px;color:var(--dsw-alias-state-warn-primary)}.lc-event-icon.lc-event-inject{color:var(--color-purple-500)}.lc-event-icon.lc-event-model{color:var(--dsw-alias-brand-primary)}.lc-event-icon.lc-event-mode{color:var(--dsw-alias-label-secondary)}.lc-kind{white-space:nowrap;border-radius:4px;flex:none;padding:1px 6px;font-size:10px;font-weight:600}.lc-kind-inject{background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 15%, transparent);color:var(--dsw-alias-state-success-primary)}.lc-kind-compaction{background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 15%, transparent);color:var(--dsw-alias-state-error-primary)}.lc-kind-prune{background:color-mix(in srgb, var(--color-violet-500) 15%, transparent);color:var(--color-violet-500)}.lc-kind-model{background:color-mix(in srgb, var(--dsw-alias-brand-primary) 15%, transparent);color:var(--dsw-alias-brand-primary)}.lc-kind-mode{background:color-mix(in srgb, var(--dsw-alias-label-secondary) 15%, transparent);color:var(--dsw-alias-label-secondary)}.lc-event-label{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.lc-event-at{color:var(--dsw-alias-label-secondary);white-space:nowrap;flex:none;font-size:11px}.lc-event-tokens{color:var(--dsw-alias-state-success-primary);white-space:nowrap;font-weight:600}.lc-event-tokens.lc-up{color:var(--dsw-alias-state-warn-primary)}.lc-event-time{color:var(--dsw-alias-label-secondary);font-size:12px}";
|
|
9075
9617
|
const tagId$6 = "dsh-context/events.css";
|
|
9076
9618
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$6) + "]") === null) {
|
|
9077
9619
|
const tag = document.createElement("style");
|
|
@@ -9082,7 +9624,7 @@ window.__ModuleLoader__.load({
|
|
|
9082
9624
|
}
|
|
9083
9625
|
//#endregion
|
|
9084
9626
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/fileCard.css.mjs
|
|
9085
|
-
const css$5 = ".lc-fa-ctl,.lc-br-toolctl{flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;display:flex}.lc-fa-ctl .lc-gran{margin-left:0}.lc-fa-n{opacity:.75;margin-left:4px;font-weight:700}.lc-fa-search,.lc-br-tool-search{min-width:80px;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;outline:none;flex:1;padding:3px 8px;font-size:12px}.lc-fa-
|
|
9627
|
+
const css$5 = ".lc-fa-ctl,.lc-br-toolctl{flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;display:flex}.lc-fa-ctl .lc-gran{margin-left:0}.lc-fa-n{opacity:.75;margin-left:4px;font-weight:700}.lc-fa-search,.lc-br-tool-search{min-width:80px;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;outline:none;flex:1;padding:3px 8px;font-size:12px}.lc-fa-meta{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:6px;font-size:12px;display:flex}.lc-fa-meta .lc-fa-sort{flex:none}.lc-fa-meta-delta{position:relative}.lc-fa-meta-tip{white-space:normal;max-width:260px;line-height:1.5;top:calc(100% + 6px);left:0}.lc-fa-item{transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border:1px solid #0000;border-radius:8px}.lc-fa-item-on{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-border-l2)}.lc-fa-row{width:100%;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;text-align:left;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:7px;align-items:center;gap:7px;padding:6px 8px;font-size:12px;display:flex}.lc-fa-form{opacity:.85;flex:none;justify-content:center;align-items:center;width:20px;height:14px;font-size:11px;display:flex}.lc-fa-lang{border-radius:4px;justify-content:center;align-items:center;min-width:16px;height:13px;padding:0 2px;font-size:8px;font-weight:700;line-height:1;display:inline-flex}.lc-fa-row .lc-br-chev{margin-right:-2px}.lc-fa-path{word-break:break-all;min-width:0}.lc-fa-file{cursor:pointer}.lc-fa-path em{color:var(--dsw-alias-label-secondary);font-style:normal}.lc-fa-badge{font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;flex:none;align-items:center;gap:4px;padding:1px 7px;font-size:11px;font-weight:600;display:inline-flex}.lc-fa-badge i{background:currentColor;border-radius:50%;width:5px;height:5px;display:inline-block}.lc-fa-b-read{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 14%, transparent)}.lc-fa-b-write{color:var(--dsw-alias-state-success-primary);background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 14%, transparent)}.lc-fa-b-search{color:var(--dsw-alias-state-warn-primary);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, transparent)}.lc-fa-chip-read,.lc-fa-chip-read:hover{color:var(--dsw-alias-brand-primary)}.lc-fa-chip-write,.lc-fa-chip-write:hover{color:var(--dsw-alias-state-success-primary)}.lc-fa-chip-search,.lc-fa-chip-search:hover{color:var(--dsw-alias-state-warn-primary)}.lc-fa-chip-read.lc-gran-on,.lc-fa-chip-read.lc-gran-on:hover{background:color-mix(in srgb, var(--dsw-alias-brand-primary) 14%, transparent);color:var(--dsw-alias-brand-primary)}.lc-fa-chip-write.lc-gran-on,.lc-fa-chip-write.lc-gran-on:hover{background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 14%, transparent);color:var(--dsw-alias-state-success-primary)}.lc-fa-chip-search.lc-gran-on,.lc-fa-chip-search.lc-gran-on:hover{background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, transparent);color:var(--dsw-alias-state-warn-primary)}.lc-fa-delta{font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;gap:5px;font-size:11px;font-weight:600;display:inline-flex}.lc-fa-up{color:var(--dsw-alias-state-success-primary)}.lc-fa-down{color:var(--dsw-alias-state-error-primary)}.lc-fa-time{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.lc-fa-ops{border-left:2px solid var(--dsw-alias-border-l1);flex-direction:column;gap:1px;margin:0 8px 8px 15px;padding:2px 0 2px 10px;display:flex}.lc-fa-op{min-width:0;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:5px;align-items:center;gap:8px;padding:3px 6px;font-size:11px;display:flex}.lc-fa-op-link{cursor:pointer}.lc-fa-op-time{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;margin-left:auto}.lc-fa-op-tool{text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);max-width:220px;color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:0 6px;font-size:11px;overflow:hidden}.lc-fa-op-detail{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary);flex:1;overflow:hidden}.lc-fa-read{color:var(--dsw-alias-brand-primary);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;font-size:11px;font-weight:600}";
|
|
9086
9628
|
const tagId$5 = "dsh-context/fileCard.css";
|
|
9087
9629
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
|
|
9088
9630
|
const tag = document.createElement("style");
|
|
@@ -9093,7 +9635,7 @@ window.__ModuleLoader__.load({
|
|
|
9093
9635
|
}
|
|
9094
9636
|
//#endregion
|
|
9095
9637
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/modal.css.mjs
|
|
9096
|
-
const css$4 = ".lc-modal-backdrop{z-index:200;background:var(--dsw-alias-bg-mask-1,#00000073);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.lc-modal-card{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:min(720px,100vw - 48px);max-height:min(82vh,760px);box-shadow:var(--dsw-shadow-lv3,0 12px 32px #0006);color:var(--dsw-alias-label-primary);border-radius:12px;padding:16px 18px 18px;font-size:13px;overflow-y:auto}.lc-modal-head{align-items:baseline;gap:8px;margin-bottom:12px;display:flex}.lc-modal-title{font-size:14px;font-weight:600}.lc-modal-close{color:var(--dsw-alias-label-secondary);cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:6px;margin-left:auto;padding:2px 6px;font-family:inherit;font-size:18px;line-height:1}.lc-
|
|
9638
|
+
const css$4 = ".lc-modal-backdrop{z-index:200;background:var(--dsw-alias-bg-mask-1,#00000073);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.lc-modal-card{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:min(720px,100vw - 48px);max-height:min(82vh,760px);box-shadow:var(--dsw-shadow-lv3,0 12px 32px #0006);color:var(--dsw-alias-label-primary);border-radius:12px;padding:16px 18px 18px;font-size:13px;overflow-y:auto}.lc-modal-head{align-items:baseline;gap:8px;margin-bottom:12px;display:flex}.lc-modal-title{font-size:14px;font-weight:600}.lc-modal-close{color:var(--dsw-alias-label-secondary);cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:6px;margin-left:auto;padding:2px 6px;font-family:inherit;font-size:18px;line-height:1}.lc-gate-card{width:min(440px,100vw - 48px)}.lc-gate-body{color:var(--dsw-alias-label-secondary);line-height:1.7}.lc-gate-versions{gap:24px;margin-top:14px;display:flex}.lc-gate-version{flex-direction:column;gap:2px;display:flex}.lc-gate-version-label{color:var(--dsw-alias-label-secondary);font-size:11px}.lc-gate-version-value{font-weight:600;font-family:var(--dsw-font-family-mono,monospace);color:var(--dsw-alias-label-primary)}.lc-gate-or-newer{color:var(--dsw-alias-label-secondary);margin-left:6px;font-family:inherit;font-size:11px;font-weight:400}.lc-gate-actions{justify-content:flex-end;margin-top:16px;display:flex}.lc-gate-ok{cursor:pointer;background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground);transition:filter var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border:0;border-radius:6px;padding:6px 16px;font-family:inherit;font-size:12px}";
|
|
9097
9639
|
const tagId$4 = "dsh-context/modal.css";
|
|
9098
9640
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
9099
9641
|
const tag = document.createElement("style");
|
|
@@ -9104,7 +9646,7 @@ window.__ModuleLoader__.load({
|
|
|
9104
9646
|
}
|
|
9105
9647
|
//#endregion
|
|
9106
9648
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/browser.css.mjs
|
|
9107
|
-
const css$3 = ".lc-br-dna-ctl{flex:none;margin-left:0}.lc-br-bar-dna .lc-stacked-seg{background-image:linear-gradient(to right, transparent calc(100% - min(.5px, 12.5%)), var(--dsw-alias-bg-layer-1) 0)}.lc-br-hint{color:var(--dsw-alias-label-secondary);white-space:nowrap;margin-left:auto;font-size:11px;font-weight:400}.lc-br-pick{font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;max-width:240px;padding:3px 6px;font-size:12px}.lc-br-meta{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:6px 16px;margin-bottom:8px;display:flex}.lc-br-meta b{color:var(--dsw-alias-label-primary)}.lc-br-meta .lc-est{margin-left:auto}.lc-br-note{color:var(--dsw-alias-label-secondary);margin-top:8px;font-size:12px}.lc-br-retry{color:var(--dsw-alias-brand-primary);font:inherit;cursor:pointer;text-underline-offset:2px;transition:filter var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;padding:0;font-size:12px;text-decoration:underline}.lc-br-
|
|
9649
|
+
const css$3 = ".lc-br-dna-ctl{flex:none;margin-left:0}.lc-br-bar-dna .lc-stacked-seg{background-image:linear-gradient(to right, transparent calc(100% - min(.5px, 12.5%)), var(--dsw-alias-bg-layer-1) 0)}.lc-br-hint{color:var(--dsw-alias-label-secondary);white-space:nowrap;margin-left:auto;font-size:11px;font-weight:400}.lc-br-pick{font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;max-width:240px;padding:3px 6px;font-size:12px}.lc-br-meta{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:6px 16px;margin-bottom:8px;display:flex}.lc-br-meta b{color:var(--dsw-alias-label-primary)}.lc-br-meta .lc-est{margin-left:auto}.lc-br-note{color:var(--dsw-alias-label-secondary);margin-top:8px;font-size:12px}.lc-br-retry{color:var(--dsw-alias-brand-primary);font:inherit;cursor:pointer;text-underline-offset:2px;transition:filter var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;padding:0;font-size:12px;text-decoration:underline}.lc-br-cats{flex-direction:column;gap:4px;margin-top:10px;display:flex}.lc-br-cat{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:8px;overflow:hidden}.lc-br-cat-empty{opacity:.55}.lc-br-cat-row{width:100%;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;text-align:left;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;align-items:center;gap:8px;padding:7px 10px;display:flex}.lc-br-cat-on{background:var(--dsw-alias-interactive-bg-hover)}.lc-br-cat-on i{box-shadow:0 0 0 1px var(--dsw-alias-brand-primary)}.lc-br-cat-row i{width:8px;height:8px;transition:box-shadow var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:2px;flex:none;display:inline-block}.lc-br-cat-label{font-weight:600}.lc-br-cat-count{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:12px}.lc-br-count-grp{flex:1;align-items:center;gap:4px;min-width:0;display:inline-flex}.lc-br-chev{width:12px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:flex}.lc-br-chev:before{content:\"\";width:5px;height:5px;transition:transform var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-bottom:1px solid;border-right:1px solid;transform:rotate(-45deg)}.lc-br-chev-on:before{transform:rotate(45deg)}.lc-br-tokens{color:var(--dsw-alias-label-secondary);flex:none;font-size:12px}.lc-br-delta,.lc-br-tdelta{white-space:nowrap;border-radius:4px;flex:none;padding:0 5px;font-size:11px;font-weight:600}.lc-br-delta-up,.lc-br-tdelta-up{color:var(--dsw-alias-state-success-primary);background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 15%, transparent)}.lc-br-delta-down,.lc-br-tdelta-down{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 15%, transparent)}.lc-br-tokens-grp{flex:none;align-items:center;gap:4px;min-width:0;display:inline-flex}.lc-br-pct{text-align:right;width:36px;color:var(--dsw-alias-label-secondary);flex:none;font-size:12px}.lc-br-body{border-top:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:2px;padding:4px 6px;display:flex}.lc-br-elem{border-radius:6px}.lc-br-elem-on{background:var(--dsw-alias-interactive-bg-active)}.lc-br-elem-row{width:100%;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;text-align:left;transition:background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;padding:5px 6px;font-size:12px;display:flex}.lc-br-err-dot{background:var(--dsw-alias-state-error-primary);width:6px;height:6px;box-shadow:0 0 0 2px color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);border-radius:50%;flex:none}.lc-br-tag{min-width:0;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);text-overflow:ellipsis;white-space:nowrap;border-radius:4px;max-width:220px;padding:0 6px;font-size:11px;overflow:hidden}.lc-br-tool-plugin{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 14%, transparent);border-color:#0000;border-radius:6px;font-size:12px}.lc-br-preview{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.lc-br-time,.lc-br-hits{color:var(--dsw-alias-label-secondary);flex:none;font-size:11px}.lc-br-content{flex-direction:column;gap:6px;padding:2px 6px 8px 26px;display:flex}.lc-br-dim{color:var(--dsw-alias-label-secondary)}";
|
|
9108
9650
|
const tagId$3 = "dsh-context/browser.css";
|
|
9109
9651
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
9110
9652
|
const tag = document.createElement("style");
|
|
@@ -9115,7 +9657,7 @@ window.__ModuleLoader__.load({
|
|
|
9115
9657
|
}
|
|
9116
9658
|
//#endregion
|
|
9117
9659
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/detailSections.css.mjs
|
|
9118
|
-
const css$2 = ".lc-ts-card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;min-width:0;overflow:hidden}.lc-ts-card-head{color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);align-items:center;gap:8px;padding:6px 10px;font-size:11px;font-weight:600;display:flex}.lc-ts-card-head-wrap{flex-wrap:wrap}.lc-ts-card-head b{color:var(--dsw-alias-label-primary)}.lc-ts-call-name{font-size:13px;font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.lc-ts-card-count{margin-left:auto}.lc-ts-card-right{align-items:center;gap:8px;margin-left:auto;display:inline-flex}.lc-ts-card-meta{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-variant-numeric:tabular-nums;font-size:11px;font-weight:400}.lc-ts-call-state{white-space:nowrap;font-size:11px;font-weight:600;line-height:1;font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);border-radius:999px;flex:none;align-items:center;gap:4px;padding:2px 7px;display:inline-flex}.lc-ts-call-state i{background:currentColor;border-radius:50%;flex:none;width:6px;height:6px}.lc-ts-call-ok{color:var(--dsw-alias-state-success-primary);background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 12%, transparent)}.lc-ts-call-err{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)}.lc-ts-desc-body{color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;scrollbar-width:thin;max-height:320px;margin:0;padding:8px 10px;font-size:12px;line-height:1.55;overflow-y:auto}.lc-ts-lines{counter-reset:lc-line}.lc-ts-line{padding-left:26px;display:block;position:relative}.lc-ts-line:before{content:counter(lc-line);counter-increment:lc-line;text-align:right;width:20px;color:var(--dsw-alias-label-tertiary);user-select:none;padding-right:6px;font-size:11px;position:absolute;left:0}.lc-ts-line:empty:after{content:\"\"}.lc-ts-param-row{border-top:1px solid var(--dsw-alias-border-l1);grid-template-columns:minmax(0,140px) minmax(0,90px) 56px minmax(0,1fr);align-items:baseline;gap:2px 10px;padding:6px 10px;font-size:12px;display:grid}.lc-ts-param-row:first-of-type{border-top:0}.lc-ts-param-name{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.lc-ts-param-type{color:var(--dsw-alias-label-secondary);font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.lc-ts-param-req{color:var(--dsw-alias-state-warn-primary);font-size:11px;font-weight:600}.lc-ts-param-req-off{color:var(--dsw-alias-label-secondary);font-size:11px}.lc-ts-param-desc{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;grid-column:1/-1;line-height:1.5}.lc-ts-params-empty{color:var(--dsw-alias-label-secondary);padding:8px 10px;font-size:12px}.lc-ts-arg-row{border-top:1px solid var(--dsw-alias-border-l1);grid-template-columns:minmax(0,96px) 1fr;align-items:start;column-gap:12px;padding:6px 10px;font-size:12px;display:grid}.lc-ts-arg-row:first-of-type{border-top:0}.lc-ts-arg-row .lc-ts-param-name{text-overflow:unset;white-space:normal;overflow-wrap:anywhere;overflow:visible}.lc-ts-arg-val{color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);white-space:pre-wrap;word-break:break-word;scrollbar-width:thin;max-height:200px;font-size:12px;line-height:1.55;overflow-y:auto}.lc-ts-json{flex-direction:column;gap:4px;display:flex}.lc-ts-json-toggle{color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;align-self:flex-start;padding:0;font-size:11px}.lc-
|
|
9660
|
+
const css$2 = ".lc-ts-card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;min-width:0;overflow:hidden}.lc-ts-card-head{color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);align-items:center;gap:8px;padding:6px 10px;font-size:11px;font-weight:600;display:flex}.lc-ts-card-head-wrap{flex-wrap:wrap}.lc-ts-card-head b{color:var(--dsw-alias-label-primary)}.lc-ts-call-name{font-size:13px;font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.lc-ts-card-count{margin-left:auto}.lc-ts-card-right{align-items:center;gap:8px;margin-left:auto;display:inline-flex}.lc-ts-card-meta{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-variant-numeric:tabular-nums;font-size:11px;font-weight:400}.lc-ts-call-state{white-space:nowrap;font-size:11px;font-weight:600;line-height:1;font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);border-radius:999px;flex:none;align-items:center;gap:4px;padding:2px 7px;display:inline-flex}.lc-ts-call-state i{background:currentColor;border-radius:50%;flex:none;width:6px;height:6px}.lc-ts-call-ok{color:var(--dsw-alias-state-success-primary);background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 12%, transparent)}.lc-ts-call-err{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)}.lc-ts-desc-body{color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;scrollbar-width:thin;max-height:320px;margin:0;padding:8px 10px;font-size:12px;line-height:1.55;overflow-y:auto}.lc-ts-lines{counter-reset:lc-line}.lc-ts-line{padding-left:26px;display:block;position:relative}.lc-ts-line:before{content:counter(lc-line);counter-increment:lc-line;text-align:right;width:20px;color:var(--dsw-alias-label-tertiary);user-select:none;padding-right:6px;font-size:11px;position:absolute;left:0}.lc-ts-line:empty:after{content:\"\"}.lc-ts-param-row{border-top:1px solid var(--dsw-alias-border-l1);grid-template-columns:minmax(0,140px) minmax(0,90px) 56px minmax(0,1fr);align-items:baseline;gap:2px 10px;padding:6px 10px;font-size:12px;display:grid}.lc-ts-param-row:first-of-type{border-top:0}.lc-ts-param-name{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.lc-ts-param-type{color:var(--dsw-alias-label-secondary);font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.lc-ts-param-req{color:var(--dsw-alias-state-warn-primary);font-size:11px;font-weight:600}.lc-ts-param-req-off{color:var(--dsw-alias-label-secondary);font-size:11px}.lc-ts-param-desc{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;grid-column:1/-1;line-height:1.5}.lc-ts-params-empty{color:var(--dsw-alias-label-secondary);padding:8px 10px;font-size:12px}.lc-ts-arg-row{border-top:1px solid var(--dsw-alias-border-l1);grid-template-columns:minmax(0,96px) 1fr;align-items:start;column-gap:12px;padding:6px 10px;font-size:12px;display:grid}.lc-ts-arg-row:first-of-type{border-top:0}.lc-ts-arg-row .lc-ts-param-name{text-overflow:unset;white-space:normal;overflow-wrap:anywhere;overflow:visible}.lc-ts-arg-val{color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);white-space:pre-wrap;word-break:break-word;scrollbar-width:thin;max-height:200px;font-size:12px;line-height:1.55;overflow-y:auto}.lc-ts-json{flex-direction:column;gap:4px;display:flex}.lc-ts-json-toggle{color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;align-self:flex-start;padding:0;font-size:11px}.lc-rich-seg{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;gap:2px;margin-left:auto;padding:1px;display:flex}.lc-rich-seg-btn{color:var(--dsw-alias-label-secondary);cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:5px;padding:3px 8px;font-family:inherit;font-size:11px;line-height:1}.lc-rich-seg-btn:hover{color:var(--dsw-alias-label-primary)}.lc-rich-seg-on,.lc-rich-seg-on:hover{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.lc-rich-copy{color:var(--dsw-alias-label-secondary);cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:5px;align-items:center;padding:2px;display:inline-flex}.lc-rich-copy:hover{color:var(--dsw-alias-label-primary)}.lc-rich-copy-on,.lc-rich-copy-on:hover{color:var(--dsw-alias-state-success-primary)}.lc-ts-desc-md{color:var(--dsw-alias-label-primary);word-break:break-word;overflow-wrap:anywhere;scrollbar-width:thin;min-width:0;max-height:320px;padding:4px 10px;font-size:12px;line-height:1.55;overflow:hidden auto}.lc-ts-desc-md>div{font-size:13px;line-height:1.55}.lc-ts-desc-md div :is(h1,h2,h3,h4,h5,h6){margin:10px 0 4px;font-size:13px;font-weight:600}.lc-ts-desc-md div p{white-space:pre-line;margin:6px 0}.lc-ts-desc-md div p br{display:none}.lc-ts-desc-md div pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;margin:6px 0}.lc-ts-desc-md div :not(pre)>code{box-decoration-break:clone;padding:1px 5px;line-height:1.3;font-size:1em!important}.lc-ts-desc-md div table code{font-size:inherit}";
|
|
9119
9661
|
const tagId$2 = "dsh-context/detailSections.css";
|
|
9120
9662
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
9121
9663
|
const tag = document.createElement("style");
|
|
@@ -9126,7 +9668,7 @@ window.__ModuleLoader__.load({
|
|
|
9126
9668
|
}
|
|
9127
9669
|
//#endregion
|
|
9128
9670
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/attachments.css.mjs
|
|
9129
|
-
const css$1 = ".lc-att-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:8px 10px;display:grid}.lc-att-item{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:100%;min-width:0;font:inherit;text-align:left;cursor:pointer;transition:border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border-radius:8px;align-items:center;gap:8px;padding:6px;display:flex}.lc-att-
|
|
9671
|
+
const css$1 = ".lc-att-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:8px 10px;display:grid}.lc-att-item{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:100%;min-width:0;font:inherit;text-align:left;cursor:pointer;transition:border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out), background-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border-radius:8px;align-items:center;gap:8px;padding:6px;display:flex}.lc-att-thumb{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:6px;flex:none;justify-content:center;align-items:center;width:64px;height:64px;padding:0;display:flex;overflow:hidden}.lc-att-thumb img{object-fit:cover;width:100%;height:100%;display:block}.lc-att-ph,.lc-att-err{color:var(--dsw-alias-label-secondary);text-align:center;padding:2px;font-size:10px}.lc-att-meta{flex-direction:column;gap:2px;min-width:0;display:flex}.lc-att-name{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;word-break:break-word;font-size:12px;line-height:1.3}.lc-att-row{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;font-size:11px}.lc-att-row-label{min-width:3.2em;font-weight:400;display:inline-block}.lc-att-lightbox{z-index:1000;place-items:center;padding:40px;display:grid;position:fixed;inset:0}.lc-att-lightbox-mask{background:var(--dsw-alias-bg-mask-1,#00000073);backdrop-filter:var(--dsw-mask-blur,blur(2px));position:absolute;inset:0}.lc-att-lightbox-img{object-fit:contain;background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));max-width:min(100%,1600px);max-height:calc(100vh - 80px);box-shadow:var(--dsw-shadow-lv3,0 12px 32px #0006);border-radius:12px;position:relative}.lc-att-lightbox-close{z-index:1;border:1px solid var(--dsw-alias-border-l2-darkmode-thin,var(--dsw-alias-border-l1));background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));width:36px;height:36px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:999px;place-items:center;padding:0;display:grid;position:fixed;top:20px;right:20px}";
|
|
9130
9672
|
const tagId$1 = "dsh-context/attachments.css";
|
|
9131
9673
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
9132
9674
|
const tag = document.createElement("style");
|
|
@@ -9137,7 +9679,7 @@ window.__ModuleLoader__.load({
|
|
|
9137
9679
|
}
|
|
9138
9680
|
//#endregion
|
|
9139
9681
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/agentGraph.css.mjs
|
|
9140
|
-
const css = ".lc-agents-chips{flex-wrap:wrap;gap:6px;margin-bottom:10px;display:flex}.lc-agents-chip{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;border-radius:999px;padding:2px 8px;font-size:11px}.lc-agents-chip-on{color:var(--dsw-alias-state-success-primary);border-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 40%, transparent)}.lc-agents-stage{overscroll-behavior-x:contain;margin:0 -4px;padding:0 4px;overflow-x:auto}.lc-agents-svg{max-width:none;margin:0 auto;display:block}.lc-agents-link
|
|
9682
|
+
const css = ".lc-agents-chips{flex-wrap:wrap;gap:6px;margin-bottom:10px;display:flex}.lc-agents-chip{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;border-radius:999px;padding:2px 8px;font-size:11px}.lc-agents-chip-on{color:var(--dsw-alias-state-success-primary);border-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 40%, transparent)}.lc-agents-stage{overscroll-behavior-x:contain;margin:0 -4px;padding:0 4px;overflow-x:auto}.lc-agents-svg{max-width:none;margin:0 auto;display:block}.lc-agents-link-live{stroke-opacity:.85}.lc-agents-flow{stroke-linecap:round;stroke-dasharray:2 7}.lc-agent-node{outline:none}.lc-agent-clickable{cursor:pointer}.lc-agent-halo{transition:fill var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out)}.lc-agent-self .lc-agent-halo{fill:var(--dsw-alias-bg-layer-2)}.lc-agent-running .lc-agent-halo{fill:color-mix(in srgb, var(--dsw-alias-state-success-primary) 12%, transparent)}.lc-agent-done .lc-agent-halo{fill:color-mix(in srgb, var(--dsw-alias-state-success-primary) 7%, transparent)}.lc-agent-seg{transition:stroke-dasharray .3s,stroke-dashoffset .3s}.lc-agent-free{stroke:color-mix(in srgb, var(--dsw-alias-label-secondary) 18%, transparent)}.lc-agent-pct{font-variant-numeric:tabular-nums;pointer-events:none;font-size:11px;font-weight:600}.lc-agent-caption{text-align:center;pointer-events:none;width:100%;line-height:1.25}.lc-agent-label{color:var(--dsw-alias-label-primary);overflow-wrap:break-word;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:11px;display:-webkit-box;overflow:hidden}.lc-agent-tokens{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;font-size:10px}.lc-agents-solo{padding:4px 0 10px}.lc-agents-inspector{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:8px;flex-wrap:wrap;align-items:baseline;gap:4px 8px;min-width:0;margin-top:10px;padding:7px 10px;font-size:12px;display:flex}.lc-agents-inspector-name{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}.lc-agents-badge{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 6px;font-size:10px}.lc-agent-self-badge{vertical-align:1px;margin-left:5px}.lc-agents-badge-on{color:var(--dsw-alias-state-success-primary);border-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 40%, transparent)}.lc-agents-inspector-stats{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.lc-agents-inspector-open{color:var(--dsw-alias-brand-primary,var(--color-blue-500));flex:none;margin-left:auto}.lc-agents-legend{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:4px 14px;margin-top:8px;font-size:11px;display:flex}.lc-agents-legend-item{align-items:center;gap:5px;display:inline-flex}.lc-agents-legend-item i{border-radius:2px;width:8px;height:8px}.lc-agents-legend-free{background:color-mix(in srgb, var(--dsw-alias-label-secondary) 18%, transparent)}.lc-agents-legend-edge{border-top:2px dashed var(--dsw-alias-label-secondary);border-radius:0!important;width:14px!important;height:0!important}";
|
|
9141
9683
|
const tagId = "dsh-context/agentGraph.css";
|
|
9142
9684
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
9143
9685
|
const tag = document.createElement("style");
|
|
@@ -9206,7 +9748,7 @@ window.__ModuleLoader__.load({
|
|
|
9206
9748
|
}, (props) => (0, react.createElement)(ContextJump, props));
|
|
9207
9749
|
});
|
|
9208
9750
|
registerContextCommand(ctx, kit);
|
|
9209
|
-
const ContextModal = makeContextModal(ctx, kit);
|
|
9751
|
+
const ContextModal = makeContextModal(ctx, kit, settings);
|
|
9210
9752
|
ctx.slots.inject("conversation.input.overlay", () => {
|
|
9211
9753
|
return ctx.slots.register({
|
|
9212
9754
|
name: "conversation.input.overlay",
|