Skip to content

Conversation

@lastshogun13
Copy link
Contributor

こちらの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:

  • Added deleteAllChats function in useChatApi.ts that paginates through all chats and deletes them using existing API
  • Created new DialogConfirmDeleteAllChats component to confirm the deletion action with users
  • Updated useChatList.ts hook to support batch deletion with optimistic cache updates
  • Fixed a bug in packages/cdk/lambda/repository.ts where message deletion failed when a chat had more than 25 messages (DynamoDB BatchWrite limit)
  • Added "Delete All Conversation History" button in Settings page
  • Added internationalization support for 6 languages (en, ja, ko, th, vi, zh)

Impact on existing users:

  • No breaking changes
  • New optional feature accessible from Settings page
  • Requires user confirmation before deletion to prevent accidental data loss

Checklist

  • Modified relevant documentation
  • Verified operation in local environment
  • Executed npm run cdk:test and if there are snapshot differences, execute npm run cdk:test:update-snapshot to update snapshots

Related Issues

})
);
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change! Thanks!

Copy link
Contributor

@tbrand tbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tbrand tbrand merged commit 0db8ab7 into aws-samples:main Nov 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants