feat(clients): add information about anonymous data tracking. (#704)

* feat(clients): add information about anonymous data tracking.

* fix: update docs for anonymous usage data.

* Update website/docs/extensions/configurations.md

Co-authored-by: Meng Zhang <meng@tabbyml.com>

* Update website/docs/extensions/configurations.md

Co-authored-by: Meng Zhang <meng@tabbyml.com>

---------

Co-authored-by: Meng Zhang <meng@tabbyml.com>
This commit is contained in:
Zhiming Ma 2023-11-06 14:59:28 +08:00 committed by GitHub
parent 039b8bf3df
commit 424626cf5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 115 additions and 14 deletions

View File

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

View File

@ -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(
"""
<html>
A http or https URL of Tabby server endpoint.<br/>
@ -25,7 +42,7 @@ class ApplicationSettingsPanel {
private val nodeBinaryTextField = JBTextField()
private val nodeBinaryPanel = FormBuilder.createFormBuilder()
.addComponent(nodeBinaryTextField)
.addTooltip(
.addCopyableTooltip(
"""
<html>
Path to the Node binary for running the Tabby agent. The Node version must be >= 18.0.<br/>
@ -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(
"""
<html>
Tabby collects aggregated anonymous usage data and sends it to the Tabby team to help improve our products.<br/>
Your code, generated completions, or any identifying information is never tracked or transmitted.<br/>
For more details on data collection, please check our <a href="https://tabby.tabbyml.com/docs/extensions/configuration#usage-collection">online documentation</a>.<br/>
</html>
"""
)
.panel
val mainPanel: JPanel = FormBuilder.createFormBuilder()
.addLabeledComponent("Server endpoint", serverEndpointPanel, 5, false)
@ -57,7 +86,7 @@ class ApplicationSettingsPanel {
.addSeparator(5)
.addLabeledComponent("<html>Node binary<br/>(Requires restart IDE)</html>", nodeBinaryPanel, 5, false)
.addSeparator(5)
.addLabeledComponent("Anonymous usage tracking", isAnonymousUsageTrackingDisabledCheckBox, 5, false)
.addLabeledComponent("Anonymous usage tracking", isAnonymousUsageTrackingPanel, 5, false)
.addComponentFillVertically(JPanel(), 0)
.panel

View File

@ -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

View File

@ -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)."
}
}
},

View File

@ -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
```

View File

@ -4,7 +4,9 @@ sidebar_position: 1
# IntelliJ Platform
#
IDEA, PyCharm, GoLand, Android Studio, and more
import IntelliJ from "../../../clients/intellij/README.md";
<IntelliJ />