dsh-edge 0.18.0 → 0.19.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +8 -8
- package/README.zh.md +8 -8
- package/THIRD_PARTY_NOTICES.md +2011 -449
- package/dist/assets/fonts/Montserrat-OFL.txt +93 -0
- package/dist/assets/fonts/montserrat-light-Cvd2VjE_.woff2 +0 -0
- package/dist/assets/fonts/montserrat-medium-B4OyO9CN.woff2 +0 -0
- package/dist/assets/fonts/montserrat-regular-DYep38cA.woff2 +0 -0
- package/dist/assets/index-Cq6ljTv2.css +1 -0
- package/dist/assets/index-Dy0OhsZ5.js +127 -0
- package/dist/assets/langs/asciidoc-Ve4PFQV2.js +2 -0
- package/dist/assets/langs/bat-BkioyH1T.js +2 -0
- package/dist/assets/langs/bibtex-CHM0blh-.js +2 -0
- package/dist/assets/langs/clojure-P80f7IUj.js +2 -0
- package/dist/assets/langs/cmake-D1j8_8rp.js +2 -0
- package/dist/assets/langs/csv-fuZLfV_i.js +2 -0
- package/dist/assets/langs/dart-bE4Kk8sk.js +2 -0
- package/dist/assets/langs/diff-D97Zzqfu.js +2 -0
- package/dist/assets/langs/dotenv-Da5cRb03.js +2 -0
- package/dist/assets/langs/elixir-CvYZzuDY.js +2 -0
- package/dist/assets/langs/erlang-DsQrWhSR.js +2 -0
- package/dist/assets/langs/fish-BvzEVeQv.js +2 -0
- package/dist/assets/langs/fsharp-CXgrBDvD.js +2 -0
- package/dist/assets/langs/graphql-DujV8YkJ.js +2 -0
- package/dist/assets/langs/groovy-gcz8RCvz.js +2 -0
- package/dist/assets/langs/haskell-Df6bDoY_.js +2 -0
- package/dist/assets/langs/hcl-BWvSN4gD.js +2 -0
- package/dist/assets/langs/html-derivative-DOyKdj44.js +2 -0
- package/dist/assets/langs/html-fwsONPVS.js +2 -0
- package/dist/assets/langs/http-DcV90OkR.js +2 -0
- package/dist/assets/langs/javascript-DI5JR1nB.js +2 -0
- package/dist/assets/langs/julia-BpJ6DjL_.js +2 -0
- package/dist/assets/langs/latex-B4C7GdlO.js +2 -0
- package/dist/assets/langs/log-2UxHyX5q.js +2 -0
- package/dist/assets/langs/make-CHLpvVh8.js +2 -0
- package/dist/assets/langs/nix-CwoSXNpI.js +2 -0
- package/dist/assets/langs/perl-DsWkoyyU.js +2 -0
- package/dist/assets/langs/php-LEPfNACG.js +2 -0
- package/dist/assets/langs/powershell-Dpen1YoG.js +2 -0
- package/dist/assets/langs/proto-C7zT0LnQ.js +2 -0
- package/dist/assets/langs/r-Dspwwk_N.js +2 -0
- package/dist/assets/langs/rst-BbocfKWr.js +2 -0
- package/dist/assets/langs/ruby-R292Iif0.js +2 -0
- package/dist/assets/langs/scala-C151Ov-r.js +2 -0
- package/dist/assets/langs/svelte-DNMY6jOf.js +2 -0
- package/dist/assets/langs/system-verilog-CnnmHF94.js +2 -0
- package/dist/assets/langs/vb-D17OF-Vu.js +2 -0
- package/dist/assets/langs/verilog-BQ8w6xss.js +2 -0
- package/dist/assets/langs/vue-Dq2x6432.js +2 -0
- package/dist/favicon-dark.svg +3 -0
- package/dist/favicon.svg +0 -5
- package/dist/index.html +5 -4
- package/dist/manifest.webmanifest +3 -4
- package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +353 -101
- package/dist/plugins/@deepseek-ai/dsh-api-job-controller/client.js +367 -0
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +7223 -3584
- package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +1107 -991
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-controller/client.js +119 -6
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-files/client.js +41 -35
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +354 -5279
- package/dist/plugins/@deepseek-ai/dsh-client-file-upload/client.js +10 -23
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +234 -80
- package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +554 -46
- package/dist/plugins/@deepseek-ai/dsh-client-shortcuts/client.js +2006 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +1090 -914
- package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +79 -6
- package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +126 -155
- package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +5776 -1593
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +375 -121
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +3524 -1923
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +1615 -258
- package/dist/plugins/@deepseek-ai/dsh-client-ui-directory-picker-browse/client.js +9 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +25 -10
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +169 -24
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +413 -63
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +131 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +24 -22
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +281 -128
- package/dist/plugins/@deepseek-ai/dsh-client-ui-open-in-app/client.js +674 -223
- package/dist/plugins/@deepseek-ai/dsh-client-ui-plan/client.js +596 -18
- package/dist/plugins/@deepseek-ai/dsh-client-ui-reference/client.js +92 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +467 -59
- package/dist/plugins/@deepseek-ai/dsh-client-ui-session/client.js +231 -72
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +281 -117
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +642 -122
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +1565 -438
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/client.js +201 -75
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugins/client.js +30 -1628
- package/dist/plugins/@deepseek-ai/dsh-client-ui-shortcuts/client.js +1163 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +165 -39
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-browser/client.js +1648 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/client.js +5515 -25622
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-files/client.js +419 -118
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-right/client.js +5692 -260
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +156 -41
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +386 -263
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +183 -73
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +2367 -429
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +788 -270
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +87 -79
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +28 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +2647 -1044
- package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +22 -7
- package/dist/plugins/dsh-edge-client-ui/client.js +1 -10
- package/package.json +96 -86
- package/scripts/cli.mjs +16 -4
- package/scripts/install.d.mts +12 -2
- package/scripts/install.mjs +36 -9
- package/scripts/legal-files.mjs +15 -0
- package/worker/direct/index.js +2564 -1822
- package/worker/isolated/index.js +2144 -1402
- package/dist/assets/index-BKQ_L1z6.js +0 -117
- package/dist/assets/index-DPX2bQLO.css +0 -1
- package/dist/assets/langs/html-CfGypltT.js +0 -2
- package/dist/assets/langs/php-DJl5gRdb.js +0 -2
- package/dist/assets/langs/ruby-5eNB0pDK.js +0 -2
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +0 -505
- package/dist/plugins/@deepseek-ai/dsh-client-ui-schedule/client.js +0 -307
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
window.__ModuleLoader__.load({
|
|
2
|
-
id: "@deepseek-ai/dsh-client-ui-schedule",
|
|
3
|
-
factory: (require) => {
|
|
4
|
-
var module = { exports: {} };
|
|
5
|
-
var exports = module.exports;
|
|
6
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let react = require("react");
|
|
9
|
-
let react_dom = require("react-dom");
|
|
10
|
-
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
11
|
-
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-schedule/src/client/ScheduleCatalogAction.module.css.mjs
|
|
12
|
-
const css = ".-\\34 LnlG_root{position:relative}.-\\34 LnlG_trigger{min-height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:6px;align-items:center;gap:4px;padding:3px 2px;font-size:12px;line-height:18px;display:inline-flex}.-\\34 LnlG_trigger:hover,.-\\34 LnlG_trigger:focus-visible{color:var(--dsw-alias-label-secondary)}.-\\34 LnlG_trigger svg{flex:none}.-\\34 LnlG_trigger>svg:last-child{transition:transform .12s}.-\\34 LnlG_triggerOpen{transform:rotate(180deg)}.-\\34 LnlG_count{margin-left:2px}.-\\34 LnlG_menu{z-index:100;box-sizing:border-box;background:var(--dsw-specific-menu);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);width:336px;max-width:min(336px,100vw - 32px);max-height:min(420px,100vh - 140px);box-shadow:var(--dsw-elevation-prominent);border:0;border-radius:20px;flex-direction:column;gap:2px;margin:0;padding:4px;list-style:none;display:flex;position:fixed;overflow:auto}.-\\34 LnlG_row{box-sizing:border-box;width:100%;min-height:54px;color:var(--dsw-alias-label-primary);border-radius:8px;flex-direction:column;flex-shrink:0;gap:3px;padding:8px 10px;display:flex}.-\\34 LnlG_rowOverdue{background:var(--dsw-alias-state-warn-tertiary)}.-\\34 LnlG_status{color:var(--dsw-alias-label-tertiary);align-items:center;gap:5px;font-size:11px;line-height:16px;display:inline-flex}.-\\34 LnlG_statusDot{corner-shape:round;background:var(--dsw-alias-state-business-primary);border-radius:50%;flex:none;width:8px;height:8px}.-\\34 LnlG_rowOverdue .-\\34 LnlG_status{color:var(--dsw-alias-state-warn-label)}.-\\34 LnlG_rowOverdue .-\\34 LnlG_statusDot{background:var(--dsw-alias-state-warn-primary)}.-\\34 LnlG_prompt{overflow-wrap:anywhere;white-space:normal;font-size:13px;line-height:18px}.-\\34 LnlG_metadata{min-width:0;color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:5px;font-size:11px;line-height:16px;display:flex}.-\\34 LnlG_relativeOverdue{color:var(--dsw-alias-state-warn-label)}";
|
|
13
|
-
const tagId = "@deepseek-ai/dsh-client-ui-schedule/ScheduleCatalogAction.module.css";
|
|
14
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
15
|
-
const tag = document.createElement("style");
|
|
16
|
-
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-schedule";
|
|
17
|
-
tag.dataset.pluginCss = tagId;
|
|
18
|
-
tag.textContent = css;
|
|
19
|
-
document.head.appendChild(tag);
|
|
20
|
-
}
|
|
21
|
-
var ScheduleCatalogAction_module_css_default = {
|
|
22
|
-
"count": "-4LnlG_count",
|
|
23
|
-
"menu": "-4LnlG_menu",
|
|
24
|
-
"metadata": "-4LnlG_metadata",
|
|
25
|
-
"prompt": "-4LnlG_prompt",
|
|
26
|
-
"relativeOverdue": "-4LnlG_relativeOverdue",
|
|
27
|
-
"root": "-4LnlG_root",
|
|
28
|
-
"row": "-4LnlG_row",
|
|
29
|
-
"rowOverdue": "-4LnlG_rowOverdue",
|
|
30
|
-
"status": "-4LnlG_status",
|
|
31
|
-
"statusDot": "-4LnlG_statusDot",
|
|
32
|
-
"trigger": "-4LnlG_trigger",
|
|
33
|
-
"triggerOpen": "-4LnlG_triggerOpen"
|
|
34
|
-
};
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region lib/types/client/ScheduleCatalogAction.js
|
|
37
|
-
const EMPTY_RECORDS = [];
|
|
38
|
-
const SECOND_MS = 1e3;
|
|
39
|
-
const SECOND_UNIT = {
|
|
40
|
-
unit: "second",
|
|
41
|
-
seconds: 1
|
|
42
|
-
};
|
|
43
|
-
const MEASURE_STYLE = {
|
|
44
|
-
visibility: "hidden",
|
|
45
|
-
left: 0,
|
|
46
|
-
top: 0
|
|
47
|
-
};
|
|
48
|
-
const UNIT_SECONDS = [
|
|
49
|
-
{
|
|
50
|
-
unit: "day",
|
|
51
|
-
seconds: 86400
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
unit: "hour",
|
|
55
|
-
seconds: 3600
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
unit: "minute",
|
|
59
|
-
seconds: 60
|
|
60
|
-
},
|
|
61
|
-
SECOND_UNIT
|
|
62
|
-
];
|
|
63
|
-
/** Localized unit word for one integral magnitude. */
|
|
64
|
-
function unitLabel(unit, value, t) {
|
|
65
|
-
const pair = {
|
|
66
|
-
day: ["unit.day.one", "unit.day.other"],
|
|
67
|
-
hour: ["unit.hour.one", "unit.hour.other"],
|
|
68
|
-
minute: ["unit.minute.one", "unit.minute.other"],
|
|
69
|
-
second: ["unit.second.one", "unit.second.other"]
|
|
70
|
-
}[unit];
|
|
71
|
-
return t(value === 1 ? pair[0] : pair[1], { count: value });
|
|
72
|
-
}
|
|
73
|
-
/** Pick the largest exact whole unit without rounding the durable interval. */
|
|
74
|
-
function formatScheduleFrequency(record, t) {
|
|
75
|
-
if (record.kind !== "every") return t("frequency.once");
|
|
76
|
-
let selected = SECOND_UNIT;
|
|
77
|
-
for (const candidate of UNIT_SECONDS) {
|
|
78
|
-
if (record.everySeconds % candidate.seconds !== 0) continue;
|
|
79
|
-
selected = candidate;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
const value = record.everySeconds / selected.seconds;
|
|
83
|
-
return t("frequency.every", {
|
|
84
|
-
value,
|
|
85
|
-
unit: unitLabel(selected.unit, value, t)
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
/** Format the durable UTC target in the browser's current locale and time zone. */
|
|
89
|
-
function formatScheduleLocalTime(scheduledAt, locale) {
|
|
90
|
-
return new Intl.DateTimeFormat(locale, {
|
|
91
|
-
dateStyle: "medium",
|
|
92
|
-
timeStyle: "short"
|
|
93
|
-
}).format(Date.parse(scheduledAt));
|
|
94
|
-
}
|
|
95
|
-
/** Human relative target using the largest natural clock unit. */
|
|
96
|
-
function formatScheduleRelative(scheduledAt, now, t) {
|
|
97
|
-
const difference = Date.parse(scheduledAt) - now;
|
|
98
|
-
if (difference === 0) return t("relative.now");
|
|
99
|
-
const absoluteSeconds = Math.abs(difference) / SECOND_MS;
|
|
100
|
-
const selected = UNIT_SECONDS.find((candidate) => absoluteSeconds >= candidate.seconds) ?? SECOND_UNIT;
|
|
101
|
-
const value = Math.max(1, difference > 0 ? Math.ceil(absoluteSeconds / selected.seconds) : Math.floor(absoluteSeconds / selected.seconds));
|
|
102
|
-
const unit = unitLabel(selected.unit, value, t);
|
|
103
|
-
return t(difference > 0 ? "relative.future" : "relative.overdue", {
|
|
104
|
-
value,
|
|
105
|
-
unit
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
/** Overdue records first, then ascending target time; exact ties stay stable. */
|
|
109
|
-
function orderScheduleRecords(records, now) {
|
|
110
|
-
return records.map((record, index) => ({
|
|
111
|
-
record,
|
|
112
|
-
index
|
|
113
|
-
})).sort((left, right) => {
|
|
114
|
-
const leftTime = Date.parse(left.record.scheduledAt);
|
|
115
|
-
const rightTime = Date.parse(right.record.scheduledAt);
|
|
116
|
-
const leftOverdue = leftTime <= now;
|
|
117
|
-
const rightOverdue = rightTime <= now;
|
|
118
|
-
if (leftOverdue !== rightOverdue) return Number(rightOverdue) - Number(leftOverdue);
|
|
119
|
-
return leftTime - rightTime || left.index - right.index;
|
|
120
|
-
}).map(({ record }) => record);
|
|
121
|
-
}
|
|
122
|
-
/** Read-only current-Session active reminder catalog. */
|
|
123
|
-
function ScheduleCatalogAction({ useSession, useProjection, t }) {
|
|
124
|
-
const openState = useSession((snapshot) => snapshot.openState);
|
|
125
|
-
const records = useProjection("schedule") ?? EMPTY_RECORDS;
|
|
126
|
-
const visible = openState === "open" && records.length > 0;
|
|
127
|
-
const [open, setOpen] = (0, react.useState)(false);
|
|
128
|
-
const [now, setNow] = (0, react.useState)(() => Date.now());
|
|
129
|
-
const rootRef = (0, react.useRef)(null);
|
|
130
|
-
const triggerRef = (0, react.useRef)(null);
|
|
131
|
-
const catalogRef = (0, react.useRef)(null);
|
|
132
|
-
const catalogPosition = (0, _deepseek_ai_dsh_client_ui_primitives.useAnchoredPosition)({
|
|
133
|
-
open,
|
|
134
|
-
anchorRef: triggerRef,
|
|
135
|
-
panelRef: catalogRef,
|
|
136
|
-
side: "bottom",
|
|
137
|
-
gap: 5,
|
|
138
|
-
margin: 16
|
|
139
|
-
});
|
|
140
|
-
(0, _deepseek_ai_dsh_client_ui_primitives.useDismissOnOutsidePointer)(rootRef, open, setOpen, catalogRef);
|
|
141
|
-
(0, react.useEffect)(() => {
|
|
142
|
-
if (!open) return;
|
|
143
|
-
setNow(Date.now());
|
|
144
|
-
const timer = setInterval(() => {
|
|
145
|
-
setNow(Date.now());
|
|
146
|
-
}, SECOND_MS);
|
|
147
|
-
return () => {
|
|
148
|
-
clearInterval(timer);
|
|
149
|
-
};
|
|
150
|
-
}, [open]);
|
|
151
|
-
(0, react.useEffect)(() => {
|
|
152
|
-
if (visible || !open) return;
|
|
153
|
-
setOpen(false);
|
|
154
|
-
}, [visible, open]);
|
|
155
|
-
const rows = (0, react.useMemo)(() => orderScheduleRecords(records, now), [records, now]);
|
|
156
|
-
if (!visible) return null;
|
|
157
|
-
const countLabel = t(records.length === 1 ? "trigger.one" : "trigger.other", { count: records.length });
|
|
158
|
-
const toggleCatalog = () => {
|
|
159
|
-
setNow(Date.now());
|
|
160
|
-
setOpen((current) => !current);
|
|
161
|
-
};
|
|
162
|
-
const onKeyDown = (event) => {
|
|
163
|
-
if (event.key !== "Escape" || !open) return;
|
|
164
|
-
event.preventDefault();
|
|
165
|
-
setOpen(false);
|
|
166
|
-
triggerRef.current?.focus();
|
|
167
|
-
};
|
|
168
|
-
const trigger = (0, react_jsx_runtime.jsxs)("button", {
|
|
169
|
-
ref: triggerRef,
|
|
170
|
-
type: "button",
|
|
171
|
-
className: ScheduleCatalogAction_module_css_default.trigger,
|
|
172
|
-
"aria-expanded": open,
|
|
173
|
-
"aria-label": countLabel,
|
|
174
|
-
onClick: toggleCatalog,
|
|
175
|
-
children: [
|
|
176
|
-
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAlarmClockOutline16, { size: 14 }),
|
|
177
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
178
|
-
className: ScheduleCatalogAction_module_css_default.count,
|
|
179
|
-
children: countLabel
|
|
180
|
-
}),
|
|
181
|
-
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { className: open ? ScheduleCatalogAction_module_css_default.triggerOpen : void 0 })
|
|
182
|
-
]
|
|
183
|
-
});
|
|
184
|
-
const catalog = open ? (0, react_dom.createPortal)((0, react_jsx_runtime.jsx)("ul", {
|
|
185
|
-
ref: catalogRef,
|
|
186
|
-
className: ScheduleCatalogAction_module_css_default.menu,
|
|
187
|
-
style: catalogPosition ?? MEASURE_STYLE,
|
|
188
|
-
"aria-label": t("list.aria"),
|
|
189
|
-
children: rows.map((record) => {
|
|
190
|
-
const overdue = Date.parse(record.scheduledAt) <= now;
|
|
191
|
-
return (0, react_jsx_runtime.jsxs)("li", {
|
|
192
|
-
className: overdue ? `${ScheduleCatalogAction_module_css_default.row} ${ScheduleCatalogAction_module_css_default.rowOverdue}` : ScheduleCatalogAction_module_css_default.row,
|
|
193
|
-
children: [
|
|
194
|
-
(0, react_jsx_runtime.jsxs)("span", {
|
|
195
|
-
className: ScheduleCatalogAction_module_css_default.status,
|
|
196
|
-
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
197
|
-
className: ScheduleCatalogAction_module_css_default.statusDot,
|
|
198
|
-
"aria-hidden": "true"
|
|
199
|
-
}), (0, react_jsx_runtime.jsx)("span", { children: t(overdue ? "status.overdue" : "status.scheduled") })]
|
|
200
|
-
}),
|
|
201
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
202
|
-
className: ScheduleCatalogAction_module_css_default.prompt,
|
|
203
|
-
children: record.prompt
|
|
204
|
-
}),
|
|
205
|
-
(0, react_jsx_runtime.jsxs)("span", {
|
|
206
|
-
className: ScheduleCatalogAction_module_css_default.metadata,
|
|
207
|
-
children: [
|
|
208
|
-
(0, react_jsx_runtime.jsx)("span", { children: formatScheduleFrequency(record, t) }),
|
|
209
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
210
|
-
"aria-hidden": "true",
|
|
211
|
-
children: "·"
|
|
212
|
-
}),
|
|
213
|
-
(0, react_jsx_runtime.jsx)("span", { children: formatScheduleLocalTime(record.scheduledAt, document.documentElement.lang) }),
|
|
214
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
215
|
-
"aria-hidden": "true",
|
|
216
|
-
children: "·"
|
|
217
|
-
}),
|
|
218
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
219
|
-
className: overdue ? ScheduleCatalogAction_module_css_default.relativeOverdue : void 0,
|
|
220
|
-
children: formatScheduleRelative(record.scheduledAt, now, t)
|
|
221
|
-
})
|
|
222
|
-
]
|
|
223
|
-
})
|
|
224
|
-
]
|
|
225
|
-
}, record.id);
|
|
226
|
-
})
|
|
227
|
-
}), document.body) : null;
|
|
228
|
-
return (0, react_jsx_runtime.jsxs)("div", {
|
|
229
|
-
ref: rootRef,
|
|
230
|
-
className: ScheduleCatalogAction_module_css_default.root,
|
|
231
|
-
onKeyDown,
|
|
232
|
-
children: [trigger, catalog]
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region lib/types/client/locales.js
|
|
237
|
-
/** `schedule.catalog` namespace dictionaries. */
|
|
238
|
-
/** Dictionary namespace owned by this plugin. */
|
|
239
|
-
const NS = "schedule.catalog";
|
|
240
|
-
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
241
|
-
const zh = {
|
|
242
|
-
"trigger.one": "{count} 个提醒",
|
|
243
|
-
"trigger.other": "{count} 个提醒",
|
|
244
|
-
"list.aria": "活动提醒",
|
|
245
|
-
"status.scheduled": "等待中",
|
|
246
|
-
"status.overdue": "已逾期",
|
|
247
|
-
"frequency.once": "单次",
|
|
248
|
-
"frequency.every": "{value}{unit}一次",
|
|
249
|
-
"unit.day.one": "天",
|
|
250
|
-
"unit.day.other": "天",
|
|
251
|
-
"unit.hour.one": "小时",
|
|
252
|
-
"unit.hour.other": "小时",
|
|
253
|
-
"unit.minute.one": "分钟",
|
|
254
|
-
"unit.minute.other": "分钟",
|
|
255
|
-
"unit.second.one": "秒",
|
|
256
|
-
"unit.second.other": "秒",
|
|
257
|
-
"relative.now": "现在到期",
|
|
258
|
-
"relative.future": "{value}{unit}后",
|
|
259
|
-
"relative.overdue": "已逾期 {value}{unit}"
|
|
260
|
-
};
|
|
261
|
-
/** English dictionary, key-identical to the Chinese source of truth. */
|
|
262
|
-
const en = {
|
|
263
|
-
"trigger.one": "{count} reminder",
|
|
264
|
-
"trigger.other": "{count} reminders",
|
|
265
|
-
"list.aria": "Active reminders",
|
|
266
|
-
"status.scheduled": "Scheduled",
|
|
267
|
-
"status.overdue": "Overdue",
|
|
268
|
-
"frequency.once": "Once",
|
|
269
|
-
"frequency.every": "Every {value} {unit}",
|
|
270
|
-
"unit.day.one": "day",
|
|
271
|
-
"unit.day.other": "days",
|
|
272
|
-
"unit.hour.one": "hour",
|
|
273
|
-
"unit.hour.other": "hours",
|
|
274
|
-
"unit.minute.one": "minute",
|
|
275
|
-
"unit.minute.other": "minutes",
|
|
276
|
-
"unit.second.one": "second",
|
|
277
|
-
"unit.second.other": "seconds",
|
|
278
|
-
"relative.now": "Due now",
|
|
279
|
-
"relative.future": "in {value} {unit}",
|
|
280
|
-
"relative.overdue": "{value} {unit} overdue"
|
|
281
|
-
};
|
|
282
|
-
//#endregion
|
|
283
|
-
//#region lib/types/client/index.js
|
|
284
|
-
/** Browser half of the read-only Schedule catalog. */
|
|
285
|
-
/** Required services for locale registration and header-slot contribution. */
|
|
286
|
-
const inject = ["slots", "locale"];
|
|
287
|
-
/** Register the dictionaries and Session-header catalog action. */
|
|
288
|
-
function apply(ctx) {
|
|
289
|
-
ctx.effect(() => ctx.locale.register(NS, {
|
|
290
|
-
zh,
|
|
291
|
-
en
|
|
292
|
-
}), "ui-schedule: dictionaries");
|
|
293
|
-
ctx.slots.inject("conversation.session.header.actions", () => ctx.slots.register({
|
|
294
|
-
name: "conversation.session.header.actions",
|
|
295
|
-
id: "schedule-catalog",
|
|
296
|
-
order: 10,
|
|
297
|
-
locale: NS
|
|
298
|
-
}, ScheduleCatalogAction));
|
|
299
|
-
}
|
|
300
|
-
//#endregion
|
|
301
|
-
exports.apply = apply;
|
|
302
|
-
exports.inject = inject;
|
|
303
|
-
return module.exports;
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
//# sourceMappingURL=client.js.map
|