Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Olasunkanmi Oyinlola authored and Olasunkanmi Oyinlola committed Aug 20, 2024
1 parent 28366d4 commit d6fbbe9
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,41 +41,41 @@ export async function activate(context: vscode.ExtensionContext) {
} = OLA_ACTIONS;
const getComment = new Comments(
`${USER_MESSAGE} generates the code comments...`,
context
context,
);
const generateOptimizeCode = new OptimizeCode(
`${USER_MESSAGE} optimizes the code...`,
context
context,
);
const generateRefactoredCode = new RefactorCode(
`${USER_MESSAGE} refactors the code...`,
context
context,
);
const explainCode = new ExplainCode(
`${USER_MESSAGE} explains the code...`,
context
context,
);
const generateReview = new ReviewCode(
`${USER_MESSAGE} reviews the code...`,
context
context,
);
const codePattern = new PatternUploader(context);
const knowledgeBase = new ReadFromKnowledgeBase(
`${USER_MESSAGE} generate your code pattern...`,
context
context,
);
const generateCommitMessage = new GenerateCommitMessage(
`${USER_MESSAGE} generates a commit message...`,
context
context,
);
const generateInterviewQuestions = new InterviewMe(
`${USER_MESSAGE} generates interview questions...`,
context
context,
);

const generateUnitTests = new GenerateUnitTest(
`${USER_MESSAGE} generates unit tests...`,
context
context,
);

const actionMap = {
Expand All @@ -89,7 +89,7 @@ export async function activate(context: vscode.ExtensionContext) {
new FixError(
`${USER_MESSAGE} finds a solution to the error...`,
context,
errorMessage
errorMessage,
).execute(errorMessage),
[explain]: () => explainCode.execute(),
[pattern]: () => codePattern.uploadPatternHandler(),
Expand All @@ -98,15 +98,15 @@ export async function activate(context: vscode.ExtensionContext) {
};

const subscriptions = Object.entries(actionMap).map(([action, handler]) =>
vscode.commands.registerCommand(action, handler)
vscode.commands.registerCommand(action, handler),
);

const selectedGenerativeAiModel = getConfigValue("generativeAi.option");

const quickFix = new CodeActionsProvider();
const quickFixCodeAction = vscode.languages.registerCodeActionsProvider(
{ scheme: "file", language: "*" },
quickFix
quickFix,
);

// Todo: move each generative Ai view providers to different files
Expand All @@ -117,13 +117,13 @@ export async function activate(context: vscode.ExtensionContext) {
context.extensionUri,
key,
model,
context
context,
);

const registerGeminiWebViewProvider =
vscode.window.registerWebviewViewProvider(
GeminiWebViewProvider.viewId,
geminiWebViewProvider
geminiWebViewProvider,
);

const chatManager = new ChatManager(context);
Expand All @@ -133,7 +133,7 @@ export async function activate(context: vscode.ExtensionContext) {
...subscriptions,
quickFixCodeAction,
registerGeminiWebViewProvider,
chatWithOla
chatWithOla,
);
}

Expand All @@ -144,12 +144,12 @@ export async function activate(context: vscode.ExtensionContext) {
context.extensionUri,
key,
model,
context
context,
);
const registerGroqWebViewProvider =
vscode.window.registerWebviewViewProvider(
GroqWebViewProvider.viewId,
groqWebViewProvider
groqWebViewProvider,
);

const chatManager = new ChatManager(context);
Expand All @@ -159,7 +159,7 @@ export async function activate(context: vscode.ExtensionContext) {
...subscriptions,
quickFixCodeAction,
registerGroqWebViewProvider,
chatWithOla
chatWithOla,
);
}
} catch (error) {
Expand Down

0 comments on commit d6fbbe9

Please sign in to comment.