From 8cb7309ee570dc090e14677c53acb26a8b4b3b56 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 24 May 2026 17:53:11 +0300 Subject: [PATCH] =?UTF-8?q?fix(skd-decompile):=20=D1=81=D0=BE=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D1=8F=D1=82=D1=8C=20Auto=20?= =?UTF-8?q?=D0=BD=D0=B0=20StructureItemChart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Раньше пропускали top-level selection в chart если она содержит только SelectedItemAuto (считая дефолтом). Но оригинал платформы всегда эмитит блок явно — для bit-perfect нужно сохранять presence (по аналогии с table axis и structure-group, где selection presence уже сохраняется). Sample30 total: 782 → 767 строк diff. --- .claude/skills/skd-decompile/scripts/skd-decompile.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 index d160641f..c94321ab 100644 --- a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 +++ b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 @@ -1,4 +1,4 @@ -# skd-decompile v0.76 — Decompile 1C DCS Template.xml to JSON DSL (draft) +# skd-decompile v0.77 — Decompile 1C DCS Template.xml to JSON DSL (draft) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -2241,10 +2241,11 @@ function Build-Structure { foreach ($s in $snList) { $sArr += (Build-TableAxisBlock -node $s -loc "$loc/$idx/series[$si]"); $si++ } $entry['series'] = $sArr } + # Selection (chart values) — сохраняем даже [Auto] для bit-perfect presence $selN = $it.SelectSingleNode("dcsset:selection", $ns) - $selI = Build-Selection -selNode $selN -loc "$loc/$idx/selection" - if ($selI.Count -gt 0 -and -not ($selI.Count -eq 1 -and $selI[0] -eq 'Auto')) { - $entry['selection'] = $selI + if ($selN) { + $selI = Build-Selection -selNode $selN -loc "$loc/$idx/selection" + if ($selI.Count -gt 0) { $entry['selection'] = $selI } } $opN = $it.SelectSingleNode("dcsset:outputParameters", $ns) $op = Build-OutputParameters -opNode $opN