Skip to content

Commit 8088fae

Browse files
author
Roman Snapko
committed
Remove stepDisplayName and stepIndex logic; update context enrichment to use currentStepId instead
1 parent a85b9ef commit 8088fae

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

packages/react-ui/src/app/features/ai/lib/enrich-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const createAdditionalContext = (
2222
flowId: flowVersion.flowId,
2323
flowVersionId: flowVersion.id,
2424
runId,
25-
currentStepIndex: stepData?.stepIndex,
25+
currentStepId: stepData?.id ?? '',
2626
steps: [
2727
{
2828
id: stepData?.id ?? '',

packages/server/api/src/app/ai/chat/context-enrichment.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ async function resolveVariable(
255255
if (!workflowStep) {
256256
return {
257257
name: variable.name,
258-
value: 'Failed to resolve variable: Step not found in flow.',
258+
value: 'Failed to resolve variable: Step not found in the workflow.',
259259
};
260260
}
261261

packages/server/api/src/app/ai/chat/prompts.service.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,6 @@ export const buildUIContextSection = async (
139139
contextParts.push(`step id ${flowContext.currentStepId}`);
140140
}
141141

142-
if (flowContext.currentStepDisplayName) {
143-
contextParts.push(`step name "${flowContext.currentStepDisplayName}"`);
144-
}
145-
146-
if (flowContext.currentStepIndex) {
147-
contextParts.push(`step index "${flowContext.currentStepIndex}"`);
148-
}
149-
150142
if (contextParts.length === 0) {
151143
return '';
152144
}

0 commit comments

Comments
 (0)