mirror of
https://github.com/block/buzz.git
synced 2026-11-02 07:22:55 +00:00
## Summary - Simplify agent profiles with Message/Bestie actions, relay-authored published instructions (unavailable without a config channel), management details, public-key copying, and a separate final Delete section. - Sort the Agents directory by name and mark the selected Bestie with a muted filled star. - Place Model and Thinking together below Name. Use native iOS Liquid Glass menus and preserve selection callbacks as controls become enabled. Related: #8685. ## Validation Full mobile checks passed. Regression coverage includes relay-author filtering, unavailable instructions, metadata retry, resizing native pickers, accurate deletion state, selection after loading, and Bestie switching. Real iOS simulator taps verified both pickers; the user confirmed the earlier iPhone build works. Review fixes were checked with widget journeys and the native UIKit resize/selection probe. <details> <summary>Previews</summary> Synthetic fixture renders: | Profile | Create agent | Bestie card | | --- | --- | --- | |  |  |  | Native iOS simulator interaction with a synthetic catalog:  </details> --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
64 lines
1.9 KiB
Dart
64 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||
|
||
import '../../shared/agents/remote_agents.dart';
|
||
import '../../shared/theme/theme.dart';
|
||
import '../../shared/widgets/app_list_card.dart';
|
||
import 'agent_instructions.dart';
|
||
|
||
/// The agent's instructions and management information in shared Settings cards.
|
||
class AgentIdentitySections extends HookWidget {
|
||
const AgentIdentitySections({
|
||
required this.pubkey,
|
||
required this.controller,
|
||
super.key,
|
||
});
|
||
|
||
final String pubkey;
|
||
final RemoteAgentController controller;
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
useListenable(controller);
|
||
final remote = controller.agents.any(
|
||
(agent) => agent['agent_pubkey'] == pubkey,
|
||
);
|
||
return Column(
|
||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||
children: [
|
||
AppListCard(
|
||
label: 'Instructions',
|
||
horizontalPadding: 0,
|
||
children: [
|
||
Padding(
|
||
padding: const EdgeInsets.all(Grid.xs),
|
||
child: SizedBox(
|
||
width: double.infinity,
|
||
child: AgentInstructions(pubkey: pubkey),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
AppListCard(
|
||
label: 'Management',
|
||
horizontalPadding: 0,
|
||
children: [
|
||
Padding(
|
||
padding: const EdgeInsets.all(Grid.xs),
|
||
child: SizedBox(
|
||
width: double.infinity,
|
||
child: Text(
|
||
remote
|
||
? 'This agent runs on Builderbot. Your desktop doesn’t need to be online for it to work.'
|
||
: 'This agent is managed on your desktop. Keep Buzz open and your desktop online for it to work.',
|
||
style: context.textTheme.bodyMedium,
|
||
),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
],
|
||
);
|
||
}
|
||
}
|