Fix: The pipeline created from the template fails immediately upon execution. (#16149)

### What problem does this PR solve?

Fix: The pipeline created from the template fails immediately upon
execution.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2026-06-17 17:03:17 +08:00
committed by GitHub
parent 9302233b95
commit 70f319c536
2 changed files with 5 additions and 3 deletions

View File

@@ -69,7 +69,9 @@ export enum TitleChunkerRulesField {
Group = 'groupRules',
}
export type TitleChunkerFormSchemaType = z.infer<typeof FormSchema>;
export type TitleChunkerFormSchemaType = z.infer<typeof FormSchema> & {
rules: z.infer<typeof rulesSchema>;
};
type LevelItemProps = {
index: number;

View File

@@ -355,9 +355,9 @@ function transformTokenChunkerParams(params: TokenChunkerFormSchemaType) {
function transformTitleChunkerParams(params: TitleChunkerFormSchemaType) {
const activeRules =
params.method === TitleChunkerMethod.Group
(params.method === TitleChunkerMethod.Group
? params.groupRules
: params.hierarchyRules;
: params.hierarchyRules) ?? params.rules;
const levels = (activeRules || []).map((rule) =>
transformObjectArrayToPureArray(rule.levels, 'expression'),