diff --git a/.claude/skills/skd-compile/scripts/skd-compile.ps1 b/.claude/skills/skd-compile/scripts/skd-compile.ps1 index b88a316a..94101c4a 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.ps1 +++ b/.claude/skills/skd-compile/scripts/skd-compile.ps1 @@ -1,4 +1,4 @@ -# skd-compile v1.57 — Compile 1C DCS from JSON +# skd-compile v1.58 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$DefinitionFile, @@ -2646,12 +2646,18 @@ function Emit-StructureItem { } } - # viewMode/itemsViewMode on StructureItemGroup are context-dependent — - # platform emits them in some shapes (top-level single group) but not always. - # Emit only when explicitly set in JSON (preserves bit-perfect round-trip). + # viewMode/itemsViewMode/userSettingID/userSettingPresentation on + # StructureItemGroup are context-dependent — emit only when explicitly set. if ($item.viewMode) { X "$indent`t$(Esc-Xml "$($item.viewMode)")" } + if ($item.userSettingID) { + $gid = if ("$($item.userSettingID)" -eq "auto") { New-Guid-String } else { "$($item.userSettingID)" } + X "$indent`t$(Esc-Xml $gid)" + } + if ($item.userSettingPresentation) { + Emit-MLText -tag "dcsset:userSettingPresentation" -text $item.userSettingPresentation -indent "$indent`t" + } if ($item.itemsViewMode) { X "$indent`t$(Esc-Xml "$($item.itemsViewMode)")" } diff --git a/.claude/skills/skd-compile/scripts/skd-compile.py b/.claude/skills/skd-compile/scripts/skd-compile.py index fc6e16d3..620926f7 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.py +++ b/.claude/skills/skd-compile/scripts/skd-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# skd-compile v1.57 — Compile 1C DCS from JSON +# skd-compile v1.58 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import json @@ -2189,9 +2189,14 @@ def emit_structure_item(lines, item, indent): for child in item['children']: emit_structure_item(lines, child, f'{indent}\t') - # viewMode/itemsViewMode — emit only when explicitly set (context-dependent) + # viewMode/itemsViewMode/userSettingID/userSettingPresentation — context-dependent if item.get('viewMode'): lines.append(f'{indent}\t{esc_xml(str(item["viewMode"]))}') + if item.get('userSettingID'): + gid = new_uuid() if str(item['userSettingID']) == 'auto' else str(item['userSettingID']) + lines.append(f'{indent}\t{esc_xml(gid)}') + if item.get('userSettingPresentation'): + emit_mltext(lines, f'{indent}\t', 'dcsset:userSettingPresentation', item['userSettingPresentation']) if item.get('itemsViewMode'): lines.append(f'{indent}\t{esc_xml(str(item["itemsViewMode"]))}')