Skip to content

Commit 79fe5f0

Browse files
committed
refactor package structure and move classes to appropriate packages
- Move QuickPromptField from gui.quick to actions.quick package- Move AutoDevInputLookupManagerListener from gui.chat.ui to completion package- Update imports in affected classes - Remove unnecessary classes and imports from gui.chat.ui package
1 parent e42fcd8 commit 79fe5f0

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

core/src/main/kotlin/cc/unitmesh/devti/actions/quick/QuickAssistantAction.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package cc.unitmesh.devti.actions.quick
33
import cc.unitmesh.devti.custom.TeamPromptBaseIntention
44
import cc.unitmesh.devti.custom.team.TeamPromptAction
55
import cc.unitmesh.devti.custom.team.TeamPromptsBuilder
6-
import cc.unitmesh.devti.gui.quick.QuickPromptField
7-
import cc.unitmesh.devti.gui.quick.QuickPromptField.Companion.QUICK_ASSISTANT_CANCEL_ACTION
8-
import cc.unitmesh.devti.gui.quick.QuickPromptField.Companion.QUICK_ASSISTANT_SUBMIT_ACTION
6+
import cc.unitmesh.devti.actions.quick.QuickPromptField
7+
import cc.unitmesh.devti.actions.quick.QuickPromptField.Companion.QUICK_ASSISTANT_CANCEL_ACTION
8+
import cc.unitmesh.devti.actions.quick.QuickPromptField.Companion.QUICK_ASSISTANT_SUBMIT_ACTION
99
import cc.unitmesh.devti.intentions.action.task.BaseCompletionTask
1010
import cc.unitmesh.devti.intentions.action.task.CodeCompletionRequest
1111
import cc.unitmesh.devti.settings.locale.LanguageChangedCallback.presentationText

core/src/main/kotlin/cc/unitmesh/devti/gui/quick/QuickPromptField.kt renamed to core/src/main/kotlin/cc/unitmesh/devti/actions/quick/QuickPromptField.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cc.unitmesh.devti.gui.quick
1+
package cc.unitmesh.devti.actions.quick
22

33
import com.intellij.ide.KeyboardAwareFocusOwner
44
import java.awt.Dimension
@@ -20,4 +20,4 @@ class QuickPromptField : JTextField(), KeyboardAwareFocusOwner {
2020
const val QUICK_ASSISTANT_CANCEL_ACTION = "quick.assistant.cancel"
2121
const val QUICK_ASSISTANT_SUBMIT_ACTION = "quick.assistant.submit"
2222
}
23-
}
23+
}

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/AutoDevInputLookupManagerListener.kt renamed to core/src/main/kotlin/cc/unitmesh/devti/completion/AutoDevInputLookupManagerListener.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
package cc.unitmesh.devti.gui.chat.ui
1+
package cc.unitmesh.devti.completion
22

3-
import cc.unitmesh.devti.completion.AutoDevFileLookupElement
43
import com.intellij.codeInsight.lookup.Lookup
54
import com.intellij.codeInsight.lookup.LookupEvent
65
import com.intellij.codeInsight.lookup.LookupListener

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/AutoDevInputSection.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import cc.unitmesh.devti.AutoDevBundle
44
import cc.unitmesh.devti.AutoDevIcons
55
import cc.unitmesh.devti.agent.custom.model.CustomAgentConfig
66
import cc.unitmesh.devti.agent.custom.model.CustomAgentState
7+
import cc.unitmesh.devti.completion.AutoDevInputLookupManagerListener
78
import cc.unitmesh.devti.gui.chat.ui.file.WorkspaceFileToolbar
89
import cc.unitmesh.devti.gui.chat.ui.file.RelatedFileListCellRenderer
910
import cc.unitmesh.devti.gui.chat.ui.file.WorkspaceFilePanel

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/RelatedFileListViewModel.kt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,7 @@ class RelatedFileListViewModel(private val project: Project) : Disposable {
3333
private val listModel = DefaultListModel<FilePresentation>()
3434

3535
private val listeners = mutableListOf<FileListChangeListener>()
36-
37-
fun addChangeListener(listener: FileListChangeListener) {
38-
listeners.add(listener)
39-
}
40-
41-
fun removeChangeListener(listener: FileListChangeListener) {
42-
listeners.remove(listener)
43-
}
44-
36+
4537
fun getListModel(): DefaultListModel<FilePresentation> = listModel
4638

4739
fun addFileIfAbsent(vfile: VirtualFile, first: Boolean = false) {

core/src/main/kotlin/cc/unitmesh/devti/inlay/InlayPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cc.unitmesh.devti.inlay
22

3-
import cc.unitmesh.devti.gui.quick.QuickPromptField
3+
import cc.unitmesh.devti.actions.quick.QuickPromptField
44
import com.intellij.openapi.Disposable
55
import com.intellij.openapi.editor.Inlay
66
import com.intellij.openapi.editor.InlayProperties

0 commit comments

Comments
 (0)