@deepseek-ai/dsh-client-ui-schedule 0.1.7-alpha.2 → 0.1.7-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +39 -5
- package/README.md +36 -39
- package/README.zh.md +42 -45
- package/lib/client.js +6735 -171
- package/lib/index.js +1 -1
- package/lib/types/client/CalendarIcon.d.ts +17 -0
- package/lib/types/client/CatalogFeedback.d.ts +28 -0
- package/lib/types/client/ClockPicker.d.ts +33 -0
- package/lib/types/client/DatePicker.d.ts +27 -0
- package/lib/types/client/DeleteToast.d.ts +47 -0
- package/lib/types/client/DeliveryHistory.d.ts +29 -0
- package/lib/types/client/PickerPopover.d.ts +27 -0
- package/lib/types/client/ScheduleCatalogAction.d.ts +12 -13
- package/lib/types/client/ScheduleCreateCard.d.ts +37 -0
- package/lib/types/client/ScheduleTaskTab.d.ts +36 -0
- package/lib/types/client/ScheduleTaskTabTitle.d.ts +21 -0
- package/lib/types/client/ScheduleTurnCard.d.ts +25 -0
- package/lib/types/client/SessionScheduleHover.d.ts +34 -0
- package/lib/types/client/SessionScheduleMark.d.ts +31 -0
- package/lib/types/client/TaskDetail.d.ts +158 -0
- package/lib/types/client/TaskManagerIcon.d.ts +11 -0
- package/lib/types/client/TaskManagerPage.d.ts +25 -0
- package/lib/types/client/TaskMenu.d.ts +76 -0
- package/lib/types/client/catalog-source.d.ts +91 -0
- package/lib/types/client/definition.d.ts +40 -0
- package/lib/types/client/frequency-locales.d.ts +71 -0
- package/lib/types/client/index.d.ts +40 -4
- package/lib/types/client/locales.d.ts +59 -8
- package/lib/types/client/recent-time-zones.d.ts +15 -0
- package/lib/types/client/relative-clock.d.ts +26 -0
- package/lib/types/client/schedule-create-card.d.ts +46 -0
- package/lib/types/client/schedule-format.d.ts +177 -0
- package/lib/types/client/schedule-turn.d.ts +63 -0
- package/lib/types/client/session-link.d.ts +41 -0
- package/lib/types/client/session-schedule-state.d.ts +62 -0
- package/lib/types/client/task-cron.d.ts +116 -0
- package/lib/types/client/task-manager-locales.d.ts +195 -0
- package/lib/types/client/task-tab-bindings.d.ts +114 -0
- package/lib/types/client/task-tab-target.d.ts +31 -0
- package/lib/types/client/task-timing.d.ts +96 -0
- package/lib/types/index.d.ts +1 -1
- package/package.json +31 -12
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region lib/types/index.js
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Schedule catalog plugin, node half. The empty apply keeps the
|
|
4
4
|
* optional browser feature addressable from the host-owned Loader overlay.
|
|
5
5
|
*/
|
|
6
6
|
/** Host plugin body — Schedule catalog behavior exists only in the browser entry. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Calendar glyph for the date row's picker trigger. */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
/** Inputs of the calendar glyph, matching the product icon set's props. */
|
|
4
|
+
export interface CalendarIconProps {
|
|
5
|
+
/** Extra class for layout placement; color rides currentColor. */
|
|
6
|
+
readonly className?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Draw the 14px calendar outline the Date row's trigger carries.
|
|
10
|
+
*
|
|
11
|
+
* The shared product icon set has no calendar glyph, so this package draws the
|
|
12
|
+
* one its own picker needs, at that set's regular 1px stroke.
|
|
13
|
+
* @param props - extra class for layout placement.
|
|
14
|
+
* @returns the decorative glyph.
|
|
15
|
+
*/
|
|
16
|
+
export declare function IconCalendarOutlineRegular({ className }: CalendarIconProps): ReactNode;
|
|
17
|
+
//# sourceMappingURL=CalendarIcon.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Catalog query states shared by the task list, the detail, and the task tab. */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
|
+
/** Props of the catalog states: query state, shown content, and the retry action. */
|
|
5
|
+
export type CatalogFeedbackProps = PropsLocale<'schedule.manager'> & {
|
|
6
|
+
/** Catalog query state; loading and a failed read each render their own state. */
|
|
7
|
+
readonly status: 'loading' | 'ready' | 'error';
|
|
8
|
+
/**
|
|
9
|
+
* Whether catalog content is on screen: shown content keeps a compact
|
|
10
|
+
* failure notice beside it, while an empty panel centers its states.
|
|
11
|
+
*/
|
|
12
|
+
readonly populated: boolean;
|
|
13
|
+
/** Reload the catalog after a query failure. */
|
|
14
|
+
readonly onRetry: () => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Render the catalog's loading and query-failure states.
|
|
18
|
+
*
|
|
19
|
+
* An empty panel centers a bare spinner while loading and the failure with its
|
|
20
|
+
* retry; a panel that already shows content keeps a compact notice for a failed
|
|
21
|
+
* refresh, and stays silent while a refresh loads, so the retained rows remain
|
|
22
|
+
* readable. Deletion outcomes are not catalog states: the app-wide toast
|
|
23
|
+
* announces them.
|
|
24
|
+
* @param props - query state, whether content is shown, the retry action, and localized copy.
|
|
25
|
+
* @returns the applicable states, or nothing while the catalog is ready.
|
|
26
|
+
*/
|
|
27
|
+
export declare function CatalogFeedback({ status, populated, onRetry, t }: CatalogFeedbackProps): ReactNode;
|
|
28
|
+
//# sourceMappingURL=CatalogFeedback.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
/** Row copy of the task manager namespace, as the pickers receive it. */
|
|
4
|
+
type Translate = PropsLocale<'schedule.manager'>['t'];
|
|
5
|
+
/** Inputs of the clock picker. */
|
|
6
|
+
export interface ClockPickerProps {
|
|
7
|
+
/** Whether the panel is showing. */
|
|
8
|
+
readonly open: boolean;
|
|
9
|
+
/** The row's trigger button, which anchors the panel. */
|
|
10
|
+
readonly anchorRef: RefObject<HTMLButtonElement | null>;
|
|
11
|
+
/** The staged clock text. */
|
|
12
|
+
readonly value: string;
|
|
13
|
+
/** Stage one picked `HH:MM:SS` clock. */
|
|
14
|
+
readonly onPick: (time: string) => void;
|
|
15
|
+
/** Dismiss the panel. */
|
|
16
|
+
readonly onClose: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the panel offers the seconds column (default true). A cron rule has
|
|
19
|
+
* no seconds field, so its form hides the column; a pick then keeps the staged
|
|
20
|
+
* clock's own seconds.
|
|
21
|
+
*/
|
|
22
|
+
readonly seconds?: boolean;
|
|
23
|
+
/** Row copy. */
|
|
24
|
+
readonly t: Translate;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Render the clock panel: hours, minutes, and optionally seconds, one scrolling column each.
|
|
28
|
+
* @param props - open state, the trigger, the staged clock, the pick and close callbacks, the seconds-column switch, and row copy.
|
|
29
|
+
* @returns the anchored panel while open, and nothing while closed.
|
|
30
|
+
*/
|
|
31
|
+
export declare function ClockPicker({ open, anchorRef, value, onPick, onClose, seconds, t }: ClockPickerProps): ReactNode;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=ClockPicker.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
/** Row copy of the task manager namespace, as the pickers receive it. */
|
|
4
|
+
type Translate = PropsLocale<'schedule.manager'>['t'];
|
|
5
|
+
/** Inputs of the date picker. */
|
|
6
|
+
export interface DatePickerProps {
|
|
7
|
+
/** Whether the panel is showing. */
|
|
8
|
+
readonly open: boolean;
|
|
9
|
+
/** The row's trigger button, which anchors the panel. */
|
|
10
|
+
readonly anchorRef: RefObject<HTMLButtonElement | null>;
|
|
11
|
+
/** The staged ISO date. */
|
|
12
|
+
readonly value: string;
|
|
13
|
+
/** Stage one picked ISO date. */
|
|
14
|
+
readonly onPick: (date: string) => void;
|
|
15
|
+
/** Dismiss the panel. */
|
|
16
|
+
readonly onClose: () => void;
|
|
17
|
+
/** Row copy. */
|
|
18
|
+
readonly t: Translate;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Render the month panel: one localized heading row over weeks of day cells.
|
|
22
|
+
* @param props - open state, the trigger, the staged date, the pick and close callbacks, and row copy.
|
|
23
|
+
* @returns the anchored panel while open, and nothing while closed.
|
|
24
|
+
*/
|
|
25
|
+
export declare function DatePicker({ open, anchorRef, value, onPick, onClose, t }: DatePickerProps): ReactNode;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transient outcome notice for schedule deletions.
|
|
3
|
+
*
|
|
4
|
+
* Every deletion — the Tasks page detail, the session task tab, and the
|
|
5
|
+
* Session-header popover — reports its settled outcome into one store, and one
|
|
6
|
+
* `shell.overlay` entry renders it as the app-wide banner. The surfaces keep no
|
|
7
|
+
* in-place deletion notice of their own, so an outcome outlives the panel or
|
|
8
|
+
* tab that asked for it.
|
|
9
|
+
*/
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
11
|
+
import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
12
|
+
import type { CatalogDeleteOutcome } from './catalog-source.ts';
|
|
13
|
+
/** One reported deletion outcome; `seq` keys the banner so a re-show restarts it. */
|
|
14
|
+
export interface DeleteToastState {
|
|
15
|
+
readonly kind: 'deleted' | 'deleteFailed';
|
|
16
|
+
readonly seq: number;
|
|
17
|
+
}
|
|
18
|
+
/** Store the deletion wiring reports into and the overlay entry reads. */
|
|
19
|
+
export interface DeleteToastSource {
|
|
20
|
+
/** Current notice for the overlay entry, or null while none shows. */
|
|
21
|
+
readonly hooks: {
|
|
22
|
+
readonly toast: HostObservable<DeleteToastState | null>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Show the notice of one settled deletion; 'pending' raises nothing because
|
|
26
|
+
* the deletion already in flight reports its own outcome.
|
|
27
|
+
* @param outcome - resolution of `CatalogInjected.onDelete`.
|
|
28
|
+
*/
|
|
29
|
+
readonly report: (outcome: CatalogDeleteOutcome) => void;
|
|
30
|
+
/** Clear the shown notice. */
|
|
31
|
+
readonly dismiss: () => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Create the one deletion-outcome store the overlay entry shows.
|
|
35
|
+
* @returns the observable notice with its report and dismiss actions.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createDeleteToastSource(): DeleteToastSource;
|
|
38
|
+
/** Props of the `shell.overlay` entry: the notice store and localized copy. */
|
|
39
|
+
export type ScheduleDeleteToastProps = PropsRuntime<'shell.overlay'> & PropsLocale<'schedule.manager'> & InjectFace<Omit<DeleteToastSource, 'report'>>;
|
|
40
|
+
/**
|
|
41
|
+
* Render the current deletion notice: a success banner for a confirmed
|
|
42
|
+
* deletion, a warning for one that could not be confirmed, or nothing.
|
|
43
|
+
* @param props - the notice hook, its dismissal, and the locale seat.
|
|
44
|
+
* @returns the banner on display, or null.
|
|
45
|
+
*/
|
|
46
|
+
export declare function ScheduleDeleteToast({ useToast, dismiss, t }: ScheduleDeleteToastProps): ReactNode;
|
|
47
|
+
//# sourceMappingURL=DeleteToast.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RemoteResult } from '@deepseek-ai/dsh-api-remotes/client';
|
|
2
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { ScheduleDeliveryHistoryRequest, ScheduleDeliveryHistoryResult } from '@deepseek-ai/dsh-schedule/client';
|
|
4
|
+
/** Read saved records without opening or activating the original Session. */
|
|
5
|
+
export interface DeliveryHistoryInjected {
|
|
6
|
+
/**
|
|
7
|
+
* Read a newest-first page for the exact task and Session.
|
|
8
|
+
* @param request - Task binding, required page size, and optional older-page cursor.
|
|
9
|
+
* @returns Remote success or failure; transport exceptions may reject the promise.
|
|
10
|
+
*/
|
|
11
|
+
readonly loadHistory: (request: ScheduleDeliveryHistoryRequest) => Promise<RemoteResult<ScheduleDeliveryHistoryResult>>;
|
|
12
|
+
}
|
|
13
|
+
type Cursor = ScheduleDeliveryHistoryRequest['before'];
|
|
14
|
+
type Props = DeliveryHistoryInjected & PropsLocale<'schedule.manager'> & {
|
|
15
|
+
id: ScheduleDeliveryHistoryRequest['id'];
|
|
16
|
+
sessionId: ScheduleDeliveryHistoryRequest['sessionId'];
|
|
17
|
+
latestMessageId: Cursor;
|
|
18
|
+
/** IANA zone of the task's own wall-clock rule; undefined for a one-shot or interval task. */
|
|
19
|
+
timeZone?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Render immutable saved deliveries; the parent keys this view by task and Session.
|
|
23
|
+
* Refreshes supersede pending older pages, and unmount ignores both late outcomes.
|
|
24
|
+
* @param props - Exact task binding, latest receipt identity, Remote callback, task zone, and locale.
|
|
25
|
+
* @returns Saved records and explicit loading, failure, and pagination actions.
|
|
26
|
+
*/
|
|
27
|
+
export declare function DeliveryHistory({ id, sessionId, latestMessageId, timeZone, loadHistory, t }: Props): import("react").JSX.Element;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=DeliveryHistory.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode, RefObject } from 'react';
|
|
2
|
+
/** Inputs of the picker shell. */
|
|
3
|
+
export interface PickerPopoverProps {
|
|
4
|
+
/** Whether the panel is mounted. */
|
|
5
|
+
readonly open: boolean;
|
|
6
|
+
/** The row's trigger button, which anchors the panel and counts as inside for dismissal. */
|
|
7
|
+
readonly anchorRef: RefObject<HTMLElement | null>;
|
|
8
|
+
/** Accessible name of the panel. */
|
|
9
|
+
readonly label: string;
|
|
10
|
+
/** Layout class of this picker's contents.
|
|
11
|
+
* (`| undefined` for exactOptionalPropertyTypes: the CSS module types every class as optional.) */
|
|
12
|
+
readonly className: string | undefined;
|
|
13
|
+
/** Dismiss the panel. */
|
|
14
|
+
readonly onClose: () => void;
|
|
15
|
+
/** The picker's columns or month grid. */
|
|
16
|
+
readonly children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Render one picker panel into `document.body`, fixed below its trigger.
|
|
20
|
+
*
|
|
21
|
+
* The panel is a portal, so an ancestor's `overflow` cannot crop it, and a
|
|
22
|
+
* pointerdown outside both the trigger and the panel dismisses it.
|
|
23
|
+
* @param props - open state, the trigger, the panel name and layout class, the dismissal callback, and the contents.
|
|
24
|
+
* @returns the panel while open, and nothing while closed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function PickerPopover({ open, anchorRef, label, className, onClose, children }: PickerPopoverProps): ReactNode;
|
|
27
|
+
//# sourceMappingURL=PickerPopover.d.ts.map
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { ScheduleId } from '@deepseek-ai/dsh-schedule/client';
|
|
3
|
+
import type { CatalogInjected } from './catalog-source.ts';
|
|
3
4
|
import { NS } from './locales.ts';
|
|
4
5
|
/** Full props for the Session-header Schedule catalog action. */
|
|
5
|
-
export type ScheduleCatalogActionProps = PropsRuntime<'conversation.session.header.
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
export declare function
|
|
14
|
-
/** Read-only current-Session active reminder catalog. */
|
|
15
|
-
export declare function ScheduleCatalogAction({ useSession, useProjection, t }: ScheduleCatalogActionProps): import("react").JSX.Element | null;
|
|
6
|
+
export type ScheduleCatalogActionProps = PropsRuntime<'conversation.session.header.utilities'> & PropsLocale<typeof NS> & InjectFace<CatalogInjected & {
|
|
7
|
+
/**
|
|
8
|
+
* Show one task's detail in the right Sidebar for this entry's Session.
|
|
9
|
+
* @param id - Task chosen by the Session entry.
|
|
10
|
+
*/
|
|
11
|
+
readonly openTaskDetail: (id: ScheduleId) => void;
|
|
12
|
+
}>;
|
|
13
|
+
/** Current-Session reminder catalog with durable deletion. */
|
|
14
|
+
export declare function ScheduleCatalogAction({ useSession, useCatalog, onDelete, onRetry, openTaskDetail, t, }: ScheduleCatalogActionProps): import("react").JSX.Element | null;
|
|
16
15
|
//# sourceMappingURL=ScheduleCatalogAction.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
3
|
+
import type { ScheduleId, ScheduleRecord } from '@deepseek-ai/dsh-schedule/client';
|
|
4
|
+
/** Task navigation the card receives from its Turn-tail registration. */
|
|
5
|
+
export interface ScheduleCreateCardInjected {
|
|
6
|
+
/**
|
|
7
|
+
* Show one created task's detail in the right Sidebar.
|
|
8
|
+
* @param id - Task created by this call.
|
|
9
|
+
*/
|
|
10
|
+
readonly openTaskDetail: (id: ScheduleId) => void;
|
|
11
|
+
}
|
|
12
|
+
/** Props of the `schedule_create` transcript card. */
|
|
13
|
+
export type ScheduleCreateCardProps = ToolCallViewProps & PropsLocale<'schedule.manager'> & InjectFace<ScheduleCreateCardInjected> & {
|
|
14
|
+
readonly currentTask?: ScheduleRecord | null;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Fields one card reads.
|
|
18
|
+
*
|
|
19
|
+
* The keyed Tool seat also carries the owner's file opener, image loader, and
|
|
20
|
+
* workspace facts; this card reads none of them, so the Turn tail that renders
|
|
21
|
+
* it supplies these fields alone and a template that starts reading another
|
|
22
|
+
* owner field fails to compile here.
|
|
23
|
+
*/
|
|
24
|
+
export type ScheduleCreateCardInput = Pick<ScheduleCreateCardProps, 'callId' | 'toolName' | 'block' | 'openTaskDetail' | 't' | 'currentTask'>;
|
|
25
|
+
/**
|
|
26
|
+
* Render one `schedule_create` call as the created task's card.
|
|
27
|
+
*
|
|
28
|
+
* A settled result yields the task's title, its localized frequency, and the
|
|
29
|
+
* button that opens that task's right-Sidebar detail. A running call, a failed
|
|
30
|
+
* creation, or a replayed result with no complete task renders its title and
|
|
31
|
+
* raw result text with no open action, so the card never presents an identity
|
|
32
|
+
* it does not have.
|
|
33
|
+
* @param props - the settled card payload, injected task navigation, and copy.
|
|
34
|
+
* @returns the created task's transcript card.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ScheduleCreateCard({ block, toolName, openTaskDetail, t, currentTask }: ScheduleCreateCardInput): import("react").JSX.Element;
|
|
37
|
+
//# sourceMappingURL=ScheduleCreateCard.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { ScheduleCatalogEntry } from '@deepseek-ai/dsh-schedule/client';
|
|
4
|
+
import type { CatalogSnapshot } from './catalog-source.ts';
|
|
5
|
+
import { type TaskDetailInjected } from './TaskDetail.tsx';
|
|
6
|
+
import type { TaskTabBindings } from './task-tab-bindings.ts';
|
|
7
|
+
/** The Host task catalog the body, its chip, and the Tasks page all read. */
|
|
8
|
+
export interface ScheduleTaskCatalogInjected {
|
|
9
|
+
/** Shared Host task catalog with its query and deletion state. */
|
|
10
|
+
readonly hooks: {
|
|
11
|
+
readonly catalog: HostObservable<CatalogSnapshot<ScheduleCatalogEntry>>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** The provider-owned recovery a restored tab page resolves its task through. */
|
|
15
|
+
export interface ScheduleTaskBindingInjected {
|
|
16
|
+
/** Durable binding from one task tab page to the task it last showed. */
|
|
17
|
+
readonly taskBindings: TaskTabBindings;
|
|
18
|
+
}
|
|
19
|
+
/** Everything the task tab's body needs injected. */
|
|
20
|
+
export interface ScheduleTaskTabInjected extends TaskDetailInjected, ScheduleTaskCatalogInjected, ScheduleTaskBindingInjected {
|
|
21
|
+
}
|
|
22
|
+
/** Props of the task tab's body: the tab it draws, localized copy, and its catalog face. */
|
|
23
|
+
export type ScheduleTaskTabProps = PropsRuntime<'sidebar.right.pane.tab'> & PropsLocale<'schedule.manager'> & InjectFace<ScheduleTaskTabInjected>;
|
|
24
|
+
/**
|
|
25
|
+
* Render the single task named by this tab's navigation parameters or by the
|
|
26
|
+
* binding those parameters last wrote.
|
|
27
|
+
*
|
|
28
|
+
* When neither names a task, the body reports the catalog feedback until a read
|
|
29
|
+
* requested after the baseline for the current navigation succeeds without the
|
|
30
|
+
* task; the missing-task state then covers both an unbound restored tab and a
|
|
31
|
+
* navigated tab whose task is gone.
|
|
32
|
+
* @param props - tab information, the Host task catalog, localized copy, and action callbacks.
|
|
33
|
+
* @returns the task's detail, or its centered loading, query-failure, or missing-task state.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ScheduleTaskTab(props: ScheduleTaskTabProps): ReactNode;
|
|
36
|
+
//# sourceMappingURL=ScheduleTaskTab.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The task tab's chip: the shown task's stored title, or the detail label while
|
|
3
|
+
* the shared catalog has no row for it yet. Registered under
|
|
4
|
+
* `sidebar.right.pane.tab.title`; without it the chip would show the constant
|
|
5
|
+
* text the definition captured at open time, which names no task.
|
|
6
|
+
*
|
|
7
|
+
* A restored record carries no navigation parameters, so the chip resolves the
|
|
8
|
+
* same provider-owned binding its body does and keeps naming the shown task.
|
|
9
|
+
*/
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
11
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
12
|
+
import type { ScheduleTaskBindingInjected, ScheduleTaskCatalogInjected } from './ScheduleTaskTab.tsx';
|
|
13
|
+
/** Props of the task tab's chip: the tab it names and the catalog row it reads. */
|
|
14
|
+
export type ScheduleTaskTabTitleProps = PropsRuntime<'sidebar.right.pane.tab.title'> & PropsLocale<'schedule.manager'> & InjectFace<ScheduleTaskCatalogInjected & ScheduleTaskBindingInjected>;
|
|
15
|
+
/**
|
|
16
|
+
* Render the clock glyph and the named task's stored title as the chip text.
|
|
17
|
+
* @param props - tab information, the Host task catalog, the tab bindings, and localized copy.
|
|
18
|
+
* @returns the clock glyph followed by the task's stored title, or the detail label without a catalog row.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ScheduleTaskTabTitle({ sessionId, useTabInfo, useCatalog, taskBindings, t }: ScheduleTaskTabTitleProps): ReactNode;
|
|
21
|
+
//# sourceMappingURL=ScheduleTaskTabTitle.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { ScheduleCatalogEntry, ScheduleId } from '@deepseek-ai/dsh-schedule/client';
|
|
3
|
+
import type { CatalogInjected } from './catalog-source.ts';
|
|
4
|
+
/** Task navigation the turn row receives from its list registration. */
|
|
5
|
+
export interface ScheduleTurnCardInjected extends Pick<CatalogInjected<ScheduleCatalogEntry>, 'hooks' | 'onRetry'> {
|
|
6
|
+
/**
|
|
7
|
+
* Show one created task's detail in the right Sidebar.
|
|
8
|
+
* @param id - Task created by this Turn.
|
|
9
|
+
*/
|
|
10
|
+
readonly openTaskDetail: (id: ScheduleId) => void;
|
|
11
|
+
}
|
|
12
|
+
/** Props of the created-task row of one Turn tail. */
|
|
13
|
+
export type ScheduleTurnCardProps = PropsRuntime<'conversation.chat.turnTail'> & InjectFace<ScheduleTurnCardInjected> & PropsLocale<'schedule.manager'>;
|
|
14
|
+
/**
|
|
15
|
+
* Render the tasks one Turn created as standalone cards beneath its closing
|
|
16
|
+
* prose.
|
|
17
|
+
*
|
|
18
|
+
* The Turn tail is a list seat independent of the Turn's process disclosure,
|
|
19
|
+
* so the cards stay visible while the Tool group is collapsed. Every list entry
|
|
20
|
+
* renders for every Turn, so this one narrows its own Turn here.
|
|
21
|
+
* @param props - closing Turn owner currency, turn-tail navigation, and copy.
|
|
22
|
+
* @returns one created-task card per settled `schedule_create` result, or null when the Turn created none.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ScheduleTurnCard(props: ScheduleTurnCardProps): import("react").JSX.Element | null;
|
|
25
|
+
//# sourceMappingURL=ScheduleTurnCard.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scheduled-task section of the Sidebar Session-row hover card.
|
|
3
|
+
*
|
|
4
|
+
* The row's own card already carries the Session title, its relative time, and
|
|
5
|
+
* the trailing status line; this seat contributes the Session's active tasks
|
|
6
|
+
* between them. It is mounted only while the card is open, and it projects the
|
|
7
|
+
* one shared Host task catalog onto the hovered Session.
|
|
8
|
+
*/
|
|
9
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
10
|
+
import { type SessionScheduleCatalogObservable } from './session-schedule-state.ts';
|
|
11
|
+
import { NS } from './locales.ts';
|
|
12
|
+
/** Most task rows one hover card shows before it reports the omitted remainder. */
|
|
13
|
+
export declare const SESSION_HOVER_TASK_LIMIT = 2;
|
|
14
|
+
/** Injected share of the Session-row hover-card task section: the shared Host task catalog. */
|
|
15
|
+
export interface SessionScheduleHoverInjected {
|
|
16
|
+
/** One catalog shared by every row; the renderer binds it to the `useCatalog` selector hook. */
|
|
17
|
+
readonly hooks: {
|
|
18
|
+
readonly catalog: SessionScheduleCatalogObservable;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Full props of the Session-row hover-card task section. */
|
|
22
|
+
export type SessionScheduleHoverProps = PropsRuntime<'sidebar.session.row.hover'> & PropsLocale<typeof NS> & InjectFace<SessionScheduleHoverInjected>;
|
|
23
|
+
/**
|
|
24
|
+
* Render up to {@link SESSION_HOVER_TASK_LIMIT} overdue-first task rows.
|
|
25
|
+
*
|
|
26
|
+
* The reference clock is sampled once per mount: the card is a long-hover
|
|
27
|
+
* preview, so its "next run" text must not drift while the pointer rests.
|
|
28
|
+
* @param props.sessionId - Session this row shows.
|
|
29
|
+
* @param props.useCatalog - selector hook over the shared Host task catalog.
|
|
30
|
+
* @param props.t - Schedule catalog locale seat.
|
|
31
|
+
* @returns the task rows plus an omission line, or nothing without an active task.
|
|
32
|
+
*/
|
|
33
|
+
export declare function SessionScheduleHover({ sessionId, useCatalog, t, }: SessionScheduleHoverProps): import("react").JSX.Element | null;
|
|
34
|
+
//# sourceMappingURL=SessionScheduleHover.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sidebar Session-row clock mark: one Session's active scheduled-task
|
|
3
|
+
* indicator, seated in the row's leading 16px cell before the title.
|
|
4
|
+
*
|
|
5
|
+
* The row offers that cell to this seat only while its own primary state is
|
|
6
|
+
* idle, so an approval request, a new message, or live activity keeps the
|
|
7
|
+
* row's state dot in the same cell and never mounts the mark. The mark
|
|
8
|
+
* projects the one shared Host task catalog onto this Session; it activates,
|
|
9
|
+
* retains, and unarchives nothing, and it never reads a Session log.
|
|
10
|
+
*/
|
|
11
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
12
|
+
import { type SessionScheduleCatalogObservable } from './session-schedule-state.ts';
|
|
13
|
+
import { NS } from './locales.ts';
|
|
14
|
+
/** Injected share of the Session-row clock mark: the shared Host task catalog. */
|
|
15
|
+
export interface SessionScheduleMarkInjected {
|
|
16
|
+
/** One catalog shared by every row; the renderer binds it to the `useCatalog` selector hook. */
|
|
17
|
+
readonly hooks: {
|
|
18
|
+
readonly catalog: SessionScheduleCatalogObservable;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Full props of the Session-row clock mark. */
|
|
22
|
+
export type SessionScheduleMarkProps = PropsRuntime<'sidebar.session.row.leading'> & PropsLocale<typeof NS> & InjectFace<SessionScheduleMarkInjected>;
|
|
23
|
+
/**
|
|
24
|
+
* Render the clock mark while this Session's active tasks are non-empty.
|
|
25
|
+
* @param props.sessionId - Session this row shows.
|
|
26
|
+
* @param props.useCatalog - selector hook over the shared Host task catalog.
|
|
27
|
+
* @param props.t - Schedule catalog locale seat.
|
|
28
|
+
* @returns the mark, or nothing while the read is unresolved, failed, ended, or empty.
|
|
29
|
+
*/
|
|
30
|
+
export declare function SessionScheduleMark({ sessionId, useCatalog, t, }: SessionScheduleMarkProps): import("react").JSX.Element | null;
|
|
31
|
+
//# sourceMappingURL=SessionScheduleMark.d.ts.map
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { ScheduleCatalogEntry, ScheduleId } from '@deepseek-ai/dsh-schedule/client';
|
|
4
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
5
|
+
import { type DeliveryHistoryInjected } from './DeliveryHistory.tsx';
|
|
6
|
+
import type { CatalogDeleteOutcome, CatalogSnapshot } from './catalog-source.ts';
|
|
7
|
+
import type { TaskTimingInjected, TimingDraft } from './task-timing.ts';
|
|
8
|
+
/** The two views of one task's detail: its rule, or its saved delivery records. */
|
|
9
|
+
export type TaskDetailTab = 'rule' | 'records';
|
|
10
|
+
/** One recurrence choice a retained task can be switched to. */
|
|
11
|
+
type RuleKind = 'daily' | 'weekdays' | 'weekly' | 'every' | 'once' | 'cron';
|
|
12
|
+
/** ISO weekdays of the weekly choice in display order, Monday through Sunday. */
|
|
13
|
+
declare const WEEKDAYS: readonly [1, 2, 3, 4, 5, 6, 7];
|
|
14
|
+
/** One ISO weekday of the weekly choice. */
|
|
15
|
+
type Weekday = (typeof WEEKDAYS)[number];
|
|
16
|
+
/**
|
|
17
|
+
* Deletion, name/instruction/timing updates, saved-history, and original-Session
|
|
18
|
+
* actions one task's detail calls.
|
|
19
|
+
*/
|
|
20
|
+
export interface TaskDetailInjected extends DeliveryHistoryInjected, TaskTimingInjected {
|
|
21
|
+
/**
|
|
22
|
+
* Delete one retained task through its original Session binding.
|
|
23
|
+
* @param id - Task shown in this detail.
|
|
24
|
+
* @returns The deletion's outcome after the Remote acknowledgement and
|
|
25
|
+
* authoritative refresh; the wiring reports it as the app-wide toast.
|
|
26
|
+
*/
|
|
27
|
+
readonly onDelete: (id: ScheduleId) => Promise<CatalogDeleteOutcome>;
|
|
28
|
+
/**
|
|
29
|
+
* Reload the catalog after a query failure or an acknowledged timing update,
|
|
30
|
+
* and from a surface that needs a read newer than its own record.
|
|
31
|
+
* @param since - request ordinal the caller last observed, 0 to share any read in flight.
|
|
32
|
+
* @returns Resolution after publishing the read result; failures remain in catalog state.
|
|
33
|
+
*/
|
|
34
|
+
readonly onRetry: (since?: number) => Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Open an available, unarchived original conversation after rechecking current metadata.
|
|
37
|
+
* @param id - Session bound to the shown task.
|
|
38
|
+
*/
|
|
39
|
+
readonly onOpenSession: (id: SessionId) => void;
|
|
40
|
+
}
|
|
41
|
+
/** One task's detail, as the Tasks page and the task tab both compose it. */
|
|
42
|
+
export type TaskDetailProps = TaskDetailInjected & PropsLocale<'schedule.manager'> & Pick<PropsRuntime<'main'>, 'useSessions' | 'useWorkspaces'> & {
|
|
43
|
+
/** Task shown; an authoritative catalog row refreshes on its own, without an edit draft. */
|
|
44
|
+
readonly task: ScheduleCatalogEntry;
|
|
45
|
+
/** Whether an authoritative catalog row backs the shown task; a draft alone disables deletion. */
|
|
46
|
+
readonly authoritative: boolean;
|
|
47
|
+
/** Element id shared by the detail panels and any control that points at them. */
|
|
48
|
+
readonly id: string;
|
|
49
|
+
/** Catalog query state; loading keeps every action visible and disabled. */
|
|
50
|
+
readonly status: 'loading' | 'ready' | 'error';
|
|
51
|
+
/** Tasks with a deletion in flight. */
|
|
52
|
+
readonly deleting: readonly ScheduleId[];
|
|
53
|
+
/**
|
|
54
|
+
* Report the shown task so its owner retains it while an update is pending
|
|
55
|
+
* or failed, or while a confirmed deletion awaits the refreshed catalog.
|
|
56
|
+
*/
|
|
57
|
+
readonly onEditState: (task: ScheduleCatalogEntry | null) => void;
|
|
58
|
+
/** Active detail view; the owner resets it to Rules when it selects another task. */
|
|
59
|
+
readonly tab: TaskDetailTab;
|
|
60
|
+
/** Select the active detail view. */
|
|
61
|
+
readonly onTabChange: (tab: TaskDetailTab) => void;
|
|
62
|
+
/** Task whose deletion confirmation the owner asked for, or null when none is open. */
|
|
63
|
+
readonly confirmId: ScheduleId | null;
|
|
64
|
+
/** Ask for one task's deletion confirmation, or dismiss it with null. */
|
|
65
|
+
readonly onConfirm: (id: ScheduleId | null) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Leave the shown task once the refreshed catalog confirms its deletion:
|
|
68
|
+
* the Tasks page clears its selection and the session task tab closes.
|
|
69
|
+
*/
|
|
70
|
+
readonly onDeleted: () => void;
|
|
71
|
+
/** Close this detail; a view with no list to return to omits the control. */
|
|
72
|
+
readonly onClose?: () => void;
|
|
73
|
+
/** Session whose Sidebar hosts this detail; a task linked to it omits the redundant original-Session entry. */
|
|
74
|
+
readonly withinSession?: SessionId;
|
|
75
|
+
};
|
|
76
|
+
/** One task detail's editing state, as its Tasks page or task tab owns it. */
|
|
77
|
+
export interface TaskDetailController {
|
|
78
|
+
/** Catalog row the shown id resolves to, or undefined when the read has no such row. */
|
|
79
|
+
readonly record: ScheduleCatalogEntry | undefined;
|
|
80
|
+
/** Task to show: the catalog row, or the draft a pending or failed mutation retained. */
|
|
81
|
+
readonly task: ScheduleCatalogEntry | undefined;
|
|
82
|
+
/** Element id shared by the detail panels and any control that points at them. */
|
|
83
|
+
readonly id: string;
|
|
84
|
+
/** Task whose deletion confirmation is open, or null when none is. */
|
|
85
|
+
readonly confirmId: ScheduleId | null;
|
|
86
|
+
/** Ask for one task's deletion confirmation, or dismiss it with null. */
|
|
87
|
+
readonly setConfirmId: (id: ScheduleId | null) => void;
|
|
88
|
+
/** Select the active detail view. */
|
|
89
|
+
readonly setTab: (tab: TaskDetailTab) => void;
|
|
90
|
+
/** Props the shared detail element takes, without the task it shows. */
|
|
91
|
+
readonly props: Omit<TaskDetailProps, 'task' | 'authoritative' | 'onClose' | 'onDeleted'>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Own the editing state one task detail shares across both of its owners.
|
|
95
|
+
*
|
|
96
|
+
* The shown task is the catalog row for `taskId`, or the draft a mutation
|
|
97
|
+
* pending against that row retained after the row left the catalog. The view,
|
|
98
|
+
* the confirmation, and the draft all reset when `taskId` changes, so one
|
|
99
|
+
* task's draft never carries into another.
|
|
100
|
+
* @param injected - detail actions, localized copy, and framework readers.
|
|
101
|
+
* @param catalog - the owner's authoritative task catalog snapshot.
|
|
102
|
+
* @param taskId - task the owner selected, or undefined when it selected none.
|
|
103
|
+
* @returns the shown task and catalog row, its element id, its confirmation, and the detail props.
|
|
104
|
+
*/
|
|
105
|
+
export declare function useTaskDetail(injected: TaskDetailInjected & PropsLocale<'schedule.manager'> & Pick<PropsRuntime<'main'>, 'useSessions' | 'useWorkspaces'>, catalog: CatalogSnapshot<ScheduleCatalogEntry>, taskId: ScheduleId | undefined): TaskDetailController;
|
|
106
|
+
/**
|
|
107
|
+
* Render one task's rule or saved deliveries with confirm-first deletion and its original Session.
|
|
108
|
+
*
|
|
109
|
+
* A deletion this detail confirmed settles with the refreshed catalog: once
|
|
110
|
+
* that refresh reports the row gone, the detail calls `onDeleted` and its owner
|
|
111
|
+
* leaves the task. The app-wide toast, not this detail, announces the outcome.
|
|
112
|
+
* @param props - task, catalog state, detail view, confirmation, localized copy, and action callbacks.
|
|
113
|
+
* @returns the detail region, its deletion confirmation dialog, and the linked Session entry.
|
|
114
|
+
*/
|
|
115
|
+
export declare function TaskDetail({ task, authoritative, id, status, deleting, onDelete, onRetry, onUpdateTiming, loadHistory, onOpenSession, onEditState, tab, onTabChange, confirmId, onConfirm, onDeleted, onClose, withinSession, useSessions, useWorkspaces, t, }: TaskDetailProps): ReactNode;
|
|
116
|
+
/** Values one task's detail stages, seeded from one stored record. */
|
|
117
|
+
interface RuleShown {
|
|
118
|
+
/** Task name the heading control edits. */
|
|
119
|
+
readonly title: string;
|
|
120
|
+
/** Reminder instruction the instruction control edits. */
|
|
121
|
+
readonly prompt: string;
|
|
122
|
+
/** Recurrence choice the rows edit. */
|
|
123
|
+
readonly kind: RuleKind;
|
|
124
|
+
/** Native time inputs the choice edits. */
|
|
125
|
+
readonly draft: TimingDraft;
|
|
126
|
+
/** ISO weekday set the weekly choice edits; other choices never read it. */
|
|
127
|
+
readonly weekdays: readonly Weekday[];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Merge one refreshed authoritative record into a staged draft.
|
|
131
|
+
*
|
|
132
|
+
* Three cases, because a rule kind and the fields that describe it are one
|
|
133
|
+
* value. The Monday-to-Friday choice and the weekly choice state the same Host
|
|
134
|
+
* weekly rule, so the comparisons below fold them together and only the day set
|
|
135
|
+
* tells them apart.
|
|
136
|
+
*
|
|
137
|
+
* The draft stages another kind than the stored record. Its fields describe a
|
|
138
|
+
* rule the refreshed record does not state, so the draft keeps them whole.
|
|
139
|
+
*
|
|
140
|
+
* The draft stages the stored kind, and the refreshed record changed that kind.
|
|
141
|
+
* The two rules cannot be mixed, so the draft is kept whole when the user edited
|
|
142
|
+
* it and the refreshed rule is adopted whole when the user did not.
|
|
143
|
+
*
|
|
144
|
+
* All three kinds agree. Only here can one field differ legitimately on each
|
|
145
|
+
* side, so the fields merge on their own: a field the user changed keeps the
|
|
146
|
+
* draft value and every other field takes the refreshed record, which is what
|
|
147
|
+
* carries a concurrent remote timing edit into an unrelated local edit.
|
|
148
|
+
*
|
|
149
|
+
* The name and the instruction merge field by field in every case: another
|
|
150
|
+
* client's rename reaches this detail even while a rule change is staged.
|
|
151
|
+
* @param authoritative - values of the refreshed record.
|
|
152
|
+
* @param draft - values the detail currently shows.
|
|
153
|
+
* @param stored - authoritative values the draft was compared against.
|
|
154
|
+
* @returns the merged values.
|
|
155
|
+
*/
|
|
156
|
+
export declare function mergeRuleDraft(authoritative: RuleShown, draft: RuleShown, stored: RuleShown): RuleShown;
|
|
157
|
+
export {};
|
|
158
|
+
//# sourceMappingURL=TaskDetail.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
/**
|
|
3
|
+
* Render the clock glyph at the size the sidebar asks for; the sidebar owns
|
|
4
|
+
* its accessible navigation label. The glyph is the row's direct icon child,
|
|
5
|
+
* as on every other panel row: an inline wrapper makes it the baseline of a
|
|
6
|
+
* line box inside the row's glyph slot, which lifts it above the label.
|
|
7
|
+
* @param props - the sidebar's icon share: the requested edge and whether the panel is selected.
|
|
8
|
+
* @returns decorative clock icon.
|
|
9
|
+
*/
|
|
10
|
+
export declare function TaskManagerIcon({ size }: PropsRuntime<'sidebar.panellist'>): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=TaskManagerIcon.d.ts.map
|