Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface HighlightContext {
highlightAll?: boolean
}

const SYSTEM_PREFIXES = new Set(['start', 'loop', 'parallel', 'variable'])
const SYSTEM_PREFIXES = new Set(['loop', 'parallel', 'variable'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Duplicated constant diverges from canonical source

SYSTEM_PREFIXES here is a local copy of SYSTEM_REFERENCE_PREFIXES from references.ts — this PR keeps them in sync, but they can drift again with future changes. Since splitReferenceSegment is already imported from that module, importing SYSTEM_REFERENCE_PREFIXES directly removes the duplication.

Suggested change
const SYSTEM_PREFIXES = new Set(['loop', 'parallel', 'variable'])
import { splitReferenceSegment, SYSTEM_REFERENCE_PREFIXES as SYSTEM_PREFIXES } from '@/lib/workflows/sanitization/references'

Then delete the local const SYSTEM_PREFIXES = new Set(...) declaration entirely.


/**
* Formats text by highlighting block references (<...>) and environment variables ({{...}})
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/lib/workflows/sanitization/references.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { normalizeName, REFERENCE } from '@/executor/constants'

export const SYSTEM_REFERENCE_PREFIXES = new Set(['start', 'loop', 'parallel', 'variable'])
export const SYSTEM_REFERENCE_PREFIXES = new Set(['loop', 'parallel', 'variable'])

const INVALID_REFERENCE_CHARS = /[+*/=<>!]/

Expand Down
Loading