Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Local model manager dialog: say which computer the model will run on

Tim8fd3b7a5702c
diff --git a/desktop/lib/widgets/run_local_model_dialog.dart b/desktop/lib/widgets/run_local_model_dialog.dart
index 5055decb2..a602000d3 100644
--- a/desktop/lib/widgets/run_local_model_dialog.dart
+++ b/desktop/lib/widgets/run_local_model_dialog.dart
@@ -212,7 +212,11 @@ class _RunLocalModelDialogState extends State<_RunLocalModelDialog> {
final current = widget.notifier.stateOf(_machineId) ?? machines.firstOrNull;
if (current == null) return const SizedBox.shrink();
if (!widget.chooseMachine || machines.length < 2) {
- return _machineRow(current, opens: false);
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [_machineRow(current, opens: false), _where(current)],
+ );
}
final visible = machines.take(3).toList();
if (!visible.any((m) => m.machine.machineId == _machineId)) {
@@ -225,7 +229,7 @@ class _RunLocalModelDialogState extends State<_RunLocalModelDialog> {
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Text(
- 'Pick the machine it should work on.',
+ 'Which computer should it look after?',
style: TextStyle(
fontFamily: grid.AppFont.sans,
fontSize: 12.5,
@@ -234,10 +238,33 @@ class _RunLocalModelDialogState extends State<_RunLocalModelDialog> {
),
),
_chips(visible, machines),
+ _where(current),
],
);
}
+ /// One sentence under the machine, saying what the choice means in plain
+ /// words: where the model will live, and that the picker everywhere sees it.
+ /// "This computer" is said outright, because a hostname alone does not tell
+ /// a person which of their machines they are sitting at.
+ Widget _where(MachineState m) => Padding(
+ padding: const EdgeInsets.only(top: 8),
+ child: Text(
+ m.isLocalMachine
+ ? 'The model will run on this computer (${m.machine.displayName}). '
+ 'Agents on any machine can use it.'
+ : 'The model will run on ${m.machine.displayName}, not on this '
+ 'computer. Agents on any machine can use it.',
+ key: const Key('run-local-model-where'),
+ style: TextStyle(
+ fontFamily: grid.AppFont.sans,
+ fontSize: 12,
+ height: 1.4,
+ color: grid.AppPalette.textSecondary,
+ ),
+ ),
+ );
+
Widget _chips(List<MachineState> visible, List<MachineState> machines) => Row(
children: [
for (final m in visible) ...[
@@ -382,11 +409,12 @@ class _RunLocalModelDialogState extends State<_RunLocalModelDialog> {
),
const TextSpan(
text:
- " is an agent that looks after the models on this "
- "computer. Say what you need and it helps you pick "
- "one that fits both this machine and the work, then "
- "sets it up for you. Once one is up, pick it in any "
- "agent's model picker.",
+ " is an agent that looks after the models on one "
+ "of your computers. Say what you need and it helps "
+ "you pick a model that fits that computer and the "
+ "work, then sets it up there. Once a model is up, "
+ "every agent on every machine can switch to it "
+ "from its model picker.",
),
],
),
diff --git a/desktop/test/run_local_model_dialog_test.dart b/desktop/test/run_local_model_dialog_test.dart
index c506b565f..06555c982 100644
--- a/desktop/test/run_local_model_dialog_test.dart
+++ b/desktop/test/run_local_model_dialog_test.dart
@@ -152,9 +152,10 @@ void main() {
expect(find.text('Models that live on your machine'), findsOneWidget);
expect(
find.text(
- "Local model manager is an agent that looks after the models on this computer. Say what "
- "you need and it helps you pick one that fits both this machine and the work, then sets "
- "it up for you. Once one is up, pick it in any agent's model picker.",
+ "Local model manager is an agent that looks after the models on one of your computers. "
+ "Say what you need and it helps you pick a model that fits that computer and the work, "
+ "then sets it up there. Once a model is up, every agent on every machine can switch to "
+ "it from its model picker.",
),
findsOneWidget,
);
@@ -181,8 +182,15 @@ void main() {
expect(find.byKey(const Key('run-local-model-machine')), findsOneWidget);
expect(find.text('studio-7'), findsOneWidget);
expect(find.text('This machine'), findsOneWidget);
+ // And one plain sentence saying what that means.
+ expect(
+ find.text(
+ 'The model will run on this computer (studio-7). Agents on any machine can use it.',
+ ),
+ findsOneWidget,
+ );
// No chips, no "…", no prompt to pick: one machine is a statement, not a choice.
- expect(find.text('Pick the machine it should work on.'), findsNothing);
+ expect(find.text('Which computer should it look after?'), findsNothing);
expect(
find.byKey(const ValueKey('run-local-model-machine-local')),
findsNothing,
@@ -510,6 +518,13 @@ void main() {
await tester.pumpAndSettle();
expect(find.text('studio-7'), findsOneWidget);
+ // Said plainly that this is NOT the computer the person is sitting at.
+ expect(
+ find.text(
+ 'The model will run on studio-7, not on this computer. Agents on any machine can use it.',
+ ),
+ findsOneWidget,
+ );
expect(
find.byKey(const ValueKey('run-local-model-machine-local')),
findsNothing,
@@ -518,7 +533,7 @@ void main() {
find.byKey(const ValueKey('run-local-model-machine-studio')),
findsNothing,
);
- expect(find.text('Pick the machine it should work on.'), findsNothing);
+ expect(find.text('Which computer should it look after?'), findsNothing);
await tester.tap(start);
await tester.pumpAndSettle();
@@ -581,7 +596,7 @@ void main() {
await tester.pumpAndSettle();
// Both machines as chips on one row, this computer first, the door's machine chosen — and
// one sentence saying what the chips are for.
- expect(find.text('Pick the machine it should work on.'), findsOneWidget);
+ expect(find.text('Which computer should it look after?'), findsOneWidget);
final localChip = find.byKey(
const ValueKey('run-local-model-machine-local'),
);