forked from React-Group/interstellar_ai
Compare commits
2 commits
953ec7d061
...
939cdd4497
Author | SHA1 | Date | |
---|---|---|---|
939cdd4497 | |||
c3580ce784 |
1 changed files with 0 additions and 28 deletions
|
@ -1,28 +0,0 @@
|
||||||
|
|
||||||
// type Message = {
|
|
||||||
// role: string;
|
|
||||||
// content:string
|
|
||||||
// }
|
|
||||||
|
|
||||||
// type Chat = {
|
|
||||||
// name: string;
|
|
||||||
// messages: Message[];
|
|
||||||
// timestamp: number;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// export function addMessageToHistory(index: number, chat: Chat): void {
|
|
||||||
// if (index >= 0 && index < chatHistory.length) {
|
|
||||||
// chatHistory[index] = chat;
|
|
||||||
// chatHistory.sort((a, b) => b.timestamp - a.timestamp)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// export function removeMessageFromHistory(timestamp: number): void {
|
|
||||||
// const index = chatHistory.findIndex((msg) => msg.timestamp === timestamp);
|
|
||||||
// if (index > -1) {
|
|
||||||
// chatHistory.splice(index, 1);
|
|
||||||
// console.log(`Removed message with timestamp: ${timestamp}`);
|
|
||||||
// } else {
|
|
||||||
// console.log(`Message not found with timestamp: ${timestamp}`);
|
|
||||||
// }
|
|
||||||
// }
|
|
Loading…
Reference in a new issue