✨ gh auth token jb
This commit is contained in:
parent
6536fad1ac
commit
04481c4fe5
4 changed files with 22 additions and 2 deletions
2
binary/package-lock.json
generated
2
binary/package-lock.json
generated
|
|
@ -38,7 +38,7 @@
|
|||
},
|
||||
"../core": {
|
||||
"name": "@continuedev/core",
|
||||
"version": "1.0.12",
|
||||
"version": "1.0.13",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-bedrock-runtime": "^3.574.0",
|
||||
|
|
|
|||
|
|
@ -141,7 +141,9 @@ class CoreMessenger(private val project: Project, esbuildPath: String, continueC
|
|||
"getGitRootPath",
|
||||
"getLastModified",
|
||||
"insertAtCursor",
|
||||
"applyToFile"
|
||||
"applyToFile",
|
||||
"getGitHubAuthToken",
|
||||
"setGitHubAuthToken",
|
||||
)
|
||||
|
||||
private val PASS_THROUGH_TO_WEBVIEW = listOf<String>(
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import com.intellij.openapi.application.ReadAction
|
|||
import com.intellij.openapi.application.WriteAction
|
||||
import com.intellij.openapi.command.WriteCommandAction
|
||||
import com.intellij.openapi.components.ServiceManager
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.editor.Document
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.SelectionModel
|
||||
|
|
@ -523,6 +524,22 @@ class IdeProtocolClient (
|
|||
}
|
||||
"applyToFile" -> {
|
||||
}
|
||||
"getGitHubAuthToken" -> {
|
||||
val continueSettingsService = service<ContinueExtensionSettings>()
|
||||
val ghAuthToken = continueSettingsService.continueState.ghAuthToken;
|
||||
respond(ghAuthToken)
|
||||
}
|
||||
"setGitHubAuthToken" -> {
|
||||
val continueSettingsService = service<ContinueExtensionSettings>()
|
||||
val data = data as Map<String, String>
|
||||
continueSettingsService.continueState.ghAuthToken = data["token"]
|
||||
respond(null)
|
||||
}
|
||||
"openUrl" -> {
|
||||
val url = data as String
|
||||
java.awt.Desktop.getDesktop().browse(java.net.URI(url))
|
||||
respond(null)
|
||||
}
|
||||
else -> {
|
||||
println("Unknown messageType: $messageType")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ open class ContinueExtensionSettings : PersistentStateComponent<ContinueExtensio
|
|||
var remoteConfigSyncPeriod: Int = 60
|
||||
var userToken: String? = null
|
||||
var enableTabAutocomplete: Boolean = false
|
||||
var ghAuthToken: String? = null
|
||||
}
|
||||
|
||||
var continueState: ContinueState = ContinueState()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue