Files
pipelines/app/lib/features/runs/actions/retry_wording.dart
T
alan d34185b56c Merge: chat colours, Ctrl+1-9, starred chats alphabetical
# Conflicts:
#	app/lib/features/chat/conversation/chat_thread_view.dart
#	app/tool/perf/perf_fixture.dart
#	internal/protocol/chat.go
#	internal/server/chat_close.go
#	internal/server/chat_sessions.go
2026-11-03 11:22:50 +00:00

34 lines
1.4 KiB
Dart

import 'package:flutter/widgets.dart';
import '../../../core/error_reason.dart';
/// The browser client's retry wording, kept verbatim.
const retryActionLabel = 'Retry';
const retryDialogMessage =
'Only failed runs can be retried. The server starts a new run from the '
'same input.';
const retryConfirmLabel = 'Retry';
const restartDialogMessage =
'This replays the whole pipeline from the start instead of resuming the '
'failed stage.';
const restartConfirmLabel = 'Restart from start';
const retryKeepLabel = 'Keep';
/// Stable test/semantics keys shared by the action and its prompt.
const retryActionKey = ValueKey<String>('retry-run-action');
const retryKeepKey = ValueKey<String>('retry-run-keep');
const retryConfirmKey = ValueKey<String>('retry-run-confirm');
const retryRestartKey = ValueKey<String>('retry-run-restart');
const retryErrorKey = ValueKey<String>('retry-run-error');
/// The retry dialog's title: `Retry run {id}?`.
String retryDialogTitle(num runId) => 'Retry run $runId?';
/// The restart dialog's title: `Restart run {id}?`.
String restartDialogTitle(num runId) => 'Restart run $runId?';
/// The server's refusal, verbatim. Only a blank error gets a generic sentence
/// so the prompt never claims a retry that did not happen.
String describeRetryError(Object error) =>
describeErrorReason(error, fallback: 'The server did not retry the run.');