Skip to content

Commit

Permalink
⚡ Resolving assistant expressions using default values
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Sep 17, 2024
1 parent 621e70a commit acbc00f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
15 changes: 1 addition & 14 deletions packages/editor-ui/src/composables/useWorkflowHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,20 +712,7 @@ export function useWorkflowHelpers(options: { router: ReturnType<typeof useRoute
// Resolve the expression if it is one
let resolved;
try {
let opts: Parameters<typeof resolveExpression>[2] = {
isForCredential: false,
};
const ndvStore = useNDVStore();
if (ndvStore.isInputParentOfActiveNode) {
opts = {
...opts,
targetItem: ndvStore.expressionTargetItem ?? undefined,
inputNodeName: ndvStore.ndvInputNodeName,
inputRunIndex: ndvStore.ndvInputRunIndex,
inputBranchIndex: ndvStore.ndvInputBranchIndex,
};
}
resolved = resolveExpression(value, undefined, opts);
resolved = resolveExpression(value, undefined, { isForCredential: false });
} catch (error) {
resolved = `Error in expression: "${error.message}"`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ const referencedNodesTestCases: Array<{ caseName: string; node: INode; expected:
parameters: {
curlImport: '',
method: 'GET',
// eslint-disable-next-line prettier/prettier
url: "={{ $(`Edit \\`Fields\\` 2`).item.json.name }}",
url: '={{ $(`Edit \\`Fields\\` 2`).item.json.name }}',
authentication: 'none',
provideSslCertificates: false,
sendQuery: false,
Expand Down

0 comments on commit acbc00f

Please sign in to comment.