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
|
|
@ -389,8 +389,8 @@
|
|||
"flowsNoneHint": "Flow speichern mit `fai admin flows save <name> <flow.yaml>`, dann taucht er hier auf.",
|
||||
"flowsRunDialogTitle": "{name} ausführen",
|
||||
"@flowsRunDialogTitle": { "placeholders": { "name": { "type": "String" } } },
|
||||
"flowsRunDialogBody": "Eingaben als key=value, eine pro Zeile. Alle Werte werden als Text-Payloads gesendet. Für binäre Eingaben die `fai run` CLI nutzen.",
|
||||
"flowsInputsHint": "name=World\ntarget_language=English\nsummary_style=three bullet points",
|
||||
"flowsRunDialogBody": "Eingaben als key=value, eine pro Zeile. Klartext-Werte landen als Text. Wert mit `@` voranstellen liest die Datei als Bytes — wie `fai run --input document=@/pfad/zu/datei.pdf`.",
|
||||
"flowsInputsHint": "name=Welt\ndocument=@/Users/ich/Dokumente/beispiel.pdf\nstil=drei Stichpunkte",
|
||||
"flowsRunButton": "Starten",
|
||||
"flowsRunningTitle": "{name} läuft",
|
||||
"@flowsRunningTitle": { "placeholders": { "name": { "type": "String" } } },
|
||||
|
|
|
|||
|
|
@ -390,8 +390,8 @@
|
|||
"flowsNoneHint": "Save a flow with `fai admin flows save <name> <flow.yaml>` and it shows up here.",
|
||||
"flowsRunDialogTitle": "Run {name}",
|
||||
"@flowsRunDialogTitle": { "placeholders": { "name": { "type": "String" } } },
|
||||
"flowsRunDialogBody": "Inputs as key=value, one per line. All values are sent as text payloads. For binary inputs use the `fai run` CLI.",
|
||||
"flowsInputsHint": "name=World\ntarget_language=English\nsummary_style=three bullet points",
|
||||
"flowsRunDialogBody": "Inputs as key=value, one per line. Plain values send as text. Prefix the value with `@` to read a file as bytes — same as `fai run --input document=@/path/to/file.pdf`.",
|
||||
"flowsInputsHint": "name=World\ndocument=@/Users/me/Documents/sample.pdf\nstyle=three bullet points",
|
||||
"flowsRunButton": "Run",
|
||||
"flowsRunningTitle": "Running {name}",
|
||||
"@flowsRunningTitle": { "placeholders": { "name": { "type": "String" } } },
|
||||
|
|
|
|||
|
|
@ -1823,13 +1823,13 @@ abstract class AppLocalizations {
|
|||
/// No description provided for @flowsRunDialogBody.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Inputs as key=value, one per line. All values are sent as text payloads. For binary inputs use the `fai run` CLI.'**
|
||||
/// **'Inputs as key=value, one per line. Plain values send as text. Prefix the value with `@` to read a file as bytes — same as `fai run --input document=@/path/to/file.pdf`.'**
|
||||
String get flowsRunDialogBody;
|
||||
|
||||
/// No description provided for @flowsInputsHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'name=World\ntarget_language=English\nsummary_style=three bullet points'**
|
||||
/// **'name=World\ndocument=@/Users/me/Documents/sample.pdf\nstyle=three bullet points'**
|
||||
String get flowsInputsHint;
|
||||
|
||||
/// No description provided for @flowsRunButton.
|
||||
|
|
|
|||
|
|
@ -1025,11 +1025,11 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||
|
||||
@override
|
||||
String get flowsRunDialogBody =>
|
||||
'Eingaben als key=value, eine pro Zeile. Alle Werte werden als Text-Payloads gesendet. Für binäre Eingaben die `fai run` CLI nutzen.';
|
||||
'Eingaben als key=value, eine pro Zeile. Klartext-Werte landen als Text. Wert mit `@` voranstellen liest die Datei als Bytes — wie `fai run --input document=@/pfad/zu/datei.pdf`.';
|
||||
|
||||
@override
|
||||
String get flowsInputsHint =>
|
||||
'name=World\ntarget_language=English\nsummary_style=three bullet points';
|
||||
'name=Welt\ndocument=@/Users/ich/Dokumente/beispiel.pdf\nstil=drei Stichpunkte';
|
||||
|
||||
@override
|
||||
String get flowsRunButton => 'Starten';
|
||||
|
|
|
|||
|
|
@ -1040,11 +1040,11 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
|
||||
@override
|
||||
String get flowsRunDialogBody =>
|
||||
'Inputs as key=value, one per line. All values are sent as text payloads. For binary inputs use the `fai run` CLI.';
|
||||
'Inputs as key=value, one per line. Plain values send as text. Prefix the value with `@` to read a file as bytes — same as `fai run --input document=@/path/to/file.pdf`.';
|
||||
|
||||
@override
|
||||
String get flowsInputsHint =>
|
||||
'name=World\ntarget_language=English\nsummary_style=three bullet points';
|
||||
'name=World\ndocument=@/Users/me/Documents/sample.pdf\nstyle=three bullet points';
|
||||
|
||||
@override
|
||||
String get flowsRunButton => 'Run';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue