Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkondratek committed Aug 5, 2024
1 parent 1868794 commit fc5eaf7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.sourcegraph.cody.error.CodyConsole
import com.sourcegraph.cody.ignore.IgnoreOracle
import com.sourcegraph.cody.listeners.CodyFileEditorListener
import com.sourcegraph.cody.statusbar.CodyStatusService
import com.sourcegraph.common.CodyBundle
import com.sourcegraph.utils.CodyEditorUtil
import java.util.Timer
import java.util.TimerTask
Expand Down Expand Up @@ -202,7 +203,7 @@ class CodyAgentService(private val project: Project) : Disposable {
CodyStatusService.resetApplication(project)
}
} catch (e: TimeoutException) {
val msg = "Failed to start Cody agent in timely manner, please run any Cody action to retry"
val msg = CodyBundle.getString("error.cody-connection-timeout.message")
runInEdt {
val isNoBalloonDisplayed =
NotificationsManager.getNotificationsManager()
Expand All @@ -216,7 +217,7 @@ class CodyAgentService(private val project: Project) : Disposable {
setAgentError(project, msg)
codyAgent.completeExceptionally(CodyAgentException(msg, e))
} catch (e: Exception) {
val msg = "Failed to start Cody agent"
val msg = CodyBundle.getString("error.cody-starting.message")
setAgentError(project, msg)
logger.error(msg, e)
codyAgent.completeExceptionally(CodyAgentException(msg, e))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.sourcegraph.cody.statusbar

import com.intellij.ide.actions.AboutAction
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.DefaultActionGroup
Expand All @@ -23,11 +22,7 @@ class CodyStatusBarActionGroup : DefaultActionGroup() {
removeAll()
val status = e.project?.let { CodyStatusService.getCurrentStatus(it) }
if (status == CodyStatus.CodyAgentNotRunning || status == CodyStatus.AgentError) {
addAll(
CodyAgentRestartAction(),
OpenLogAction(),
AboutAction().apply { templatePresentation.text = "Open About To Troubleshoot Issue" },
ReportCodyBugAction())
addAll(CodyAgentRestartAction(), OpenLogAction(), ReportCodyBugAction())
} else {
addAll(listOfNotNull(deriveRateLimitErrorAction()))
addSeparator()
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/CodyBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ notification.general.cody-not-running.detail=Please wait a few seconds. If Cody
notifications.edits.editing-not-available.title=Cody can't edit the file
notifications.edits.editing-not-available.detail=This could be because the file is not writable or Cody has trouble communicating with the editor.
notifications.cody-connection-timeout.title=Cody's connection timeout
notifications.cody-connection-timeout.detail=Failed to start Cody in timely manner, please run any Cody action or restart Cody to retry.

notifications.cody-connection-timeout.detail=Cody took longer than expected to start. Please run any Cody action or restart Cody to retry.
error.cody-connection-timeout.message=Failed to start Cody in timely manner, please run any Cody action to retry
error.cody-starting.message=Failed to start Cody
# Context Filters
filter.action-in-ignored-file.detail=This file has been restricted by an admin. Autocomplete, commands, and other Cody features are disabled.
filter.action-in-ignored-file.learn-more-cta=Learn about Context Filters
Expand Down

0 comments on commit fc5eaf7

Please sign in to comment.