Skip to content

Commit 9261308

Browse files
committed
refactor(ui): remove unused SessionPopupStep class
Remove dead code - SessionPopupStep class and its related imports (PopupStep, BaseListPopupStep) are no longer used in ViewHistoryAction.
1 parent 537d2e9 commit 9261308

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/toolbar/ViewHistoryAction.kt

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import com.intellij.openapi.actionSystem.AnActionEvent
1414
import com.intellij.openapi.project.Project
1515
import com.intellij.openapi.ui.Messages
1616
import com.intellij.openapi.ui.popup.JBPopupFactory
17-
import com.intellij.openapi.ui.popup.PopupStep
18-
import com.intellij.openapi.ui.popup.util.BaseListPopupStep
1917
import com.intellij.openapi.wm.ToolWindowManager
2018
import com.intellij.ui.ColoredListCellRenderer
2119
import com.intellij.ui.SimpleTextAttributes
@@ -115,30 +113,6 @@ class ViewHistoryAction : AnAction(
115113
}
116114
}
117115

118-
private inner class SessionPopupStep(
119-
private val project: Project,
120-
private val sessions: List<ChatSessionHistory>
121-
) : BaseListPopupStep<SessionListItem>(
122-
AutoDevBundle.message("popup.title.session.history"),
123-
sessions.map { SessionListItem(it, formatRelativeTime(it.createdAt)) }
124-
) {
125-
126-
override fun getTextFor(value: SessionListItem): String {
127-
return value.session.name
128-
}
129-
130-
override fun onChosen(selectedValue: SessionListItem, finalChoice: Boolean): PopupStep<*>? {
131-
if (finalChoice) {
132-
loadSessionIntoSketch(project, selectedValue.session)
133-
}
134-
return PopupStep.FINAL_CHOICE
135-
}
136-
137-
override fun hasSubstep(selectedValue: SessionListItem): Boolean = false
138-
139-
override fun isSelectable(value: SessionListItem): Boolean = true
140-
}
141-
142116
override fun actionPerformed(e: AnActionEvent) {
143117
val project = e.project ?: return
144118
val historyService = project.getService(ChatHistoryService::class.java)

0 commit comments

Comments
 (0)