neoagent 2.4.1-beta.42 → 2.4.1-beta.44

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,
@@ -1536,235 +1536,59 @@ class _SettingsPanelState extends State<SettingsPanel> {
1536
1536
  'Client and runtime update controls live here.',
1537
1537
  style: TextStyle(color: _textSecondary, height: 1.45),
1538
1538
  ),
1539
- const SizedBox(height: 16),
1540
- LayoutBuilder(
1541
- builder: (context, constraints) {
1542
- final compact = constraints.maxWidth < 720;
1543
- final checkButton = FilledButton.icon(
1544
- onPressed:
1545
- controller.isCheckingAppUpdate ||
1546
- !controller.appUpdaterConfigured
1547
- ? null
1548
- : () => controller.checkForAppUpdates(),
1549
- style: FilledButton.styleFrom(backgroundColor: _accent),
1550
- icon: controller.isCheckingAppUpdate
1551
- ? _inlineProgressIndicator()
1552
- : const Icon(Icons.sync),
1553
- label: Text(
1554
- controller.isCheckingAppUpdate
1555
- ? 'Checking...'
1556
- : 'Check now',
1557
- ),
1558
- );
1559
- final appHeading = Text(
1560
- 'Client App',
1561
- style: TextStyle(
1562
- fontWeight: FontWeight.w700,
1563
- color: _textPrimary,
1564
- ),
1565
- );
1566
- if (compact) {
1567
- return Column(
1568
- crossAxisAlignment: CrossAxisAlignment.start,
1539
+ if (!kIsWeb) ...<Widget>[
1540
+ const SizedBox(height: 16),
1541
+ LayoutBuilder(
1542
+ builder: (context, constraints) {
1543
+ final compact = constraints.maxWidth < 720;
1544
+ final checkButton = FilledButton.icon(
1545
+ onPressed:
1546
+ controller.isCheckingAppUpdate ||
1547
+ !controller.appUpdaterConfigured
1548
+ ? null
1549
+ : () => controller.checkForAppUpdates(),
1550
+ style: FilledButton.styleFrom(backgroundColor: _accent),
1551
+ icon: controller.isCheckingAppUpdate
1552
+ ? _inlineProgressIndicator()
1553
+ : const Icon(Icons.sync),
1554
+ label: Text(
1555
+ controller.isCheckingAppUpdate
1556
+ ? 'Checking...'
1557
+ : 'Check now',
1558
+ ),
1559
+ );
1560
+ final appHeading = Text(
1561
+ 'Client App',
1562
+ style: TextStyle(
1563
+ fontWeight: FontWeight.w700,
1564
+ color: _textPrimary,
1565
+ ),
1566
+ );
1567
+ if (compact) {
1568
+ return Column(
1569
+ crossAxisAlignment: CrossAxisAlignment.start,
1570
+ children: <Widget>[
1571
+ appHeading,
1572
+ const SizedBox(height: 10),
1573
+ checkButton,
1574
+ ],
1575
+ );
1576
+ }
1577
+ return Row(
1569
1578
  children: <Widget>[
1570
- appHeading,
1571
- const SizedBox(height: 10),
1579
+ Expanded(child: appHeading),
1572
1580
  checkButton,
1573
1581
  ],
1574
1582
  );
1575
- }
1576
- return Row(
1577
- children: <Widget>[
1578
- Expanded(child: appHeading),
1579
- checkButton,
1580
- ],
1581
- );
1582
- },
1583
- ),
1584
- const SizedBox(height: 12),
1585
- if (!controller.appUpdaterConfigured)
1586
- if (!kIsWeb)
1583
+ },
1584
+ ),
1585
+ const SizedBox(height: 12),
1586
+ if (!controller.appUpdaterConfigured)
1587
1587
  Text(
1588
1588
  'Client app updates are not configured for this build.',
1589
1589
  style: TextStyle(color: _textSecondary, height: 1.5),
1590
- )
1591
- else ...<Widget>[
1592
- LayoutBuilder(
1593
- builder: (context, constraints) {
1594
- final compact = constraints.maxWidth < 780;
1595
- final channelPicker = DropdownButtonFormField<String>(
1596
- initialValue: controller.appUpdateChannel,
1597
- decoration: const InputDecoration(
1598
- labelText: 'App release channel',
1599
- ),
1600
- items: const <DropdownMenuItem<String>>[
1601
- DropdownMenuItem<String>(
1602
- value: 'stable',
1603
- child: Text('Stable'),
1604
- ),
1605
- DropdownMenuItem<String>(
1606
- value: 'beta',
1607
- child: Text('Beta'),
1608
- ),
1609
- ],
1610
- onChanged: (value) {
1611
- if (value != null) {
1612
- unawaited(controller.setAppUpdateChannel(value));
1613
- }
1614
- },
1615
- );
1616
- final autoCheck = SwitchListTile.adaptive(
1617
- value: controller.appUpdateAutoCheckEnabled,
1618
- contentPadding: EdgeInsets.zero,
1619
- title: Text('Check automatically on launch'),
1620
- subtitle: Text(
1621
- 'This only checks GitHub Releases on startup. Installation still requires your confirmation.',
1622
- style: TextStyle(color: _textSecondary),
1623
- ),
1624
- onChanged: controller.setAppUpdateAutoCheckEnabled,
1625
- );
1626
-
1627
- if (compact) {
1628
- return Column(
1629
- crossAxisAlignment: CrossAxisAlignment.start,
1630
- children: <Widget>[
1631
- channelPicker,
1632
- const SizedBox(height: 10),
1633
- autoCheck,
1634
- ],
1635
- );
1636
- }
1637
-
1638
- return Row(
1639
- crossAxisAlignment: CrossAxisAlignment.start,
1640
- children: <Widget>[
1641
- Expanded(child: channelPicker),
1642
- const SizedBox(width: 16),
1643
- Expanded(child: autoCheck),
1644
- ],
1645
- );
1646
- },
1647
- ),
1648
- const SizedBox(height: 8),
1649
- Text(
1650
- 'Installed: ${controller.installedAppVersion ?? 'Unknown'} | Channel: ${controller.appUpdateChannelLabel} | Last checked: ${controller.appUpdateLastCheckedLabel}',
1651
- style: TextStyle(color: _textSecondary),
1652
1590
  ),
1653
- const SizedBox(height: 6),
1654
- Text(
1655
- 'Source: ${app_release_updater.appUpdaterGithubOwner}/${app_release_updater.appUpdaterGithubRepo}${app_release_updater.appUpdaterGithubToken.trim().isNotEmpty ? ' (override active)' : ''}',
1656
- style: TextStyle(color: _textSecondary),
1657
- ),
1658
- if (controller.appUpdateErrorMessage
1659
- case final message?) ...<Widget>[
1660
- const SizedBox(height: 12),
1661
- _InlineError(message: message),
1662
- ],
1663
- if (controller.availableAppUpdate
1664
- case final release?) ...<Widget>[
1665
- const SizedBox(height: 16),
1666
- Container(
1667
- width: double.infinity,
1668
- padding: const EdgeInsets.all(16),
1669
- decoration: BoxDecoration(
1670
- color: _bgSecondary,
1671
- borderRadius: BorderRadius.circular(18),
1672
- border: Border.all(color: _border),
1673
- ),
1674
- child: Column(
1675
- crossAxisAlignment: CrossAxisAlignment.start,
1676
- children: <Widget>[
1677
- Wrap(
1678
- spacing: 10,
1679
- runSpacing: 10,
1680
- children: <Widget>[
1681
- _StatusPill(
1682
- label: 'Update ${release.version}',
1683
- color: release.channel == 'beta'
1684
- ? _warning
1685
- : _accent,
1686
- ),
1687
- _StatusPill(
1688
- label: release.asset.name,
1689
- color: _textSecondary,
1690
- ),
1691
- ],
1692
- ),
1693
- const SizedBox(height: 10),
1694
- Text(
1695
- '${release.title} · ${release.publishedLabel} · ${release.asset.sizeLabel}',
1696
- style: TextStyle(color: _textSecondary),
1697
- ),
1698
- if (release.body.trim().isNotEmpty) ...<Widget>[
1699
- const SizedBox(height: 14),
1700
- ConstrainedBox(
1701
- constraints: const BoxConstraints(maxHeight: 220),
1702
- child: SingleChildScrollView(
1703
- child: MarkdownBody(
1704
- data: release.body,
1705
- selectable: true,
1706
- styleSheet: MarkdownStyleSheet(
1707
- p: TextStyle(
1708
- color: _textSecondary,
1709
- height: 1.45,
1710
- ),
1711
- ),
1712
- ),
1713
- ),
1714
- ),
1715
- ],
1716
- const SizedBox(height: 14),
1717
- Wrap(
1718
- spacing: 10,
1719
- runSpacing: 10,
1720
- children: <Widget>[
1721
- FilledButton.icon(
1722
- onPressed: controller.isOpeningAppUpdate
1723
- ? null
1724
- : controller.openAppUpdate,
1725
- style: FilledButton.styleFrom(
1726
- backgroundColor: _accent,
1727
- ),
1728
- icon: controller.isOpeningAppUpdate
1729
- ? _inlineProgressIndicator()
1730
- : const Icon(Icons.system_update_alt),
1731
- label: Text(
1732
- controller.isOpeningAppUpdate
1733
- ? 'Opening...'
1734
- : 'Download update',
1735
- ),
1736
- ),
1737
- if (release.htmlUrl.trim().isNotEmpty)
1738
- OutlinedButton.icon(
1739
- onPressed: () {
1740
- unawaited(
1741
- widget.controller._oauthLauncher
1742
- .openExternal(
1743
- url: release.htmlUrl,
1744
- label: 'release_notes',
1745
- ),
1746
- );
1747
- },
1748
- icon: const Icon(Icons.open_in_new),
1749
- label: Text('View release'),
1750
- ),
1751
- ],
1752
- ),
1753
- ],
1754
- ),
1755
- ),
1756
- ] else ...<Widget>[
1757
- const SizedBox(height: 12),
1758
- Text(
1759
- controller.isCheckingAppUpdate
1760
- ? 'Checking GitHub releases...'
1761
- : controller.appUpdateLastCheckedAt == null
1762
- ? 'Choose a channel, then check GitHub releases.'
1763
- : 'No newer app release is available on the selected channel.',
1764
- style: TextStyle(color: _textSecondary, height: 1.45),
1765
- ),
1766
- ],
1767
- ],
1591
+ ],
1768
1592
  const Divider(height: 32),
1769
1593
  if (controller.updateStatus.allowSelfUpdate) ...<Widget>[
1770
1594
  LayoutBuilder(
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.44",
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
+ 22ba65f9e626f79d02d182ef30d2f6b7
@@ -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: "1306020824" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });