Repository navigation
FE-1986: Add a Draft message with AI flow action - #10099
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## kostandin/fe-1985-add-create-entity-and-update-entity-flow-actions #10099 +/- ##
=====================================================================================================
Coverage ? 68.07%
=====================================================================================================
Files ? 2012
Lines ? 206478
Branches ? 8869
=====================================================================================================
Hits ? 140555
Misses ? 64242
Partials ? 1681
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR SummaryMedium Risk Overview The worker activity calls Claude Haiku with a forced Reviewed by Cursor Bugbot for commit a4b9ade. Bugbot is set up for automated code reviews on this repo. Configure here. |
Drafts a subject and a plain-text body from instructions, optional context text, and the properties of up to 20 entities in the flow's web, read as the user running the flow. A stored list of entity IDs and a wrapped for-each item both work. More than 20 entities, or one that is missing or unreadable, fails the step before the model is called. The model (Claude Haiku 4.5, at temperature 0) must submit the draft through a submitDraft tool. A missing draft or an empty subject or body is asked for again, up to 3 calls, then fails the step with no outputs. Co-authored-by: Amp <[email protected]>
…on JSON indentation Co-authored-by: Amp <[email protected]>
Empty instructions fail the step, as does a prompt longer than 400,000 characters (about 100,000 tokens), rather than being cut short. Each draft is limited to 2,000 tokens, and no attempt starts more than 2 minutes after the first, so the step finishes within the 5 minutes an action that doesn't heartbeat has. Co-authored-by: Amp <[email protected]>
…ext isn't instructions A line break in a subject could add headers to an email sent from it, so whitespace in the subject is collapsed to single spaces. The system prompt now says the context and entities are data to draw on, so instructions in an entity's properties aren't followed. Co-authored-by: Amp <[email protected]>
b9b6cc6 to
a4b9ade
Compare
🌟 Purpose
Adds Draft Message: an AI-written email-style subject and plain-text body for a later step to send or a person to review. Nothing is sent. It builds on Query (#10050) and Create/Update entity (#10060).
instructions(required),context(Text, e.g. from Read Entity),entities(Query Entities' list, or a for-each item withwrap: true).subject(one line) andbody(plain text).🔍 Changes
flow-activities/draft-message-action.tsflows/action-definitions.ts,flows/limits.tsdraftMessageand its 20-entity limit.flow-activities.ts🤔 Decisions to review
submitDrafttool for output only: no lookups, code or sandbox.getSimpleGraph, without links. The prompt treats context and entities as data, not instructions.refusalfails with an unclear error, as the shared Anthropic code throws on it.🔀 Merge order
Stacked on #10060. Retarget to
mainafter it merges, rebasing if squashed.🛡 Tests