idea-manager 0.2.0 → 0.3.0
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/next.config.ts +0 -1
- package/package.json +2 -2
- package/{src/app/icon.svg → public/favicon.svg} +2 -2
- package/src/app/api/filesystem/route.ts +49 -0
- package/src/app/api/projects/[id]/cleanup/route.ts +32 -0
- package/src/app/api/projects/[id]/items/[itemId]/refine/route.ts +36 -0
- package/src/app/api/projects/[id]/items/[itemId]/route.ts +23 -1
- package/src/app/api/projects/[id]/items/route.ts +51 -1
- package/src/app/api/projects/[id]/scan/route.ts +73 -0
- package/src/app/api/projects/[id]/scan/stream/route.ts +112 -0
- package/src/app/api/projects/[id]/structure/route.ts +34 -3
- package/src/app/api/projects/[id]/structure/stream/route.ts +157 -0
- package/src/app/api/projects/[id]/sub-projects/[subId]/route.ts +39 -0
- package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route.ts +60 -0
- package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route.ts +26 -0
- package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route.ts +39 -0
- package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/route.ts +33 -0
- package/src/app/api/projects/[id]/sub-projects/route.ts +31 -0
- package/src/app/api/projects/route.ts +1 -1
- package/src/app/globals.css +465 -5
- package/src/app/layout.tsx +3 -0
- package/src/app/page.tsx +260 -88
- package/src/app/projects/[id]/page.tsx +366 -183
- package/src/cli.ts +10 -10
- package/src/components/DirectoryPicker.tsx +137 -0
- package/src/components/ScanPanel.tsx +743 -0
- package/src/components/brainstorm/Editor.tsx +20 -4
- package/src/components/brainstorm/MemoPin.tsx +91 -5
- package/src/components/dashboard/SubProjectCard.tsx +76 -0
- package/src/components/dashboard/TabBar.tsx +42 -0
- package/src/components/task/ProjectTree.tsx +223 -0
- package/src/components/task/PromptEditor.tsx +107 -0
- package/src/components/task/StatusFlow.tsx +43 -0
- package/src/components/task/TaskChat.tsx +134 -0
- package/src/components/task/TaskDetail.tsx +205 -0
- package/src/components/task/TaskList.tsx +119 -0
- package/src/components/tree/CardView.tsx +206 -0
- package/src/components/tree/RefinePopover.tsx +157 -0
- package/src/components/tree/TreeNode.tsx +147 -38
- package/src/components/tree/TreeView.tsx +270 -26
- package/src/components/ui/ConfirmDialog.tsx +88 -0
- package/src/lib/ai/chat-responder.ts +4 -2
- package/src/lib/ai/cleanup.ts +87 -0
- package/src/lib/ai/client.ts +175 -58
- package/src/lib/ai/prompter.ts +19 -24
- package/src/lib/ai/refiner.ts +128 -0
- package/src/lib/ai/structurer.ts +340 -11
- package/src/lib/db/queries/context.ts +76 -0
- package/src/lib/db/queries/items.ts +133 -12
- package/src/lib/db/queries/projects.ts +12 -8
- package/src/lib/db/queries/sub-projects.ts +122 -0
- package/src/lib/db/queries/task-conversations.ts +27 -0
- package/src/lib/db/queries/task-prompts.ts +32 -0
- package/src/lib/db/queries/tasks.ts +133 -0
- package/src/lib/db/schema.ts +75 -0
- package/src/lib/mcp/server.ts +38 -39
- package/src/lib/mcp/tools.ts +47 -45
- package/src/lib/scanner.ts +573 -0
- package/src/lib/task-store.ts +97 -0
- package/src/types/index.ts +65 -0
package/src/types/index.ts
CHANGED
|
@@ -2,10 +2,19 @@ export interface IProject {
|
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
4
|
description: string;
|
|
5
|
+
project_path: string | null;
|
|
5
6
|
created_at: string;
|
|
6
7
|
updated_at: string;
|
|
7
8
|
}
|
|
8
9
|
|
|
10
|
+
export interface IProjectContext {
|
|
11
|
+
id: string;
|
|
12
|
+
project_id: string;
|
|
13
|
+
file_path: string;
|
|
14
|
+
content: string;
|
|
15
|
+
scanned_at: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
export interface IBrainstorm {
|
|
10
19
|
id: string;
|
|
11
20
|
project_id: string;
|
|
@@ -30,6 +39,7 @@ export interface IItem {
|
|
|
30
39
|
priority: ItemPriority;
|
|
31
40
|
status: ItemStatus;
|
|
32
41
|
is_locked: boolean;
|
|
42
|
+
is_pinned: boolean;
|
|
33
43
|
sort_order: number;
|
|
34
44
|
metadata: string | null;
|
|
35
45
|
created_at: string;
|
|
@@ -82,6 +92,61 @@ export interface IPrompt {
|
|
|
82
92
|
created_at: string;
|
|
83
93
|
}
|
|
84
94
|
|
|
95
|
+
// v2 types
|
|
96
|
+
export type TaskStatus = 'idea' | 'writing' | 'submitted' | 'testing' | 'done' | 'problem';
|
|
97
|
+
|
|
98
|
+
export interface ISubProject {
|
|
99
|
+
id: string;
|
|
100
|
+
project_id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
description: string;
|
|
103
|
+
folder_path: string | null;
|
|
104
|
+
sort_order: number;
|
|
105
|
+
created_at: string;
|
|
106
|
+
updated_at: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface ITask {
|
|
110
|
+
id: string;
|
|
111
|
+
project_id: string;
|
|
112
|
+
sub_project_id: string;
|
|
113
|
+
title: string;
|
|
114
|
+
description: string;
|
|
115
|
+
status: TaskStatus;
|
|
116
|
+
priority: ItemPriority;
|
|
117
|
+
is_today: boolean;
|
|
118
|
+
sort_order: number;
|
|
119
|
+
created_at: string;
|
|
120
|
+
updated_at: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface ITaskPrompt {
|
|
124
|
+
id: string;
|
|
125
|
+
task_id: string;
|
|
126
|
+
content: string;
|
|
127
|
+
prompt_type: 'manual' | 'ai_assisted';
|
|
128
|
+
created_at: string;
|
|
129
|
+
updated_at: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface ITaskConversation {
|
|
133
|
+
id: string;
|
|
134
|
+
task_id: string;
|
|
135
|
+
role: 'assistant' | 'user';
|
|
136
|
+
content: string;
|
|
137
|
+
created_at: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface ISubProjectWithStats extends ISubProject {
|
|
141
|
+
task_count: number;
|
|
142
|
+
active_count: number;
|
|
143
|
+
pending_count: number;
|
|
144
|
+
done_count: number;
|
|
145
|
+
problem_count: number;
|
|
146
|
+
last_activity: string | null;
|
|
147
|
+
preview_tasks: { title: string; status: TaskStatus }[];
|
|
148
|
+
}
|
|
149
|
+
|
|
85
150
|
export interface IStructureWithQuestions {
|
|
86
151
|
items: {
|
|
87
152
|
title: string;
|