@sparkelf/dsh-plus 0.2.9-alpha.59 → 0.2.9-alpha.61
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.
|
@@ -1,114 +1,5 @@
|
|
|
1
|
-
diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
|
|
2
|
-
index 7c4acf5a3d..ea9d29e2e3 100644
|
|
3
|
-
--- a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
|
|
4
|
-
+++ b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
|
|
5
|
-
@@ -149,6 +149,12 @@
|
|
6
|
-
neutral hairline, the 10px radius, and the mock's `--muted` leading icon. The
|
|
7
|
-
mock brightens the border on hover and takes the brand stroke on focus
|
|
8
|
-
rather than drawing a ring around the control. */
|
|
9
|
-
+/* The runtime extension tab keeps the page's centered column, so a contributor
|
|
10
|
-
+ body lines up with the search field and the task rows. */
|
|
11
|
-
+.plazaBody {
|
|
12
|
-
+ min-width: 0;
|
|
13
|
-
+}
|
|
14
|
-
+
|
|
15
|
-
.searchTools {
|
|
16
|
-
--task-search-height: 36px;
|
|
17
|
-
display: flex;
|
|
18
|
-
diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.tsx b/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
|
|
19
|
-
index 3c330c9f26..f7e7b78312 100644
|
|
20
|
-
--- a/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
|
|
21
|
-
+++ b/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
|
|
22
|
-
@@ -5,7 +5,7 @@ import {
|
|
23
|
-
Button, IconClockOutlineRegular, IconCloseOutlineRegular, IconEllipsisOutlineRegular, IconPlusOutlineRegular,
|
|
24
|
-
IconSearchOutlineRegular, IconTrashOutlineRegular, Input, Menu, Modal, Tooltip,
|
|
25
|
-
} from '@deepseek-ai/dsh-client-ui-primitives'
|
|
26
|
-
-import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
|
|
27
|
-
+import type { HostObservable, InjectFace, PropsLocale, PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
|
|
28
|
-
import type {} from '@deepseek-ai/dsh-client-ui-layout/client'
|
|
29
|
-
import type { ScheduleCatalogEntry, ScheduleId } from '@deepseek-ai/dsh-schedule/client'
|
|
30
|
-
import type { CatalogSnapshot } from './catalog-source.ts'
|
|
31
|
-
@@ -36,14 +36,26 @@ export interface TaskManagerInjected extends TaskDetailInjected {
|
|
32
|
-
* @returns resolution after the outcome is reported.
|
|
33
|
-
*/
|
|
34
|
-
readonly onClearEnded: () => Promise<void>
|
|
35
|
-
+ /**
|
|
36
|
-
+ * Whether a plugin currently contributes the page's runtime extension tab.
|
|
37
|
-
+ *
|
|
38
|
-
+ * The page reads this while rendering, so a contributor that registers after
|
|
39
|
-
+ * the page mounted still makes its tab appear on the next render; with no
|
|
40
|
-
+ * contributor the page keeps exactly its three status tabs.
|
|
41
|
-
+ * @returns true when the `schedule.manager.tabs` seat has an occupant.
|
|
42
|
-
+ */
|
|
43
|
-
+ readonly plazaAvailable?: () => boolean
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** Root-scoped task catalog props derived from the framework and injected actions. */
|
|
47
|
-
export type TaskManagerPageProps = PropsRuntime<'main'>
|
|
48
|
-
& InjectFace<TaskManagerInjected>
|
|
49
|
-
& PropsLocale<'schedule.manager'>
|
|
50
|
-
+ // Narrowed to the one seat this page declares; optional so a unit test can
|
|
51
|
-
+ // render the page without a slot host, as every other page-level test does.
|
|
52
|
-
+ & Partial<PropsRenderSlots<'schedule.manager.tabs'>>
|
|
53
|
-
|
|
54
|
-
-type StatusFilter = 'all' | ScheduleCatalogEntry['status']
|
|
55
|
-
+type StatusFilter = 'all' | ScheduleCatalogEntry['status'] | 'plaza'
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Render retained tasks with authoritative deletion and timing-only edits.
|
|
59
|
-
@@ -51,7 +63,7 @@ type StatusFilter = 'all' | ScheduleCatalogEntry['status']
|
|
60
|
-
* @returns the searchable task list beside the selected task's detail.
|
|
61
|
-
*/
|
|
62
|
-
export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
63
|
-
- const { useCatalog, onNewTask, onClearEnded, onRetry, t } = props
|
|
64
|
-
+ const { useCatalog, onNewTask, onClearEnded, onRetry, plazaAvailable, renderSlot, t } = props
|
|
65
|
-
const catalog = useCatalog(snapshot => snapshot)
|
|
66
|
-
const { records, status } = catalog
|
|
67
|
-
const [search, setSearch] = useState('')
|
|
68
|
-
@@ -85,7 +97,7 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
69
|
-
const rows = useMemo(() => {
|
|
70
|
-
const query = search.trim().toLowerCase()
|
|
71
|
-
return records.filter(record => (
|
|
72
|
-
- (statusFilter === 'all' || record.status === statusFilter)
|
|
73
|
-
+ (statusFilter === 'all' || (statusFilter !== 'plaza' && record.status === statusFilter))
|
|
74
|
-
&& (record.prompt.toLowerCase().includes(query)
|
|
75
|
-
|| record.sessionId.toLowerCase().includes(query)
|
|
76
|
-
|| taskName(record).toLowerCase().includes(query))
|
|
77
|
-
@@ -202,8 +214,24 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
78
|
-
{t(value === 'all' ? 'statusFilter.all' : `status.${value}`)}
|
|
79
|
-
</button>
|
|
80
|
-
))}
|
|
81
|
-
+ {plazaAvailable?.() === true && (
|
|
82
|
-
+ <button
|
|
83
|
-
+ type="button"
|
|
84
|
-
+ className={clsx(css.filterTab, statusFilter === 'plaza' && css.filterTabActive)}
|
|
85
|
-
+ aria-pressed={statusFilter === 'plaza'}
|
|
86
|
-
+ data-testid="task-manager-plaza-tab"
|
|
87
|
-
+ onClick={() => { setStatusFilter('plaza') }}
|
|
88
|
-
+ >
|
|
89
|
-
+ {t('statusFilter.plaza')}
|
|
90
|
-
+ </button>
|
|
91
|
-
+ )}
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
+ {statusFilter === 'plaza' ? (
|
|
95
|
-
+ <div className={css.plazaBody} data-testid="task-manager-plaza-body">
|
|
96
|
-
+ {renderSlot?.('schedule.manager.tabs', {})}
|
|
97
|
-
+ </div>
|
|
98
|
-
+ ) : (<>
|
|
99
|
-
<div className={css.searchTools}>
|
|
100
|
-
<div className={css.searchField}>
|
|
101
|
-
<Input
|
|
102
|
-
@@ -299,6 +327,7 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
103
|
-
})}
|
|
104
|
-
</ul>
|
|
105
|
-
</div>
|
|
106
|
-
+ </>)}
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
1
|
diff --git a/packages/client/ui-schedule/src/client/index.ts b/packages/client/ui-schedule/src/client/index.ts
|
|
111
|
-
index
|
|
2
|
+
index 5df35309..8ae6791e 100644
|
|
112
3
|
--- a/packages/client/ui-schedule/src/client/index.ts
|
|
113
4
|
+++ b/packages/client/ui-schedule/src/client/index.ts
|
|
114
5
|
@@ -73,6 +73,21 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
@@ -119,10 +10,10 @@ index 7dcbc32ee3..cd072150e7 100644
|
|
|
119
10
|
+ /**
|
|
120
11
|
+ * One extension body contributed at runtime to the automation-task page.
|
|
121
12
|
+ *
|
|
122
|
-
+ * The page renders the single occupant as an additional status tab and
|
|
123
|
-
+ *
|
|
124
|
-
+ *
|
|
125
|
-
+ *
|
|
13
|
+
+ * The page renders the single occupant as an additional status tab and supplies no owner
|
|
14
|
+
+ * props: a contributor owns its own data and needs no identity from the page. The seat
|
|
15
|
+
+ * belongs to no Session, so opening the page never mounts a contributor against an arbitrary
|
|
16
|
+
+ * conversation.
|
|
126
17
|
+ */
|
|
127
18
|
+ 'schedule.manager.tabs': {
|
|
128
19
|
+ kind: 'single'
|
|
@@ -132,86 +23,86 @@ index 7dcbc32ee3..cd072150e7 100644
|
|
|
132
23
|
+ }
|
|
133
24
|
}
|
|
134
25
|
|
|
135
|
-
/** Required services for catalogs, ambient Session marks, the right Sidebar, Remote queries,
|
|
136
|
-
@@ -
|
|
137
|
-
name: 'main',
|
|
26
|
+
/** Required services for catalogs, ambient Session marks, the right Sidebar, Remote queries, linked-Session navigation, and access. */
|
|
27
|
+
@@ -220,8 +235,13 @@ export function apply(ctx: ClientContext): void {
|
|
138
28
|
key: PANEL_ID,
|
|
139
29
|
locale: MANAGER_NS,
|
|
140
|
-
|
|
141
|
-
+ //
|
|
142
|
-
+ // a tab body without this package
|
|
30
|
+
store: createEditorStore(),
|
|
31
|
+
+ // The automation page is the one first-level page that accepts a runtime extension tab.
|
|
32
|
+
+ // Declaring the seat here is what lets a plugin contribute a tab body without this package
|
|
33
|
+
+ // importing that plugin.
|
|
143
34
|
+ children: { 'schedule.manager.tabs': { kind: 'single', scope: 'root' } },
|
|
144
35
|
inject: (): TaskManagerInjected => ({
|
|
145
36
|
...detail,
|
|
146
37
|
+ plazaAvailable: () => ctx.slots.entriesOfSlot('schedule.manager.tabs').length > 0,
|
|
147
|
-
|
|
148
|
-
onNewTask: () => { ctx.uiWorkspace.startSession() },
|
|
38
|
+
onNewTask: () => { ctx.uiWorkspace.startSession(undefined, { prompt: t('host.createPrompt'), whenDraftExists: 'append' }) },
|
|
149
39
|
onClearEnded: async () => {
|
|
40
|
+
const outcome = await clearEnded()
|
|
150
41
|
diff --git a/packages/client/ui-schedule/src/client/task-manager-locales.ts b/packages/client/ui-schedule/src/client/task-manager-locales.ts
|
|
151
|
-
index
|
|
42
|
+
index 13ef7c90..b6b3a90e 100644
|
|
152
43
|
--- a/packages/client/ui-schedule/src/client/task-manager-locales.ts
|
|
153
44
|
+++ b/packages/client/ui-schedule/src/client/task-manager-locales.ts
|
|
154
|
-
@@ -
|
|
45
|
+
@@ -65,6 +65,7 @@ export const en = {
|
|
155
46
|
'empty.action': 'New automation task',
|
|
156
47
|
'statusFilter.label': 'Task status',
|
|
157
48
|
'statusFilter.all': 'All',
|
|
158
49
|
+ 'statusFilter.plaza': 'Workflow plaza',
|
|
159
50
|
'status.active': 'Enabled',
|
|
160
|
-
'status.inactive': 'Inactive',
|
|
161
51
|
'detail.label': 'Task details',
|
|
162
|
-
|
|
52
|
+
'detail.close': 'Close details',
|
|
53
|
+
@@ -231,6 +232,7 @@ export const zh: Record<TaskManagerKey, string> = {
|
|
163
54
|
'empty.action': '新建自动化任务',
|
|
164
55
|
'statusFilter.label': '任务状态',
|
|
165
56
|
'statusFilter.all': '全部',
|
|
166
57
|
+ 'statusFilter.plaza': '工作流广场',
|
|
167
58
|
'status.active': '已开启',
|
|
168
|
-
'status.inactive': '已结束',
|
|
169
59
|
'detail.label': '任务详情',
|
|
170
|
-
|
|
60
|
+
'detail.close': '关闭详情',
|
|
61
|
+
@@ -392,6 +394,7 @@ export const ja = {
|
|
171
62
|
'empty.action': '新規自動化タスク',
|
|
172
63
|
'statusFilter.label': 'タスクの状態',
|
|
173
64
|
'statusFilter.all': 'すべて',
|
|
174
65
|
+ 'statusFilter.plaza': 'ワークフロープラザ',
|
|
175
66
|
'status.active': '有効',
|
|
176
|
-
'status.inactive': '無効',
|
|
177
67
|
'detail.label': 'タスクの詳細',
|
|
178
|
-
|
|
68
|
+
'detail.close': '詳細を閉じる',
|
|
69
|
+
@@ -507,6 +510,7 @@ export const es = {
|
|
179
70
|
'empty.action': 'Nueva tarea de automatización',
|
|
180
71
|
'statusFilter.label': 'Estado de la tarea',
|
|
181
72
|
'statusFilter.all': 'Todos',
|
|
182
73
|
+ 'statusFilter.plaza': 'Plaza de flujos',
|
|
183
74
|
'status.active': 'Habilitado',
|
|
184
|
-
'status.inactive': 'Inactivo',
|
|
185
75
|
'detail.label': 'Detalles de la tarea',
|
|
186
|
-
|
|
76
|
+
'detail.close': 'Cerrar detalles',
|
|
77
|
+
@@ -668,6 +672,7 @@ export const fr = {
|
|
187
78
|
'empty.action': "Nouvelle tâche d'automatisation",
|
|
188
79
|
'statusFilter.label': 'Statut de la tâche',
|
|
189
80
|
'statusFilter.all': 'Tout',
|
|
190
81
|
+ 'statusFilter.plaza': 'Place des workflows',
|
|
191
82
|
'status.active': 'Activé',
|
|
192
|
-
'status.inactive': 'Inactif',
|
|
193
83
|
'detail.label': 'Détails de la tâche',
|
|
194
|
-
|
|
84
|
+
'detail.close': 'Fermer les détails',
|
|
85
|
+
@@ -829,6 +834,7 @@ export const de = {
|
|
195
86
|
'empty.action': 'Neue Automatisierungsaufgabe',
|
|
196
87
|
'statusFilter.label': 'Aufgabenstatus',
|
|
197
88
|
'statusFilter.all': 'Alle',
|
|
198
89
|
+ 'statusFilter.plaza': 'Workflow-Plaza',
|
|
199
90
|
'status.active': 'Aktiviert',
|
|
200
|
-
'status.inactive': 'Inaktiv',
|
|
201
91
|
'detail.label': 'Aufgabendetails',
|
|
202
|
-
|
|
92
|
+
'detail.close': 'Details schließen',
|
|
93
|
+
@@ -990,6 +996,7 @@ export const ru = {
|
|
203
94
|
'empty.action': 'Новая задача автоматизации',
|
|
204
95
|
'statusFilter.label': 'Статус задачи',
|
|
205
96
|
'statusFilter.all': 'Все',
|
|
206
97
|
+ 'statusFilter.plaza': 'Витрина сценариев',
|
|
207
98
|
'status.active': 'Включено',
|
|
208
|
-
'status.inactive': 'Неактивный',
|
|
209
99
|
'detail.label': 'Подробности задачи',
|
|
210
|
-
|
|
100
|
+
'detail.close': 'Закрыть детали',
|
|
101
|
+
@@ -1151,6 +1158,7 @@ export const pt = {
|
|
211
102
|
'empty.action': 'Nova tarefa de automação',
|
|
212
103
|
'statusFilter.label': 'Status da tarefa',
|
|
213
104
|
'statusFilter.all': 'Todos',
|
|
214
105
|
+ 'statusFilter.plaza': 'Praça de fluxos',
|
|
215
106
|
'status.active': 'Habilitado',
|
|
216
|
-
'status.inactive': 'Inativo',
|
|
217
107
|
'detail.label': 'Detalhes da tarefa',
|
|
108
|
+
'detail.close': 'Fechar detalhes',
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
diff --git a/packages/client/ui-workspace/src/client/tree.ts b/packages/client/ui-workspace/src/client/tree.ts
|
|
2
|
+
index 054c584..1df953b 100644
|
|
3
|
+
--- a/packages/client/ui-workspace/src/client/tree.ts
|
|
4
|
+
+++ b/packages/client/ui-workspace/src/client/tree.ts
|
|
5
|
+
@@ -17,6 +17,16 @@ import { workspaceTitleOf } from '@deepseek-ai/dsh-util-workspace-path'
|
|
6
|
+
/** Group key for Sessions outside every Workspace. */
|
|
7
|
+
export const UNGROUPED_KEY = ''
|
|
8
|
+
|
|
9
|
+
+/**
|
|
10
|
+
+ * Group-chat rooms own a Workspace only to keep their Session selectable. Those
|
|
11
|
+
+ * Workspaces live under the rooms directory (`<dsh-home>/group-chat/rooms/<room>`)
|
|
12
|
+
+ * and the room already has an entry in the group-chat section, so the Workspace
|
|
13
|
+
+ * browser must not repeat it as a folder.
|
|
14
|
+
+ */
|
|
15
|
+
+const GROUP_ROOM_PATH_MARKER = '/group-chat/rooms/'
|
|
16
|
+
+const isGroupRoomWorkspace = (path: string | undefined): boolean =>
|
|
17
|
+
+ typeof path === 'string' && path.includes(GROUP_ROOM_PATH_MARKER)
|
|
18
|
+
+
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the Workspace browser group that owns one Session.
|
|
21
|
+
* @param workspaces - authoritative Workspace membership.
|
|
22
|
+
@@ -341,6 +351,9 @@ function groupByWorkspace(
|
|
23
|
+
if (!sessionVisible(summary, current, archived, archivedFilter)) continue
|
|
24
|
+
members.push(summary)
|
|
25
|
+
}
|
|
26
|
+
+ // A room Workspace still owns its Session (accounted above), but that Session belongs to
|
|
27
|
+
+ // the group-chat section rather than this browser's folder list.
|
|
28
|
+
+ if (isGroupRoomWorkspace(workspace.path)) continue
|
|
29
|
+
// The archived-only view lists archives, not the Workspace inventory, so
|
|
30
|
+
// a Workspace without archived Sessions contributes no group.
|
|
31
|
+
if (archivedFilter === 'only' && members.length === 0) continue
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 DeepSeek
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|