File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,10 @@ import ai.devchat.core.DevChatClient
55import ai.devchat.core.DevChatWrapper
66import ai.devchat.installer.DevChatSetupThread
77import ai.devchat.storage.ActiveConversation
8+ import ai.devchat.storage.RecentFilesTracker
89import com.intellij.openapi.Disposable
910import com.intellij.openapi.components.Service
11+ import com.intellij.openapi.components.service
1012import com.intellij.openapi.project.DumbAware
1113import com.intellij.openapi.project.Project
1214import com.intellij.openapi.util.Disposer
@@ -35,6 +37,7 @@ class DevChatService(project: Project) {
3537
3638class DevChatToolWindowFactory : ToolWindowFactory , DumbAware , Disposable {
3739 override fun createToolWindowContent (project : Project , toolWindow : ToolWindow ) {
40+ project.service<RecentFilesTracker >()
3841 val devChatService = project.getService(DevChatService ::class .java)
3942 val browser = Browser (project)
4043 devChatService.browser = browser
Original file line number Diff line number Diff line change @@ -3,12 +3,10 @@ package ai.devchat.storage
33import ai.devchat.common.Log
44import com.intellij.openapi.application.runInEdt
55import com.intellij.openapi.components.Service
6- import com.intellij.openapi.components.service
76import com.intellij.openapi.fileEditor.FileEditorManager
87import com.intellij.openapi.fileEditor.FileEditorManagerListener
98import com.intellij.openapi.project.Project
109import com.intellij.openapi.roots.ProjectFileIndex
11- import com.intellij.openapi.startup.ProjectActivity
1210import com.intellij.openapi.vfs.VirtualFile
1311import com.intellij.util.messages.MessageBusConnection
1412
@@ -49,9 +47,3 @@ class RecentFilesTracker(private val project: Project) {
4947 return recentFiles.toList()
5048 }
5149}
52-
53- class RecentFilesStartupActivity : ProjectActivity {
54- override suspend fun execute (project : Project ) {
55- project.service<RecentFilesTracker >()
56- }
57- }
Original file line number Diff line number Diff line change 3636<!-- <listener class="ai.devchat.plugin.IDELifecycleListener" topic="com.intellij.ide.AppLifecycleListener" />-->
3737<!-- </applicationListeners>-->
3838 <extensions defaultExtensionNs =" com.intellij" >
39- <postStartupActivity implementation =" ai.devchat.storage.RecentFilesStartupActivity" />
4039 <toolWindow id =" ${ASSISTANT_NAME_ZH}" secondary =" false" icon =" /icons/toolWindowIcon.svg" anchor =" right"
4140 factoryClass =" ai.devchat.plugin.DevChatToolWindowFactory" />
4241 <applicationService serviceImplementation =" ai.devchat.storage.DevChatSettingsState" />
You can’t perform that action at this time.
0 commit comments