Commit 316c277
authored
feat(mpp-core): implement Task Management Tool for CodingAgent (#38)
* feat(mpp-ui): implement file context management with indexed search
- Add SelectedFileItem, FileChip, TopToolbar, FileSearchPopup components
- Add WorkspaceFileSearchProvider with pre-built file index for fast search
- Add IndexingState enum for tracking indexing progress
- Integrate file context into DevInEditorInput with buildAndSendMessage()
- Add Prompt Enhancement button to BottomToolbar
- Add AutoAwesome and History icons to AutoDevComposeIcons
- Add FileContext to EditorCallbacks for file context submission
Closes #35
* feat(mpp-core): add plan management data models and parser for task management
- Add TaskStatus enum (TODO, IN_PROGRESS, COMPLETED, FAILED, BLOCKED) and PlanPhase enum (PDCA cycle)
- Add CodeFileLink data class for markdown file link extraction
- Add PlanStep, PlanTask, AgentPlan data models with serialization support
- Add MarkdownPlanParser using pure Kotlin regex (no IntelliJ dependencies)
- Add PlanStateService with StateFlow and listener pattern for reactive updates
- Add PlanUpdateListener interface for UI notifications
- Add comprehensive unit tests for parser and state service
- Fix DocQLReturnAllTest missing Pending branch in when expressions
Part of #37
* feat(mpp-core): add PlanManagementTool for AI agent task planning
- Add PlanManagementTool with CREATE, UPDATE, COMPLETE_STEP, FAIL_STEP, VIEW actions
- Add PlanManagementParams, PlanManagementSchema, PlanManagementInvocation
- Add comprehensive unit tests for all tool actions
- Tool integrates with PlanStateService for state management
Part of #37
* feat(mpp-core): register PlanManagementTool in BuiltinToolsProvider
- Add PlanManagementTool to BuiltinToolsProvider.provide()
- Add executePlanManagementTool method in ToolOrchestrator
- Add tests for plan and task-boundary tool registration
Part of #37
* feat(mpp-ui): add PlanPanel UI component and integrate with ComposeRenderer
- Create PlanPanel composable with task and step display
- Add expandable task cards with progress tracking
- Implement status icons and colors for plan visualization
- Integrate plan state tracking in ComposeRenderer
- Handle plan tool calls to update UI state
Part of #37
* feat(mpp-core): add plan management guidance to system prompt and fix parameter parsing
- Add Planning and Task Management section to CodingAgentTemplate (EN and ZH)
- Document when to use planning, plan format, and plan actions
- Update Task Completion Strategy to include planning step
- Fix taskIndex/stepIndex parameter parsing in ToolOrchestrator to handle both Number and String types
Part of #37
* refactor(mpp-core): remove TaskBoundaryTool in favor of PlanManagementTool
- Remove TaskBoundaryTool.kt as PlanManagementTool provides superset functionality
- Remove TaskBoundaryTool from BuiltinToolsProvider and ToolOrchestrator
- Update ToolRegistryTest to remove task-boundary test
- Update comments referencing task-boundary
- Enhance PlanManagementTool with detailed KDoc documentation
- Fix tuiEmoji to use proper emoji character
Part of #37
* fix(executor): reduce shell command max timeout to 2 minutes
Lower the maximum wait time for shell command execution to 2 minutes and pass it as a timeout to the orchestrator context.1 parent 88781b5 commit 316c277
File tree
23 files changed
+1979
-244
lines changed- mpp-core
- src
- commonMain/kotlin/cc/unitmesh/agent
- executor
- orchestrator
- plan
- render
- tool
- impl
- registry
- commonTest/kotlin/cc/unitmesh/agent
- plan
- tool
- impl
- jvmTest/kotlin/cc/unitmesh/agent/tool/impl
- mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/ui/compose/agent
23 files changed
+1979
-244
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
Lines changed: 74 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
39 | 71 | | |
40 | 72 | | |
41 | 73 | | |
42 | 74 | | |
43 | 75 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
48 | 81 | | |
49 | 82 | | |
50 | 83 | | |
| |||
161 | 194 | | |
162 | 195 | | |
163 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
164 | 229 | | |
165 | 230 | | |
166 | 231 | | |
167 | 232 | | |
168 | 233 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
173 | 239 | | |
174 | 240 | | |
175 | 241 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
Lines changed: 31 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
| 678 | + | |
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
695 | 706 | | |
696 | | - | |
697 | | - | |
| 707 | + | |
| 708 | + | |
698 | 709 | | |
699 | 710 | | |
700 | 711 | | |
| |||
704 | 715 | | |
705 | 716 | | |
706 | 717 | | |
707 | | - | |
| 718 | + | |
708 | 719 | | |
709 | 720 | | |
710 | 721 | | |
711 | | - | |
| 722 | + | |
712 | 723 | | |
713 | 724 | | |
714 | 725 | | |
715 | 726 | | |
716 | | - | |
| 727 | + | |
717 | 728 | | |
718 | 729 | | |
719 | 730 | | |
| |||
738 | 749 | | |
739 | 750 | | |
740 | 751 | | |
741 | | - | |
| 752 | + | |
742 | 753 | | |
743 | 754 | | |
744 | 755 | | |
| |||
Lines changed: 140 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
0 commit comments