Skip to content

Commit e7258f5

Browse files
committed
refactor(AutoSketchMode): rename hasReadCommand to isAutoCommand for clarity and update command filtering logic
1 parent eb09670 commit e7258f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/main/kotlin/cc/unitmesh/devti/sketch/AutoSketchMode.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class AutoSketchMode(val project: Project) {
3030
val commands: MutableList<BuiltinCommand> = mutableListOf()
3131

3232
val allCode = devinCodeFence.filter {
33-
!it.text.contains("<DevinsError>") && (hasReadCommand(it) || hasToolchainFunctionCommand(it))
33+
!it.text.contains("<DevinsError>") && (isAutoCommand(it) || hasToolchainFunctionCommand(it))
3434
}
3535

3636
val language = CodeFence.findLanguage("DevIn")
@@ -69,7 +69,7 @@ class AutoSketchMode(val project: Project) {
6969
listener?.manualSend(text)
7070
}
7171

72-
private fun hasReadCommand(fence: CodeFence): Boolean = buildAutoCommands().any { command ->
72+
private fun isAutoCommand(fence: CodeFence): Boolean = buildAutoCommands().any { command ->
7373
fence.text.contains("/" + command.commandName + ":")
7474
}
7575

@@ -86,6 +86,7 @@ class AutoSketchMode(val project: Project) {
8686
RULE,
8787
USAGE,
8888
BROWSE,
89+
SPECKIT
8990
)
9091

9192
of += setOf(

0 commit comments

Comments
 (0)