Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestSpark does not provide any feedback if a client sends an inappropriate request via a per-test textbox after tests generation via LLM #95

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.jetbrains.research.testspark.display

import com.intellij.lang.Language
import com.intellij.notification.NotificationGroupManager
import com.intellij.notification.NotificationType
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.openapi.components.service
import com.intellij.openapi.diff.DiffColors
Expand Down Expand Up @@ -405,9 +407,19 @@ class TestCasePanelFactory(
)
addTest(modifiedTest)
} else {
NotificationGroupManager.getInstance()
.getNotificationGroup("LLM Execution Error")
.createNotification(
TestSparkBundle.message("llmWarningTitle"),
TestSparkBundle.message("noRequestFromLLM"),
NotificationType.WARNING,
)
.notify(project)

loadingLabel.isVisible = false
sendButton.isEnabled = true
}

if (processStopped(project, indicator)) return

indicator.stop()
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/messages/TestSpark.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ tooLongPrompt=The generated prompt is too long! Please, generate tests for singl
requestError=An error occurred during interaction with the LLM Platform. Code:
savingTestFileIssue=Plugin cannot save the test file
promptReduction=The generated prompt is too long, plugin reduced Large Language Model parameters.
!No request from LLM
noRequestFromLLM=LLM does not provide any request. Could you, please, change the message.
arksap2002 marked this conversation as resolved.
Show resolved Hide resolved
!Build error messages
commonBuildErrorMessage=Please make sure that IntelliJ can build your project without any issues or provide the correct build command in the settings
sendingFeedback=Sending your request to LLM
testRunning=Test running
!Run caution message
runCautionMessage=By clicking "OK" you agree to run this code on your machine
Loading