Merge: Next chat button cycles through the list

This commit is contained in:
2026-11-04 18:22:45 +00:00
9 changed files with 425 additions and 8 deletions
@@ -14,6 +14,7 @@ import '../domain/chat_attachment_picker.dart';
import '../domain/chat_colors.dart';
import '../domain/chat_transcript.dart';
import '../ui/sessions/chat_adaptive.dart';
import 'chat_next_chat_button.dart';
import '../ui/sessions/chat_color_picker.dart';
import '../ui/sessions/session_actions.dart';
import '../ui/transcript/chat_markdown_view.dart';
@@ -87,10 +88,15 @@ class ChatThreadView extends StatefulWidget {
this.onSessionClosed,
this.fileBridge = const ArtifactFileBridge(),
this.onColorSelected,
this.onNextChat,
});
final ApiGateway gateway;
/// Opens the chat after this one in the list (wrapping to the first), from
/// the bar's Next chat button; null when there is no other chat to open.
final VoidCallback? onNextChat;
/// Sets the chat's shared colour (a palette name, null for none) from the
/// information sheet; null leaves the sheet without the Colour choice.
final ValueChanged<String?>? onColorSelected;
@@ -1199,6 +1205,8 @@ class _ChatThreadViewState extends State<ChatThreadView> {
answeredBy: answeredBy,
),
if (hasMode) _modeControl(),
if (widget.onNextChat case final next?)
ChatNextChatButton(key: const Key('chat-next'), onPressed: next),
],
);
}