Skip to content

Guide recipes use real template parameters + attribute-aware parameter listing#142

Open
zekelinAlex wants to merge 2 commits into
TALXIS:masterfrom
zekelinAlex:users/alexander.zekelin/issue-92-guide-template-params
Open

Guide recipes use real template parameters + attribute-aware parameter listing#142
zekelinAlex wants to merge 2 commits into
TALXIS:masterfrom
zekelinAlex:users/alexander.zekelin/issue-92-guide-template-params

Conversation

@zekelinAlex

@zekelinAlex zekelinAlex commented Jun 5, 2026

Copy link
Copy Markdown

The guide tool plans component scaffolding by asking the model what commands to run, but the model doesn't know a template's parameters, so it made up names like FieldName that don't exist and the create call failed. This attaches the real parameter list to the recipe.

Сlose: #92
How GuideHandle worksr:

  1. The sampling prompt asks the model to add a 'TEMPLATES: tamplate-short-name' line naming the templates its recipe scaffolds
  2. After the model returns the recipe text, EnrichRecipeWithTemplateParamsAsync runs, but only if workspace_component_create is one of the matched tools.
  3. ExtractTemplateShortNames reads the TEMPLATES line, or falls back to scanning the recipe for pp-* names if it's missing.
  4. For each tamplate, GetParametersAsync runs txc workspace component parameter list --format json and parses it. Results are cached in memory per template so the command isn't run twice.
  5. BuildAuthoritativeBlock turns those parameters into a markdown section (required vs optional, types, choices, defaults ect)
  6. That markdown section is concatenated onto the recipe text and the combined string is returned to the agent as the guide's answer. If any lookup fails, the recipe is returned unchanged.

Сlose: #88
How ComponentParameterListCliCommand works:
1.The user runs txc workspace component parameter list pp-entity-attribute --param AttributeType=Text.
2. The command fetches the template's full parameter list via ListParametersForTemplateAsync
3. ParseParamValues turns the --param values into a dictionary
4. f at least one --param was given, FilterEnabled is called with the parameter list and that dictionary
5. For each parameter that has an isEnabled condition, method Evaluate runs; the parameter stays if it has no condition or the condition is true
6. The filtered list is printed, and each parameter also shows its appliesWhen / requiredWhen conditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant