Skip to content

Commit

Permalink
fix(reload): command name
Browse files Browse the repository at this point in the history
  • Loading branch information
l1shen committed Dec 5, 2024
1 parent 2cde3a4 commit 809aa8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/commands/reload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { storage } from "../storage";
export class ReloadCommand {
static register() {
storage.getContext().subscriptions.push(
vscode.commands.registerCommand("flexpilot.reload", () => {
vscode.commands.registerCommand("oopilot.reload", () => {
InlineChatParticipant.reload();
PanelChatParticipant.reload();
events.fire({
Expand Down
4 changes: 2 additions & 2 deletions src/panel-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ class PanelChatParticipant {
private async provideWelcomeMessage(): Promise<vscode.ChatWelcomeMessageContent> {
return {
icon: new vscode.ThemeIcon("flexpilot-default"),
title: "Ask Flexpilot",
message: PanelChatPrompt.getWelcomeMessage("anonymous"),
title: "Ask OO-Pilot",
message: PanelChatPrompt.getWelcomeMessage(this.session.account.label),
};
}

Expand Down
12 changes: 3 additions & 9 deletions src/providers/mistral-ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,28 +124,22 @@ export class MistralAICompletionModelProvider extends ICompletionModelProvider {
* @returns {Promise<void>} A promise that resolves when the provider is initialized.
*/
async initialize(): Promise<void> {
this.tokenizer = await Tokenizers.get(this.config.model);
// this.tokenizer = await Tokenizers.get(this.config.model);
}

/**
* Encodes the given text into tokens.
* @param {string} text - The text to encode.
* @returns {Promise<number[]>} A promise that resolves to an array of token ids.
*/
readonly encode = async (text: string): Promise<number[]> => {
logger.debug(`Encoding text: ${text.substring(0, 50)}...`);
return this.tokenizer.encode(text, false);
};
readonly encode = undefined;

/**
* Decodes the given tokens into text.
* @param {number[]} tokens - The tokens to decode.
* @returns {Promise<string>} A promise that resolves to the decoded text.
*/
readonly decode = async (tokens: number[]): Promise<string> => {
logger.debug(`Decoding ${tokens.length} tokens`);
return this.tokenizer.decode(tokens, false);
};
readonly decode = undefined;

/**
* Invokes the Mistral AI completion model.
Expand Down

0 comments on commit 809aa8e

Please sign in to comment.