← All changes
|
modules/mcp/abilities/utils/llm-guidance-builder.php
+6
-1
4.3.0-beta1
→
trunk
View file →
| @@ -18,8 +18,12 @@ | ||
| 18 | 18 | ]; |
| 19 | 19 | |
| 20 | 20 | $default_styles = self::collect_default_styles( $config['base_styles'] ?? [] ); |
| 21 | 21 | |
| 22 | + if ( Atomic_Container_Presentation::applies_to( $config ) ) { | |
| 23 | + $default_styles = array_merge( Atomic_Container_Presentation::SHELL_STYLES, $default_styles ); | |
| 24 | + } | |
| 25 | + | |
| 22 | 26 | $instructions = array_filter( [ |
| 23 | 27 | ! empty( $default_styles ) ? self::DEFAULT_STYLES_INSTRUCTION : null, |
| 24 | 28 | ] ); |
| 25 | 29 | |
| @@ -59,9 +63,10 @@ | ||
| 59 | 63 | } |
| 60 | 64 | |
| 61 | 65 | private static function build_nesting( array $config, string $widget_type, array $parents_index ): array { |
| 62 | 66 | $allowed_child_types = $config['allowed_child_types'] ?? []; |
| 63 | - $allowed_parents = $parents_index[ $widget_type ] ?? []; | |
| 67 | + $emit_allowed_parents = empty( $config['show_in_panel'] ); | |
| 68 | + $allowed_parents = $emit_allowed_parents ? ( $parents_index[ $widget_type ] ?? [] ) : []; | |
| 64 | 69 | |
| 65 | 70 | return array_filter( |
| 66 | 71 | [ |
| 67 | 72 | 'allowed_child_types' => empty( $allowed_child_types ) ? null : $allowed_child_types, |