Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
fix(tag-dropdown): exclude downstream blocks in loops and parallel siblings#3312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
019b407
fix(tag-dropdown): exclude downstream blocks in loops and parallel si…
waleedlatif1 0c261f7
chore(serializer): remove unused computeAccessibleBlockIds method
waleedlatif1 f7404a3
chore(block-path-calculator): remove unused calculateAccessibleBlocks…
waleedlatif1 b068b42
chore(tag-dropdown): remove no-op loop node filter
waleedlatif1 a44e766
fix(tag-dropdown): remove parallel container from accessible referenc…
waleedlatif1 68bc9f6
chore(tag-dropdown): remove no-op starter block filter
waleedlatif1 de8ef28
fix(tag-dropdown): restore parallel container in accessible reference…
waleedlatif1 f31ac10
fix(copilot): exclude downstream loop nodes and parallel siblings fro…
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
24 changes: 4 additions & 20 deletions
24 ...sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2,7 +2,6 @@ import { useMemo } from 'react' | ||
| import { useShallow } from 'zustand/react/shallow' | ||
| import { BlockPathCalculator } from '@/lib/workflows/blocks/block-path-calculator' | ||
| import { SYSTEM_REFERENCE_PREFIXES } from '@/lib/workflows/sanitization/references' | ||
| import { isInputDefinitionTrigger } from '@/lib/workflows/triggers/input-definition-triggers' | ||
| import { normalizeName } from '@/executor/constants' | ||
| import { useWorkflowStore } from '@/stores/workflows/workflow/store' | ||
| import type { Loop, Parallel } from '@/stores/workflows/workflow/types' | ||
| @@ -27,27 +26,12 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str | ||
| const accessibleIds = new Set<string>(ancestorIds) | ||
| accessibleIds.add(blockId) | ||
| const starterBlock = Object.values(blocks).find((block) => isInputDefinitionTrigger(block.type)) | ||
| if (starterBlock && ancestorIds.includes(starterBlock.id)) { | ||
| accessibleIds.add(starterBlock.id) | ||
| } | ||
| const loopValues = Object.values(loops as Record<string, Loop>) | ||
| loopValues.forEach((loop) => { | ||
| if (!loop?.nodes) return | ||
| if (loop.nodes.includes(blockId)) { | ||
| accessibleIds.add(loop.id) // Add the loop block itself | ||
| loop.nodes.forEach((nodeId) => accessibleIds.add(nodeId)) | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| Object.values(loops as Record<string, Loop>).forEach((loop) => { | ||
| if (loop?.nodes?.includes(blockId)) accessibleIds.add(loop.id) | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| }) | ||
| const parallelValues = Object.values(parallels as Record<string, Parallel>) | ||
| parallelValues.forEach((parallel) => { | ||
| if (!parallel?.nodes) return | ||
| if (parallel.nodes.includes(blockId)) { | ||
| accessibleIds.add(parallel.id) // Add the parallel block itself | ||
| parallel.nodes.forEach((nodeId) => accessibleIds.add(nodeId)) | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| Object.values(parallels as Record<string, Parallel>).forEach((parallel) => { | ||
| if (parallel?.nodes?.includes(blockId)) accessibleIds.add(parallel.id) | ||
| }) | ||
| const prefixes = new Set<string>() | ||
16 changes: 2 additions & 14 deletions
16 apps/sim/lib/copilot/orchestrator/tool-executor/workflow-tools/queries.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.