Skip to content

Commit 6e549fc

Browse files
committed
Snow CLI v0.7.24
- Modified some incorrect prompt information - Added secondary confirmation and quick delete to history record deletion - Fixed the bug of abnormal loading of history records when switching between welcome page and conversation page - Added anti-status loss mechanism for sub-agent and team mode VSCode Extension v0.4.22 - Added AI-generated Git commit messages JetBrains Plugin v0.4.20 - Added AI-generated Git commit messages
1 parent bc18b72 commit 6e549fc

22 files changed

Lines changed: 1613 additions & 33 deletions

File tree

.github/workflows/build_jetbrains.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ jobs:
7777
## 🚀 Snow CLI JetBrains plugin
7878
Latest release version: `v${{ env.PLUGIN_VERSION }}`
7979
80+
### What's New
81+
82+
- Add AI-generated git commit message feature
83+
8084
### Usage
8185
8286
JetBrains IDE plugin for integrating with Snow AI CLI. Provides intelligent code navigation and search powered by AI, with support for IntelliJ IDEA, PyCharm, WebStorm, and other JetBrains IDEs.

.github/workflows/build_vsix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
6666
### What's New
6767
68-
- feat(vsix): 支持启动命令轮询、终端代理和选区位置发送
68+
- Add AI-generated git commit message feature
6969
7070
### Installation
7171

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656
5757
### What's New
5858
59-
- Add the /deepresearch command to conduct in-depth research and generate research reports, which are stored in the .snow/deepresearch/ folder at the root directory of the working directory
60-
- Add full coverage functionality for ROLE.md, access the ROLE list using the /role -l command, and use the shortcut key R to override the built-in system prompts of Snow CLI
61-
- Add the feature to switch between working directories, enhancing single-window flexibility, and use the /ide command to switch working directories
62-
- The skills panel has been migrated from the original mcp panel to a new independent panel management, access the skills list using the /skills -l command
59+
- Modify some incorrect prompt information
60+
- Add secondary confirmation and quick delete to history record deletion
61+
- Fix the bug of abnormal loading of history records when switching between welcome page and conversation page
62+
- Add anti-status loss mechanism to sub-agent and team mode
6363
6464
### Installation
6565
```bash

JetBrains/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group = "com.snow"
8-
version = "0.4.19"
8+
version = "0.4.20"
99

1010
repositories {
1111
mavenCentral()
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
package com.snow.plugin.actions
2+
3+
import com.intellij.openapi.actionSystem.ActionUpdateThread
4+
import com.intellij.openapi.actionSystem.AnActionEvent
5+
import com.intellij.openapi.components.service
6+
import com.intellij.openapi.project.DumbAwareAction
7+
import com.intellij.openapi.ui.Messages
8+
import com.intellij.openapi.vcs.VcsDataKeys
9+
import com.snow.plugin.commit.SnowCommitMessageGenerationService
10+
import icons.SnowPluginIcons
11+
import java.awt.event.InputEvent
12+
13+
class GenerateCommitMessageAction : DumbAwareAction() {
14+
15+
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
16+
17+
override fun actionPerformed(e: AnActionEvent) {
18+
val project = e.project ?: return
19+
val commitMessageControl = e.getData(VcsDataKeys.COMMIT_MESSAGE_CONTROL)
20+
val commitWorkflowUi = e.getData(VcsDataKeys.COMMIT_WORKFLOW_UI)
21+
val service = project.service<SnowCommitMessageGenerationService>()
22+
23+
if (service.isGenerating()) {
24+
service.generate(commitMessageControl, commitWorkflowUi?.commitMessageUi)
25+
return
26+
}
27+
28+
val shouldAskForRequirements = hasRequirementsModifier(e)
29+
val additionalRequirements = if (shouldAskForRequirements) {
30+
val input = Messages.showInputDialog(
31+
project,
32+
"Add optional requirements for the generated commit message.",
33+
"Snow CLI: Commit Message Requirements",
34+
Messages.getQuestionIcon(),
35+
) ?: return
36+
input.trim().ifEmpty { null }
37+
} else {
38+
null
39+
}
40+
41+
service.generate(
42+
commitMessageControl,
43+
commitWorkflowUi?.commitMessageUi,
44+
additionalRequirements,
45+
)
46+
}
47+
48+
override fun update(e: AnActionEvent) {
49+
val project = e.project
50+
val hasCommitMessageTarget = e.getData(VcsDataKeys.COMMIT_MESSAGE_CONTROL) != null ||
51+
e.getData(VcsDataKeys.COMMIT_WORKFLOW_UI) != null
52+
val isGenerating = project?.service<SnowCommitMessageGenerationService>()?.isGenerating() == true
53+
54+
e.presentation.icon = if (isGenerating) {
55+
SnowPluginIcons.SnowStopToolbarAction
56+
} else {
57+
SnowPluginIcons.SnowToolbarAction
58+
}
59+
60+
e.presentation.isEnabledAndVisible = project != null && hasCommitMessageTarget
61+
e.presentation.text = if (isGenerating) {
62+
"Cancel Commit Message Generation"
63+
} else {
64+
"Generate Commit Message"
65+
}
66+
e.presentation.description = if (isGenerating) {
67+
"Cancel Snow CLI commit message generation"
68+
} else {
69+
"Generate a commit message with Snow CLI AI. Alt/Option-click to add requirements."
70+
}
71+
}
72+
73+
private fun hasRequirementsModifier(e: AnActionEvent): Boolean {
74+
return (e.inputEvent?.modifiersEx ?: 0) and InputEvent.ALT_DOWN_MASK != 0
75+
}
76+
}

0 commit comments

Comments
 (0)