Skip to content

Commit

Permalink
Refactor chat history methods for better access control
Browse files Browse the repository at this point in the history
Make 'addChat' and 'saveChatHistory' methods public for easier
accessibility and maintenance.

Generated by gpt-3.5-turbo
  • Loading branch information
joone committed Mar 16, 2024
1 parent 1bce0cb commit 96fe29d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/history/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export class ChatHistoryManager {
};
}

addChat(chat: PromptAndAnswer) {
public addChat(chat: PromptAndAnswer): void {
this.chatHistory.dialogue.push(chat);
}

// Save chat history (JSON) to file.
async saveChatHistory() {
public async saveChatHistory(): Promise<void> {
const date = new Date();

const fileName =
Expand Down

0 comments on commit 96fe29d

Please sign in to comment.