Skip to content

Commit

Permalink
Merge branch 'master' into DEV2-4433
Browse files Browse the repository at this point in the history
  • Loading branch information
dimacodota committed Dec 5, 2023
2 parents 2a7536a + 4d58507 commit 914d5f1
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"publisher": "TabNine",
"name": "tabnine-vscode",
"version": "3.45.0",
"version": "3.46.0",
"displayName": "Tabnine: AI Autocomplete & Chat for Javascript, Python, Typescript, PHP, Go, Java & more",
"description": "AI coding assistant with AI code completions and AI code chat right in the IDE, helping developers by generating code, writing unit tests and documentation, explaining legacy code, and much more. Tabnine supports all major languages including JavaScript, Python, Java, Typescript c/c++ and more.",
"icon": "small_logo.png",
Expand Down Expand Up @@ -365,6 +365,10 @@
{
"command": "TabNine::assistantToggle",
"when": "tabnine-assistant:capability"
},
{
"command": "TabNine::configExternal",
"when": "!tabnine.enterprise"
}
],
"comments/commentThread/title": [
Expand Down
7 changes: 5 additions & 2 deletions src/commandsHandler.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { commands, ExtensionContext } from "vscode";
import SignInUsingCustomTokenCommand from "./authentication/loginWithCustomTokenCommand";
import { Capability, isCapabilityEnabled } from "./capabilities/capabilities";
import { StateType, STATUS_BAR_FIRST_TIME_CLICKED } from "./globals/consts";
import {
StateType,
STATUS_BAR_FIRST_TIME_CLICKED,
CONFIG_COMMAND,
} from "./globals/consts";
import openHub, { openHubExternal } from "./hub/openHub";
import { showStatusBarNotificationOptions } from "./statusBar/statusBarNotificationOptions";

const CONFIG_COMMAND = "TabNine::config";
const CONFIG_EXTERNAL_COMMAND = "TabNine::configExternal";
export const STATUS_BAR_COMMAND = "TabNine.statusBar";
export const SIGN_IN_AUTH_TOKEN_COMMAND = "tabnine.signInUsingAuthToken";
Expand Down
17 changes: 16 additions & 1 deletion src/enterprise/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ import {
SELF_HOSTED_IGNORE_PROXY_CONFIGURATION,
SELF_HOSTED_SERVER_CONFIGURATION,
TABNINE_HOST_CONFIGURATION,
EXTENSION_ID,
OPEN_SETTINGS_COMMAND,
TABNINE_ENTERPISE_CONTEXT_KEY,
} from "./consts";
import TabnineAuthenticationProvider from "../authentication/TabnineAuthenticationProvider";
import { BRAND_NAME, ENTERPRISE_BRAND_NAME } from "../globals/consts";
import {
BRAND_NAME,
CONFIG_COMMAND,
ENTERPRISE_BRAND_NAME,
IS_SELF_HOSTED_CONTEXT_KEY,
} from "../globals/consts";
import { StatusBar } from "./statusBar";
import { isHealthyServer } from "./update/isHealthyServer";
import confirm from "./update/confirm";
Expand All @@ -59,6 +66,14 @@ export async function activate(
context.subscriptions.push(new WorkspaceUpdater());
context.subscriptions.push(BINARY_STATE);
context.subscriptions.push(activeTextEditorState);
context.subscriptions.push(
commands.registerCommand(CONFIG_COMMAND, () => {
void commands.executeCommand(
OPEN_SETTINGS_COMMAND,
`@ext:${EXTENSION_ID}`
);
})
);

initReporter(new LogReporter());
const statusBar = new StatusBar(context);
Expand Down
3 changes: 3 additions & 0 deletions src/globals/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,6 @@ export enum SuggestionTrigger {
}

export const TLS_CONFIG_MIN_SUPPORTED_VERSION = "4.22.0";
export const IS_SELF_HOSTED_CONTEXT_KEY = "tabnine.isSelfHosted";
export const CONFIG_COMMAND = "TabNine::config";
export const EXTENSION_ID = "TabNine.tabnine-vscode";
2 changes: 1 addition & 1 deletion src/globals/proposedAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import * as path from "path";
import * as os from "os";
import showMessage from "../preRelease/messages";
import { Logger } from "../utils/logger";
import { EXTENSION_ID } from "./consts";

const EXTENSION_ID = "TabNine.tabnine-vscode";
const ARGV_FILE_NAME = "argv.json";
const PRODUCT_FILE_NAME = "product.json";
const PRODUCT_FILE_PATH = path.join(vscode.env.appRoot, PRODUCT_FILE_NAME);
Expand Down

0 comments on commit 914d5f1

Please sign in to comment.