feat(studio): @-syntax file inputs in flows, copyable doc errors, services-row overflow (v0.40.0)
Three concrete fixes against today's user feedback.
- Flows that take binary inputs (extract / extract-summarize /
…) work from the Flows tab. The run-flow input dialog now
accepts the same `@/path/to/file` syntax `fai run --input`
uses on the CLI: any value beginning with `@` is read as
bytes and sent as a binary Payload; plain values still flow
through as text. The dialog hint copy and the example
placeholder reflect the new syntax. File-read failures
surface as a SnackBar before the run dialog opens, so a
typo in the path doesn't reach the hub. Threaded through
`_FlowRunDialog` and `HubService.runSavedFlow`, which both
carry separate `textInputs` and `fileInputs` maps now and
forward to the SDK's mixed-mode runSavedFlow (v0.14.0).
- The Welcome doc-reader's error path uses `FaiErrorBox` so
the actual underlying error is selectable + copy-to-
clipboard via the existing widget. Plus the loader throws
a richer error string that names *both* attempted asset
paths (`<slug>_<lang>.md` and the EN fallback) and the
underlying exception each, so the operator can paste a
diagnostic into a chat without us having to ship a
separate "how to read Flutter asset errors" doc.
- Doctor's empty Services panel had a horizontal RenderFlex
overflow at narrow widths because the long mono-spaced
hint ("add to ~/.fai/config.yaml under services:") and
the leading icon+text both demanded full intrinsic width
in a single Row. Now wraps via a `Wrap` widget so the
hint flows to a second line on narrow viewports and stays
in the same row when there's space.
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
eb447c6ec0
commit
63e19974c0
11 changed files with 118 additions and 39 deletions
|
|
@ -819,8 +819,17 @@ class _DocReaderSheetState extends State<_DocReaderSheet> {
|
|||
final fallback = 'assets/docs/${widget.entry.slug}.md';
|
||||
try {
|
||||
return await rootBundle.loadString(localised);
|
||||
} catch (_) {
|
||||
return rootBundle.loadString(fallback);
|
||||
} catch (firstErr) {
|
||||
try {
|
||||
return await rootBundle.loadString(fallback);
|
||||
} catch (secondErr) {
|
||||
// Surface BOTH attempted paths and the underlying
|
||||
// errors so the operator can copy a useful diagnostic
|
||||
// out of FaiErrorBox without us having to ship a doc
|
||||
// about reading Flutter asset errors.
|
||||
throw 'tried "$localised": $firstErr\n'
|
||||
'then "$fallback": $secondErr';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -887,11 +896,22 @@ class _DocReaderSheetState extends State<_DocReaderSheet> {
|
|||
if (snap.hasError) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(FaiSpace.xxl),
|
||||
child: Text(
|
||||
l.welcomeDocFailedToLoad(snap.error.toString()),
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: theme.colorScheme.error,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
l.welcomeDocFailedToLoad(''),
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: theme.colorScheme.error,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: FaiSpace.sm),
|
||||
FaiErrorBox(
|
||||
text: snap.error.toString(),
|
||||
isError: true,
|
||||
maxHeight: 200,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue