30ba70ade8
Guide new users through connecting a server, configuring an agent harness, starting runs, and chatting with agents. Persist completion per device and offer the walkthrough again for empty servers or from Settings, with widget coverage and implementation notes.
80 lines
2.6 KiB
Dart
80 lines
2.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// One page of the first-run walkthrough. Pure content: no widgets, so the
|
|
/// copy can be checked without pumping a tree.
|
|
class WalkthroughStep {
|
|
const WalkthroughStep({
|
|
required this.icon,
|
|
required this.title,
|
|
required this.body,
|
|
this.points = const <String>[],
|
|
this.showsHarnessCommand = false,
|
|
});
|
|
|
|
final IconData icon;
|
|
final String title;
|
|
final String body;
|
|
|
|
/// Short labelled facts shown under the body, one per line.
|
|
final List<String> points;
|
|
|
|
/// Whether this page shows the harness setup command picker.
|
|
final bool showsHarnessCommand;
|
|
}
|
|
|
|
/// The agents `pipelines harness setup` accepts, in the order they are offered.
|
|
const harnessAgents = <String>['claude', 'codex', 'opencode', 'pi'];
|
|
|
|
/// The command for [agent], exactly as a terminal should run it.
|
|
String harnessSetupCommand(String agent) => 'pipelines harness setup $agent';
|
|
|
|
/// The four walkthrough pages, in order.
|
|
const walkthroughSteps = <WalkthroughStep>[
|
|
WalkthroughStep(
|
|
icon: Icons.hub_outlined,
|
|
title: 'Welcome to Pipelines',
|
|
body:
|
|
'Pipelines runs reusable AI workflows and holds chats with coding '
|
|
'agents. Both live on your server, so start by connecting this app '
|
|
'to it.',
|
|
points: <String>[
|
|
'Pipelines: workflows you define once and run again.',
|
|
'Chats: conversations with coding agents on the server.',
|
|
'Connect: open Settings, then Connection, enter the Server URL and '
|
|
'choose Connect.',
|
|
],
|
|
),
|
|
WalkthroughStep(
|
|
icon: Icons.build_circle_outlined,
|
|
title: 'Set up an agent harness',
|
|
body:
|
|
'A harness lets Pipelines drive a coding agent. Choose the agent you '
|
|
'use, then run its setup command in a terminal.',
|
|
showsHarnessCommand: true,
|
|
),
|
|
WalkthroughStep(
|
|
icon: Icons.play_circle_outline,
|
|
title: 'Start a run',
|
|
body:
|
|
'Pipelines shows your workflows. Runs shows every run with its '
|
|
'progress and results.',
|
|
points: <String>[
|
|
'Pipelines tab: open a workflow and fill in its inputs.',
|
|
'Runs tab: follow a run as it works, then read what it produced.',
|
|
'Choose Run on a workflow to start one.',
|
|
],
|
|
),
|
|
WalkthroughStep(
|
|
icon: Icons.forum_outlined,
|
|
title: 'Chat with an agent',
|
|
body:
|
|
'The Chat tab lists your conversations. Open one to read the thread '
|
|
'and reply.',
|
|
points: <String>[
|
|
'Float: pop a chat into its own window while you work elsewhere.',
|
|
'Terminal: open a terminal beside the Chat tab for direct commands.',
|
|
'New chat starts a conversation with an agent.',
|
|
],
|
|
),
|
|
];
|