diff --git a/lib/views/chat_page.dart b/lib/views/chat_page.dart index 42d614e..53d9951 100644 --- a/lib/views/chat_page.dart +++ b/lib/views/chat_page.dart @@ -400,8 +400,7 @@ class _ChatViewState extends State { children: [ TextButton.icon( icon: const Icon(Icons.refresh, size: 16), - label: Text( - AppLocalizations.of(context)!.regenerate), + label: const Text("重新生成"), onPressed: () async { final lastMessage = _records.last.request; setState(() { @@ -500,7 +499,6 @@ class _ChatViewState extends State { AppLocalizations.of(context)! .copied_to_clipboard))); }), - const Spacer(), IconButton( onPressed: () { String content = ""; @@ -517,6 +515,16 @@ class _ChatViewState extends State { .copied_to_clipboard))); }, icon: const Icon(Icons.copy_all)), + const Spacer(), + TextButton.icon( + icon: const Icon(Icons.add, size: 16), + label: const Text("新对话"), + onPressed: () { + setState(() { + _messages.clear(); + _records.clear(); + }); + }), // IconButton( // onPressed: () async { // try {