diff --git a/.claude/skills/meta-compile/scripts/meta-compile.ps1 b/.claude/skills/meta-compile/scripts/meta-compile.ps1 index b2918df4..3c227d7b 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.ps1 +++ b/.claude/skills/meta-compile/scripts/meta-compile.ps1 @@ -1,4 +1,4 @@ -# meta-compile v1.11 — Compile 1C metadata object from JSON +# meta-compile v1.12 — Compile 1C metadata object from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -502,6 +502,7 @@ function Parse-AttributeShorthand { fillChecking = if ($val.fillChecking) { "$($val.fillChecking)" } else { "" } indexing = if ($val.indexing) { "$($val.indexing)" } else { "" } multiLine = if ($val.multiLine -eq $true) { $true } else { $false } + choiceHistoryOnInput = if ($val.choiceHistoryOnInput) { "$($val.choiceHistoryOnInput)" } else { "" } } } @@ -822,7 +823,8 @@ function Emit-Attribute { X "$indent`t`tAuto" X "$indent`t`t" X "$indent`t`t" - X "$indent`t`tAuto" + $chi = if ($parsed.choiceHistoryOnInput) { $parsed.choiceHistoryOnInput } else { "Auto" } + X "$indent`t`t$chi" # Use — only for catalog top-level attributes if ($context -eq "catalog") { diff --git a/.claude/skills/meta-compile/scripts/meta-compile.py b/.claude/skills/meta-compile/scripts/meta-compile.py index 196397e8..6e8a07a4 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.py +++ b/.claude/skills/meta-compile/scripts/meta-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# meta-compile v1.11 — Compile 1C metadata object from JSON +# meta-compile v1.12 — Compile 1C metadata object from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -465,6 +465,7 @@ def parse_attribute_shorthand(val): 'fillChecking': str(val['fillChecking']) if val.get('fillChecking') else '', 'indexing': str(val['indexing']) if val.get('indexing') else '', 'multiLine': True if val.get('multiLine') is True else False, + 'choiceHistoryOnInput': str(val['choiceHistoryOnInput']) if val.get('choiceHistoryOnInput') else '', } def parse_enum_value_shorthand(val): @@ -774,7 +775,8 @@ def emit_attribute(indent, parsed, context): X(f'{indent}\t\tAuto') X(f'{indent}\t\t') X(f'{indent}\t\t') - X(f'{indent}\t\tAuto') + chi = parsed.get('choiceHistoryOnInput') or 'Auto' + X(f'{indent}\t\t{chi}') if context == 'catalog': X(f'{indent}\t\tForItem') if context not in ('processor', 'processor-tabular'): diff --git a/tests/skills/integration/build-webtest-config.test.mjs b/tests/skills/integration/build-webtest-config.test.mjs index a36c8c97..688349c8 100644 --- a/tests/skills/integration/build-webtest-config.test.mjs +++ b/tests/skills/integration/build-webtest-config.test.mjs @@ -140,7 +140,9 @@ export const steps = [ type: 'Document', name: 'ПриходнаяНакладная', attributes: [ { name: 'Организация', type: 'CatalogRef.Организации' }, - { name: 'Контрагент', type: 'CatalogRef.Контрагенты' }, + // choiceHistoryOnInput=DontUse: предотвращает выбор через историю в smoke-тестах + // (04-selectvalue/direct-form проверяет open-form path; история обходит его). + { name: 'Контрагент', type: 'CatalogRef.Контрагенты', choiceHistoryOnInput: 'DontUse' }, { name: 'Склад', type: 'String', length: 50 }, { name: 'Комментарий', type: 'String', length: 200 }, ],