Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV2-4430 fix command not found #1398

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
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
11 changes: 11 additions & 0 deletions src/enterprise/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ import {
SELF_HOSTED_IGNORE_PROXY_CONFIGURATION,
SELF_HOSTED_SERVER_CONFIGURATION,
TABNINE_HOST_CONFIGURATION,
EXTENSION_ID,
OPEN_SETTINGS_COMMAND,
} from "./consts";
import TabnineAuthenticationProvider from "../authentication/TabnineAuthenticationProvider";
import {
BRAND_NAME,
CONFIG_COMMAND,
ENTERPRISE_BRAND_NAME,
IS_SELF_HOSTED_CONTEXT_KEY,
} from "../globals/consts";
Expand Down Expand Up @@ -62,6 +65,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
2 changes: 2 additions & 0 deletions src/globals/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,5 @@ 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
Loading