{ editor?.insertAtCursor(detail) editor?.focus() }} > {#snippet aiGen()} {#if enableAi} { branch.expr = e.detail // Monaco owns its buffer once mounted: writing the value alone leaves // the visible code stale until the editor is torn down and rebuilt. editor?.setCode(e.detail) }} on:updateSummary={(e) => { // The prompt names the branch better than "Branch 2" does, but only // when the user hasn't already named it themselves. if (!branch.summary) { branch.summary = e.detail } }} pickableProperties={stepPropPicker.pickableProperties} /> {/if} {/snippet}