fix: allow multiple pipeline chunker nodes#14845
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR modifies operator constraints in the pipeline UI to allow multiple instances of chunker operators. The ChangesMultiple Chunker Operators Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What problem does this solve?
Closes #14772.
Pipeline workflows hid chunker nodes after one instance had already been added, which prevented users from adding multiple independently configured title/token chunking stages in the same pipeline.
What is changed?
Parser,Tokenizer) restricted to a single canvas instance.TokenChunkerandTitleChunkeravailable in the pipeline operator menu after one is already present.Behavior proof
PipelineAccordionOperatorsfilteredTokenChunkerandTitleChunkerthroughrestrictSingleOperatorOnCanvas, so the menu removed them oncefindNodeByName()found an existing node.[Operator.TokenChunker, Operator.TitleChunker], whileParserandTokenizerstill go through the singleton filter.Test plan
git diff --checkcd web && npx eslint src/pages/agent/canvas/node/dropdown/accordion-operators.tsx src/pages/agent/constant/pipeline.tsxprettier --write --ignore-unknownandeslinton staged filescd web && npm run type-check -- --pretty falsecurrently fails on existing unrelated TypeScript errors outside this change, e.g.src/components/document-preview/doc-preview.tsx,src/components/dynamic-form.tsx, andsrc/components/file-upload.tsx.