返回 DeepSeek-Reasonix
heartbeat.types.ts
根目录 / desktop / frontend / src / custom / features / heartbeat / heartbeat.types.ts
1 // Heartbeat task types — mirrors desktop/heartbeat.go.
2
3 export interface HeartbeatRun {
4 at: number; // unix millis execution time
5 topicId: string; // topic used/created by this run
6 }
7
8 export interface HeartbeatTask {
9 id: string;
10 title: string;
11 prompt: string;
12 interval: string; // e.g. "5m", "1h", "30s"
13 enabled: boolean;
14 scope?: string; // "global" or "project"
15 workspaceRoot?: string;
16 topicId?: string;
17 lastRunAt?: number; // unix millis
18 newConversationEachRun?: boolean; // true = create new topic each run
19 runHistory?: HeartbeatRun[]; // recent executions (oldest first)
20 createdAt?: number;
21 approvalMode?: "read-only" | "workspace-write" | "danger-full-access" | "ask" | "auto" | "yolo";
22 timeWindowStart?: string; // "HH:MM" — interval tasks only run after this time
23 timeWindowEnd?: string; // "HH:MM" — interval tasks only run before this time
24 notifyChannels?: boolean; // true = push to bot channels; false/nil = skip
25 }
26
26 lines TYPESCRIPT