neoagent 2.4.1-beta.42 → 2.4.1-beta.43

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.
@@ -273,7 +273,47 @@ class _ChatPanelState extends State<ChatPanel> with WidgetsBindingObserver {
273
273
  if (_stickToBottom && !nearBottom) {
274
274
  _scrollGeneration++;
275
275
  }
276
- _stickToBottom = nearBottom;
276
+ if (_stickToBottom != nearBottom) {
277
+ setState(() => _stickToBottom = nearBottom);
278
+ }
279
+ }
280
+
281
+ void _openModelPicker() {
282
+ final controller = widget.controller;
283
+ if (controller.hasLiveRun) return;
284
+ final enabled = controller.enabledModelIds;
285
+ final models = controller.supportedModels
286
+ .where((m) => enabled.contains(m.id))
287
+ .toList();
288
+ final options = _modelPickerOptions(models, allowAuto: true);
289
+ showGeneralDialog<void>(
290
+ context: context,
291
+ barrierDismissible: true,
292
+ barrierLabel: 'Dismiss',
293
+ barrierColor: Colors.black.withValues(alpha: 0.55),
294
+ transitionDuration: const Duration(milliseconds: 230),
295
+ transitionBuilder: (ctx, animation, secondary, child) => FadeTransition(
296
+ opacity: CurvedAnimation(parent: animation, curve: Curves.easeOut),
297
+ child: SlideTransition(
298
+ position: Tween<Offset>(
299
+ begin: const Offset(0, 0.04),
300
+ end: Offset.zero,
301
+ ).animate(
302
+ CurvedAnimation(parent: animation, curve: Curves.easeOutCubic),
303
+ ),
304
+ child: child,
305
+ ),
306
+ ),
307
+ pageBuilder: (dialogContext, _, __) => _ModelPickerDialog(
308
+ title: 'Chat Model',
309
+ options: options,
310
+ currentValue: controller.defaultChatModel,
311
+ onChanged: (v) {
312
+ Navigator.of(dialogContext).pop();
313
+ controller.saveSettingsPayload({'default_chat_model': v});
314
+ },
315
+ ),
316
+ );
277
317
  }
278
318
 
279
319
  void _handleComposerLayoutChanged() {
@@ -425,22 +465,38 @@ class _ChatPanelState extends State<ChatPanel> with WidgetsBindingObserver {
425
465
  children: <Widget>[
426
466
  _ChatTopBar(controller: controller),
427
467
  Expanded(
428
- child: SelectionArea(
429
- child: ListView(
430
- controller: _scrollController,
431
- padding: EdgeInsets.fromLTRB(sidePadding, 30, sidePadding, 18),
432
- children: <Widget>[
433
- Center(
434
- child: ConstrainedBox(
435
- constraints: const BoxConstraints(maxWidth: 860),
436
- child: Column(
437
- crossAxisAlignment: CrossAxisAlignment.stretch,
438
- children: threadChildren,
468
+ child: Stack(
469
+ children: <Widget>[
470
+ SelectionArea(
471
+ child: ListView(
472
+ controller: _scrollController,
473
+ padding:
474
+ EdgeInsets.fromLTRB(sidePadding, 30, sidePadding, 18),
475
+ children: <Widget>[
476
+ Center(
477
+ child: ConstrainedBox(
478
+ constraints: const BoxConstraints(maxWidth: 860),
479
+ child: Column(
480
+ crossAxisAlignment: CrossAxisAlignment.stretch,
481
+ children: threadChildren,
482
+ ),
483
+ ),
439
484
  ),
485
+ ],
486
+ ),
487
+ ),
488
+ if (!_stickToBottom)
489
+ Positioned(
490
+ bottom: 14,
491
+ right: 16,
492
+ child: _ScrollToBottomButton(
493
+ onTap: () {
494
+ setState(() => _stickToBottom = true);
495
+ _scheduleScrollToBottom(force: true);
496
+ },
440
497
  ),
441
498
  ),
442
- ],
443
- ),
499
+ ],
444
500
  ),
445
501
  ),
446
502
  Container(
@@ -605,12 +661,14 @@ class _ChatPanelState extends State<ChatPanel> with WidgetsBindingObserver {
605
661
  ),
606
662
  ),
607
663
  const SizedBox(width: 12),
608
- Flexible(
664
+ GestureDetector(
665
+ onTap: controller.hasLiveRun ? null : _openModelPicker,
609
666
  child: Container(
610
667
  padding: const EdgeInsets.symmetric(
611
668
  horizontal: 9,
612
669
  vertical: 4,
613
670
  ),
671
+ constraints: const BoxConstraints(maxWidth: 200),
614
672
  decoration: BoxDecoration(
615
673
  color: _bgCard,
616
674
  borderRadius: BorderRadius.circular(8),
@@ -636,7 +694,9 @@ class _ChatPanelState extends State<ChatPanel> with WidgetsBindingObserver {
636
694
  Icon(
637
695
  Icons.keyboard_arrow_down_rounded,
638
696
  size: 13,
639
- color: _textMuted,
697
+ color: controller.hasLiveRun
698
+ ? _textMuted
699
+ : _textSecondary,
640
700
  ),
641
701
  ],
642
702
  ),
@@ -777,6 +837,42 @@ class _ChatComposerIconButton extends StatelessWidget {
777
837
  }
778
838
  }
779
839
 
840
+ class _ScrollToBottomButton extends StatelessWidget {
841
+ const _ScrollToBottomButton({required this.onTap});
842
+
843
+ final VoidCallback onTap;
844
+
845
+ @override
846
+ Widget build(BuildContext context) {
847
+ return Tooltip(
848
+ message: 'Scroll to bottom',
849
+ child: Material(
850
+ color: _bgCard,
851
+ borderRadius: BorderRadius.circular(20),
852
+ elevation: 4,
853
+ shadowColor: Colors.black.withValues(alpha: 0.22),
854
+ child: InkWell(
855
+ onTap: onTap,
856
+ borderRadius: BorderRadius.circular(20),
857
+ child: Container(
858
+ width: 38,
859
+ height: 38,
860
+ decoration: BoxDecoration(
861
+ borderRadius: BorderRadius.circular(20),
862
+ border: Border.all(color: _border),
863
+ ),
864
+ child: Icon(
865
+ Icons.keyboard_arrow_down_rounded,
866
+ size: 22,
867
+ color: _textSecondary,
868
+ ),
869
+ ),
870
+ ),
871
+ ),
872
+ );
873
+ }
874
+ }
875
+
780
876
  class _SharedAttachmentTray extends StatelessWidget {
781
877
  const _SharedAttachmentTray({
782
878
  required this.attachments,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.4.1-beta.42",
3
+ "version": "2.4.1-beta.43",
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
- ed88f04225b62218697804faf6ff5b05
1
+ cd85dfa77920c8daf53d4dfffda5a6ee
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"c416acfeb8126e097f758c664aaa3da929e27d
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "1217250469" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "3940621086" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });