diff --git a/clients/intellij/build.gradle.kts b/clients/intellij/build.gradle.kts index 1c0277612..a312f97bf 100644 --- a/clients/intellij/build.gradle.kts +++ b/clients/intellij/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "com.tabbyml" -version = "1.0.0" +version = "1.1.0-dev" repositories { mavenCentral() diff --git a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/settings/ApplicationSettingsPanel.kt b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/settings/ApplicationSettingsPanel.kt index 2827c8e31..7926e8d35 100644 --- a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/settings/ApplicationSettingsPanel.kt +++ b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/settings/ApplicationSettingsPanel.kt @@ -1,17 +1,34 @@ package com.tabbyml.intellijtabby.settings import com.intellij.ui.components.JBCheckBox +import com.intellij.ui.components.JBLabel import com.intellij.ui.components.JBRadioButton import com.intellij.ui.components.JBTextField import com.intellij.util.ui.FormBuilder +import com.intellij.util.ui.JBUI +import com.intellij.util.ui.UIUtil import javax.swing.ButtonGroup import javax.swing.JPanel +private fun FormBuilder.addCopyableTooltip(text: String): FormBuilder { + return this.addComponentToRightColumn( + JBLabel( + text, + UIUtil.ComponentStyle.SMALL, + UIUtil.FontColor.BRIGHTER + ).apply { + setBorder(JBUI.Borders.emptyLeft(10)) + setCopyable(true) + }, + 1, + ) +} + class ApplicationSettingsPanel { private val serverEndpointTextField = JBTextField() private val serverEndpointPanel = FormBuilder.createFormBuilder() .addComponent(serverEndpointTextField) - .addTooltip( + .addCopyableTooltip( """ A http or https URL of Tabby server endpoint.
@@ -25,7 +42,7 @@ class ApplicationSettingsPanel { private val nodeBinaryTextField = JBTextField() private val nodeBinaryPanel = FormBuilder.createFormBuilder() .addComponent(nodeBinaryTextField) - .addTooltip( + .addCopyableTooltip( """ Path to the Node binary for running the Tabby agent. The Node version must be >= 18.0.
@@ -43,12 +60,24 @@ class ApplicationSettingsPanel { } private val completionTriggerModePanel: JPanel = FormBuilder.createFormBuilder() .addComponent(completionTriggerModeAutomaticRadioButton) - .addTooltip("Trigger automatically when you stop typing") + .addCopyableTooltip("Trigger automatically when you stop typing") .addComponent(completionTriggerModeManualRadioButton) - .addTooltip("Trigger manually by pressing `Alt + \\`") + .addCopyableTooltip("Trigger manually by pressing `Alt + \\`") .panel - private val isAnonymousUsageTrackingDisabledCheckBox = JBCheckBox("Disable") + private val isAnonymousUsageTrackingDisabledCheckBox = JBCheckBox("Disable anonymous usage tracking") + private val isAnonymousUsageTrackingPanel: JPanel = FormBuilder.createFormBuilder() + .addComponent(isAnonymousUsageTrackingDisabledCheckBox) + .addCopyableTooltip( + """ + + Tabby collects aggregated anonymous usage data and sends it to the Tabby team to help improve our products.
+ Your code, generated completions, or any identifying information is never tracked or transmitted.
+ For more details on data collection, please check our online documentation.
+ + """ + ) + .panel val mainPanel: JPanel = FormBuilder.createFormBuilder() .addLabeledComponent("Server endpoint", serverEndpointPanel, 5, false) @@ -57,7 +86,7 @@ class ApplicationSettingsPanel { .addSeparator(5) .addLabeledComponent("Node binary
(Requires restart IDE)", nodeBinaryPanel, 5, false) .addSeparator(5) - .addLabeledComponent("Anonymous usage tracking", isAnonymousUsageTrackingDisabledCheckBox, 5, false) + .addLabeledComponent("Anonymous usage tracking", isAnonymousUsageTrackingPanel, 5, false) .addComponentFillVertically(JPanel(), 0) .panel diff --git a/clients/tabby-agent/src/AgentConfig.ts b/clients/tabby-agent/src/AgentConfig.ts index b0977047f..208c26abb 100644 --- a/clients/tabby-agent/src/AgentConfig.ts +++ b/clients/tabby-agent/src/AgentConfig.ts @@ -86,11 +86,12 @@ export const defaultAgentConfig: AgentConfig = { const configTomlTemplate = `## Tabby agent configuration file -## You can uncomment any block to enable settings. -## Configurations in this file has lower priority than in IDE settings. +## Online documentation: https://tabby.tabbyml.com/docs/extensions/configuration +## You can uncomment and edit the values below to change the default settings. +## Configurations in this file have lower priority than the IDE settings. ## Server -## You can set the server endpoint here, and auth token if server requires. +## You can set the server endpoint here and an optional authentication token if required. # [server] # endpoint = "http://localhost:8080" # http or https URL # token = "your-token-here" # if token is set, request header Authorization = "Bearer $token" will be added automatically @@ -98,7 +99,7 @@ const configTomlTemplate = `## Tabby agent configuration file ## You can add custom request headers. # [server.requestHeaders] # Header1 = "Value1" # list your custom headers here -# Header2 = "Value2" # value can be string, number or boolean +# Header2 = "Value2" # values can be strings, numbers or booleans ## Logs ## You can set the log level here. The log file is located at ~/.tabby-client/agent/logs/. @@ -106,7 +107,10 @@ const configTomlTemplate = `## Tabby agent configuration file # level = "silent" # "silent" or "error" or "debug" ## Anonymous usage tracking -## You can disable anonymous usage tracking here. +## Tabby collects anonymous usage data and sends it to the Tabby team to help improve our products. +## Your code, generated completions, or any sensitive information is never tracked or sent. +## For more details on data collection, see https://tabby.tabbyml.com/docs/extensions/configuration#usage-collection +## Your contribution is greatly appreciated. However, if you prefer not to participate, you can disable anonymous usage tracking here. # [anonymousUsageTracking] # disable = false # set to true to disable diff --git a/clients/vscode/package.json b/clients/vscode/package.json index 27ecc233b..d5277eb3e 100644 --- a/clients/vscode/package.json +++ b/clients/vscode/package.json @@ -147,7 +147,7 @@ "tabby.usage.anonymousUsageTracking": { "type": "boolean", "default": false, - "description": "Disable anonymous usage tracking." + "markdownDescription": "**Disable anonymous usage tracking** \nTabby collects aggregated anonymous usage data and sends it to the Tabby team to help improve our products. \nYour code, generated completions, or any identifying information is never tracked or transmitted. \nFor more details on data collection, please check our [online documentation](https://tabby.tabbyml.com/docs/extensions/configuration#usage-collection)." } } }, diff --git a/website/docs/extensions/configurations.md b/website/docs/extensions/configurations.md new file mode 100644 index 000000000..867900812 --- /dev/null +++ b/website/docs/extensions/configurations.md @@ -0,0 +1,66 @@ +--- +sidebar_position: 98 +--- + +# Configurations + +This document describes the available configurations for Tabby IDE extensions. + +## Config File + +The Tabby agent, which is the core component of Tabby IDE extensions, reads configurations from the `~/.tabby-client/agent/config.toml` file. This file is automatically created when you first run the Tabby IDE extensions. You can edit this file to modify the configurations. The Tabby IDE extensions will automatically reload the config file when it detects changes. + +:::tip +- Configurations set via the IDE settings page take precedence over the config file. If you want to use a configuration from the config file, make sure that the IDE setting is empty. +- If you are using the Tabby VSCode extension in a web browser, this config file is not available. You can use the VSCode settings page to configure the extension. +::: + +## Server + +The `server` section contains configurations related to the Tabby server. + +```toml +# Server +# You can set the server endpoint here and an optional authentication token if required. +[server] +endpoint = "http://localhost:8080" # http or https URL +token = "your-token-here" # if token is set, request header Authorization = "Bearer $token" will be added automatically + +# You can add custom request headers. +[server.requestHeaders] +Header1 = "Value1" # list your custom headers here +Header2 = "Value2" # values can be strings, numbers or booleans +``` + +## Logs + +If you encounter any issues with the Tabby IDE extensions and need to report a bug, you can enable debug logs to help us investigate the issue. + +```toml +# Logs +# You can set the log level here. The log file is located at ~/.tabby-client/agent/logs/. +[logs] +level = "silent" # "silent" or "error" or "debug" +``` + +## Usage Collection + +Tabby IDE extensions collect aggregated anonymous usage data and sends it to the Tabby team to help improve our products. + +**Do not worry, your code, generated completions, or any identifying information is never tracked or transmitted.** + +The data we collect, as of the latest update on November 6, 2023, contains following major parts: + +- System info and extension version info +- Completions statistics + - Completion count + - Completion accepted count + - Completion HTTP request latency + +We sincerely appreciate your contribution in sending anonymous usage data. However, if you prefer not to participate, you can disable anonymous usage tracking here: + +```toml +# Anonymous usage tracking +[anonymousUsageTracking] +disable = false # set to true to disable +``` diff --git a/website/docs/extensions/intellij.mdx b/website/docs/extensions/intellij.mdx index f85d9aadf..7c1988b99 100644 --- a/website/docs/extensions/intellij.mdx +++ b/website/docs/extensions/intellij.mdx @@ -4,7 +4,9 @@ sidebar_position: 1 # IntelliJ Platform -# + +IDEA, PyCharm, GoLand, Android Studio, and more + import IntelliJ from "../../../clients/intellij/README.md";