feat: set branch summary on predicate gen (#3212)

This commit is contained in:
HugoCasa
2024-02-13 17:36:32 +01:00
committed by GitHub
parent d352b68a26
commit 156d10d416
4 changed files with 18 additions and 1 deletions

View File

@@ -71,6 +71,7 @@ Only return the expression without any wrapper. Do not explain or discuss.`
)
dispatch('setExpr', result)
dispatch('updateSummary', instructions)
} catch (err) {
if (!abortController.signal.aborted) {
sendUserToast('Could not generate summary: ' + err, true)

View File

@@ -65,6 +65,7 @@
on:setExpr={(e) => {
branch.expr = e.detail
}}
on:updateSummary
pickableProperties={stepPropPicker.pickableProperties}
/>
{/if}

View File

@@ -22,7 +22,17 @@
</div>
<div class="overflow-hidden flex-grow">
<h3 class="p-2">Predicate expression</h3>
<BranchPredicateEditor {branch} {parentModule} {previousModule} {enableAi} />
<BranchPredicateEditor
{branch}
{parentModule}
{previousModule}
{enableAi}
on:updateSummary={(e) => {
if (!branch.summary) {
branch.summary = e.detail
}
}}
/>
</div>
</FlowCard>
</div>

View File

@@ -68,6 +68,11 @@
<div class="w-full border">
<BranchPredicateEditor
{branch}
on:updateSummary={(e) => {
if (!branch.summary) {
branch.summary = e.detail
}
}}
parentModule={flowModule}
{previousModule}
{enableAi}