Skip to content

Commit

Permalink
feat: new chat
Browse files Browse the repository at this point in the history
  • Loading branch information
singularity-s0 committed May 17, 2024
1 parent a6a5c3b commit 8bf9c97
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/views/chat_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,7 @@ class _ChatViewState extends State<ChatView> {
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(() {
Expand Down Expand Up @@ -500,7 +499,6 @@ class _ChatViewState extends State<ChatView> {
AppLocalizations.of(context)!
.copied_to_clipboard)));
}),
const Spacer(),
IconButton(
onPressed: () {
String content = "";
Expand All @@ -517,6 +515,16 @@ class _ChatViewState extends State<ChatView> {
.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 {
Expand Down

0 comments on commit 8bf9c97

Please sign in to comment.