feat(ui): edit objective/constraint source in panel + UNSET wiring
This commit is contained in:
@@ -178,9 +178,14 @@ const validationRules: ValidationRule[] = [
|
||||
edge => edge.target === obj.id && edge.source.startsWith('ext_')
|
||||
);
|
||||
|
||||
// Also check if source.extractor_id is set
|
||||
const hasDirectSource = obj.source?.extractor_id &&
|
||||
spec.extractors.some(e => e.id === obj.source.extractor_id);
|
||||
// Also check if source.extractor_id is set (and not UNSET placeholders)
|
||||
const extractorId = obj.source?.extractor_id;
|
||||
const outputName = obj.source?.output_name;
|
||||
const hasDirectSource = Boolean(extractorId) &&
|
||||
extractorId !== '__UNSET__' &&
|
||||
Boolean(outputName) &&
|
||||
outputName !== '__UNSET__' &&
|
||||
spec.extractors.some(e => e.id === extractorId);
|
||||
|
||||
if (!hasSource && !hasDirectSource) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user