Unify chat selector menus

Use the permission selector's shared popup and choice-row primitives for model and thinking controls while preserving catalog, search, and next-turn behavior. Remove the obsolete Cupertino model chooser parameter and cover current-model dismissal.
This commit is contained in:
2026-11-11 19:40:26 +00:00
parent 3da71c3053
commit 2d0e33dd67
7 changed files with 227 additions and 137 deletions
@@ -135,6 +135,20 @@ void main() {
expect(find.text('model-b'), findsOneWidget);
});
testWidgets('choosing the current model only dismisses the chooser', (
tester,
) async {
final gateway = _ModelGateway()..modelsReply = _catalog;
await _openThread(tester, gateway);
await _openChooser(tester);
await tester.tap(find.text('Model Alpha'));
await tester.pumpAndSettle();
expect(find.byKey(const Key('chat-model-chooser')), findsNothing);
expect(gateway.lastFields('chat_model'), isNull);
});
testWidgets('a refusal keeps the previous model and shows the reason', (
tester,
) async {