返回 DeepSeek-Reasonix
ProjectTreeProps.ts
根目录 / desktop / frontend / src / components / ProjectTreeProps.ts
1 import type { RemoteTabRefView } from "../lib/types";
2 import type { ShortcutPlatform } from "../lib/keyboardShortcuts";
3 import type { TopicShortcutEntry } from "../lib/topicShortcuts";
4 import type { ProjectTreeVariant } from "../lib/projectTreeTopic";
5 import type { SessionDraftSummary } from "../generated/desktopContract.generated";
6
7 type ProjectTreeImTopicSource = {
8 platform?: string;
9 label: string;
10 title?: string;
11 remoteId?: string;
12 };
13
14 export interface ProjectTreeProps {
15 activeScope?: string;
16 activeWorkspaceRoot?: string;
17 activeTopicId?: string;
18 activeSessionPath?: string;
19 activeRemote?: RemoteTabRefView;
20 imTopicSources?: Record<string, ProjectTreeImTopicSource>;
21 variant?: ProjectTreeVariant;
22 onOpenTopic: (scope: string, workspaceRoot: string, topicId: string, sessionPath?: string) => Promise<void> | void;
23 onAddProject: (path?: string) => Promise<void>;
24 onCreateTopic?: (scope: string, workspaceRoot: string) => Promise<void> | void;
25 onCreateIsolatedWorktree?: (workspaceRoot: string) => Promise<void> | void;
26 onRenameTopic?: (topicId: string, title: string) => Promise<void> | void;
27 onTopicsChanged?: () => Promise<void> | void;
28 refreshSignal?: number;
29 searchExpanded?: boolean;
30 searchFocusSignal?: number;
31 showShortcutBadges?: boolean;
32 shortcutPlatform?: ShortcutPlatform;
33 onVisibleTopicsChange?: (topics: TopicShortcutEntry[]) => void;
34 draftSummaries?: SessionDraftSummary[];
35 onOpenDraft?: (scope: string, workspaceRoot: string) => Promise<void> | void;
36 }
37
37 lines TYPESCRIPT