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 22
33## [ Unreleased]
44
5+ ### Fixed
6+
7+ - NPE when retrieving TaskManager for prompt construction.
8+
59## [ 2.3.0] - 2024-09-09
610
711### Added
Original file line number Diff line number Diff line change @@ -42,10 +42,13 @@ object AICommitsUtils {
4242 content = content.replace(" {branch}" , branch)
4343 content = replaceHint(content, hint)
4444
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+ }
4952
5053 return if (content.contains(" {diff}" )) {
5154 content.replace(" {diff}" , diff)
You can’t perform that action at this time.
0 commit comments