Skip to content

Cleanup/prompt enh context unification#307

Open
failerko wants to merge 15 commits intoepic/#254/prompt-pack-enh--unified-contextfrom
cleanup/prompt-enh--context-unification
Open

Cleanup/prompt enh context unification#307
failerko wants to merge 15 commits intoepic/#254/prompt-pack-enh--unified-contextfrom
cleanup/prompt-enh--context-unification

Conversation

@failerko
Copy link
Copy Markdown
Collaborator

No description provided.

failerko and others added 11 commits March 29, 2026 04:08
…nitions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nitions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nesting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch validator, TemplateEditor, VariablePalette, TemplatePreview,
TestVariablesModal, and PromptPackEditor from the old flat
variableRegistry to the new per-template-group APIs
(getVariablesForTemplate, getDisplayGroupsForTemplate,
getSamplesForTemplate). Also update sampleContext.test.ts to use
per-template samples instead of the removed allSamples export.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…h packVariables.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ed-context' into cleanup/prompt-enh--context-unification
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the template variable system, replacing the flat VariableRegistry with a structured, per-template context mapping in templateContextMap.ts. This change enhances autocomplete, validation, and UI grouping in components like TemplateEditor and TestVariablesModal. Sample data has been reorganized to match these context groups. Feedback addresses a namespace mismatch in the validator, root detection issues for namespaced variables, optimization of helper functions within effects, and minor corrections to field definitions and typos.

Comment thread src/lib/components/vault/prompts/TemplateEditor.svelte Outdated
Comment thread src/lib/services/templates/validator.ts Outdated
Comment thread src/lib/components/vault/prompts/PromptPackEditor.svelte Outdated
Comment thread src/lib/services/templates/templateContextMap.ts
Comment thread src/lib/services/templates/templateContextMap.ts Outdated
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.

2 participants