chore: bump intellij plugin version 0.5.0. (#450)

release-0.2
Zhiming Ma 2023-09-15 19:15:56 +08:00 committed by GitHub
parent 635469f6bd
commit 076dff9d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 103 additions and 117 deletions

View File

@ -1,3 +1,15 @@
## 0.5.0
### Incompatible Changes:
- Node.js version requirement is now v18+.
- System proxy environment variables are now ignored, including `http_proxy`, `https_proxy`, `all_proxy` and `no_proxy`. Before this change, proxy environment variables are processed, but requests will fail due to lack of supporting for https over http proxy and socks proxy.
### Fixes:
- Fixed a bug that causes auto-completion requests cannot be cancelled.
- Migrated Tabby cloud authorization tokens and anonymous usage tracking id from the old data directory to the new one.
## 0.4.0 ## 0.4.0
### Features: ### Features:

View File

@ -3,7 +3,7 @@
## Requirements ## Requirements
- Tabby plugin works with all IntelliJ Platform IDEs that have build 2022.2.5 or later versions, such as Idea, PyCharm, Android Studio, and more. - Tabby plugin works with all IntelliJ Platform IDEs that have build 2022.2.5 or later versions, such as Idea, PyCharm, Android Studio, and more.
- Tabby plugin requires [Node.js](https://nodejs.org) 16.0+ to be installed and added into the `PATH` environment variable. - Tabby plugin requires [Node.js](https://nodejs.org) 18.0+ to be installed and added into the `PATH` environment variable.
## Installation ## Installation
You can install Tabby plugin from the IntelliJ Platform [plugin marketplace](https://plugins.jetbrains.com/plugin/22379-tabby). You can install Tabby plugin from the IntelliJ Platform [plugin marketplace](https://plugins.jetbrains.com/plugin/22379-tabby).

View File

@ -6,7 +6,7 @@ plugins {
} }
group = "com.tabbyml" group = "com.tabbyml"
version = "0.4.0" version = "0.5.0"
repositories { repositories {
mavenCentral() mavenCentral()

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
package com.tabbyml.intellijtabby.actions package com.tabbyml.intellijtabby.actions
import com.intellij.ide.BrowserUtil
import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.AnActionEvent
@ -29,7 +30,10 @@ class CheckIssueDetail : AnAction() {
} }
val message = buildDetailMessage(detail, serverHealthState) val message = buildDetailMessage(detail, serverHealthState)
invokeLater { invokeLater {
Messages.showInfoMessage(message, title) val result = Messages.showOkCancelDialog(message, title, "Dismiss", "Supported Models", Messages.getInformationIcon())
if (result == Messages.CANCEL) {
BrowserUtil.browse("https://tabby.tabbyml.com/docs/models/")
}
} }
} }
} }
@ -62,7 +66,7 @@ class CheckIssueDetail : AnAction() {
""" """
Your Tabby server is running model $model on CPU. Your Tabby server is running model $model on CPU.
This model is too large to run on CPU, please try a smaller model or switch to GPU. This model is too large to run on CPU, please try a smaller model or switch to GPU.
You can find supported model list by search TabbyML on HuggingFace. You can find supported model list in online documents.
""" """
} else { } else {
"" ""
@ -78,7 +82,7 @@ class CheckIssueDetail : AnAction() {
helpMessage += " - Server overload. Please contact your Tabby server administrator for assistance.\n"; helpMessage += " - Server overload. Please contact your Tabby server administrator for assistance.\n";
if (helpMessageForRunningLargeModelOnCPU.isEmpty()) { if (helpMessageForRunningLargeModelOnCPU.isEmpty()) {
helpMessage += " - The running model $model is too large to run on your Tabby server. "; helpMessage += " - The running model $model is too large to run on your Tabby server. ";
helpMessage += "Please try a smaller model. You can find supported model list by search TabbyML on HuggingFace.\n"; helpMessage += "Please try a smaller model. You can find supported model list in online documents.\n";
} }
return statsMessages + helpMessage return statsMessages + helpMessage
} }

View File

@ -84,10 +84,10 @@ class Agent : ProcessAdapter() {
val process = GeneralCommandLine(node, "--version").createProcess() val process = GeneralCommandLine(node, "--version").createProcess()
val version = BufferedReader(InputStreamReader(process.inputStream)).readLine() val version = BufferedReader(InputStreamReader(process.inputStream)).readLine()
val regResult = Regex("v([0-9]+)\\.([0-9]+)\\.([0-9]+)").find(version) val regResult = Regex("v([0-9]+)\\.([0-9]+)\\.([0-9]+)").find(version)
if (regResult != null && regResult.groupValues[1].toInt() >= 16) { if (regResult != null && regResult.groupValues[1].toInt() >= 18) {
return return
} else { } else {
throw AgentException("Node version is too old: $version. Please install Node.js v16+ and add bin path to system environment variable PATH, then restart IDE.") throw AgentException("Node version is too old: $version. Please install Node.js v18+ and add bin path to system environment variable PATH, then restart IDE.")
} }
} catch (e: Exception) { } catch (e: Exception) {
if (e is AgentException) { if (e is AgentException) {
@ -186,15 +186,15 @@ class Agent : ProcessAdapter() {
} }
suspend fun requestAuthUrl(): AuthUrlResponse? { suspend fun requestAuthUrl(): AuthUrlResponse? {
return request("requestAuthUrl", listOf()) return request("requestAuthUrl", listOf(ABORT_SIGNAL_ENABLED))
} }
suspend fun waitForAuthToken(code: String) { suspend fun waitForAuthToken(code: String) {
return request("waitForAuthToken", listOf(code)) return request("waitForAuthToken", listOf(code, ABORT_SIGNAL_ENABLED))
} }
suspend fun provideCompletions(request: CompletionRequest): CompletionResponse? { suspend fun provideCompletions(request: CompletionRequest): CompletionResponse? {
return request("provideCompletions", listOf(request)) return request("provideCompletions", listOf(request, ABORT_SIGNAL_ENABLED))
} }
data class LogEventRequest( data class LogEventRequest(
@ -212,7 +212,7 @@ class Agent : ProcessAdapter() {
} }
suspend fun postEvent(event: LogEventRequest) { suspend fun postEvent(event: LogEventRequest) {
request<Any>("postEvent", listOf(event)) request<Any>("postEvent", listOf(event, ABORT_SIGNAL_ENABLED))
} }
data class AuthUrlResponse( data class AuthUrlResponse(
@ -331,4 +331,8 @@ class Agent : ProcessAdapter() {
} }
} }
} }
companion object {
private val ABORT_SIGNAL_ENABLED = mapOf("signal" to true)
}
} }

View File

@ -43,7 +43,7 @@ class AgentService : Disposable {
INITIALIZATION_FAILED, INITIALIZATION_FAILED,
} }
private var initResultFlow: MutableStateFlow<Boolean?> = MutableStateFlow(null) private var initResultFlow: MutableStateFlow<Boolean?> = MutableStateFlow(null)
val status get() = initResultFlow.combine(agent.status) { initResult, agentStatus -> val status = initResultFlow.combine(agent.status) { initResult, agentStatus ->
if (initResult == null) { if (initResult == null) {
Status.INITIALIZING Status.INITIALIZING
} else if (initResult) { } else if (initResult) {
@ -51,7 +51,7 @@ class AgentService : Disposable {
} else { } else {
Status.INITIALIZATION_FAILED Status.INITIALIZATION_FAILED
} }
}.stateIn(scope, SharingStarted.WhileSubscribed(), Status.INITIALIZING) }.stateIn(scope, SharingStarted.Eagerly, Status.INITIALIZING)
val currentIssue get() = agent.currentIssue val currentIssue get() = agent.currentIssue