This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
forked from ChatGPTNextWeb/NextChat
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Local Storage Helper (#266)
* Feat [Utility] [Storage Helper] "clearUnfinishedInputForSession" - [+] feat(storageHelper.ts): add utility function to clear unfinished input for a session * Feat [UI/UX] [Front End] [Chat List] "clearUnfinishedInputForSession" - [+] feat(chat-list.tsx): add clearUnfinishedInputForSession functionality on session deletion
- Loading branch information
1 parent
b33d507
commit fe2f09e
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// easy maintain unlike stupid complexity | ||
import { UNFINISHED_INPUT } from "../constant"; | ||
|
||
// Function to clear unfinished input from local storage for a given session ID | ||
export const clearUnfinishedInputForSession = (sessionId: string) => { | ||
const key = UNFINISHED_INPUT(sessionId); | ||
localStorage.removeItem(key); | ||
}; |