neoagent 2.3.1-beta.63 → 2.3.1-beta.64
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.
- package/flutter_app/lib/main.dart +1 -0
- package/flutter_app/lib/main_account_settings.dart +50 -22
- package/flutter_app/lib/main_admin.dart +24 -10
- package/flutter_app/lib/main_app_shell.dart +10 -9
- package/flutter_app/lib/main_chat.dart +433 -309
- package/flutter_app/lib/main_controller.dart +2 -1
- package/flutter_app/lib/main_integrations.dart +15 -7
- package/flutter_app/lib/main_models.dart +116 -7
- package/flutter_app/lib/main_navigation.dart +27 -18
- package/flutter_app/lib/main_operations.dart +162 -91
- package/flutter_app/lib/main_settings.dart +268 -71
- package/flutter_app/lib/main_shared.dart +4 -6
- package/flutter_app/lib/main_unified.dart +388 -0
- package/package.json +1 -1
- package/server/db/database.js +52 -0
- package/server/public/.last_build_id +1 -1
- package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
- package/server/public/flutter_bootstrap.js +1 -1
- package/server/public/main.dart.js +77499 -76627
- package/server/routes/agents.js +2 -1
- package/server/routes/memory.js +75 -3
- package/server/routes/widgets.js +4 -4
- package/server/services/ai/engine.js +86 -0
- package/server/services/ai/runEvents.js +100 -0
- package/server/services/memory/manager.js +242 -26
- package/server/services/websocket.js +3 -1
- package/server/services/widgets/focus_widget.js +126 -0
- package/server/services/widgets/service.js +130 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
part of 'main.dart';
|
|
2
2
|
|
|
3
3
|
class LogsPanel extends StatefulWidget {
|
|
4
|
-
const LogsPanel({super.key, required this.controller});
|
|
4
|
+
const LogsPanel({super.key, required this.controller, this.embedded = false});
|
|
5
5
|
|
|
6
6
|
final NeoAgentController controller;
|
|
7
|
+
final bool embedded;
|
|
7
8
|
|
|
8
9
|
@override
|
|
9
10
|
State<LogsPanel> createState() => _LogsPanelState();
|
|
@@ -350,46 +351,89 @@ class _LogsPanelState extends State<LogsPanel> {
|
|
|
350
351
|
@override
|
|
351
352
|
Widget build(BuildContext context) {
|
|
352
353
|
return ListView(
|
|
353
|
-
padding: _pagePadding(context),
|
|
354
|
+
padding: widget.embedded ? EdgeInsets.zero : _pagePadding(context),
|
|
354
355
|
children: <Widget>[
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
356
|
+
if (!widget.embedded)
|
|
357
|
+
_PageTitle(
|
|
358
|
+
title: 'Logs',
|
|
359
|
+
subtitle:
|
|
360
|
+
'Merged server and Flutter runtime logs for this app session.',
|
|
361
|
+
trailing: Wrap(
|
|
362
|
+
spacing: 12,
|
|
363
|
+
runSpacing: 12,
|
|
364
|
+
children: <Widget>[
|
|
365
|
+
OutlinedButton.icon(
|
|
366
|
+
onPressed: _isExportingRecentMessages
|
|
367
|
+
? null
|
|
368
|
+
: _exportRecentMessages,
|
|
369
|
+
icon: _isExportingRecentMessages
|
|
370
|
+
? const SizedBox.square(
|
|
371
|
+
dimension: 16,
|
|
372
|
+
child: CircularProgressIndicator(strokeWidth: 2),
|
|
373
|
+
)
|
|
374
|
+
: Icon(Icons.ios_share_outlined),
|
|
375
|
+
label: Text('Export last 5 messages'),
|
|
376
|
+
),
|
|
377
|
+
OutlinedButton.icon(
|
|
378
|
+
onPressed: _copyDebugInfo,
|
|
379
|
+
icon: Icon(Icons.bug_report_outlined),
|
|
380
|
+
label: Text('Copy debug info'),
|
|
381
|
+
),
|
|
382
|
+
OutlinedButton.icon(
|
|
383
|
+
onPressed: widget.controller.logs.isEmpty ? null : _copyLogs,
|
|
384
|
+
icon: Icon(Icons.copy_all_outlined),
|
|
385
|
+
label: Text('Copy logs'),
|
|
386
|
+
),
|
|
387
|
+
OutlinedButton.icon(
|
|
388
|
+
onPressed: widget.controller.clearLogs,
|
|
389
|
+
icon: Icon(Icons.clear_all),
|
|
390
|
+
label: Text('Clear'),
|
|
391
|
+
),
|
|
392
|
+
],
|
|
393
|
+
),
|
|
394
|
+
)
|
|
395
|
+
else
|
|
396
|
+
Align(
|
|
397
|
+
alignment: Alignment.centerRight,
|
|
398
|
+
child: Padding(
|
|
399
|
+
padding: const EdgeInsets.only(bottom: 12),
|
|
400
|
+
child: Wrap(
|
|
401
|
+
spacing: 12,
|
|
402
|
+
runSpacing: 12,
|
|
403
|
+
children: <Widget>[
|
|
404
|
+
OutlinedButton.icon(
|
|
405
|
+
onPressed: _isExportingRecentMessages
|
|
406
|
+
? null
|
|
407
|
+
: _exportRecentMessages,
|
|
408
|
+
icon: _isExportingRecentMessages
|
|
409
|
+
? const SizedBox.square(
|
|
410
|
+
dimension: 16,
|
|
411
|
+
child: CircularProgressIndicator(strokeWidth: 2),
|
|
412
|
+
)
|
|
413
|
+
: const Icon(Icons.ios_share_outlined),
|
|
414
|
+
label: const Text('Export last 5 messages'),
|
|
415
|
+
),
|
|
416
|
+
OutlinedButton.icon(
|
|
417
|
+
onPressed: _copyDebugInfo,
|
|
418
|
+
icon: const Icon(Icons.bug_report_outlined),
|
|
419
|
+
label: const Text('Copy debug info'),
|
|
420
|
+
),
|
|
421
|
+
OutlinedButton.icon(
|
|
422
|
+
onPressed: widget.controller.logs.isEmpty
|
|
423
|
+
? null
|
|
424
|
+
: _copyLogs,
|
|
425
|
+
icon: const Icon(Icons.copy_all_outlined),
|
|
426
|
+
label: const Text('Copy logs'),
|
|
427
|
+
),
|
|
428
|
+
OutlinedButton.icon(
|
|
429
|
+
onPressed: widget.controller.clearLogs,
|
|
430
|
+
icon: const Icon(Icons.clear_all),
|
|
431
|
+
label: const Text('Clear'),
|
|
432
|
+
),
|
|
433
|
+
],
|
|
389
434
|
),
|
|
390
|
-
|
|
435
|
+
),
|
|
391
436
|
),
|
|
392
|
-
),
|
|
393
437
|
Card(
|
|
394
438
|
child: Padding(
|
|
395
439
|
padding: const EdgeInsets.all(16),
|
|
@@ -440,9 +484,14 @@ class _LogsPanelState extends State<LogsPanel> {
|
|
|
440
484
|
}
|
|
441
485
|
|
|
442
486
|
class SkillsPanel extends StatefulWidget {
|
|
443
|
-
const SkillsPanel({
|
|
487
|
+
const SkillsPanel({
|
|
488
|
+
super.key,
|
|
489
|
+
required this.controller,
|
|
490
|
+
this.embedded = false,
|
|
491
|
+
});
|
|
444
492
|
|
|
445
493
|
final NeoAgentController controller;
|
|
494
|
+
final bool embedded;
|
|
446
495
|
|
|
447
496
|
@override
|
|
448
497
|
State<SkillsPanel> createState() => _SkillsPanelState();
|
|
@@ -493,10 +542,9 @@ class _SkillsPanelState extends State<SkillsPanel>
|
|
|
493
542
|
return a.name.toLowerCase().compareTo(b.name.toLowerCase());
|
|
494
543
|
});
|
|
495
544
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
children: <Widget>[
|
|
545
|
+
final body = Column(
|
|
546
|
+
children: <Widget>[
|
|
547
|
+
if (!widget.embedded)
|
|
500
548
|
_PageTitle(
|
|
501
549
|
title: 'Skills',
|
|
502
550
|
subtitle:
|
|
@@ -506,38 +554,53 @@ class _SkillsPanelState extends State<SkillsPanel>
|
|
|
506
554
|
icon: Icon(Icons.add),
|
|
507
555
|
label: Text('New Skill'),
|
|
508
556
|
),
|
|
509
|
-
)
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
indicatorSize: TabBarIndicatorSize.tab,
|
|
521
|
-
labelStyle: TextStyle(fontWeight: FontWeight.w700),
|
|
522
|
-
tabs: <Widget>[
|
|
523
|
-
Tab(text: 'Installed Skills (${controller.skills.length})'),
|
|
524
|
-
Tab(text: 'Store (${filteredStore.length})'),
|
|
525
|
-
],
|
|
557
|
+
)
|
|
558
|
+
else
|
|
559
|
+
Align(
|
|
560
|
+
alignment: Alignment.centerRight,
|
|
561
|
+
child: Padding(
|
|
562
|
+
padding: const EdgeInsets.only(bottom: 12),
|
|
563
|
+
child: FilledButton.icon(
|
|
564
|
+
onPressed: () => _openCreateSkill(context),
|
|
565
|
+
icon: const Icon(Icons.add),
|
|
566
|
+
label: const Text('New Skill'),
|
|
567
|
+
),
|
|
526
568
|
),
|
|
527
569
|
),
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
_buildStoreTab(controller, categories, filteredStore),
|
|
535
|
-
],
|
|
536
|
-
),
|
|
570
|
+
if (!widget.embedded) const SizedBox(height: 12),
|
|
571
|
+
Container(
|
|
572
|
+
decoration: BoxDecoration(
|
|
573
|
+
color: _bgSecondary,
|
|
574
|
+
borderRadius: BorderRadius.circular(14),
|
|
575
|
+
border: Border.all(color: _border),
|
|
537
576
|
),
|
|
538
|
-
|
|
539
|
-
|
|
577
|
+
child: TabBar(
|
|
578
|
+
controller: _tabController,
|
|
579
|
+
dividerColor: Colors.transparent,
|
|
580
|
+
indicatorSize: TabBarIndicatorSize.tab,
|
|
581
|
+
labelStyle: TextStyle(fontWeight: FontWeight.w700),
|
|
582
|
+
tabs: <Widget>[
|
|
583
|
+
Tab(text: 'Installed Skills (${controller.skills.length})'),
|
|
584
|
+
Tab(text: 'Store (${filteredStore.length})'),
|
|
585
|
+
],
|
|
586
|
+
),
|
|
587
|
+
),
|
|
588
|
+
const SizedBox(height: 12),
|
|
589
|
+
Expanded(
|
|
590
|
+
child: TabBarView(
|
|
591
|
+
controller: _tabController,
|
|
592
|
+
children: <Widget>[
|
|
593
|
+
_buildInstalledTab(controller),
|
|
594
|
+
_buildStoreTab(controller, categories, filteredStore),
|
|
595
|
+
],
|
|
596
|
+
),
|
|
597
|
+
),
|
|
598
|
+
],
|
|
540
599
|
);
|
|
600
|
+
if (widget.embedded) {
|
|
601
|
+
return body;
|
|
602
|
+
}
|
|
603
|
+
return Padding(padding: _pagePadding(context), child: body);
|
|
541
604
|
}
|
|
542
605
|
|
|
543
606
|
Widget _buildInstalledTab(NeoAgentController controller) {
|
|
@@ -1985,16 +2048,18 @@ class WidgetsPanel extends StatelessWidget {
|
|
|
1985
2048
|
spacing: 10,
|
|
1986
2049
|
runSpacing: 10,
|
|
1987
2050
|
children: <Widget>[
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2051
|
+
if (!item.isSystem)
|
|
2052
|
+
OutlinedButton(
|
|
2053
|
+
onPressed: () =>
|
|
2054
|
+
controller.openWidgetEditFlow(item),
|
|
2055
|
+
child: Text('Edit With AI'),
|
|
2056
|
+
),
|
|
2057
|
+
if (!item.isSystem)
|
|
2058
|
+
OutlinedButton(
|
|
2059
|
+
onPressed: () =>
|
|
2060
|
+
controller.toggleWidgetEnabled(item),
|
|
2061
|
+
child: Text(item.enabled ? 'Pause' : 'Enable'),
|
|
2062
|
+
),
|
|
1998
2063
|
FilledButton(
|
|
1999
2064
|
onPressed: remaining > 0
|
|
2000
2065
|
? null
|
|
@@ -2003,16 +2068,18 @@ class WidgetsPanel extends StatelessWidget {
|
|
|
2003
2068
|
_manualRunButtonLabel('Run Now', remaining),
|
|
2004
2069
|
),
|
|
2005
2070
|
),
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2071
|
+
if (!item.isSystem)
|
|
2072
|
+
OutlinedButton(
|
|
2073
|
+
onPressed: () => _confirmDelete(
|
|
2074
|
+
context,
|
|
2075
|
+
title: 'Delete widget?',
|
|
2076
|
+
message:
|
|
2077
|
+
'This removes "${item.name}" and its refresh job.',
|
|
2078
|
+
onConfirm: () =>
|
|
2079
|
+
controller.deleteWidget(item.id),
|
|
2080
|
+
),
|
|
2081
|
+
child: Text('Delete'),
|
|
2013
2082
|
),
|
|
2014
|
-
child: Text('Delete'),
|
|
2015
|
-
),
|
|
2016
2083
|
],
|
|
2017
2084
|
),
|
|
2018
2085
|
),
|
|
@@ -2185,7 +2252,11 @@ class _AiWidgetCardState extends State<_AiWidgetCard> {
|
|
|
2185
2252
|
),
|
|
2186
2253
|
const SizedBox(width: 12),
|
|
2187
2254
|
_StatusPill(
|
|
2188
|
-
label: item.
|
|
2255
|
+
label: item.isSystem
|
|
2256
|
+
? (item.enabled
|
|
2257
|
+
? 'System live'
|
|
2258
|
+
: 'System paused')
|
|
2259
|
+
: (item.enabled ? 'Live' : 'Paused'),
|
|
2189
2260
|
color: item.enabled ? _success : _textSecondary,
|
|
2190
2261
|
),
|
|
2191
2262
|
],
|