Added the ability to delete all conversation history at once #1351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
こちらのIssue #1333にあった過去の会話履歴をまとめて削除する機能を実装しました。
実装方針として、新規のLambda関数を作成せず既存のLambda関数を複数回実行する方式を採用しました。また、頻繁に使う機能ではなく誤操作も避けたいため、設定画面内のボタンとして実装しています。
Description of Changes
This PR adds a "Delete All Conversation History" feature to the Settings page, allowing users to delete all their chat history at once.
Changes include:
deleteAllChatsfunction inuseChatApi.tsthat paginates through all chats and deletes them using existing APIDialogConfirmDeleteAllChatscomponent to confirm the deletion action with usersuseChatList.tshook to support batch deletion with optimistic cache updatespackages/cdk/lambda/repository.tswhere message deletion failed when a chat had more than 25 messages (DynamoDB BatchWrite limit)Impact on existing users:
Checklist
npm run cdk:testand if there are snapshot differences, executenpm run cdk:test:update-snapshotto update snapshotsRelated Issues