in gui/frontend/src/components/ui/CodeEditor/CodeCompletionProvider.ts [78:300]
private createInternalCompletionItems(range: IRange, mode: CodeEditorMode): CompletionItem[] {
switch (mode) {
case CodeEditorMode.Terminal: {
return [
{
label: "\\about",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\about",
detail: "Shows some general information.",
},
{
label: "\\sql",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\sql",
detail: "Executes SQL statement or switches to SQL processing mode when no statement is given.",
},
{
label: "\\js",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\js",
detail: "Command to switch the session to JavaScript mode",
},
{
label: "\\py",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\py",
detail: "Command to switch the session to Python mode",
},
{
label: "\\?",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\?",
detail: "Prints help information about a specific topic",
},
{
label: "\\help",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\help",
detail: "Prints help information about a specific topic",
},
{
label: "\\h",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\h",
detail: "Prints help information about a specific topic",
},
{
label: "\\connect",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\connect",
detail: "Connects the shell to a MySQL server and assigns the global session.",
},
{
label: "\\c",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\c",
detail: "Connects the shell to a MySQL server and assigns the global session.",
},
{
label: "\\disconnect",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\disconnect",
detail: "Disconnects the current MySQL connection.",
},
{
label: "\\exit",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\exit",
detail: "Closes the session and the session tab, same as \\quit.",
},
{
label: "\\option",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\option",
detail: "Allows working with the available shell options.",
},
{
label: "\\quit",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\quit",
detail: "Closes the session and the session tab",
},
{
label: "\\q",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\q",
detail: "Closes the session and the session tab",
},
{
label: "\\reconnect",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\reconnect",
detail: "Reconnects the current MySQL connection",
},
{
label: "\\show",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\show",
detail: "Executes the given report with provided options and arguments",
},
{
label: "\\status",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\status",
detail: "Print information about the current session",
},
{
label: "\\s",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\s",
detail: "Print information about the current session",
},
{
label: "\\use",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\use",
detail: "Sets the active schema",
},
{
label: "\\u",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\u",
detail: "Sets the active schema",
},
];
}
default: {
return [
{
label: "\\about",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\about",
detail: "Shows some general information.",
},
{
label: "\\sql",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\sql",
detail: "Executes SQL statement or switches to SQL processing mode when no statement is given.",
},
{
label: "\\js",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\js",
detail: "Command to switch the session to JavaScript mode",
},
{
label: "\\ts",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\ts",
detail: "Command to switch the session to TypeScript mode",
},
{
label: "\\?",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\?",
detail: "Prints help information about a specific topic",
},
{
label: "\\help",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\help",
detail: "Prints help information about a specific topic",
},
{
label: "\\h",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\h",
detail: "Prints help information about a specific topic",
},
{
label: "\\reconnect",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\reconnect",
detail: "Reconnects the current MySQL connection.",
},
{
label: "\\chat",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\chat",
detail: "Switches to HeatWave Chat.",
},
{
label: "\\nl",
kind: languages.CompletionItemKind.Keyword,
range,
insertText: "\\nl",
detail: "Generates a SQL statement from a natural language query.",
},
];
}
}
}