@qihongmu/dsh-client-ui-scheduled-task 0.1.0 → 0.1.1-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/lib/client.js CHANGED
@@ -244,75 +244,75 @@ window.__ModuleLoader__.load({
244
244
  //#endregion
245
245
  //#region \0dsh-plugin-css:src/client/ScheduledTasksPanel.module.css.dshcss.js
246
246
  const classes = {
247
- "drawer": "D-0Mgq_drawer",
248
- "weekPicker": "D-0Mgq_weekPicker",
249
- "rowTitle": "D-0Mgq_rowTitle",
250
- "scheduleEditor": "D-0Mgq_scheduleEditor",
251
- "tabs": "D-0Mgq_tabs",
252
- "note": "D-0Mgq_note",
253
- "drawer-in": "D-0Mgq_drawer-in",
254
- "switchRow": "D-0Mgq_switchRow",
255
- "weekOption": "D-0Mgq_weekOption",
256
- "closeButton": "D-0Mgq_closeButton",
257
- "subtitle": "D-0Mgq_subtitle",
258
- "rowLastError": "D-0Mgq_rowLastError",
259
- "toolbar": "D-0Mgq_toolbar",
260
- "readError": "D-0Mgq_readError",
261
- "rowHead": "D-0Mgq_rowHead",
262
- "bottomBar": "D-0Mgq_bottomBar",
263
- "rowMain": "D-0Mgq_rowMain",
264
- "timeZoneChip": "D-0Mgq_timeZoneChip",
265
- "segmentButton": "D-0Mgq_segmentButton",
266
- "switchCopy": "D-0Mgq_switchCopy",
267
- "rail": "D-0Mgq_rail",
268
- "headActions": "D-0Mgq_headActions",
269
- "scheduleRow": "D-0Mgq_scheduleRow",
270
- "drawerError": "D-0Mgq_drawerError",
271
- "textArea": "D-0Mgq_textArea",
272
- "head": "D-0Mgq_head",
273
- "unreadDot": "D-0Mgq_unreadDot",
274
- "rowActions": "D-0Mgq_rowActions",
275
- "searchBox": "D-0Mgq_searchBox",
276
- "actionButton": "D-0Mgq_actionButton",
277
- "backdrop": "D-0Mgq_backdrop",
278
- "switch": "D-0Mgq_switch",
279
- "segmentText": "D-0Mgq_segmentText",
280
- "customGroup": "D-0Mgq_customGroup",
281
- "rowSchedule": "D-0Mgq_rowSchedule",
282
- "weekMenu": "D-0Mgq_weekMenu",
283
- "footerButtons": "D-0Mgq_footerButtons",
284
- "tab": "D-0Mgq_tab",
285
- "rowStatus": "D-0Mgq_rowStatus",
286
- "rowOverdue": "D-0Mgq_rowOverdue",
287
- "ghostButton": "D-0Mgq_ghostButton",
288
- "rowNext": "D-0Mgq_rowNext",
289
- "formBody": "D-0Mgq_formBody",
290
- "fieldLine": "D-0Mgq_fieldLine",
291
- "timeZoneInput": "D-0Mgq_timeZoneInput",
292
- "rows": "D-0Mgq_rows",
293
- "searchInput": "D-0Mgq_searchInput",
294
- "rowMeta": "D-0Mgq_rowMeta",
295
- "textInput": "D-0Mgq_textInput",
296
- "primaryButton": "D-0Mgq_primaryButton",
297
- "badgeCount": "D-0Mgq_badgeCount",
298
- "hint": "D-0Mgq_hint",
299
- "badgeLabel": "D-0Mgq_badgeLabel",
300
- "segmentSelect": "D-0Mgq_segmentSelect",
301
- "clearButton": "D-0Mgq_clearButton",
302
- "segmentTime": "D-0Mgq_segmentTime",
303
- "fieldHint": "D-0Mgq_fieldHint",
304
- "title": "D-0Mgq_title",
305
- "body": "D-0Mgq_body",
306
- "badge": "D-0Mgq_badge",
307
- "schedulePreview": "D-0Mgq_schedulePreview",
308
- "row": "D-0Mgq_row",
309
- "statusDot": "D-0Mgq_statusDot",
310
- "layer": "D-0Mgq_layer"
247
+ "drawer-in": "L9cC6W_drawer-in",
248
+ "closeButton": "L9cC6W_closeButton",
249
+ "drawerError": "L9cC6W_drawerError",
250
+ "formBody": "L9cC6W_formBody",
251
+ "layer": "L9cC6W_layer",
252
+ "rowLastError": "L9cC6W_rowLastError",
253
+ "segmentSelect": "L9cC6W_segmentSelect",
254
+ "rowTitle": "L9cC6W_rowTitle",
255
+ "switch": "L9cC6W_switch",
256
+ "segmentButton": "L9cC6W_segmentButton",
257
+ "badgeLabel": "L9cC6W_badgeLabel",
258
+ "switchCopy": "L9cC6W_switchCopy",
259
+ "actionButton": "L9cC6W_actionButton",
260
+ "rowHead": "L9cC6W_rowHead",
261
+ "bottomBar": "L9cC6W_bottomBar",
262
+ "clearButton": "L9cC6W_clearButton",
263
+ "drawer": "L9cC6W_drawer",
264
+ "badge": "L9cC6W_badge",
265
+ "head": "L9cC6W_head",
266
+ "rowMeta": "L9cC6W_rowMeta",
267
+ "fieldLine": "L9cC6W_fieldLine",
268
+ "toolbar": "L9cC6W_toolbar",
269
+ "title": "L9cC6W_title",
270
+ "tabs": "L9cC6W_tabs",
271
+ "readError": "L9cC6W_readError",
272
+ "segmentText": "L9cC6W_segmentText",
273
+ "tab": "L9cC6W_tab",
274
+ "segmentTime": "L9cC6W_segmentTime",
275
+ "textInput": "L9cC6W_textInput",
276
+ "customGroup": "L9cC6W_customGroup",
277
+ "timeZoneChip": "L9cC6W_timeZoneChip",
278
+ "schedulePreview": "L9cC6W_schedulePreview",
279
+ "rowMain": "L9cC6W_rowMain",
280
+ "switchRow": "L9cC6W_switchRow",
281
+ "ghostButton": "L9cC6W_ghostButton",
282
+ "scheduleRow": "L9cC6W_scheduleRow",
283
+ "weekMenu": "L9cC6W_weekMenu",
284
+ "rowSchedule": "L9cC6W_rowSchedule",
285
+ "rowActions": "L9cC6W_rowActions",
286
+ "scheduleEditor": "L9cC6W_scheduleEditor",
287
+ "fieldHint": "L9cC6W_fieldHint",
288
+ "hint": "L9cC6W_hint",
289
+ "searchBox": "L9cC6W_searchBox",
290
+ "rowNext": "L9cC6W_rowNext",
291
+ "statusDot": "L9cC6W_statusDot",
292
+ "note": "L9cC6W_note",
293
+ "rail": "L9cC6W_rail",
294
+ "body": "L9cC6W_body",
295
+ "row": "L9cC6W_row",
296
+ "rowOverdue": "L9cC6W_rowOverdue",
297
+ "timeZoneInput": "L9cC6W_timeZoneInput",
298
+ "badgeCount": "L9cC6W_badgeCount",
299
+ "unreadDot": "L9cC6W_unreadDot",
300
+ "weekOption": "L9cC6W_weekOption",
301
+ "weekPicker": "L9cC6W_weekPicker",
302
+ "subtitle": "L9cC6W_subtitle",
303
+ "backdrop": "L9cC6W_backdrop",
304
+ "rowStatus": "L9cC6W_rowStatus",
305
+ "textArea": "L9cC6W_textArea",
306
+ "searchInput": "L9cC6W_searchInput",
307
+ "footerButtons": "L9cC6W_footerButtons",
308
+ "rows": "L9cC6W_rows",
309
+ "headActions": "L9cC6W_headActions",
310
+ "primaryButton": "L9cC6W_primaryButton"
311
311
  };
312
312
  if (typeof document !== "undefined" && !document.querySelector("style[data-dsh-plugin-css=\"ScheduledTasksPanel.module.css\"]")) {
313
313
  const style = document.createElement("style");
314
314
  style.setAttribute("data-dsh-plugin-css", "ScheduledTasksPanel.module.css");
315
- style.textContent = ".D-0Mgq_layer {\n flex: none;\n align-items: center;\n width: 100%;\n height: 49px;\n margin: 8px 0 0;\n display: flex;\n position: relative;\n}\n\n.D-0Mgq_footerButtons {\n align-items: center;\n width: 100%;\n display: flex;\n}\n\n.D-0Mgq_badge {\n width: 100%;\n height: 49px;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 12px;\n align-items: center;\n gap: 8px;\n padding: 0 8px 0 6px;\n font-family: inherit;\n font-size: 14px;\n display: inline-flex;\n overflow: hidden;\n}\n\n.D-0Mgq_badge:hover {\n background: var(--dsw-alias-interactive-bg-hover-solid);\n}\n\n.D-0Mgq_badge[data-active] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.D-0Mgq_badgeLabel {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n overflow: hidden;\n}\n\n.D-0Mgq_badgeCount {\n background: var(--dsw-alias-state-business-primary);\n min-width: 18px;\n color: var(--dsw-alias-label-primary-inverted);\n text-align: center;\n font-variant-numeric: tabular-nums;\n border-radius: 999px;\n flex: none;\n margin-left: auto;\n padding: 0 5px;\n font-size: 11px;\n line-height: 18px;\n}\n\n.D-0Mgq_layer.D-0Mgq_rail {\n width: 36px;\n height: 36px;\n margin: 0;\n}\n\n.D-0Mgq_rail .D-0Mgq_badge {\n border-radius: 50%;\n justify-content: center;\n gap: 0;\n width: 36px;\n height: 36px;\n padding: 0;\n}\n\n.D-0Mgq_rail .D-0Mgq_footerButtons {\n flex-direction: column;\n}\n\n@keyframes D-0Mgq_drawer-in {\n from {\n opacity: 0;\n transform: translateX(24px);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n.D-0Mgq_backdrop {\n z-index: 40;\n background: #00000052;\n position: fixed;\n inset: 0;\n}\n\n.D-0Mgq_drawer {\n z-index: 41;\n border-left: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-alias-bg-base);\n width: 640px;\n max-width: calc(100vw - 24px);\n box-shadow: var(--dsw-shadow-lv2);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n flex-direction: column;\n animation: .16s ease-out D-0Mgq_drawer-in;\n display: flex;\n position: fixed;\n top: 0;\n bottom: 0;\n right: 0;\n overflow: hidden;\n}\n\n.D-0Mgq_drawerError {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n box-shadow: var(--dsw-shadow-lv2);\n border-radius: 8px;\n margin: 0;\n padding: 8px 10px;\n position: absolute;\n bottom: 16px;\n left: 20px;\n right: 20px;\n}\n\n.D-0Mgq_head {\n flex: none;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n padding: 20px 20px 0;\n display: flex;\n}\n\n.D-0Mgq_title {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n line-height: 28px;\n overflow: hidden;\n}\n\n.D-0Mgq_headActions {\n flex: none;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.D-0Mgq_subtitle {\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n margin: 4px 0 0;\n padding: 0 20px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.D-0Mgq_toolbar {\n flex: none;\n align-items: center;\n gap: 8px;\n padding: 14px 20px 0;\n display: flex;\n}\n\n.D-0Mgq_searchBox {\n border: 1px solid var(--dsw-alias-border-l2);\n height: 32px;\n color: var(--dsw-alias-label-tertiary);\n border-radius: 8px;\n flex: 1;\n align-items: center;\n gap: 6px;\n padding: 0 10px;\n display: flex;\n}\n\n.D-0Mgq_searchBox:focus-within {\n border-color: var(--dsw-alias-border-l3);\n}\n\n.D-0Mgq_searchInput {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n background: none;\n border: none;\n outline: none;\n flex: 1;\n font-size: 13px;\n}\n\n.D-0Mgq_searchInput::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.D-0Mgq_primaryButton {\n background: var(--dsw-alias-button-primary-fill);\n height: 32px;\n color: var(--dsw-alias-label-primary-inverted);\n font: inherit;\n cursor: pointer;\n border: none;\n border-radius: 8px;\n flex: none;\n align-items: center;\n gap: 6px;\n padding: 0 14px;\n font-size: 13px;\n display: inline-flex;\n}\n\n.D-0Mgq_primaryButton:hover:not(:disabled) {\n background: var(--dsw-alias-button-primary-hover);\n}\n\n.D-0Mgq_ghostButton {\n border: 1px solid var(--dsw-alias-border-l2);\n height: 32px;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n cursor: pointer;\n background: none;\n border-radius: 8px;\n flex: none;\n padding: 0 12px;\n font-size: 13px;\n}\n\n.D-0Mgq_ghostButton:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.D-0Mgq_closeButton {\n width: 28px;\n height: 28px;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 999px;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.D-0Mgq_closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n.D-0Mgq_primaryButton:disabled, .D-0Mgq_ghostButton:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.D-0Mgq_tabs {\n border-bottom: 1px solid var(--dsw-alias-border-l2);\n flex: none;\n gap: 16px;\n margin: 10px 20px 0;\n display: flex;\n}\n\n.D-0Mgq_tab {\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n cursor: pointer;\n background: none;\n border: none;\n border-bottom: 2px solid #0000;\n padding: 8px 2px;\n font-size: 13px;\n}\n\n.D-0Mgq_tab:hover {\n color: var(--dsw-alias-label-primary);\n}\n\n.D-0Mgq_tab[data-active] {\n border-bottom-color: var(--dsw-alias-state-business-primary);\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.D-0Mgq_body {\n flex: 1;\n min-height: 0;\n padding: 12px 20px 20px;\n overflow-y: auto;\n}\n\n.D-0Mgq_note, .D-0Mgq_readError {\n color: var(--dsw-alias-label-tertiary);\n margin: 4px 0;\n font-size: 12px;\n line-height: 18px;\n}\n\n.D-0Mgq_readError {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.D-0Mgq_rows {\n flex-direction: column;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.D-0Mgq_row {\n border-radius: 10px;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n display: flex;\n}\n\n.D-0Mgq_row:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.D-0Mgq_statusDot {\n border: 1.5px solid var(--dsw-alias-label-tertiary);\n border-radius: 50%;\n flex: none;\n width: 14px;\n height: 14px;\n margin-top: 3px;\n}\n\n.D-0Mgq_statusDot[data-status=\"active\"] {\n border-color: var(--dsw-alias-state-business-primary);\n background: var(--dsw-alias-state-business-primary);\n}\n\n.D-0Mgq_statusDot[data-status=\"paused\"] {\n border-color: var(--dsw-alias-label-tertiary);\n background: none;\n}\n\n.D-0Mgq_statusDot[data-status=\"completed\"] {\n border-color: var(--dsw-alias-label-tertiary);\n background: var(--dsw-alias-label-tertiary);\n}\n\n.D-0Mgq_rowMain {\n flex-direction: column;\n flex: 1;\n gap: 2px;\n min-width: 0;\n display: flex;\n}\n\n.D-0Mgq_rowMain[data-unread] {\n cursor: pointer;\n}\n\n.D-0Mgq_rowMain[data-unread]:hover {\n opacity: .85;\n}\n\n.D-0Mgq_rowHead {\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.D-0Mgq_unreadDot {\n background: var(--dsw-alias-state-business-primary);\n border-radius: 50%;\n flex: none;\n width: 7px;\n height: 7px;\n}\n\n.D-0Mgq_rowTitle {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n overflow: hidden;\n}\n\n.D-0Mgq_rowMeta {\n align-items: center;\n gap: 8px;\n min-width: 0;\n display: flex;\n}\n\n.D-0Mgq_rowSchedule, .D-0Mgq_rowNext {\n min-width: 0;\n color: var(--dsw-alias-label-tertiary);\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 18px;\n overflow: hidden;\n}\n\n.D-0Mgq_rowNext {\n flex-shrink: 1;\n}\n\n.D-0Mgq_rowSchedule {\n flex-shrink: 0;\n}\n\n.D-0Mgq_rowOverdue {\n color: var(--dsw-alias-state-warn-label);\n flex: none;\n font-size: 11px;\n line-height: 16px;\n}\n\n.D-0Mgq_rowLastError {\n color: var(--dsw-alias-state-error-primary, var(--dsw-alias-state-warn-label));\n cursor: help;\n flex: none;\n font-size: 11px;\n line-height: 16px;\n}\n\n.D-0Mgq_fieldHint {\n color: var(--dsw-alias-state-error-primary, var(--dsw-alias-state-warn-label));\n font-size: 11px;\n line-height: 16px;\n}\n\n.D-0Mgq_rowStatus {\n background: var(--dsw-alias-button-ghost-active-fill);\n height: 20px;\n color: var(--dsw-alias-label-caption);\n border-radius: 10px;\n flex: none;\n align-items: center;\n padding: 0 6px;\n font-size: 11px;\n line-height: 20px;\n display: inline-flex;\n}\n\n.D-0Mgq_rowStatus[data-state=\"overdue\"] {\n background: var(--dsw-alias-state-warn-tertiary);\n color: var(--dsw-alias-state-warn-label);\n}\n\n.D-0Mgq_rowActions {\n opacity: 0;\n flex: none;\n align-items: center;\n gap: 6px;\n transition: opacity .12s;\n display: flex;\n}\n\n.D-0Mgq_row:hover .D-0Mgq_rowActions, .D-0Mgq_row:focus-within .D-0Mgq_rowActions {\n opacity: 1;\n}\n\n.D-0Mgq_actionButton {\n width: 28px;\n height: 28px;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 999px;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.D-0Mgq_actionButton:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n.D-0Mgq_actionButton:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.D-0Mgq_formBody {\n flex-direction: column;\n gap: 14px;\n display: flex;\n}\n\n.D-0Mgq_fieldLine {\n color: var(--dsw-alias-label-caption);\n flex-direction: column;\n gap: 6px;\n font-size: 12px;\n line-height: 16px;\n display: flex;\n}\n\n.D-0Mgq_textInput {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n height: 32px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n border-radius: 8px;\n padding: 0 10px;\n font-size: 13px;\n}\n\n.D-0Mgq_textInput:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.D-0Mgq_textArea {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n min-height: 96px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n resize: vertical;\n border-radius: 8px;\n padding: 8px 10px;\n font-size: 13px;\n line-height: 20px;\n}\n\n.D-0Mgq_textArea:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.D-0Mgq_bottomBar {\n border-top: 1px solid var(--dsw-alias-border-l2);\n grid-template-columns: minmax(0, 1fr);\n gap: 14px;\n margin-top: 2px;\n padding-top: 14px;\n display: grid;\n}\n\n.D-0Mgq_switchRow {\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n display: flex;\n}\n\n.D-0Mgq_switchCopy {\n color: var(--dsw-alias-label-secondary);\n flex-direction: column;\n gap: 2px;\n font-size: 12px;\n line-height: 16px;\n display: flex;\n}\n\n.D-0Mgq_hint {\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n line-height: 16px;\n}\n\n.D-0Mgq_switch {\n background: var(--dsw-alias-interactive-bg-hover-solid);\n cursor: pointer;\n border: none;\n border-radius: 999px;\n flex: none;\n width: 36px;\n height: 20px;\n padding: 0;\n transition: background .12s;\n position: relative;\n}\n\n.D-0Mgq_switch:after {\n content: \"\";\n background: var(--dsw-alias-label-primary-inverted);\n border-radius: 50%;\n width: 16px;\n height: 16px;\n transition: transform .12s;\n position: absolute;\n top: 2px;\n left: 2px;\n}\n\n.D-0Mgq_switch[data-on] {\n background: var(--dsw-alias-state-business-primary);\n}\n\n.D-0Mgq_switch[data-on]:after {\n transform: translateX(16px);\n}\n\n.D-0Mgq_scheduleEditor {\n width: 100%;\n}\n\n.D-0Mgq_scheduleRow {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n border-radius: 10px;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n padding: 8px 10px;\n display: flex;\n}\n\n.D-0Mgq_segmentSelect, .D-0Mgq_segmentTime {\n background: var(--dsw-alias-button-ghost-active-fill);\n height: 30px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n border: 1px solid #0000;\n border-radius: 8px;\n padding: 0 8px;\n font-size: 13px;\n}\n\n.D-0Mgq_segmentSelect:focus, .D-0Mgq_segmentTime:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.D-0Mgq_segmentTime {\n width: auto;\n}\n\n.D-0Mgq_segmentText {\n color: var(--dsw-alias-label-secondary);\n white-space: nowrap;\n font-size: 13px;\n line-height: 20px;\n}\n\n.D-0Mgq_timeZoneChip {\n background: var(--dsw-alias-button-ghost-active-fill, transparent);\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n border: none;\n border-radius: 6px;\n padding: 2px 6px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.D-0Mgq_timeZoneChip:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.D-0Mgq_timeZoneInput {\n background: var(--dsw-alias-fill-secondary, transparent);\n width: 9em;\n color: var(--dsw-alias-label-primary);\n border: none;\n border-radius: 6px;\n padding: 2px 6px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.D-0Mgq_timeZoneInput:focus {\n outline: 1px solid var(--dsw-alias-border-focus, currentColor);\n}\n\n.D-0Mgq_schedulePreview {\n color: var(--dsw-alias-label-tertiary);\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-left: auto;\n font-size: 12px;\n line-height: 18px;\n overflow: hidden;\n}\n\n.D-0Mgq_clearButton {\n width: 26px;\n height: 26px;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 999px;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.D-0Mgq_clearButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-state-error-primary);\n}\n\n.D-0Mgq_weekPicker {\n position: relative;\n}\n\n.D-0Mgq_segmentButton {\n background: var(--dsw-alias-button-ghost-active-fill);\n height: 30px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n cursor: pointer;\n border: 1px solid #0000;\n border-radius: 8px;\n align-items: center;\n gap: 4px;\n padding: 0 8px;\n font-size: 13px;\n display: inline-flex;\n}\n\n.D-0Mgq_segmentButton:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.D-0Mgq_weekMenu {\n z-index: 60;\n border: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-alias-bg-base);\n width: 96px;\n max-height: 240px;\n box-shadow: var(--dsw-shadow-lv2);\n border-radius: 10px;\n flex-direction: column;\n padding: 4px;\n display: flex;\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n overflow-y: auto;\n}\n\n.D-0Mgq_weekOption {\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n border-radius: 7px;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n font-size: 13px;\n display: flex;\n}\n\n.D-0Mgq_weekOption:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.D-0Mgq_weekOption input {\n margin: 0;\n}\n\n.D-0Mgq_customGroup {\n gap: 12px;\n}\n";
315
+ style.textContent = ".L9cC6W_layer {\n flex: none;\n align-items: center;\n width: 100%;\n height: 49px;\n margin: 8px 0 0;\n display: flex;\n position: relative;\n}\n\n.L9cC6W_footerButtons {\n align-items: center;\n width: 100%;\n display: flex;\n}\n\n.L9cC6W_badge {\n width: 100%;\n height: 49px;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 12px;\n align-items: center;\n gap: 8px;\n padding: 0 8px 0 6px;\n font-family: inherit;\n font-size: 14px;\n display: inline-flex;\n overflow: hidden;\n}\n\n.L9cC6W_badge:hover {\n background: var(--dsw-alias-interactive-bg-hover-solid);\n}\n\n.L9cC6W_badge[data-active] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.L9cC6W_badgeLabel {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n overflow: hidden;\n}\n\n.L9cC6W_badgeCount {\n background: var(--dsw-alias-state-business-primary);\n min-width: 18px;\n color: var(--dsw-alias-label-primary-inverted);\n text-align: center;\n font-variant-numeric: tabular-nums;\n border-radius: 999px;\n flex: none;\n margin-left: auto;\n padding: 0 5px;\n font-size: 11px;\n line-height: 18px;\n}\n\n.L9cC6W_layer.L9cC6W_rail {\n width: 36px;\n height: 36px;\n margin: 0;\n}\n\n.L9cC6W_rail .L9cC6W_badge {\n border-radius: 50%;\n justify-content: center;\n gap: 0;\n width: 36px;\n height: 36px;\n padding: 0;\n}\n\n.L9cC6W_rail .L9cC6W_footerButtons {\n flex-direction: column;\n}\n\n@keyframes L9cC6W_drawer-in {\n from {\n opacity: 0;\n transform: translateX(24px);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n.L9cC6W_backdrop {\n z-index: 40;\n background: #00000052;\n position: fixed;\n inset: 0;\n}\n\n.L9cC6W_drawer {\n z-index: 41;\n border-left: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-alias-bg-base);\n width: 640px;\n max-width: calc(100vw - 24px);\n box-shadow: var(--dsw-shadow-lv2);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n flex-direction: column;\n animation: .16s ease-out L9cC6W_drawer-in;\n display: flex;\n position: fixed;\n top: 0;\n bottom: 0;\n right: 0;\n overflow: hidden;\n}\n\n.L9cC6W_drawerError {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n box-shadow: var(--dsw-shadow-lv2);\n border-radius: 8px;\n margin: 0;\n padding: 8px 10px;\n position: absolute;\n bottom: 16px;\n left: 20px;\n right: 20px;\n}\n\n.L9cC6W_head {\n flex: none;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n padding: 20px 20px 0;\n display: flex;\n}\n\n.L9cC6W_title {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n line-height: 28px;\n overflow: hidden;\n}\n\n.L9cC6W_headActions {\n flex: none;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.L9cC6W_subtitle {\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n margin: 4px 0 0;\n padding: 0 20px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.L9cC6W_toolbar {\n flex: none;\n align-items: center;\n gap: 8px;\n padding: 14px 20px 0;\n display: flex;\n}\n\n.L9cC6W_searchBox {\n border: 1px solid var(--dsw-alias-border-l2);\n height: 32px;\n color: var(--dsw-alias-label-tertiary);\n border-radius: 8px;\n flex: 1;\n align-items: center;\n gap: 6px;\n padding: 0 10px;\n display: flex;\n}\n\n.L9cC6W_searchBox:focus-within {\n border-color: var(--dsw-alias-border-l3);\n}\n\n.L9cC6W_searchInput {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n background: none;\n border: none;\n outline: none;\n flex: 1;\n font-size: 13px;\n}\n\n.L9cC6W_searchInput::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.L9cC6W_primaryButton {\n background: var(--dsw-alias-button-primary-fill);\n height: 32px;\n color: var(--dsw-alias-label-primary-inverted);\n font: inherit;\n cursor: pointer;\n border: none;\n border-radius: 8px;\n flex: none;\n align-items: center;\n gap: 6px;\n padding: 0 14px;\n font-size: 13px;\n display: inline-flex;\n}\n\n.L9cC6W_primaryButton:hover:not(:disabled) {\n background: var(--dsw-alias-button-primary-hover);\n}\n\n.L9cC6W_ghostButton {\n border: 1px solid var(--dsw-alias-border-l2);\n height: 32px;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n cursor: pointer;\n background: none;\n border-radius: 8px;\n flex: none;\n padding: 0 12px;\n font-size: 13px;\n}\n\n.L9cC6W_ghostButton:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.L9cC6W_closeButton {\n width: 28px;\n height: 28px;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 999px;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.L9cC6W_closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n.L9cC6W_primaryButton:disabled, .L9cC6W_ghostButton:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.L9cC6W_tabs {\n border-bottom: 1px solid var(--dsw-alias-border-l2);\n flex: none;\n gap: 16px;\n margin: 10px 20px 0;\n display: flex;\n}\n\n.L9cC6W_tab {\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n cursor: pointer;\n background: none;\n border: none;\n border-bottom: 2px solid #0000;\n padding: 8px 2px;\n font-size: 13px;\n}\n\n.L9cC6W_tab:hover {\n color: var(--dsw-alias-label-primary);\n}\n\n.L9cC6W_tab[data-active] {\n border-bottom-color: var(--dsw-alias-state-business-primary);\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.L9cC6W_body {\n flex: 1;\n min-height: 0;\n padding: 12px 20px 20px;\n overflow-y: auto;\n}\n\n.L9cC6W_note, .L9cC6W_readError {\n color: var(--dsw-alias-label-tertiary);\n margin: 4px 0;\n font-size: 12px;\n line-height: 18px;\n}\n\n.L9cC6W_readError {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.L9cC6W_rows {\n flex-direction: column;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.L9cC6W_row {\n border-radius: 10px;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n display: flex;\n}\n\n.L9cC6W_row:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.L9cC6W_statusDot {\n border: 1.5px solid var(--dsw-alias-label-tertiary);\n border-radius: 50%;\n flex: none;\n width: 14px;\n height: 14px;\n margin-top: 3px;\n}\n\n.L9cC6W_statusDot[data-status=\"active\"] {\n border-color: var(--dsw-alias-state-business-primary);\n background: var(--dsw-alias-state-business-primary);\n}\n\n.L9cC6W_statusDot[data-status=\"paused\"] {\n border-color: var(--dsw-alias-label-tertiary);\n background: none;\n}\n\n.L9cC6W_statusDot[data-status=\"completed\"] {\n border-color: var(--dsw-alias-label-tertiary);\n background: var(--dsw-alias-label-tertiary);\n}\n\n.L9cC6W_rowMain {\n flex-direction: column;\n flex: 1;\n gap: 2px;\n min-width: 0;\n display: flex;\n}\n\n.L9cC6W_rowMain[data-unread] {\n cursor: pointer;\n}\n\n.L9cC6W_rowMain[data-unread]:hover {\n opacity: .85;\n}\n\n.L9cC6W_rowHead {\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.L9cC6W_unreadDot {\n background: var(--dsw-alias-state-business-primary);\n border-radius: 50%;\n flex: none;\n width: 7px;\n height: 7px;\n}\n\n.L9cC6W_rowTitle {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n overflow: hidden;\n}\n\n.L9cC6W_rowMeta {\n align-items: center;\n gap: 8px;\n min-width: 0;\n display: flex;\n}\n\n.L9cC6W_rowSchedule, .L9cC6W_rowNext {\n min-width: 0;\n color: var(--dsw-alias-label-tertiary);\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 18px;\n overflow: hidden;\n}\n\n.L9cC6W_rowNext {\n flex-shrink: 1;\n}\n\n.L9cC6W_rowSchedule {\n flex-shrink: 0;\n}\n\n.L9cC6W_rowOverdue {\n color: var(--dsw-alias-state-warn-label);\n flex: none;\n font-size: 11px;\n line-height: 16px;\n}\n\n.L9cC6W_rowLastError {\n color: var(--dsw-alias-state-error-primary, var(--dsw-alias-state-warn-label));\n cursor: help;\n flex: none;\n font-size: 11px;\n line-height: 16px;\n}\n\n.L9cC6W_fieldHint {\n color: var(--dsw-alias-state-error-primary, var(--dsw-alias-state-warn-label));\n font-size: 11px;\n line-height: 16px;\n}\n\n.L9cC6W_rowStatus {\n background: var(--dsw-alias-button-ghost-active-fill);\n height: 20px;\n color: var(--dsw-alias-label-caption);\n border-radius: 10px;\n flex: none;\n align-items: center;\n padding: 0 6px;\n font-size: 11px;\n line-height: 20px;\n display: inline-flex;\n}\n\n.L9cC6W_rowStatus[data-state=\"overdue\"] {\n background: var(--dsw-alias-state-warn-tertiary);\n color: var(--dsw-alias-state-warn-label);\n}\n\n.L9cC6W_rowActions {\n opacity: 0;\n flex: none;\n align-items: center;\n gap: 6px;\n transition: opacity .12s;\n display: flex;\n}\n\n.L9cC6W_row:hover .L9cC6W_rowActions, .L9cC6W_row:focus-within .L9cC6W_rowActions {\n opacity: 1;\n}\n\n.L9cC6W_actionButton {\n width: 28px;\n height: 28px;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 999px;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.L9cC6W_actionButton:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n.L9cC6W_actionButton:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.L9cC6W_formBody {\n flex-direction: column;\n gap: 14px;\n display: flex;\n}\n\n.L9cC6W_fieldLine {\n color: var(--dsw-alias-label-caption);\n flex-direction: column;\n gap: 6px;\n font-size: 12px;\n line-height: 16px;\n display: flex;\n}\n\n.L9cC6W_textInput {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n height: 32px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n border-radius: 8px;\n padding: 0 10px;\n font-size: 13px;\n}\n\n.L9cC6W_textInput:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.L9cC6W_textArea {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n min-height: 96px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n resize: vertical;\n border-radius: 8px;\n padding: 8px 10px;\n font-size: 13px;\n line-height: 20px;\n}\n\n.L9cC6W_textArea:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.L9cC6W_bottomBar {\n border-top: 1px solid var(--dsw-alias-border-l2);\n grid-template-columns: minmax(0, 1fr);\n gap: 14px;\n margin-top: 2px;\n padding-top: 14px;\n display: grid;\n}\n\n.L9cC6W_switchRow {\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n display: flex;\n}\n\n.L9cC6W_switchCopy {\n color: var(--dsw-alias-label-secondary);\n flex-direction: column;\n gap: 2px;\n font-size: 12px;\n line-height: 16px;\n display: flex;\n}\n\n.L9cC6W_hint {\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n line-height: 16px;\n}\n\n.L9cC6W_switch {\n background: var(--dsw-alias-interactive-bg-hover-solid);\n cursor: pointer;\n border: none;\n border-radius: 999px;\n flex: none;\n width: 36px;\n height: 20px;\n padding: 0;\n transition: background .12s;\n position: relative;\n}\n\n.L9cC6W_switch:after {\n content: \"\";\n background: var(--dsw-alias-label-primary-inverted);\n border-radius: 50%;\n width: 16px;\n height: 16px;\n transition: transform .12s;\n position: absolute;\n top: 2px;\n left: 2px;\n}\n\n.L9cC6W_switch[data-on] {\n background: var(--dsw-alias-state-business-primary);\n}\n\n.L9cC6W_switch[data-on]:after {\n transform: translateX(16px);\n}\n\n.L9cC6W_scheduleEditor {\n width: 100%;\n}\n\n.L9cC6W_scheduleRow {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-base);\n border-radius: 10px;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n padding: 8px 10px;\n display: flex;\n}\n\n.L9cC6W_segmentSelect, .L9cC6W_segmentTime {\n background: var(--dsw-alias-button-ghost-active-fill);\n height: 30px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n border: 1px solid #0000;\n border-radius: 8px;\n padding: 0 8px;\n font-size: 13px;\n}\n\n.L9cC6W_segmentSelect:focus, .L9cC6W_segmentTime:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.L9cC6W_segmentTime {\n width: auto;\n}\n\n.L9cC6W_segmentText {\n color: var(--dsw-alias-label-secondary);\n white-space: nowrap;\n font-size: 13px;\n line-height: 20px;\n}\n\n.L9cC6W_timeZoneChip {\n background: var(--dsw-alias-button-ghost-active-fill, transparent);\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n border: none;\n border-radius: 6px;\n padding: 2px 6px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.L9cC6W_timeZoneChip:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.L9cC6W_timeZoneInput {\n background: var(--dsw-alias-fill-secondary, transparent);\n width: 9em;\n color: var(--dsw-alias-label-primary);\n border: none;\n border-radius: 6px;\n padding: 2px 6px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.L9cC6W_timeZoneInput:focus {\n outline: 1px solid var(--dsw-alias-border-focus, currentColor);\n}\n\n.L9cC6W_schedulePreview {\n color: var(--dsw-alias-label-tertiary);\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-left: auto;\n font-size: 12px;\n line-height: 18px;\n overflow: hidden;\n}\n\n.L9cC6W_clearButton {\n width: 26px;\n height: 26px;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 999px;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.L9cC6W_clearButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-state-error-primary);\n}\n\n.L9cC6W_weekPicker {\n position: relative;\n}\n\n.L9cC6W_segmentButton {\n background: var(--dsw-alias-button-ghost-active-fill);\n height: 30px;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n cursor: pointer;\n border: 1px solid #0000;\n border-radius: 8px;\n align-items: center;\n gap: 4px;\n padding: 0 8px;\n font-size: 13px;\n display: inline-flex;\n}\n\n.L9cC6W_segmentButton:focus {\n border-color: var(--dsw-alias-border-l3);\n outline: none;\n}\n\n.L9cC6W_weekMenu {\n z-index: 60;\n border: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-alias-bg-base);\n width: 96px;\n max-height: 240px;\n box-shadow: var(--dsw-shadow-lv2);\n border-radius: 10px;\n flex-direction: column;\n padding: 4px;\n display: flex;\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n overflow-y: auto;\n}\n\n.L9cC6W_weekOption {\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n border-radius: 7px;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n font-size: 13px;\n display: flex;\n}\n\n.L9cC6W_weekOption:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.L9cC6W_weekOption input {\n margin: 0;\n}\n\n.L9cC6W_customGroup {\n gap: 12px;\n}\n";
316
316
  document.head.append(style);
317
317
  }
318
318
  var ScheduledTasksPanel_module_css_dshcss_default = new Proxy(classes, { get(target, key) {
@@ -1504,15 +1504,16 @@ window.__ModuleLoader__.load({
1504
1504
  /**
1505
1505
  * Required services: the slot system, locale, the Remote key, the
1506
1506
  * `remote.scheduledTasks` namespace provided by the remotes assembly entry,
1507
- * and the connection/session runtimes backing the create form's option lists.
1507
+ * and the workspace state / session-model catalog backing the create form's
1508
+ * option lists.
1508
1509
  */
1509
1510
  const inject = [
1510
1511
  "slots",
1511
1512
  "locale",
1512
1513
  "remote",
1513
1514
  "remote.scheduledTasks",
1514
- "connection",
1515
- "sessions"
1515
+ "workspaces",
1516
+ "remote.session"
1516
1517
  ];
1517
1518
  /** Register the scheduled-tasks sidebar panel over the mounted Remote namespace. */
1518
1519
  function apply(ctx) {
@@ -1520,8 +1521,7 @@ window.__ModuleLoader__.load({
1520
1521
  zh,
1521
1522
  en
1522
1523
  }), "ui-scheduled-task: dictionaries");
1523
- const sessions = ctx.get("sessions");
1524
- const connection = ctx.get("connection");
1524
+ const workspaces = ctx.get("workspaces");
1525
1525
  ctx.slots.inject("sidebar.footer.action", () => ctx.slots.register({
1526
1526
  name: "sidebar.footer.action",
1527
1527
  id: "scheduled-tasks",
@@ -1529,21 +1529,17 @@ window.__ModuleLoader__.load({
1529
1529
  inject: () => ({
1530
1530
  remote: ctx.remote.scheduledTasks,
1531
1531
  listProjects: async () => {
1532
- const response = await connection.api.workspace.list({});
1533
- if (!response.result.ok) throw new Error(`${response.result.error.code}: ${response.result.error.message}`);
1534
- return response.result.value.items.map((item) => ({
1532
+ return workspaces.list.getSnapshot().items.map((item) => ({
1535
1533
  workspaceId: String(item.workspaceId),
1536
1534
  title: item.title,
1537
1535
  path: item.path
1538
1536
  }));
1539
1537
  },
1540
1538
  listModels: async () => {
1541
- const sessionId = sessions.list.getSnapshot().current;
1542
- if (sessionId === void 0) return [];
1543
- const response = await connection.api.sessions.models({ sessionId });
1544
- if (!response.result.ok) throw new Error(`${response.result.error.code}: ${response.result.error.message}`);
1539
+ const response = await ctx.remote.session.modelCatalog();
1540
+ if (!response.ok) throw new Error(`${response.error.code}: ${response.error.message}`);
1545
1541
  const rows = [];
1546
- for (const group of response.result.value.groups) for (const model of group.models) rows.push({
1542
+ for (const group of response.value.groups) for (const model of group.models) rows.push({
1547
1543
  providerId: group.id,
1548
1544
  providerName: group.name,
1549
1545
  modelId: model.id,
@@ -6,8 +6,8 @@
6
6
  * project workspace, confirm-before-change, model). The `scheduledTasks`
7
7
  * Remote namespace is provided by the sibling remotes assembly entry
8
8
  * (`@qihongmu/dsh-client-remotes-scheduled-task`), which activates first —
9
- * this entry declares it plus `connection`/`sessions` (the project and model
10
- * option catalogs) in its inject list so cordis grants the guarded reads.
9
+ * this entry declares it plus `workspaces`/`remote.session` (the project and
10
+ * model option catalogs) in its inject list so cordis grants the guarded reads.
11
11
  * @module @qihongmu/dsh-client-ui-scheduled-task/client
12
12
  */
13
13
  import type { Context } from '@deepseek-ai/cordis';
@@ -22,7 +22,8 @@ export type { ScheduledTaskModelOption, ScheduledTaskProjectOption, ScheduledTas
22
22
  /**
23
23
  * Required services: the slot system, locale, the Remote key, the
24
24
  * `remote.scheduledTasks` namespace provided by the remotes assembly entry,
25
- * and the connection/session runtimes backing the create form's option lists.
25
+ * and the workspace state / session-model catalog backing the create form's
26
+ * option lists.
26
27
  */
27
28
  export declare const inject: string[];
28
29
  /** Register the scheduled-tasks sidebar panel over the mounted Remote namespace. */
@@ -6,8 +6,8 @@
6
6
  * project workspace, confirm-before-change, model). The `scheduledTasks`
7
7
  * Remote namespace is provided by the sibling remotes assembly entry
8
8
  * (`@qihongmu/dsh-client-remotes-scheduled-task`), which activates first —
9
- * this entry declares it plus `connection`/`sessions` (the project and model
10
- * option catalogs) in its inject list so cordis grants the guarded reads.
9
+ * this entry declares it plus `workspaces`/`remote.session` (the project and
10
+ * model option catalogs) in its inject list so cordis grants the guarded reads.
11
11
  * @module @qihongmu/dsh-client-ui-scheduled-task/client
12
12
  */
13
13
  import { en, NS, zh } from "./locales.js";
@@ -16,16 +16,16 @@ export { ScheduledTasksPanel } from "./ScheduledTasksPanel.js";
16
16
  /**
17
17
  * Required services: the slot system, locale, the Remote key, the
18
18
  * `remote.scheduledTasks` namespace provided by the remotes assembly entry,
19
- * and the connection/session runtimes backing the create form's option lists.
19
+ * and the workspace state / session-model catalog backing the create form's
20
+ * option lists.
20
21
  */
21
22
  export const inject = [
22
- 'slots', 'locale', 'remote', 'remote.scheduledTasks', 'connection', 'sessions',
23
+ 'slots', 'locale', 'remote', 'remote.scheduledTasks', 'workspaces', 'remote.session',
23
24
  ];
24
25
  /** Register the scheduled-tasks sidebar panel over the mounted Remote namespace. */
25
26
  export function apply(ctx) {
26
27
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'ui-scheduled-task: dictionaries');
27
- const sessions = ctx.get('sessions');
28
- const connection = ctx.get('connection');
28
+ const workspaces = ctx.get('workspaces');
29
29
  ctx.slots.inject('sidebar.footer.action', () => ctx.slots.register({
30
30
  name: 'sidebar.footer.action',
31
31
  id: 'scheduled-tasks',
@@ -33,27 +33,25 @@ export function apply(ctx) {
33
33
  inject: () => ({
34
34
  remote: ctx.remote.scheduledTasks,
35
35
  listProjects: async () => {
36
- const response = await connection.api.workspace.list({});
37
- if (!response.result.ok) {
38
- throw new Error(`${response.result.error.code}: ${response.result.error.message}`);
39
- }
40
- return response.result.value.items.map((item) => ({
36
+ // The client Workspace runtime keeps `list` fed by its own follow
37
+ // stream; by the time the create form opens, the boot baseline has
38
+ // landed, so the snapshot read needs no RPC of its own.
39
+ const items = workspaces.list.getSnapshot().items;
40
+ return items.map((item) => ({
41
41
  workspaceId: String(item.workspaceId),
42
42
  title: item.title,
43
43
  path: item.path,
44
44
  }));
45
45
  },
46
46
  listModels: async () => {
47
- // The advisory catalog is session-scoped; borrow the open conversation's.
48
- const sessionId = sessions.list.getSnapshot().current;
49
- if (sessionId === undefined)
50
- return [];
51
- const response = await connection.api.sessions.models({ sessionId });
52
- if (!response.result.ok) {
53
- throw new Error(`${response.result.error.code}: ${response.result.error.message}`);
47
+ // The advisory catalog is Host-generation scoped and session-free;
48
+ // rows come flattened per provider group.
49
+ const response = await ctx.remote.session.modelCatalog();
50
+ if (!response.ok) {
51
+ throw new Error(`${response.error.code}: ${response.error.message}`);
54
52
  }
55
53
  const rows = [];
56
- for (const group of response.result.value.groups) {
54
+ for (const group of response.value.groups) {
57
55
  for (const model of group.models) {
58
56
  rows.push({
59
57
  providerId: group.id,
@@ -35,9 +35,9 @@ export interface ScheduledTasksPanelFace {
35
35
  /** List registered workspaces (projects) in registry display order. */
36
36
  readonly listProjects: () => Promise<readonly ScheduledTaskProjectOption[]>;
37
37
  /**
38
- * Flatten the current conversation session's advisory model catalog into
39
- * selectable rows. Empty when no conversation session is open (the task then
40
- * runs with the deployment default model).
38
+ * Flatten the Host-generation advisory model catalog into selectable rows.
39
+ * Session-free: the catalog covers every currently routable provider, and an
40
+ * empty catalog leaves the task on the deployment default model.
41
41
  */
42
42
  readonly listModels: () => Promise<readonly ScheduledTaskModelOption[]>;
43
43
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@qihongmu/dsh-client-ui-scheduled-task",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-alpha.2",
4
4
  "license": "MIT",
5
5
  "author": "Qihong <qihong.m.u+dev@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/qihongmu/dsh-plugins.git",
8
+ "url": "https://github.com/qihongmu/dsh-plugins.git",
9
9
  "directory": "packages/scheduled-task/client"
10
10
  },
11
11
  "description": "External user plugin: scheduled-tasks sidebar panel (browser half), self-mounts the scheduledTasks Remote via ctx.remote.$mount. No changes to the dsh library.",
@@ -34,8 +34,10 @@
34
34
  },
35
35
  "client": {
36
36
  "inject": [
37
- "@deepseek-ai/dsh-client-connection",
38
- "@deepseek-ai/dsh-client-runtime",
37
+ "@deepseek-ai/dsh-api-remotes",
38
+ "@deepseek-ai/dsh-api-session-controller",
39
+ "@deepseek-ai/dsh-api-workspace-controller",
40
+ "@deepseek-ai/dsh-client-ui-renderer",
39
41
  "@deepseek-ai/dsh-client-ui-sidebar",
40
42
  "@deepseek-ai/dsh-client-ui-slots",
41
43
  "@deepseek-ai/dsh-client-locale",
@@ -51,11 +53,13 @@
51
53
  },
52
54
  "peerDependencies": {
53
55
  "@deepseek-ai/cordis": "*",
54
- "@deepseek-ai/dsh-client-connection": "*",
56
+ "@deepseek-ai/dsh-api-remotes": "*",
57
+ "@deepseek-ai/dsh-api-session-controller": "*",
58
+ "@deepseek-ai/dsh-api-workspace-controller": "*",
55
59
  "@deepseek-ai/dsh-client-locale": "*",
56
60
  "@qihongmu/dsh-client-remotes-scheduled-task": "*",
57
- "@deepseek-ai/dsh-client-runtime": "*",
58
61
  "@deepseek-ai/dsh-client-ui-primitives": "*",
62
+ "@deepseek-ai/dsh-client-ui-renderer": "*",
59
63
  "@deepseek-ai/dsh-client-ui-sidebar": "*",
60
64
  "@deepseek-ai/dsh-client-ui-slots": "*",
61
65
  "@deepseek-ai/dsh-invariants": "*",