[2/2] feat: let a host annotate the generate action - #171
Draft
dazzatronus wants to merge 8 commits into
Draft
Conversation
dazzatronus
force-pushed
the
derk/eng-898-generation-status
branch
from
August 28, 2026 10:45
a302571 to
254eef6
Compare
dazzatronus
marked this pull request as draft
August 28, 2026 10:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR [2/2]. The mechanical extraction is already split out into #170 (
refactor: lift generation type and prompt helpers into shared utils), which is this PR's base branch. This PR contains no refactoring:git diff <base>...HEADtouches nine files,src/core/shared/ai-asset-utils.tsis not among them, and the refactor commit is not in this PR's commit range. Merge #170 first, then retarget this tomain.Studio renders a clip's model and options but the host has no way to say anything about them. This adds one event out and one method in.
Editemitsgeneration:configChangedwhen the selected prompt-bearing clip's model, options, length or prompt changes, carrying{ clipId, type, model?, options, length, prompt }. The host replies withedit.setGenerationStatus(clipId, { text, tone }), rendered beside Generate.Non-obvious:
lengthis a required key typednumber | undefined. It isundefinedonly forauto, where the duration comes from media that does not exist yet; the resolver's placeholder would otherwise be reported as fact.tone: "error"disables Generate. A stale host value should not block work the backend would accept.TimelineUpdatedis a trigger so a live merge-field edit re-announces the resolved prompt.Verify:
npm run verify:ciRisk: 393 lines, roughly half tests. Inert until a host opts in — no behaviour changes without a registered handler and a status call.