@deepseek-ai/dsh-client-ui-schedule 0.2.1-rc.5 → 0.2.2-alpha.3
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 +19 -19
- package/README.md +28 -36
- package/README.zh.md +26 -34
- package/lib/client.js +15570 -3670
- package/lib/types/client/ClockPicker.d.ts +3 -3
- package/lib/types/client/DeleteToast.d.ts +26 -11
- package/lib/types/client/DeliveryHistory.d.ts +12 -6
- package/lib/types/client/NewSessionLimit.d.ts +12 -0
- package/lib/types/client/RuleSelectRow.d.ts +22 -0
- package/lib/types/client/ScheduleCatalogAction.d.ts +9 -4
- package/lib/types/client/ScheduleEmptyIllustration.d.ts +12 -0
- package/lib/types/client/ScheduleTaskTab.d.ts +2 -1
- package/lib/types/client/TaskDetail.d.ts +71 -96
- package/lib/types/client/TaskEditorFields.d.ts +54 -0
- package/lib/types/client/TaskManagerPage.d.ts +18 -4
- package/lib/types/client/TaskMenu.d.ts +3 -2
- package/lib/types/client/TaskRuleControls.d.ts +50 -0
- package/lib/types/client/catalog-source.d.ts +5 -2
- package/lib/types/client/clear-ended.d.ts +33 -0
- package/lib/types/client/editor-store.d.ts +32 -0
- package/lib/types/client/editor-timing.d.ts +47 -0
- package/lib/types/client/frequency-locales.d.ts +386 -2
- package/lib/types/client/index.d.ts +4 -4
- package/lib/types/client/locales.d.ts +490 -10
- package/lib/types/client/relative-clock.d.ts +8 -2
- package/lib/types/client/schedule-format.d.ts +16 -5
- package/lib/types/client/session-link.d.ts +1 -22
- package/lib/types/client/session-schedule-state.d.ts +13 -29
- package/lib/types/client/task-cron.d.ts +0 -65
- package/lib/types/client/task-manager-locales.d.ts +1386 -51
- package/lib/types/client/task-record.d.ts +30 -0
- package/locale/de.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/package.json +25 -22
- package/lib/types/client/task-timing.d.ts +0 -96
package/README.i18n.yaml
CHANGED
|
@@ -3,38 +3,38 @@
|
|
|
3
3
|
# After editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-schedule/README.md
|
|
5
5
|
/:
|
|
6
|
-
en:
|
|
7
|
-
zh:
|
|
6
|
+
en: b4f472194d36189e
|
|
7
|
+
zh: 9dc81770c98be03b
|
|
8
8
|
/deepseek-ai-dsh-client-ui-schedule:
|
|
9
9
|
en: 862120984d5392eb
|
|
10
10
|
zh: eb3e5d5a802da592
|
|
11
11
|
/deepseek-ai-dsh-client-ui-schedule/summary:
|
|
12
|
-
en:
|
|
13
|
-
zh:
|
|
12
|
+
en: 9a690c99b0562de5
|
|
13
|
+
zh: 77a7464316afb3ed
|
|
14
14
|
/deepseek-ai-dsh-client-ui-schedule/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 405b30feaf48c087
|
|
17
17
|
/deepseek-ai-dsh-client-ui-schedule/use-this-package:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: 99626c29eb801b6f
|
|
19
|
+
zh: 9693d278f467ad90
|
|
20
20
|
/deepseek-ai-dsh-client-ui-schedule/use-this-package/time-zone-data-source:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: 4005b800e930f581
|
|
22
|
+
zh: ccb9318dad7f7e8f
|
|
23
23
|
/deepseek-ai-dsh-client-ui-schedule/understand-the-implementation:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: 72598a09be42251d
|
|
25
|
+
zh: 4140b2eec82c7f1f
|
|
26
26
|
/deepseek-ai-dsh-client-ui-schedule/further-exploration:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 2fd968202916b197
|
|
28
|
+
zh: f1ab66194846562b
|
|
29
29
|
/deepseek-ai-dsh-client-ui-schedule/model-experience:
|
|
30
|
-
en:
|
|
31
|
-
zh:
|
|
30
|
+
en: 6f528a72fe45af1b
|
|
31
|
+
zh: 8272529f6e324315
|
|
32
32
|
/deepseek-ai-dsh-client-ui-schedule/model-experience/kv-cache-effect:
|
|
33
|
-
en:
|
|
34
|
-
zh:
|
|
33
|
+
en: 52239e5688dfebe1
|
|
34
|
+
zh: 37343f5dbde010e8
|
|
35
35
|
/deepseek-ai-dsh-client-ui-schedule/known-limitations-and-deferred-work:
|
|
36
|
-
en:
|
|
37
|
-
zh:
|
|
36
|
+
en: 6ee939ce57fcea66
|
|
37
|
+
zh: 0e99fadf1fb7ac4d
|
|
38
38
|
/deepseek-ai-dsh-client-ui-schedule/known-limitations-and-deferred-work/dev-note:
|
|
39
|
-
en:
|
|
39
|
+
en: 18a59ce211e19bbd
|
|
40
40
|
zh: a4b126f9a4eaca6f
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Automation task management and Session reminder entries in the existing Web UI."
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The Automation tasks page and right Sidebar task tab use the same editor for task rules, saved delivery records, deletion, and conversation navigation. Manual creation and target selection use the Host Schedule service; conversation cards, header clocks, and Session row marks retain their existing locations.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -25,83 +25,75 @@ Manage active and inactive tasks from the Automation tasks page and the right Si
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Below 768px, the task list uses 20px horizontal insets, matching the Plugins page.
|
|
29
29
|
|
|
30
|
-
The
|
|
30
|
+
The shipped Web composition mounts `ui-schedule` with Host Schedule. The Automation tasks sidebar entry opens the task list without selecting or activating a Session. New and the adjacent menu's Create in a session action both open a new conversation with a short task-creation prompt in the current UI language, ready for the user to complete and send. When a blank conversation is reused, the prompt is appended on a new line, preserving its text, inline references, and attachments. The same menu offers Create manually. Manual creation opens the same editor as an existing task, validates required fields, and saves a task without starting an Agent or sending the instruction. A failed request leaves the form and its values visible. The empty state shows a decorative document-and-clock illustration whose colors follow the theme.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Enabled, Paused, Ended, and All filters combine with text search over the title, prompt, and linked Session id; the page starts on Enabled. The search-row menu clears all ended tasks after confirmation, preserving active and paused tasks. Selecting a task opens its editable Rules / Records page. Save is enabled only for valid, meaningful changes and sends only changed fields with `expectedUpdatedAt`, or `null` when no stored revision exists. The fields stay editable after saving. Unsaved drafts survive navigation between tasks and away from the page. A conflict retains the whole draft and disables Save. Review with my edits reapplies the changed field groups to the latest values for review before saving; Discard replaces the draft with the latest stored values. For a new task, Discard closes the editor. Late responses cannot change another task's detail. Coarse-pointer search, instruction, and timing fields use 16px text to prevent focus zoom on iOS Safari.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The destination menu offers a new conversation that the first delivery creates and later deliveries reuse, or a new conversation at every delivery. Manual creation defaults to reuse. A task already bound to a Session shows Current linked conversation as its destination, and editing it preserves that destination unless the user explicitly chooses a new one. The Linked workspace selector lists the framework Workspace catalog, shows each Workspace's directory under its name, and labels the first-use Workspace with its localized default name. A new destination starts in that Workspace, else in the first listed one. A stored task without a directory shows Ungrouped, because the Sessions it creates join no Workspace. For a reusable destination, the bottom conversation entry shows Pending creation until the first Session exists. A per-run destination instead shows Latest run conversation after its first delivery and hides the entry before that delivery; earlier conversations remain accessible from delivery records. Available links recheck membership and archive state before opening; missing or archived Sessions remain disabled.
|
|
35
35
|
|
|
36
|
-
The
|
|
36
|
+
The repeat editor offers once, minute, hour, day, week, month, and custom rules. Date and clock controls reuse existing pickers. Guided presets produce RRULE; minute and hour intervals start from the current minute in the selected zone. The Custom choice and Customize input do not name either syntax; the input accepts a two-line RRULE or a five-field Cron expression with an explicit zone. RRULE retains the zone in `DTSTART`; Cron retains its expression and selected zone as Cron timing. Complex RRULE values remain verbatim. The shared time parser checks new or changed Custom text before enabling Save; invalid or empty input keeps the draft and explains which field to change. Invalid Custom text offers manual correction, another repeat option, or correction by the Agent. The Host performs the final validation on save. Stored After and At tasks show date and clock fields immediately; a repeated local time uses UTC when needed to retain the exact instant. Every, Daily, and Weekly tasks show the matching controls when their interval or wall-clock precision is representable. Other stored timings remain in Custom and keep their typed timing until replaced. Viewing a task or editing other fields preserves its timing and committed occurrence.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Pause and resume update lifecycle state. Unsaved changes hold pause, resume, Run now, and Delete until you save or discard them. The detail menu offers Run now and Delete. It offers no queued-message cancellation: one inbox message may contain deliveries from several tasks. While a delivery to a reused conversation is queued or running, the detail disables its fields, Save, pause and resume, Run now, and Delete, and states that the task is queued or running and is managed in its conversation, which the bottom conversation entry opens. The minimum delivery interval disables another immediate run until the interval ends, while pause and deletion remain available once execution is idle. When the interval is the only cause, the Run now row stays focusable, and its tooltip states that the minimum run interval has not passed and when Run now becomes available. An archived linked conversation of a task already bound to a Session also disables Run now, because the Host refuses that delivery. A run that the Host refuses with `schedule_execution_pending` shows a status notice instead of an error. Deletion requires confirmation, removes the task and its saved records, retains Sessions and already-delivered messages, and reports the result through the existing app-wide toast. The confirmation focuses Cancel first; when it closes, focus returns to the detail menu button. The detail keeps the task until the Host answers. An applied deletion closes the detail or its task tab; a failed deletion keeps the task open for another attempt.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
The list, detail, header, and Session hover show the later of the scheduled occurrence and the Host delivery floor as the next run. Creation and editing show one short minimum-interval hint for per-run conversation targets, read from `schedule.deliveryLimits`; a failed read offers Retry. Scheduled and immediate runs share this limit.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Records lazily requests 20 saved deliveries, supports newest-first pagination, retains loaded records after failure, and ignores superseded or unmounted requests. Each record shows its occurrence and saved prompt, with Expand / Collapse for long prompts; legacy records without prompt text never substitute the current instruction. A receipt's actual destination has a conversation link when the Session is available. Confirmed pruning is stated only after the final saved page and offers the current retention explanation. These records acknowledge inbox delivery, not model execution success.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
An open Session renders an icon-only clock button among its header's right-aligned utilities, immediately left of the overflow menu, only once it has something to open: the first read mounts nothing, a read that returns no active reminder leaves the header without the button, a refresh keeps the last known reminders visible, and a failed read keeps the button with its retry. That rule prevents the clock from appearing and disappearing around the first answer. Its accessible name states the reminder count when the read is ready and the generic reminder label otherwise. With exactly one active reminder, the button opens that task's detail in the right Sidebar directly. With any other count it opens a popover that lists overdue reminders first, then future reminders by target time, with stored title, frequency, browser-local target time, relative time, and a Delete button; the title is a button that opens that task's detail in the right Sidebar. The task tab names the shown task's stored title on its chip and carries the same rule, delivery records, name, instruction, and run-time editing, confirmed deletion, and original-Session link as the Automation tasks page; it never activates a Session. Daily frequency text retains the saved local time and zone, and every next-target instant is shown as a device-zone clock with its relative duration in parentheses; the rule's own zone appears only in that frequency text. Escape closes the popover and returns focus to the button; an outside pointer press dismisses it. Deleting the final reminder removes the button, and an already open popover stays expandable until then.
|
|
47
|
-
|
|
48
|
-
The popover is body-portaled and targets 336px, sharing the trigger left edge when space permits and shifting left to retain a 16px viewport margin when the trigger is near the right edge; its width never exceeds the viewport width minus 32px, and it scrolls vertically when the list overflows. It exposes no task id, raw UTC value, or delivery details; each row carries only its detail opener and its Delete action.
|
|
49
|
-
|
|
50
|
-
Calling `schedule_create` renders the created task in the transcript as a card with a clock icon, its stored title, its frequency, and an Open button that opens that task's right-Sidebar tab. The card first narrows the task out of the call's persisted result JSON and reads its `title` from that result; once a catalog read that succeeded after the card appeared resolves that task, the card follows the catalog for the current name and frequency, and shows its deleted state instead of a frequency when that read lacks the record. A result recorded before the stored field existed falls back to the instruction's first line. A running call, a failed creation, or a result carrying no complete task keeps the row, shows the raw result text when the result is a single non-empty text block, and offers no Open action. The card adds no Host field and no Session-log format change, so Sessions recorded before the card existed render it too.
|
|
51
|
-
|
|
52
|
-
The Sidebar's Session rows mark scheduled Sessions: while a row is idle, unarchived, and its Session has at least one active task, the row shows a clock mark; an archived row keeps that cell blank, with its live status on the hover card only. A long hover on a Session with active tasks adds an automation section inside that row's existing hover card, whether or not the row is idle, listing up to two tasks with their icon, stored title, frequency, and next-run text, and an omission line when further tasks are hidden. A row with a higher-priority state — a pending interaction, live activity, or an unviewed completion — keeps its own dot and renders no mark, so the two never appear together. The mark and the hover section read the shared active and inactive Host task catalog and select their own Session's active tasks from it, so any number of visible rows costs one read; they never activate, retain, or unarchive a Session, and never read a Session log.
|
|
53
|
-
|
|
54
|
-
-----
|
|
44
|
+
An open conversation's header clock remains hidden before the first successful read or while no active related tasks exist. One task opens its right Sidebar tab; several open the existing popover. Idle, unarchived Session rows with active related tasks retain their clock mark and hover list. `schedule_create` continues to render a Turn-level card with a task title, repeat description, and Open action. Persisted legacy and current tool results both render; an authoritative read newer than the card resolves later edits or deletion.
|
|
55
45
|
|
|
56
46
|
### Time-zone data source
|
|
57
47
|
|
|
58
|
-
Time-zone
|
|
48
|
+
Time-zone enumeration and localized names use the browser's embedded ICU/CLDR data through `Intl`. There is no runtime download. The editor retains a stored alias even when enumeration omits it, and uses the system zone plus UTC when enumeration is unavailable.
|
|
59
49
|
|
|
60
50
|
<a id="understand-the-implementation"></a>
|
|
61
51
|
## Understand the implementation
|
|
62
52
|
|
|
53
|
+
Task menus use the [standard menu geometry](../../../docs/ui-radius.md#nested-hover), including keyboard-highlighted rows. Portaled task menus and date/time pickers use `useAnchoredPosition` to follow their triggers during browser zoom, scrolling, and resizing, while preserving viewport margins and the desktop frame clearance. Task-menu labels and clock values ellipsize when the visual viewport is too narrow. Clock columns shrink within the panel and scroll vertically within its available height; task menus scroll vertically to reach every choice. The Session-header popover follows the same viewport constraints and stays hidden until its first position resolves.
|
|
54
|
+
|
|
63
55
|
<details>
|
|
64
|
-
<summary>Implementation
|
|
56
|
+
<summary>Implementation details — click to expand</summary>
|
|
65
57
|
|
|
66
|
-
|
|
58
|
+
While the Peer may read `schedule/catalog`, the plugin registers the existing `schedules` main panel, Session header utility, Turn tail card, Session row mark and hover entries, and `scheduleTask` right Sidebar tab. Slot injection supplies framework readers and action callbacks; components own selection, search, and paging state. Entry-declared stores retain each task draft and its CAS baseline across navigation within their root or Session scope; the main panel and Session tabs have independent drafts. Pristine forms follow the catalog. A dirty form retains all fields and its original revision. A newer catalog revision prevents saving until the user discards the draft or explicitly reapplies changed title, prompt, timing, and target groups to that revision. Reapplying does not write; the user reviews the resulting form and saves with the new CAS baseline. Untouched groups follow the newer record. Missing tasks retain editable local drafts while Host mutations stay disabled. Drafts are not persisted; a Client reload or disposal of the owning entry or Session scope drops them. The Host owns task storage and execution. Browsing catalogs does not activate a Session. Conflict feedback reuses the catalog notice style; its outlined review action wraps below the message in narrow panes.
|
|
67
59
|
|
|
68
|
-
|
|
60
|
+
Edits to typed calendar timing use the shared recurrence evaluator to find the first valid future occurrence while preserving interval alignment across daylight-saving gaps. Successful edits use Schedule’s existing [current-format write path](../../schedule/schedule/README.md); a content-only edit retains the timing kind, precision, expression, and committed occurrence.
|
|
69
61
|
|
|
70
|
-
|
|
62
|
+
The manager, task tabs, row marks, and conversation-header projections share one observable `schedule.catalog` source. Header and row views filter active records by involvement and delivery target. Mutations use task-id-based `schedule.create`, `schedule.edit`, and `schedule.run`; history uses task identity and cursor without a Session ownership parameter. A mutation acknowledgment triggers a fresh authoritative read; a failed read remains a catalog error rather than changing the acknowledged write into a failure.
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
Sidebar layout records omit opener parameters. `TaskTabBindings` therefore persists task identity by Session and tab id in localStorage, without storing task content. Closed tab bindings are pruned. Observable catalog requests subscribe only while read, invalidate on Schedule changes and connection reset, and retire outstanding reads after the final subscriber leaves.
|
|
73
65
|
|
|
74
66
|
</details>
|
|
75
67
|
|
|
76
68
|
<a id="further-exploration"></a>
|
|
77
69
|
## Further Exploration
|
|
78
70
|
|
|
79
|
-
- [Schedule](../../schedule/schedule/README.md) owns persistence,
|
|
80
|
-
- [Slots](../../../docs/subsystems/slots.md)
|
|
71
|
+
- [Schedule](../../schedule/schedule/README.md) owns persistence, destinations, lifecycle, and delivery semantics.
|
|
72
|
+
- [Slots](../../../docs/subsystems/slots.md) defines framework readers and panel contributions.
|
|
81
73
|
|
|
82
74
|
<a id="model-experience"></a>
|
|
83
75
|
## Model Experience
|
|
84
76
|
|
|
85
|
-
None, as this browser
|
|
77
|
+
None, as this browser package registers no model tools or automatic messages; the creation prompt stays an unsent draft.
|
|
86
78
|
|
|
87
79
|
#### KV Cache effect
|
|
88
80
|
|
|
89
|
-
None.
|
|
81
|
+
None. Task-list content does not enter model requests.
|
|
90
82
|
|
|
91
83
|
## Known Limitations and Deferred Work
|
|
92
84
|
|
|
93
85
|
<a id="known-limitations-and-deferred-work"></a>
|
|
94
86
|
|
|
95
|
-
- Saved records describe inbox delivery, not
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
87
|
+
- Saved records describe inbox delivery, not execution results; absent historical prompts or physically deleted tasks cannot be reconstructed.
|
|
88
|
+
- The Host limits saved history by `deliveryHistoryDays` and `deliveryHistoryRecords`; page size limits record count, not prompt bytes.
|
|
89
|
+
- Conversation links open the Session through normal navigation, not a specific message. Deleting a task does not cancel messages already delivered.
|
|
90
|
+
- This UI provides no task-level authorization for model tools. Host Schedule owns access control and must enforce any per-Session restrictions.
|
|
99
91
|
|
|
100
92
|
<a id="dev-note"></a>
|
|
101
93
|
### Dev Note
|
|
102
94
|
|
|
103
95
|
<details>
|
|
104
|
-
<summary>
|
|
96
|
+
<summary>Maintenance context — click to expand</summary>
|
|
105
97
|
|
|
106
98
|
None.
|
|
107
99
|
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "基于现有 Web UI 的自动化任务管理和会话提醒入口。"
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
自动化任务页和右侧栏任务页签使用同一编辑器处理任务规则、已保存的投递记录、删除及会话导航。手动创建和执行目标选择使用宿主的 Schedule 服务;会话卡片、页头时钟和会话行标记保留现有位置。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -25,77 +25,69 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
宽度小于 768px 时,任务列表使用 20px 的左右内边距,与插件页一致。
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
发布的 Web 组合将 `ui-schedule` 与宿主 Schedule 一起挂载。自动化任务侧栏入口打开任务列表,不选择或激活会话。“新建”和相邻菜单的“在会话中创建”都会进入新会话,按当前界面语言预填简短的任务创建提示,供用户补充并发送。若复用空白会话,提示会另起一行追加,保留原有文本、行内引用和附件。该菜单还提供“手动创建”。手动创建与已有任务打开同一编辑页,校验必填项并保存任务,不启动 Agent 或发送指令。请求失败时保留表单和已填内容。空态显示装饰性的文档与时钟插图,其颜色随主题变化。
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
“已开启”“已暂停”“已结束”“全部”筛选结合标题、指令和关联会话 id 搜索,默认显示已开启任务。搜索行菜单在确认后清除全部已结束任务,保留已开启和已暂停任务。选择任务直接打开可编辑的“规则 / 任务运行记录”页面。只有字段有效且有实际修改时才能保存;保存只发送变更字段及 `expectedUpdatedAt`,存储版本缺失时发送 `null`。保存后字段保持可编辑。切换任务或离开页面时保留未保存的草稿。冲突保留整份草稿并禁用保存。“保留修改并复核”将改过的字段组应用到最新值,供保存前复核;“放弃”用最新存储值替换草稿。对于新任务,“放弃”关闭编辑页。迟到响应不会改变其他任务详情。粗指针设备的搜索、指令和时间字段使用 16px 字号,避免 iOS Safari 聚焦时缩放。
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
执行位置下拉提供“新建对话并复用”和“每次新建对话”,手动创建默认前者。已经关联会话的任务,执行位置显示“当前关联对话”;编辑时保留原目标,只有用户主动选择新方式才会切换。“关联工作区”选择器列出框架工作区目录,在每个工作区名称下显示其路径,并以本地化默认名称标注首次使用时创建的工作区。新的执行位置默认使用该工作区;没有该工作区时使用列表中的第一个。没有目录的已有任务显示“未分组”,因为它创建的会话不加入任何工作区。复用目标的首次会话尚未存在时,详情底部入口显示“待创建”。每次新建的目标在首次投递后显示“最近运行对话”,首次投递前隐藏该入口;更早的对话仍可从任务运行记录进入。可用链接在打开前再次检查会话是否仍存在、是否归档;缺失或归档会话保持禁用。
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
重复编辑提供仅一次、每分钟、每小时、每天、每周、每月和自定义规则。日期和时间控件复用已有选择器。引导选项生成 RRULE;分钟和小时间隔从所选时区的当前分钟开始。自定义选项和自定义输入框不提示任何语法名称;输入框接受两行 RRULE 或带显式时区的五字段 Cron。RRULE 在 `DTSTART` 中保留时区;Cron 将表达式和所选时区保留为 Cron 时间类型。复杂 RRULE 保持原文。新的或已修改的自定义文本由共享时间解析器校验,校验通过后才能保存;无效或空输入保留草稿,并说明需要修改的字段。自定义文本无效时,提示手动修改规则、选择其他重复方式,或让智能体修改规则。宿主在保存时执行最终校验。已有 After、At 任务直接显示日期和时间控件;本地时间重复时,必要时使用 UTC 保留准确时点。Every、Daily、Weekly 任务在控件可表示其间隔或钟表时间精度时直接显示对应控件;其他时间规则仍在自定义中显示描述,并在替换前保留原类型。查看任务或编辑其他字段保留其时间规则及已提交发生时点。
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
暂停和恢复修改生命周期状态。有未保存修改时,先保存或放弃更改,才能暂停、恢复、立即执行或删除。详情菜单提供立即执行和删除,不提供取消排队消息:同一条收件箱消息可能包含多个任务的投递。投递到复用对话的投递排队或执行期间,详情禁用字段、保存、暂停与恢复、立即执行和删除,并说明此任务已排队或执行中,请在会话中管理任务;详情底部的会话入口打开该会话。最小投递间隔结束前禁用再次立即执行,执行空闲后仍可暂停或删除。仅因间隔禁用时,立即执行项仍可聚焦,其提示说明未满最小运行间隔,并给出可以立即执行的时间。已经关联会话的任务,其关联对话已归档时,同样禁用立即执行,因为宿主拒绝这次投递。宿主以 `schedule_execution_pending` 拒绝的立即执行显示为状态提示,而非错误。删除需要确认,移除任务及其已保存记录,保留会话和已经投递的消息,并通过现有应用级提示报告结果。确认对话框首先聚焦“取消”;对话框关闭后,焦点回到详情菜单按钮。宿主答复之前,详情保持显示该任务。删除生效后关闭详情或其任务页签;删除失败时保留任务,以便再次尝试。
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
列表、详情、页头和会话悬浮内容的下次运行时间,取计划发生时间和宿主最早允许投递时间中较晚的一项。创建和编辑“每次新建对话”时,通过 `schedule.deliveryLimits` 读取宿主配置,以一句短提示显示最小间隔;读取失败可重试。定时与立即执行共用此限制。
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
“任务运行记录”按需请求 20 条已保存投递,支持从新到旧分页,失败时保留已加载记录,并忽略被刷新替代或卸载后的请求。每条记录显示投递发生时间与已保存指令,长指令可展开、收起;缺少指令的旧记录不使用当前指令替代。回执的实际执行会话可用时提供入口。仅在最后一页且确认裁剪后显示清理提示,并提供当前保留规则说明。这些记录确认收件箱投递,不表示模型执行成功。
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
已打开的会话只有在确实有可打开的内容时,才在页头右侧功能位中、紧邻更多操作菜单左侧渲染一个仅图标时钟按钮:首次读取前不渲染任何内容,读取结果为没有活动提醒时页头不显示该按钮,刷新期间保留上一次已知的提醒,读取失败则保留按钮及其重试。该规则避免时钟在首次结果前后出现又消失。其无障碍名称在读取就绪时给出提醒数量,否则显示通用提醒标签。当该会话只有一个活动提醒时,按钮直接在右侧栏打开该任务的详情。其余数量都会打开弹层:先列出逾期提醒,再按目标时间列出未来提醒,显示已存储的标题、频率、浏览器本地目标时间、相对时间及删除按钮;标题本身是一个按钮,点击后在右侧栏打开该任务的详情。任务页签在标签上显示当前任务已存储的标题,并提供与自动化任务页面相同的规则、任务运行记录、名称、指令和运行时间修改、确认删除和原会话入口;它不会激活会话。每日频率文本保留保存的本地时间和时区;每个下一目标时点都显示为设备时区的钟点和括号内的相对时长;规则自身的时区只显示在该频率文本中。Escape 关闭弹层并将焦点返回按钮;点击外部将其关闭。删除最后一条提醒会移除按钮;在此之前,已经打开的弹层保持可展开状态。
|
|
47
|
-
|
|
48
|
-
弹层通过 portal 挂到 body,目标宽度为 336px;空间足够时与触发按钮左边缘对齐,触发器靠近视口右侧时向左避让并保留 16px 视口边距,宽度不超过视口宽度减 32px,列表溢出时纵向滚动。它不显示任务 id、原始 UTC 值或投递详情;每行只带自身的详情入口和删除操作。
|
|
49
|
-
|
|
50
|
-
调用 `schedule_create` 时,创建的任务会以卡片形式渲染在 transcript 中,包含时钟图标、已存储的标题、频率,以及打开该任务右侧栏页签的“打开”按钮。卡片先按该调用持久化的结果 JSON 收窄出任务,并从该结果读取 `title`;当一次在卡片出现之后成功结束的目录读取解析到该任务时,卡片改为跟随目录显示当前名称与频率,若该读取中不含该记录,则以“已删除”代替频率显示。在已存储字段存在之前录制的结果回退为指令首行。仍在运行的调用、创建失败,或结果中没有完整任务时,卡片保留该行,并在结果为单个非空文本块时显示原始结果文本,不提供“打开”操作。卡片不增加 Host 字段,也不改变 Session 日志格式,因此早于该卡片录制的 Session 也会渲染它。
|
|
51
|
-
|
|
52
|
-
侧栏的 Session 行会标记有定时任务的会话:当某行处于空闲状态、未归档且其会话至少有一个活动任务时,该行显示时钟标记;归档行该格留空,其实时状态只在悬浮卡片中显示。对存在活动任务的会话长按悬停时,无论该行是否空闲,都会在其已有的悬浮卡片内增加自动化区段,最多列出两个任务(图标、已存储的标题、频率与下次运行文本),还有更多任务被隐藏时显示遗漏行。处于更高优先级状态的行——有待处理交互、活动仍在进行,或有未查看的完成提醒——保留自身状态点且不渲染标记,两者不会同时出现。该标记和悬停区段读取共享的活动与未运行 Host 任务目录,并从中筛选本会话的活动任务;它们不会激活、保留或取消归档任何会话,也不读取 Session 日志。
|
|
53
|
-
|
|
54
|
-
-----
|
|
44
|
+
打开会话的页头时钟在首次读取成功之前或没有活动关联任务时保持隐藏。一个任务直接打开右侧栏页签;多个任务打开现有弹层。空闲、未归档且有活动关联任务的会话行保留时钟标记和悬浮列表。`schedule_create` 继续在轮次末尾渲染任务卡片,显示标题、重复描述和“打开”操作。持久化的旧工具结果与当前结果均可渲染;比卡片更新的权威读取同步后续修改或删除。
|
|
55
45
|
|
|
56
46
|
### 时区数据来源
|
|
57
47
|
|
|
58
|
-
|
|
48
|
+
时区清单和本地化名称通过 `Intl` 使用浏览器内嵌的 ICU/CLDR 数据,不在运行时下载。选择器保留清单未列出的已存储别名;无法枚举时使用系统时区和 UTC。
|
|
59
49
|
|
|
60
50
|
<a id="understand-the-implementation"></a>
|
|
61
51
|
## 理解实现
|
|
62
52
|
|
|
53
|
+
任务菜单使用[标准菜单几何](../../../docs/ui-radius.zh.md#nested-hover),包含键盘高亮行。使用 portal 的任务菜单和日期、时间选择器通过 `useAnchoredPosition`,在浏览器缩放、滚动和尺寸变化时跟随触发器,并保留视口边距和桌面标题栏避让。视觉视口过窄时,任务菜单文案和时间值以省略号截断。时间列随面板缩窄,并在可用高度内纵向滚动;任务菜单通过纵向滚动到达每个选项。会话页头弹层遵循同样的视口限制,并在首次定位完成前保持隐藏。
|
|
54
|
+
|
|
63
55
|
<details>
|
|
64
56
|
<summary>实现内部细节 — 点击展开</summary>
|
|
65
57
|
|
|
66
|
-
|
|
58
|
+
Peer 可读取 `schedule/catalog` 时,插件注册现有 `schedules` 主面板、会话页头功能位、轮次尾部卡片、会话行标记与悬浮内容,以及 `scheduleTask` 右侧栏页签。槽位注入提供框架读取器与操作回调;组件拥有选择、搜索和分页状态。入口声明的存储在根或会话作用域中按任务保留草稿和 CAS 基线,支持导航后恢复;主面板与会话页签的草稿相互独立。未修改的表单跟随目录更新。已修改的表单保留全部字段及原版本。目录出现新版本后,须放弃草稿,或由用户明确将改过的名称、内容、时间和目标字段组重新应用到该版本,才能保存。此操作不写入任务;用户复核结果后,以新版本作为 CAS 基线保存。未修改的字段组采用新记录的值。任务缺失时保留可编辑的本地草稿,宿主修改操作仍禁用。草稿不持久化;客户端重新加载,或所属入口、会话作用域销毁时,草稿随之释放。宿主拥有任务存储与执行。浏览目录不会激活会话。冲突反馈沿用目录提示样式;复核按钮采用描边样式,在窄面板中换到提示下方。
|
|
67
59
|
|
|
68
|
-
|
|
60
|
+
修改类型化日历时间时,通过共享重复规则求值器查找首个有效未来发生时点,并保留跨夏令时缺口的间隔对齐。成功编辑沿用 Schedule 的[当前格式写入路径](../../schedule/schedule/README.zh.md);仅修改内容时保留时间类型、精度、表达式及已提交发生时点。
|
|
69
61
|
|
|
70
|
-
|
|
62
|
+
管理页、任务页签、行标记和会话页头投影共享一个可观察的 `schedule.catalog` 数据源。页头与会话行根据关联关系和执行目标筛选活动记录。修改使用基于任务 id 的 `schedule.create`、`schedule.edit` 和 `schedule.run`;历史使用任务标识和游标,不携带会话所有权参数。修改确认后发起新的权威读取;回读失败仍是目录错误,不将已经确认的写入改判为失败。
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
侧栏布局记录不保存打开参数,因此 `TaskTabBindings` 按会话和页签 id 在 localStorage 中保存任务标识,不保存任务内容,并清理已关闭页签的关联。可观察目录仅在被读取时订阅,在 Schedule 变更或连接重置时刷新,最后一个订阅退出后使未完成读取失效。
|
|
73
65
|
|
|
74
66
|
</details>
|
|
75
67
|
|
|
76
68
|
<a id="further-exploration"></a>
|
|
77
69
|
## 延伸阅读
|
|
78
70
|
|
|
79
|
-
- [Schedule](../../schedule/schedule/README.zh.md)
|
|
80
|
-
- [槽位](../../../docs/subsystems/slots.zh.md)
|
|
71
|
+
- [Schedule](../../schedule/schedule/README.zh.md) 拥有持久化、执行目标、生命周期和投递语义。
|
|
72
|
+
- [槽位](../../../docs/subsystems/slots.zh.md) 定义框架读取器和面板贡献。
|
|
81
73
|
|
|
82
74
|
<a id="model-experience"></a>
|
|
83
75
|
## 模型体验
|
|
84
76
|
|
|
85
|
-
|
|
77
|
+
无:本浏览器包不注册模型工具或自动消息;创建提示保留为未发送的草稿。
|
|
86
78
|
|
|
87
79
|
#### KV Cache 影响
|
|
88
80
|
|
|
89
|
-
|
|
81
|
+
无。任务列表内容不进入模型请求。
|
|
90
82
|
|
|
91
83
|
## 已知限制与后续工作
|
|
92
84
|
|
|
93
85
|
<a id="known-limitations-and-deferred-work"></a>
|
|
94
86
|
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
87
|
+
- 已保存记录描述收件箱投递,不表示执行结果;无法重建缺失的历史指令或已物理删除的任务。
|
|
88
|
+
- 宿主通过 `deliveryHistoryDays` 和 `deliveryHistoryRecords` 限制历史;分页大小限制记录数量,不限制指令字节数。
|
|
89
|
+
- 会话入口通过普通导航打开会话,不跳转到特定消息。删除任务不会取消已投递的消息。
|
|
90
|
+
- 此 UI 不为模型工具提供任务级授权。宿主 Schedule 拥有访问控制,任何按会话限制都必须由宿主执行。
|
|
99
91
|
|
|
100
92
|
<a id="dev-note"></a>
|
|
101
93
|
### 开发备注
|