Skip to content
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
57 changes: 24 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Alita Code
# ELITEA Code


Introducing Alita Code for VSCode, the ultimate AI-powered IDE extension that revolutionizes the way you develop, test, and maintain your code. Alita Code harnesses the power of generative AI to provide intelligent suggestions, streamline code implementation, and automate essential tasks, elevating your coding experience to new heights. With customizable internal and external prompts, Alita Code offers an unparalleled level of adaptability, catering to your unique project needs and preferences.
Introducing ELITEA Code for VSCode, the ultimate AI-powered IDE extension that revolutionizes the way you develop, test, and maintain your code. ELITEA Code harnesses the power of generative AI to provide intelligent suggestions, streamline code implementation, and automate essential tasks, elevating your coding experience to new heights. With customizable internal and external prompts, ELITEA Code offers an unparalleled level of adaptability, catering to your unique project needs and preferences.

# Why Alita Code?
# Why ELITEA Code?

## Boost productivity with AI-powered suggestions

Alita Code intelligently analyzes your code and provides real-time suggestions for implementing features, enhancing code readability, and optimizing performance. Save time and effort while crafting high-quality code.
ELITEA Code intelligently analyzes your code and provides real-time suggestions for implementing features, enhancing code readability, and optimizing performance. Save time and effort while crafting high-quality code.

## Automate testing and documentation

Generate unit-tests, integration tests, and automated tests with ease, ensuring your code is robust and reliable. Alita Code also automatically adds comments to your code, making it more understandable and maintainable for your team.
Generate unit-tests, integration tests, and automated tests with ease, ensuring your code is robust and reliable. ELITEA Code also automatically adds comments to your code, making it more understandable and maintainable for your team.

## Customizable prompts for personalized assistance

Tailor Alita Code to your specific needs with customizable internal and external prompts. Create and modify prompts within your IDE, or leverage the power of Alita Backend's large language model for external prompts, offering an unparalleled level of adaptability.
Tailor ELITEA Code to your specific needs with customizable internal and external prompts. Create and modify prompts within your IDE, or leverage the power of ELITEA Backend's large language model for external prompts, offering an unparalleled level of adaptability.


# Features list:
Expand All @@ -26,7 +26,7 @@ Tailor Alita Code to your specific needs with customizable internal and external
- Automated test creation
- Automatic code commenting
- Customizable internal prompts
- Project-specific external prompts powered by Alita Backend
- Project-specific external prompts powered by ELITEA Backend
- Code explanation and optimization recommendations
- Native IDE integration
- Regular updates and improvements
Expand All @@ -35,36 +35,27 @@ Tailor Alita Code to your specific needs with customizable internal and external
- Secure and privacy-conscious implementation

# Extension Commands
- Alita: Init - Initialize Alita Code and create .promptLib folder in a root of your open workspace
- Alita: Create Prompt - Create a new prompt in .promptLib folder
- Alita: Extend Context - Extend context of the prompt in .promptLib folder
- Alita: Predict - Provide a list of prompts to choose from and generate prediction based on the selected prompt and **its last version**
- Alita: Similarity - Provide list of embedding to run similarity search against
- Alita: Sync External Prompts - Sync external prompts from Alita Backend


# Supported LLM providers
- Alita - https://projectalita.ai
- EPAM Dial - https://epam-rail.com
- OpenAI - https://openai.com
- Azure Open AI - https://azure.microsoft.com/en-us/products/ai-services/openai-service

- Elitea: Init - Initialize ELITEA Code and create .promptLib folder in a root of your open workspace
- Elitea: Create Prompt - Create a new prompt in .promptLib folder
- Elitea: Extend Context - Extend context of the prompt in .promptLib folder
- Elitea: Predict - Provide a list of prompts to choose from and generate prediction based on the selected prompt and **its last version**
- Elitea: Sync External Prompts - Sync external prompts from ELITEA Backend

# Extension Settings

This extension contributes the following settings:
- alitacode.enable: enable/disable this extension
- alitacode.serviceProviderForLLM: select the LLM provider (Alita, OpenAI, Azure Open AI)
- alitacode.LLMAuthToken: API key for the selected LLM provider
- alitacode.LLMServerUrl: URL of the LLM provider server
- alitacode.apiVersion: Api version, mostly applicable for Azure OpenAI compatible APIs
- alitacode.LLMModelName: Default model name used for local prompts (Can be overwritten in prompt)
- alitacode.projectId (optional): Project ID for external prompts (ignored for any OpenAI)
- alitacode.integrationUid (optional): Integration UID for external prompts (ignored for any OpenAI)
- alitacode.temperature: Default temperature for model (Can be overwritten in prompt)
- alitacode.maxTokens: Default max tokens for model (Can be overwritten in prompt)
- alitacode.topP: Default top P for model (Can be overwritten in prompt)
- alitacode.topK: Default top K for model (Can be overwritten in prompt)
- eliteacode.enable: enable/disable this extension
- eliteacode.serviceProviderForLLM: select the LLM provider (ELITEA)
- eliteacode.LLMAuthToken: API key for the selected LLM provider
- eliteacode.LLMServerUrl: URL of the LLM provider server
- eliteacode.apiVersion: Api version, mostly applicable for Azure OpenAI compatible APIs
- eliteacode.LLMModelName: Default model name used for local prompts (Can be overwritten in prompt)
- eliteacode.projectId (optional): Project ID for external prompts (ignored for any OpenAI)
- eliteacode.integrationUid (optional): Integration UID for external prompts (ignored for any OpenAI)
- eliteacode.temperature: Default temperature for model (Can be overwritten in prompt)
- eliteacode.maxTokens: Default max tokens for model (Can be overwritten in prompt)
- eliteacode.topP: Default top P for model (Can be overwritten in prompt)
- eliteacode.topK: Default top K for model (Can be overwritten in prompt)


# Development
Expand Down
12 changes: 6 additions & 6 deletions commands/getAvailableAIModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ module.exports = async function () {
if (selectedModel) {
const configuration = vscode.workspace.getConfiguration();
const { label: modelName, description: groupName } = selectedModel;
await configuration.update("alitacode.LLMModelName", modelName, vscode.ConfigurationTarget.Workspace);
await configuration.update("alitacode.LLMModelName", modelName, vscode.ConfigurationTarget.Global);
await configuration.update("eliteacode.LLMModelName", modelName, vscode.ConfigurationTarget.Workspace);
await configuration.update("eliteacode.LLMModelName", modelName, vscode.ConfigurationTarget.Global);
const integrationName = await alitaService.getAIModelIntegrationName(groupName, true);
await configuration.update(
"alitacode.integrationName",
"eliteacode.integrationName",
integrationName.toString(),
vscode.ConfigurationTarget.Workspace
);
await configuration.update(
"alitacode.integrationName",
"eliteacode.integrationName",
integrationName.toString(),
vscode.ConfigurationTarget.Global
);
const uid = await alitaService.getAIModelUid(groupName, true);
await configuration.update("alitacode.integrationUid", uid.toString(), vscode.ConfigurationTarget.Workspace);
await configuration.update("alitacode.integrationUid", uid.toString(), vscode.ConfigurationTarget.Global);
await configuration.update("eliteacode.integrationUid", uid.toString(), vscode.ConfigurationTarget.Workspace);
await configuration.update("eliteacode.integrationUid", uid.toString(), vscode.ConfigurationTarget.Global);
vscode.window.showInformationMessage(`You selected: ${modelName} [${groupName}]`);
} else {
vscode.window.showInformationMessage("Operation cancelled.");
Expand Down
2 changes: 1 addition & 1 deletion commands/initAlita.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ module.exports = async function () {
}
fs.writeFileSync(path.join(workspacePath, promptLib, "./prompts.json"), JSON.stringify(prompts, null, 2));
}
await vscode.commands.executeCommand("setContext", "alita.init", true);
await vscode.commands.executeCommand("setContext", "eliteacode.init", true);
return await onConfigChange();
};
8 changes: 4 additions & 4 deletions commands/onConfigChange.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ module.exports = async function () {
const { promptLib, workspacePath, LLMProvider, verifySsl, LLMauthToken } = workspaceService.getWorkspaceConfig();
verifyToken(parseJwt(LLMauthToken));
https.globalAgent.options.rejectUnauthorized = verifySsl;
await vscode.commands.executeCommand("setContext", "alitacode.LLMProvider", LLMProvider);
await vscode.commands.executeCommand("setContext", "eliteacode.LLMProvider", LLMProvider);
await vscode.commands.executeCommand(
"setContext",
"alitacode.LocalPrompts",
"eliteacode.LocalPrompts",
!LOCAL_PROMPTS_BLOCKERS.includes(LLMProvider)
);
alitaService.serviceProvider = undefined;
if (promptLib && fs.existsSync(path.join(workspacePath, promptLib, "./prompts.json"))) {
await vscode.commands.executeCommand("setContext", "alita.init", true);
await vscode.commands.executeCommand("setContext", "eliteacode.init", true);
return await workspaceService.updatePrompts();
} else {
return await vscode.commands.executeCommand("setContext", "alita.init", false);
return await vscode.commands.executeCommand("setContext", "eliteacode.init", false);
}
};
3 changes: 1 addition & 2 deletions commands/predict.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
const promptsList = await workspaceService.updatePrompts();
// renderring list
const entities = [...promptsList]
.filter((it) => !it.external)
.map((prompt) => ({
label: prompt.label.replace(/(_prompt|_datasource)$/, ""),
description: prompt.description,
Expand All @@ -59,7 +58,7 @@
vscode.window.withProgress(
{
location: vscode.ProgressLocation.Window,
title: "Alita prediction...",
title: "Elitea prediction...",
cancellable: false,
},
(progress) => {
Expand Down Expand Up @@ -97,7 +96,7 @@
progress.report({ increment: 5 });
resolve();
})
.catch((ex) => {

Check warning on line 99 in commands/predict.js

View workflow job for this annotation

GitHub Actions / test

'ex' is defined but never used
vscode.window.showErrorMessage(
`Alita is not able to connected to ${alitaService.serviceProvider.getPromptsUrl}`
);
Expand Down
22 changes: 11 additions & 11 deletions constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
},
WORKSPACE: {
EXTENSION: {
NAME: "alitacode",
NAME: "eliteacode",
PARAM: {
ENABLE: "enable",
PROMPT_LIB: "promptLib",
Expand All @@ -55,18 +55,18 @@ module.exports = {
},
},
COMMAND: {
INIT_ALITA: "alitacode.initAlita",
SYNC_PROMPTS: "alitacode.syncPrompts",
ADD_EXAMPLE: "alitacode.addExample",
ADD_CONTEXT: "alitacode.addContext",
CREATE_PROMPT: "alitacode.createPrompt",
PREDICT: "alitacode.predict",
INIT_ALITA: "eliteacode.initAlita",
SYNC_PROMPTS: "eliteacode.syncPrompts",
ADD_EXAMPLE: "eliteacode.addExample",
ADD_CONTEXT: "eliteacode.addContext",
CREATE_PROMPT: "eliteacode.createPrompt",
PREDICT: "eliteacode.predict",
OPEN_SETTINGS: "workbench.action.openSettings",
ADD_GOOD_PREDICTION: "alitacode.addGoodPrediction",
GET_AVAILABLE_AI_MODELS: "alitacode.getAvailableAIModels",
ADD_GOOD_PREDICTION: "eliteacode.addGoodPrediction",
GET_AVAILABLE_AI_MODELS: "eliteacode.getAvailableAIModels",
},
TEXT: {
ALITA_ACTIVATED: "Alita was activated! Please specify configuration",
ALITA_ACTIVATED: "Elitea was activated! Please specify configuration",
ENTER_PROMPT_NAME: "Enter prompt name",
ENTER_PROMPT_DESCRIPTION: "Enter prompt description",
ENTER_PROMPT_CONTEXT: "Enter context",
Expand All @@ -77,6 +77,6 @@ module.exports = {
MESSAGE: {
CONTEXT_WAS_ADDED: (label) => `Context was added to ${label} prompt!`,
},
EXTERNAL_PROMPTS_PROVIDERS: ["Alita", "DigitalPlatform"],
EXTERNAL_PROMPTS_PROVIDERS: ["ELITEA", "DigitalPlatform"],
LOCAL_PROMPTS_BLOCKERS: ["DigitalPlatform"],
};
3 changes: 1 addition & 2 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const { COMMAND, EXTERNAL_PROMPTS_PROVIDERS } = require("./constants/index");
const {
addContext,
addExample,
createPrompt,
predict,
addGoodPrediction,
initAlita,
Expand All @@ -30,7 +29,7 @@ import { CreatePromptPanel } from "./panels/CreatePromptPanel";
const OutputService = require("./services/output.service");

async function activate(context) {
await vscode.commands.executeCommand("setContext", "alitacode.ExtentablePlatforms", EXTERNAL_PROMPTS_PROVIDERS);
await vscode.commands.executeCommand("setContext", "eliteacode.ExtentablePlatforms", EXTERNAL_PROMPTS_PROVIDERS);
try {
await onConfigChange();
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading