diff --git a/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/agent/AgentToolWindowContentManager.kt b/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/agent/AgentToolWindowContentManager.kt index 6c8a6c67..988c17e7 100644 --- a/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/agent/AgentToolWindowContentManager.kt +++ b/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/agent/AgentToolWindowContentManager.kt @@ -23,22 +23,7 @@ class AgentToolWindowContentManager(private val project: Project) : Disposable { } }) - val storedSessions = sessionState.getSessionIds() - if (storedSessions.isEmpty()) { - createNewAgentTab() - } else { - storedSessions.forEach { sessionId -> - createNewAgentTab(sessionId = sessionId, select = false) - } - sessionState.getLastActiveSessionId()?.let { lastActive -> - tabbedPane.tryFindTabTitle(lastActive).ifPresent { title -> - val tabIndex = tabbedPane.indexOfTab(title) - if (tabIndex >= 0) { - tabbedPane.selectedIndex = tabIndex - } - } - } - } + createNewAgentTab() return tabbedPane } diff --git a/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt b/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt index b63ef4c9..42aae819 100644 --- a/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt +++ b/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt @@ -85,10 +85,7 @@ class SelectionTagProcessor( } promptBuilder.append( - """ - # User has highlighted code: - ${CompletionRequestUtil.formatCode(selectedText, tagDetails.virtualFile.path)} - """.trimIndent() + CompletionRequestUtil.formatCode(selectedText, tagDetails.virtualFile.path) ) } } @@ -104,10 +101,7 @@ class EditorSelectionTagProcessor( } promptBuilder.append( - """ - # User has highlighted code: - ${CompletionRequestUtil.formatCode(selectedText, tagDetails.virtualFile.path)} - """.trimIndent() + CompletionRequestUtil.formatCode(selectedText, tagDetails.virtualFile.path) ) } }