idea-manager 0.1.2 → 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.
Files changed (63) hide show
  1. package/README.md +19 -10
  2. package/next.config.ts +0 -1
  3. package/package.json +2 -2
  4. package/public/favicon.svg +10 -0
  5. package/public/icon.svg +2 -11
  6. package/src/app/api/filesystem/route.ts +49 -0
  7. package/src/app/api/projects/[id]/cleanup/route.ts +32 -0
  8. package/src/app/api/projects/[id]/items/[itemId]/refine/route.ts +36 -0
  9. package/src/app/api/projects/[id]/items/[itemId]/route.ts +23 -1
  10. package/src/app/api/projects/[id]/items/route.ts +51 -1
  11. package/src/app/api/projects/[id]/scan/route.ts +73 -0
  12. package/src/app/api/projects/[id]/scan/stream/route.ts +112 -0
  13. package/src/app/api/projects/[id]/structure/route.ts +34 -3
  14. package/src/app/api/projects/[id]/structure/stream/route.ts +157 -0
  15. package/src/app/api/projects/[id]/sub-projects/[subId]/route.ts +39 -0
  16. package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route.ts +60 -0
  17. package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route.ts +26 -0
  18. package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route.ts +39 -0
  19. package/src/app/api/projects/[id]/sub-projects/[subId]/tasks/route.ts +33 -0
  20. package/src/app/api/projects/[id]/sub-projects/route.ts +31 -0
  21. package/src/app/api/projects/route.ts +1 -1
  22. package/src/app/globals.css +465 -5
  23. package/src/app/layout.tsx +3 -0
  24. package/src/app/page.tsx +260 -88
  25. package/src/app/projects/[id]/page.tsx +366 -183
  26. package/src/cli.ts +44 -12
  27. package/src/components/DirectoryPicker.tsx +137 -0
  28. package/src/components/ScanPanel.tsx +743 -0
  29. package/src/components/brainstorm/Editor.tsx +20 -4
  30. package/src/components/brainstorm/MemoPin.tsx +91 -5
  31. package/src/components/dashboard/SubProjectCard.tsx +76 -0
  32. package/src/components/dashboard/TabBar.tsx +42 -0
  33. package/src/components/task/ProjectTree.tsx +223 -0
  34. package/src/components/task/PromptEditor.tsx +107 -0
  35. package/src/components/task/StatusFlow.tsx +43 -0
  36. package/src/components/task/TaskChat.tsx +134 -0
  37. package/src/components/task/TaskDetail.tsx +205 -0
  38. package/src/components/task/TaskList.tsx +119 -0
  39. package/src/components/tree/CardView.tsx +206 -0
  40. package/src/components/tree/RefinePopover.tsx +157 -0
  41. package/src/components/tree/TreeNode.tsx +147 -38
  42. package/src/components/tree/TreeView.tsx +270 -26
  43. package/src/components/ui/ConfirmDialog.tsx +88 -0
  44. package/src/lib/ai/chat-responder.ts +4 -2
  45. package/src/lib/ai/cleanup.ts +87 -0
  46. package/src/lib/ai/client.ts +175 -58
  47. package/src/lib/ai/prompter.ts +19 -24
  48. package/src/lib/ai/refiner.ts +128 -0
  49. package/src/lib/ai/structurer.ts +340 -11
  50. package/src/lib/db/queries/context.ts +76 -0
  51. package/src/lib/db/queries/items.ts +133 -12
  52. package/src/lib/db/queries/projects.ts +12 -8
  53. package/src/lib/db/queries/sub-projects.ts +122 -0
  54. package/src/lib/db/queries/task-conversations.ts +27 -0
  55. package/src/lib/db/queries/task-prompts.ts +32 -0
  56. package/src/lib/db/queries/tasks.ts +133 -0
  57. package/src/lib/db/schema.ts +75 -0
  58. package/src/lib/mcp/server.ts +38 -39
  59. package/src/lib/mcp/tools.ts +47 -45
  60. package/src/lib/scanner.ts +573 -0
  61. package/src/lib/task-store.ts +97 -0
  62. package/src/types/index.ts +65 -0
  63. package/src/app/icon.svg +0 -19
@@ -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;
package/src/app/icon.svg DELETED
@@ -1,19 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
2
- <defs>
3
- <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
4
- <stop offset="0%" stop-color="#6366f1"/>
5
- <stop offset="100%" stop-color="#8b5cf6"/>
6
- </linearGradient>
7
- </defs>
8
- <rect width="512" height="512" rx="96" fill="url(#bg)"/>
9
- <text x="256" y="310" font-family="system-ui, -apple-system, sans-serif" font-size="260" font-weight="800" fill="white" text-anchor="middle" letter-spacing="-12">IM</text>
10
- <circle cx="390" cy="130" r="28" fill="#fbbf24"/>
11
- <line x1="390" y1="90" x2="390" y2="70" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
12
- <line x1="390" y1="170" x2="390" y2="190" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
13
- <line x1="350" y1="130" x2="330" y2="130" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
14
- <line x1="430" y1="130" x2="450" y2="130" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
15
- <line x1="362" y1="102" x2="348" y2="88" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
16
- <line x1="418" y1="158" x2="432" y2="172" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
17
- <line x1="418" y1="102" x2="432" y2="88" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
18
- <line x1="362" y1="158" x2="348" y2="172" stroke="#fbbf24" stroke-width="8" stroke-linecap="round"/>
19
- </svg>