Skip to content

Commit a127e03

Browse files
Fix issues with the deepseek feature
1 parent 77e8f41 commit a127e03

File tree

10 files changed

+325
-238
lines changed

10 files changed

+325
-238
lines changed

package-lock.json

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
"Deepseek"
178178
],
179179
"default": "Groq",
180-
"description": "Select the Generative AI to use with code buddy"
180+
"description": "Select Model"
181181
},
182182
"google.gemini.apiKeys": {
183183
"type": [

src/application/constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ export const generateQuerySting = (query: string) =>
139139
export enum WEB_SEARCH_CONFIG {
140140
baseUrl = "https://www.startpage.com/sp/search?",
141141
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
142-
}
142+
}

src/extension.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,49 +109,49 @@ export async function activate(context: vscode.ExtensionContext) {
109109
} = OLA_ACTIONS;
110110
const getComment = new Comments(
111111
`${USER_MESSAGE} generates the code comments...`,
112-
context,
112+
context
113113
);
114114
const getInLineChat = new InLineChat(
115115
`${USER_MESSAGE} generates a response...`,
116-
context,
116+
context
117117
);
118118
const generateOptimizeCode = new OptimizeCode(
119119
`${USER_MESSAGE} optimizes the code...`,
120-
context,
120+
context
121121
);
122122
const generateRefactoredCode = new RefactorCode(
123123
`${USER_MESSAGE} refactors the code...`,
124-
context,
124+
context
125125
);
126126
const explainCode = new ExplainCode(
127127
`${USER_MESSAGE} explains the code...`,
128-
context,
128+
context
129129
);
130130
const generateReview = new ReviewCode(
131131
`${USER_MESSAGE} reviews the code...`,
132-
context,
132+
context
133133
);
134134
const codeChartGenerator = new CodeChartGenerator(
135135
`${USER_MESSAGE} creates the code chart...`,
136-
context,
136+
context
137137
);
138138
const codePattern = fileUpload;
139139
const knowledgeBase = new ReadFromKnowledgeBase(
140140
`${USER_MESSAGE} generate your code pattern...`,
141-
context,
141+
context
142142
);
143143
const generateCommitMessage = new GenerateCommitMessage(
144144
`${USER_MESSAGE} generates a commit message...`,
145-
context,
145+
context
146146
);
147147
const generateInterviewQuestions = new InterviewMe(
148148
`${USER_MESSAGE} generates interview questions...`,
149-
context,
149+
context
150150
);
151151

152152
const generateUnitTests = new GenerateUnitTest(
153153
`${USER_MESSAGE} generates unit tests...`,
154-
context,
154+
context
155155
);
156156

157157
const actionMap = {
@@ -165,7 +165,7 @@ export async function activate(context: vscode.ExtensionContext) {
165165
new FixError(
166166
`${USER_MESSAGE} finds a solution to the error...`,
167167
context,
168-
errorMessage,
168+
errorMessage
169169
).execute(errorMessage),
170170
[explain]: async () => await explainCode.execute(),
171171
[pattern]: async () => await codePattern.uploadFileHandler(),
@@ -177,15 +177,15 @@ export async function activate(context: vscode.ExtensionContext) {
177177
};
178178

179179
const subscriptions: vscode.Disposable[] = Object.entries(actionMap).map(
180-
([action, handler]) => vscode.commands.registerCommand(action, handler),
180+
([action, handler]) => vscode.commands.registerCommand(action, handler)
181181
);
182182

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

185185
const quickFix = new CodeActionsProvider();
186186
quickFixCodeAction = vscode.languages.registerCodeActionsProvider(
187187
{ scheme: "file", language: "*" },
188-
quickFix,
188+
quickFix
189189
);
190190

191191
agentEventEmmitter = new EventEmitter();
@@ -233,13 +233,13 @@ export async function activate(context: vscode.ExtensionContext) {
233233
webviewProviderClass,
234234
subscriptions,
235235
quickFixCodeAction,
236-
agentEventEmmitter,
236+
agentEventEmmitter
237237
);
238238
}
239239
} catch (error) {
240240
Memory.clear();
241241
vscode.window.showErrorMessage(
242-
"An Error occured while setting up generative AI model",
242+
"An Error occured while setting up generative AI model"
243243
);
244244
console.log(error);
245245
}
@@ -249,4 +249,4 @@ export function deactivate(context: vscode.ExtensionContext) {
249249
quickFixCodeAction.dispose();
250250
agentEventEmmitter.dispose();
251251
context.subscriptions.forEach((subscription) => subscription.dispose());
252-
}
252+
}

src/llms/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { IBaseLLM, ILlmConfig } from "./interface";
66
export abstract class BaseLLM<T extends Record<string, any>>
77
implements IBaseLLM
88
{
9-
protected readonly logger: Logger;
9+
protected logger: Logger;
1010
constructor(protected config: ILlmConfig) {
1111
this.logger = new Logger("BaseLLM");
1212
this.validateConfig();

0 commit comments

Comments
 (0)