Skip to content
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
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "/test syntax highlighting when viewing diff"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description" : "/test syntax highlighting when viewing diff"
"description" : "Enable syntax highlighting when viewing diff for /test"

}
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ class CodeTestChatController(
when (message.actionID) {
"utg_view_diff" -> {
withContext(EDT) {
val virtualFile = Path.of(session.projectRoot, session.testFileRelativePathToProjectRoot).toString().let { Path.of(it).toFile().toVirtualFile() }

(DiffManager.getInstance() as DiffManagerEx).showDiffBuiltin(
context.project,
SimpleDiffRequest(
Expand All @@ -466,9 +468,13 @@ class CodeTestChatController(
getFileContentAtTestFilePath(
session.projectRoot,
session.testFileRelativePathToProjectRoot
)
),
virtualFile
),
DiffContentFactory.getInstance().create(
session.generatedTestDiffs.values.first(),
virtualFile
),
DiffContentFactory.getInstance().create(session.generatedTestDiffs.values.first()),
"Before",
"After"
)
Expand Down
Loading