File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ ### Fixed
6
+
7
+ - NPE when retrieving TaskManager for prompt construction.
8
+
5
9
## [ 2.3.0] - 2024-09-09
6
10
7
11
### Added
Original file line number Diff line number Diff line change @@ -42,10 +42,13 @@ object AICommitsUtils {
42
42
content = content.replace(" {branch}" , branch)
43
43
content = replaceHint(content, hint)
44
44
45
- val activeTask = TaskManager .getManager(project).activeTask
46
- content = content.replace(" {taskId}" , activeTask.id)
47
- content = content.replace(" {taskSummary}" , activeTask.summary)
48
- content = content.replace(" {taskDescription}" , activeTask.description.orEmpty())
45
+ // TODO @Blarc: If TaskManager is null, the prompt might be incorrect...
46
+ TaskManager .getManager(project)?.let {
47
+ val activeTask = it.activeTask
48
+ content = content.replace(" {taskId}" , activeTask.id)
49
+ content = content.replace(" {taskSummary}" , activeTask.summary)
50
+ content = content.replace(" {taskDescription}" , activeTask.description.orEmpty())
51
+ }
49
52
50
53
return if (content.contains(" {diff}" )) {
51
54
content.replace(" {diff}" , diff)
You can’t perform that action at this time.
0 commit comments