Skip to content

Asset based container generation and AI context resolution refinement#620

Open
underscope wants to merge 34 commits intofeature/contextual-discoveryfrom
feature/structured-content-ai
Open

Asset based container generation and AI context resolution refinement#620
underscope wants to merge 34 commits intofeature/contextual-discoveryfrom
feature/structured-content-ai

Conversation

@underscope
Copy link
Copy Markdown
Collaborator

@underscope underscope commented Mar 28, 2026

  • Move all DB-backed context assembly (outline, tags, assets, vectorStoreId) into RepositoryContext - single repo fetch, no DB access in AiPrompt
  • Backend resolves AI instructions from outline hierarchy via activityId instead of frontend enriching prompt text
  • Nest asset meta fields under AssetReference.meta; drop unused fields
  • Remove dead code (getContainerGenerationConfig, duplicate import)

Move all DB-backed context assembly (outline hierarchy, repository
meta, assets, vectorStoreId) from AiPrompt and frontend into
RepositoryContext.resolve(). This eliminates duplicate Repository
fetches, removes frontend-side AI instruction enrichment and tag
assembly, and makes AiPrompt a pure prompt builder with no DB access.

- Add activityId to AiRepositoryContext; backend resolves outline
  ancestors via Activity.predecessors() for location + AI instructions
- Resolve tags from repo.data.$$.ai server-side (frontend fallback
  kept for pre-repository outline generation)
- Nest asset meta fields under AssetReference.meta instead of
  flattening onto top level; trim unused fields (mimeType, extension,
  width, height, provider, fileSize)
- AiPrompt.context is now a getter merging requestContext with
  resolved data — no manual sync step
- Remove dead getContainerGenerationConfig, rename
  flattenElementTypeIds → getSupportedElementTypes
- Fix duplicate AssetType import in AssetList.vue
@underscope underscope changed the base branch from main to feature/contextual-discovery March 28, 2026 10:32
Move all DB-backed context assembly (outline hierarchy, repository
meta, assets, vectorStoreId) from AiPrompt and frontend into
RepositoryContext.resolve(). This eliminates duplicate Repository
fetches, removes frontend-side AI instruction enrichment and tag
assembly, and makes AiPrompt a pure prompt builder with no DB access.

- Add activityId to AiRepositoryContext; backend resolves outline
  ancestors via Activity.predecessors() for location + AI instructions
- Resolve tags from repo.data.$$.ai server-side (frontend fallback
  kept for pre-repository outline generation)
- Nest asset meta fields under AssetReference.meta instead of
  flattening onto top level; trim unused fields (mimeType, extension,
  width, height, provider, fileSize)
- AiPrompt.context is now a getter merging requestContext with
  resolved data — no manual sync step
- Remove dead getContainerGenerationConfig, rename
  flattenElementTypeIds → getSupportedElementTypes
- Fix duplicate AssetType import in AssetList.vue
…ilor-cms/author into feature/structured-content-ai

# Conflicts:
#	apps/backend/asset/asset.service.ts
#	apps/backend/asset/extraction/synthetic-content.ts
#	apps/frontend/app/components/repository/Assets/utils.ts
…ontent-ai

# Conflicts:
#	apps/frontend/app/components/repository/Assets/utils.ts
#	packages/core-components/src/components/FileInput/PickerDialog/LibraryTab/AssetList.vue
#	packages/core-components/src/components/FileInput/index.vue
#	packages/tailor-interfaces/asset.ts
#	tests/specs/functional/assets/asset-api.spec.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant