hash icon indicating copy to clipboard operation
hash copied to clipboard

H-2722: Add AI-generated name for flow runs

Open CiaranMn opened this issue 1 year ago β€’ 3 comments

🌟 What is the purpose of this PR?

This PRs adds a way of distinguishing between runs of a given flow type by assigning a name to them.

The name is:

  • fixed to [Auto-] Analyze URL: [url] in the case of browser-triggered flows
  • generated by an LLM from the flow inputs in other cases

It uses this name in the frontend UI where flow runs are listed, as well as on the page for the flow run.

Since I was editing the Flow entity type I've taken the opportunity to rename it to Flow Run to distinguish it from Flow Definitions.

Pre-Merge Checklist πŸš€

🚒 Has this modified a publishable library?

This PR:

  • [x] does not modify any publishable blocks or libraries, or modifications do not need publishing

πŸ“œ Does this require a change to the docs?

The changes in this PR:

  • [x] are internal and do not require a docs change

πŸ•ΈοΈ Does this require a change to the Turbo Graph?

The changes in this PR:

  • [x] do not affect the execution graph

🐾 Next steps

The quality of the outputted name will probably need improving based on further usage.

πŸ›‘ What tests cover this?

  • None yet

❓ How to test this?

  1. Start any flow, see what name it is given.

πŸ“Ή Demo

Name generated from input

https://github.com/hashintel/hash/assets/37743469/096e1cde-e6eb-4999-be10-5e28002646e8

Fixed name for browser-base flows

Screenshot 2024-05-23 at 16 31 04

CiaranMn avatar May 23 '24 15:05 CiaranMn

User CiaranMn does not have permission to trigger build.

plasmo-itero[bot] avatar May 23 '24 15:05 plasmo-itero[bot]

User CiaranMn does not have permission to trigger build.

plasmo-itero[bot] avatar May 23 '24 15:05 plasmo-itero[bot]

Codecov Report

Attention: Patch coverage is 0% with 48 lines in your changes are missing coverage. Please review.

Project coverage is 21.04%. Comparing base (a99e8a2) to head (c26625e). Report is 1 commits behind head on main.

Files Patch % Lines
...flow-activities/generate-flow-run-name-activity.ts 0.00% 30 Missing :warning:
libs/@local/hash-backend-utils/src/flows.ts 0.00% 7 Missing :warning:
...sh-ai-worker-ts/src/workflows/run-flow-workflow.ts 0.00% 4 Missing :warning:
...@local/hash-isomorphic-utils/src/flows/mappings.ts 0.00% 3 Missing :warning:
...ctivities/flow-activities/persist-flow-activity.ts 0.00% 1 Missing :warning:
.../shared/testing-utilities/mock-get-flow-context.ts 0.00% 1 Missing :warning:
...rkflows/run-flow-workflow/get-all-steps-in-flow.ts 0.00% 1 Missing :warning:
...src/workflows/run-flow-workflow/initialize-flow.ts 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4504      +/-   ##
==========================================
- Coverage   21.10%   21.04%   -0.06%     
==========================================
  Files         456      460       +4     
  Lines       15247    15290      +43     
  Branches     2277     2283       +6     
==========================================
  Hits         3218     3218              
- Misses      11988    12031      +43     
  Partials       41       41              
Flag Coverage Ξ”
apps.hash-ai-worker-ts 1.81% <0.00%> (-0.02%) :arrow_down:
apps.hash-api 0.00% <ΓΈ> (ΓΈ)
local.hash-backend-utils 4.26% <0.00%> (-0.05%) :arrow_down:
local.hash-isomorphic-utils 0.00% <0.00%> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 23 '24 15:05 codecov[bot]