Improve data skill routing and tool organization
This commit is contained in:
@@ -49,6 +49,8 @@ def prepare_generation_goal(
|
||||
if missing:
|
||||
raise DataRecordError('missing required goal fields: ' + ', '.join(missing))
|
||||
normalized_targets = _normalize_target_definitions(target_definitions)
|
||||
if not target.strip() and not normalized_targets:
|
||||
raise DataRecordError('generation goal must include target or target_definitions')
|
||||
state = _load_goal_state(root)
|
||||
sequence = int(state.get('next_sequence') or 1)
|
||||
goal_id = f'data_goal_{sequence:06d}'
|
||||
@@ -186,6 +188,12 @@ def prepare_generation_plan(
|
||||
}
|
||||
)
|
||||
normalized_targets = _normalize_target_definitions(target_definitions)
|
||||
if confirmed_goal is not None and not target.strip() and not normalized_targets:
|
||||
normalized_targets = _normalize_target_definitions(
|
||||
confirmed_goal.get('target_definitions') if isinstance(confirmed_goal, dict) else None
|
||||
)
|
||||
if not normalized_targets:
|
||||
target = str(confirmed_goal.get('target') or '').strip()
|
||||
if not target.strip() and not normalized_targets:
|
||||
missing.append('target')
|
||||
if missing:
|
||||
|
||||
Reference in New Issue
Block a user