Skip to content

Commit 31fe212

Browse files
committed
feat(chat): improve code readability in ChatWithThisAction.kt by simplifying input setting in contentPanel.setInput().
1 parent 76a7c47 commit 31fe212

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/kotlin/cc/unitmesh/devti/actions/chat/ChatWithThisAction.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ class ChatWithThisAction : ChatBaseAction() {
2828
val language = event.getData(CommonDataKeys.PSI_FILE)?.language?.displayName ?: ""
2929

3030
sendToChatWindow(project, getActionType()) { contentPanel, _ ->
31-
contentPanel.setInput(
32-
trimMargin = """
33-
```$language
34-
$prefixText
35-
```"""
36-
)
31+
contentPanel.setInput("\n```$language\n$prefixText\n```")
3732
}
3833
}
3934
}

0 commit comments

Comments
 (0)