neoagent 2.4.1-beta.12 → 2.4.1-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -313,26 +313,8 @@ class _SettingsPanelState extends State<SettingsPanel> {
313
313
  final routingModels = availableModels.isEmpty
314
314
  ? controller.supportedModels
315
315
  : availableModels;
316
- final modelChoices = <DropdownMenuItem<String>>[
317
- const DropdownMenuItem<String>(
318
- value: 'auto',
319
- child: Text(
320
- 'Smart Selector (Auto)',
321
- maxLines: 1,
322
- overflow: TextOverflow.ellipsis,
323
- ),
324
- ),
325
- ...routingModels.map(
326
- (model) => DropdownMenuItem<String>(
327
- value: model.id,
328
- child: Text(
329
- model.label,
330
- maxLines: 1,
331
- overflow: TextOverflow.ellipsis,
332
- ),
333
- ),
334
- ),
335
- ];
316
+ final List<_ModelPickerOption> modelChoices =
317
+ _modelPickerOptions(routingModels, allowAuto: true);
336
318
  final enabledSmartModels = _enabledModels
337
319
  .where((id) => routingModels.any((model) => model.id == id))
338
320
  .length;
@@ -872,7 +854,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
872
854
 
873
855
  Widget _buildModelsSection({
874
856
  required NeoAgentController controller,
875
- required List<DropdownMenuItem<String>> modelChoices,
857
+ required List<_ModelPickerOption> modelChoices,
876
858
  required List<ModelMeta> routingModels,
877
859
  required List<ModelMeta> availableModels,
878
860
  required int enabledSmartModels,
@@ -997,7 +979,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
997
979
  routingModels,
998
980
  allowAuto: true,
999
981
  ),
1000
- items: modelChoices,
982
+ options: modelChoices,
1001
983
  onChanged: (value) {
1002
984
  if (value != null) {
1003
985
  setState(() => _defaultChatModel = value);
@@ -1015,7 +997,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
1015
997
  routingModels,
1016
998
  allowAuto: true,
1017
999
  ),
1018
- items: modelChoices,
1000
+ options: modelChoices,
1019
1001
  onChanged: (value) {
1020
1002
  if (value != null) {
1021
1003
  setState(() => _defaultSubagentModel = value);
@@ -1033,18 +1015,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
1033
1015
  routingModels,
1034
1016
  allowAuto: false,
1035
1017
  ),
1036
- items: routingModels
1037
- .map(
1038
- (model) => DropdownMenuItem<String>(
1039
- value: model.id,
1040
- child: Text(
1041
- model.label,
1042
- maxLines: 1,
1043
- overflow: TextOverflow.ellipsis,
1044
- ),
1045
- ),
1046
- )
1047
- .toList(),
1018
+ options: _modelPickerOptions(routingModels),
1048
1019
  onChanged: (value) {
1049
1020
  if (value != null) {
1050
1021
  setState(() => _fallbackModel = value);
@@ -1114,7 +1085,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
1114
1085
 
1115
1086
  Widget _buildVoiceAndRecordingSection({
1116
1087
  required NeoAgentController controller,
1117
- required List<DropdownMenuItem<String>> modelChoices,
1088
+ required List<_ModelPickerOption> modelChoices,
1118
1089
  required List<ModelMeta> routingModels,
1119
1090
  }) {
1120
1091
  final liveVoiceOptions =
@@ -1160,7 +1131,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
1160
1131
  routingModels,
1161
1132
  allowAuto: true,
1162
1133
  ),
1163
- items: modelChoices,
1134
+ options: modelChoices,
1164
1135
  onChanged: (value) {
1165
1136
  if (value != null) {
1166
1137
  setState(
@@ -1176,7 +1147,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
1176
1147
  label: 'Recording Transcription',
1177
1148
  icon: Icons.hearing_outlined,
1178
1149
  value: _defaultRecordingTranscriptionModel,
1179
- items: _recordingTranscriptionModelChoices(
1150
+ options: _recordingTranscriptionOptions(
1180
1151
  _defaultRecordingTranscriptionModel,
1181
1152
  ),
1182
1153
  onChanged: (value) {
@@ -1221,7 +1192,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
1221
1192
  routingModels,
1222
1193
  allowAuto: true,
1223
1194
  ),
1224
- items: modelChoices,
1195
+ options: modelChoices,
1225
1196
  onChanged: (value) {
1226
1197
  if (value != null) {
1227
1198
  setState(() => _defaultSpeechModel = value);
@@ -1263,14 +1234,9 @@ class _SettingsPanelState extends State<SettingsPanel> {
1263
1234
  label: 'Live Provider',
1264
1235
  icon: Icons.call_outlined,
1265
1236
  value: _voiceLiveProvider,
1266
- items: const <String>['openai', 'gemini']
1267
- .map(
1268
- (value) => DropdownMenuItem<String>(
1269
- value: value,
1270
- child: Text(value),
1271
- ),
1272
- )
1273
- .toList(),
1237
+ options: _simplePickerOptions(
1238
+ const <String>['openai', 'gemini'],
1239
+ ),
1274
1240
  onChanged: (value) {
1275
1241
  if (value == null) return;
1276
1242
  setState(() {
@@ -1299,16 +1265,10 @@ class _SettingsPanelState extends State<SettingsPanel> {
1299
1265
  label: 'Live Model',
1300
1266
  icon: Icons.speed_outlined,
1301
1267
  value: _voiceLiveModel,
1302
- items:
1303
- (_voiceLiveModelsByProvider[_voiceLiveProvider] ??
1304
- const <String>[])
1305
- .map(
1306
- (value) => DropdownMenuItem<String>(
1307
- value: value,
1308
- child: Text(value),
1309
- ),
1310
- )
1311
- .toList(),
1268
+ options: _simplePickerOptions(
1269
+ _voiceLiveModelsByProvider[_voiceLiveProvider] ??
1270
+ const <String>[],
1271
+ ),
1312
1272
  onChanged: (value) {
1313
1273
  if (value != null) {
1314
1274
  setState(() => _voiceLiveModel = value);
@@ -1323,14 +1283,7 @@ class _SettingsPanelState extends State<SettingsPanel> {
1323
1283
  label: 'Live Voice',
1324
1284
  icon: Icons.graphic_eq_outlined,
1325
1285
  value: _voiceLiveVoice,
1326
- items: liveVoiceOptions
1327
- .map(
1328
- (value) => DropdownMenuItem<String>(
1329
- value: value,
1330
- child: Text(value),
1331
- ),
1332
- )
1333
- .toList(),
1286
+ options: _simplePickerOptions(liveVoiceOptions),
1334
1287
  onChanged: (value) {
1335
1288
  if (value != null) {
1336
1289
  setState(() => _voiceLiveVoice = value);
@@ -2179,20 +2132,12 @@ class _SettingsPanelState extends State<SettingsPanel> {
2179
2132
  }
2180
2133
  }
2181
2134
 
2182
- List<DropdownMenuItem<String>> _recordingTranscriptionModelChoices(
2183
- String current,
2184
- ) {
2185
- const defaults = <String>['nova-3', 'nova-2-general'];
2186
- final normalizedCurrent = current.trim();
2187
- final values = <String>{...defaults};
2188
- if (normalizedCurrent.isNotEmpty) {
2189
- values.add(normalizedCurrent);
2190
- }
2191
- return values
2192
- .map(
2193
- (value) => DropdownMenuItem<String>(value: value, child: Text(value)),
2194
- )
2195
- .toList();
2135
+ List<_ModelPickerOption> _recordingTranscriptionOptions(String current) {
2136
+ const List<String> defaults = <String>['nova-3', 'nova-2-general'];
2137
+ final String normalizedCurrent = current.trim();
2138
+ final Set<String> values = <String>{...defaults};
2139
+ if (normalizedCurrent.isNotEmpty) values.add(normalizedCurrent);
2140
+ return _simplePickerOptions(values.toList());
2196
2141
  }
2197
2142
 
2198
2143
  // Shared helper: small "Test" button + inline result row.
@@ -2503,14 +2448,14 @@ class _RoutingSelectCard extends StatelessWidget {
2503
2448
  required this.label,
2504
2449
  required this.icon,
2505
2450
  required this.value,
2506
- required this.items,
2451
+ required this.options,
2507
2452
  required this.onChanged,
2508
2453
  });
2509
2454
 
2510
2455
  final String label;
2511
2456
  final IconData icon;
2512
2457
  final String value;
2513
- final List<DropdownMenuItem<String>> items;
2458
+ final List<_ModelPickerOption> options;
2514
2459
  final ValueChanged<String?> onChanged;
2515
2460
 
2516
2461
  @override
@@ -2533,12 +2478,11 @@ class _RoutingSelectCard extends StatelessWidget {
2533
2478
  ],
2534
2479
  ),
2535
2480
  const SizedBox(height: 10),
2536
- DropdownButtonFormField<String>(
2537
- initialValue: value,
2538
- items: items,
2539
- isExpanded: true,
2540
- decoration: const InputDecoration(isDense: true),
2481
+ _ModelPickerButton(
2482
+ value: value,
2483
+ options: options,
2541
2484
  onChanged: onChanged,
2485
+ dialogTitle: 'Select $label',
2542
2486
  ),
2543
2487
  ],
2544
2488
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.4.1-beta.12",
3
+ "version": "2.4.1-beta.13",
4
4
  "description": "Proactive personal AI agent with no limits",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "server/index.js",
@@ -1 +1 @@
1
- 2d79bb1c88e94d9acee7e3021ec0b119
1
+ da05ba4590c63eb13c0254be7a8b0840
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"4c525dac5ebe5971c5708ef73558ed8edcf4a3
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "4015974692" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "2422850760" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });