@@ -52,29 +52,27 @@ class TeamPromptBaseIntention(val intentionConfig: TeamPromptAction, val trySele
52
52
val actionPrompt = intentionConfig.actionPrompt
53
53
val chatMessages = actionPrompt.msgs
54
54
55
-
56
55
if (actionPrompt.batchFileRegex != " " ) {
57
56
val files = actionPrompt.batchFiles(project)
58
57
if (files.isNotEmpty()) {
59
58
val length = files.size
60
- files.forEachIndexed { index, vfile ->
61
- compiler.set(" all" , VfsUtilCore .loadText(vfile ))
59
+ files.forEachIndexed { index, file ->
60
+ compiler.set(" all" , VfsUtilCore .loadText(file ))
62
61
val msgs = chatMessages.map {
63
62
it.copy(content = compiler.compile(it.content))
64
63
}
65
64
66
65
// display progress like 1/2 in the title
67
- val taskName = " ${intentionConfig.actionName} ${index + 1 } /$length - ${vfile .name} "
66
+ val taskName = " ${intentionConfig.actionName} ${index + 1 } /$length - ${file .name} "
68
67
val task: Task .Backgroundable =
69
- TeamPromptExecTask (project, msgs, editor, intentionConfig, element, vfile, taskName)
68
+ TeamPromptExecTask (project, msgs, editor, intentionConfig, element, file, taskName)
69
+
70
70
ProgressManager .getInstance()
71
71
.runProcessWithProgressAsynchronously(task, BackgroundableProcessIndicator (task))
72
72
}
73
73
} else {
74
- AutoDevNotifications .error(
75
- project,
76
- " No files found for batch processing, please check the regex. " + " Regex: ${actionPrompt.batchFileRegex} "
77
- )
74
+ val msg = " No files found for batch processing, please check the regex: ${actionPrompt.batchFileRegex} "
75
+ AutoDevNotifications .error(project, msg)
78
76
}
79
77
} else {
80
78
val msgs = chatMessages.map {
0 commit comments