use code/use ai in workflow run ui (#3468)

This commit is contained in:
Jonathan Dobson
2025-09-18 17:27:48 -04:00
committed by GitHub
parent 07eaaf6682
commit f73de59d6c
2 changed files with 265 additions and 25 deletions

View File

@@ -120,7 +120,7 @@ const constructCacheKeyValue = (opts: {
workflowRun?: WorkflowRunStatusApiResponse;
}) => {
const { workflow, workflowRun } = opts;
let codeKey = opts.codeKey;
const codeKey = opts.codeKey;
if (!workflow) {
return "";
@@ -138,7 +138,20 @@ const constructCacheKeyValue = (opts: {
{} as Record<string, unknown>,
);
for (const [name, value] of Object.entries(workflowParameters)) {
return constructCacheKeyValueFromParameters({
codeKey,
parameters: workflowParameters,
});
};
const constructCacheKeyValueFromParameters = (opts: {
codeKey: string;
parameters: Record<string, unknown>;
}) => {
const parameters = opts.parameters;
let codeKey = opts.codeKey;
for (const [name, value] of Object.entries(parameters)) {
if (value === null || value === undefined || value === "") {
continue;
}
@@ -153,4 +166,8 @@ const constructCacheKeyValue = (opts: {
return codeKey;
};
export { constructCacheKeyValue, getInitialParameters };
export {
constructCacheKeyValue,
constructCacheKeyValueFromParameters,
getInitialParameters,
};