Skip to content

Conversation

@hunterjam
Copy link
Contributor

Purpose

  • Content Generation is replacing the Document Generation. Moving to the DEV branch until ready to publish.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • I have built and tested the code locally and in a deployed app
  • For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
  • This is a change for all users of this app. No code or asset is specific to my use case or my organization.

Other Information

hunterjam and others added 30 commits November 21, 2025 16:57
- Multi-agent architecture using Microsoft Agent Framework
- React/TypeScript frontend with Fluent UI
- Python/Quart backend with async streaming
- Azure OpenAI GPT-5.1 for text generation
- Azure OpenAI DALL-E 3 for image generation
- Azure Cosmos DB for conversation persistence
- Azure Blob Storage for image storage
- Azure AI Search for product/image search
- Comprehensive brand guidelines compliance checking
- Creative brief parsing and confirmation flow
- Real-time SSE streaming for chat responses
- Updated model names (GPT-5.1 instead of GPT-5)
- Added note about DALL-E potentially being in separate resource
- Updated resource descriptions (product-images, generated-images containers)
- Added Azure AI Search index descriptions (products, product-images)
- Replaced sample data loading with proper image upload and index creation scripts
- Added RBAC role assignment instructions for Azure OpenAI access
- Added note about AZURE_OPENAI_DALLE_ENDPOINT configuration
- Created ChatHistory component to display and manage previous conversations
- Added ability to select and load previous conversations
- Added ability to start new conversations
- Added delete conversation functionality
- Updated App.tsx with conversation state management
- Updated layout to three-column design (history, chat, sidebar)
- Added responsive CSS for smaller screens
- Add message saving to /api/brief/parse endpoint (user message + parsing response)
- Add confirmation message saving to /api/brief/confirm endpoint
- Add message saving to /api/generate endpoint (request + generated content)
- Update frontend API to pass conversationId and userId to parseBrief
- Update streamGenerateContent to accept and send userId
- Fix assistant response saving condition (requires_user_input OR is_final)
- Add delete_conversation method to cosmos_service
- Update ChatHistory component with currentMessages prop and refresh trigger
- Add InlineBriefConfirmation component for brief confirmation in chat flow
- Add InlineProductSelector component for product selection in chat flow
- Add InlineContentPreview component for generated content in chat flow
- Update ChatPanel to render inline components within message stream
- Update App.tsx to pass handlers to ChatPanel and remove sidebar
- Update CSS to hide sidebar and adjust chat panel width

All interactive components now appear directly in the conversation,
creating a more seamless chat-like experience.
- Added generated_content parameter to save_conversation in cosmos_service.py
- Added save_generated_content method to update existing conversations
- Updated /api/generate endpoint to save full generated_content object
- Updated handleSelectConversation in App.tsx to restore generatedContent from DB
- Added /api/images/<conversation_id>/<filename> endpoint to proxy images from blob storage
- Backend now saves proxy URLs instead of direct blob URLs
- Frontend converts old blob URLs to proxy URLs when loading conversations
- Fixes 403 Forbidden errors when accessing generated images
- Add Dockerfile for containerized backend deployment
- Add frontend-server with Express proxy for API calls to ACI
- Fix agent-framework version constraint in requirements.txt
- Fix TypeScript compilation error in frontend API
- Update main.bicep infrastructure
- Add built frontend static files
- Add deployment package
- Configure for App Service with VNet integration
- Backend deployed to ACI with managed identity
- Private endpoints for Cosmos DB and Blob Storage
…ith pagination

- Add aci-deployment.yaml with private endpoint configuration (secret removed)
- Update ChatHistory component to show only 5 conversations initially
- Add 'Show More' and 'Show Less' pagination controls
- Rebuild frontend static assets
- Add /api/user endpoint to get current authenticated user from EasyAuth headers
- Update conversation endpoints to use auth headers instead of query params
- Modify Cosmos DB query to filter by user_id (empty for dev mode)
- Update frontend to fetch user info and remove userId prop from ChatHistory
- Fix Dockerfile to use port 8000 and single worker
- Fix f-string syntax error in app.py
- Updated header with Contoso logo and user avatar
- Moved Chat History panel to right side
- Added WelcomeCard component with Copilot-style icon and vertical suggestion cards
- Redesigned input area with pill-style design and AI disclaimer
- Simplified ChatHistory with 'See all' and 'Start new chat' links
- Updated InlineContentPreview with grid layout matching design mockup
  - Product card on left with color swatch
  - Generated images in center/right with text overlay
  - Marketing copy with sparkle emojis and hashtags
- Updated global.css with new layout styles
- Updated Product model with new fields: description, tags, price
- Added delete_all_products method to cosmos_service
- Rewrote load_sample_data.py with 16 paint products from CSV
- Updated upload_images.py to support PNG files
- Updated frontend Product type and components
- Replaced 16 JPG images with PNG paint color swatches
- Deployed updated frontend to App Service
- Implement responsive design across all UI components using CSS clamp()
- Add breakpoints for mobile (576px), tablet (768px, 992px), and desktop (1200px, 1400px)
- Update WelcomeCard, ChatPanel, ChatHistory, InlineProductSelector, InlineContentPreview
- Add /api/product-images/<filename> proxy endpoint for private storage access
- Update /api/products endpoints to return proxy URLs instead of direct blob URLs
- Add DNS update script for backend container IP changes
- Update .gitignore to exclude build artifacts (static/, node_modules/, zip files)
- Replace editable InlineBriefConfirmation with read-only BriefReview component
- BriefReview displays parsed brief fields in styled cards
- Users can modify brief via natural language chat messages
- handleSendMessage detects brief refinement requests and updates pending brief
- handleBriefConfirm now uses pending brief from state
- Contextual prompts guide users on how to modify/add/remove content
…eration

- Add SSE heartbeat events every 15 seconds to prevent 504 gateway timeouts
- Improve SSE response headers (Connection: keep-alive, Cache-Control)
- Add generationStatus state to track content generation progress
- Add styled progress indicator in ChatPanel with stage-based messages
- Update AgentResponse type to include heartbeat type
- Add ProductReview component
- Update WebApp.Dockerfile for container deployment
- Truncate DALL-E prompts to prevent 'prompt too long' errors
- Remove legacy Foundry SDK agents (base_agent.py, simple_agent.py, triage_agent.py, planning_agent.py, research_agent.py, text_content_agent.py, compliance_agent.py)
- Keep only image_content_agent.py with generate_dalle_image function
- Update agents/__init__.py to export only generate_dalle_image
- Remove _AzureAISettings from settings.py (no longer needed)
- Add progress status indicators for all API operations:
  - 'Parsing creative brief...' for initial brief parsing
  - 'Updating creative brief...' for brief refinements
  - 'Finding products...' for product selection
  - 'Processing your request...' for general chat
- Fix loading spinner to show during all loading states
- Update frontend proxy server.js:
  - Add 5-minute timeout for long-running requests
  - Add streaming support headers for SSE responses
  - Improve error handling for proxy errors
- Updated deploy.sh to use ACR/ACI deployment workflow
- Updated deploy.ps1 with same changes
- Added assign_rbac_roles.sh for managed identity RBAC setup
- Created comprehensive DEPLOYMENT.md guide
- Updated README.md with current architecture details
- Removed azd dependency from main deployment scripts
- Added detailed RBAC instructions for GPT, DALL-E, Cosmos DB, Storage
- Added AZURE_OPENAI_IMAGE_MODEL setting (dall-e-3 or gpt-image-1)
- Added AZURE_OPENAI_GPT_IMAGE_ENDPOINT for dedicated gpt-image-1 endpoint
- Image model can be configured via environment variable
- Automatic quality/size mapping between models:
  - DALL-E 3: standard/hd quality, 1024x1024/1024x1792/1792x1024 sizes
  - gpt-image-1: low/medium/high/auto quality, 1024x1024/1536x1024/1024x1536/auto sizes
- gpt-image-1 supports larger prompts (more context)
- Added generate_image alias for backwards compatibility
- Existing generate_dalle_image function still works (delegates to selected model)
- Changed from SSE streaming to polling architecture for content generation
- Added /api/generate/start endpoint that returns task_id immediately
- Added /api/generate/status/<task_id> endpoint for polling results
- Frontend now polls every 1 second instead of waiting on SSE stream
- Each poll request completes quickly, avoiding VNet integration timeout
- Added background task execution with in-memory task storage
- Added proper async client cleanup in image generation
- Preserved original /api/generate SSE endpoint for backward compatibility
- Updated server.js with extended timeouts and keep-alive settings

Root cause: Azure VNet integration has a hardcoded 60-second idle timeout
that killed SSE connections before gpt-image-1 could complete (40-90s).
The polling approach bypasses this by using quick request/response cycles.
…, fix chat history products

- Updated InlineContentPreview to use HTML Canvas for downloading images with text overlay
- Removed attach file button from ChatPanel (feature not implemented)
- Fixed selected products restoration from chat history in App.tsx
- Added SelectedProductView component for read-only product display
- Added ConfirmedBriefView component for confirmed brief display
- Backend saves selected_products with generated content for history
Infrastructure:
- Add skipContainerDeployment parameter for 2-phase ACI deployment
- Add container-instance.bicep module with UserAssigned identity
- Add virtualNetwork.bicep module with NSGs and subnet config
- Add main.parameters.json for azd env variable mapping
- Update azure.yaml with workflow for automatic image build/push

Scripts:
- Add assign_aci_roles.sh for ACI role assignments
- Add local_dev.sh/ps1 for local development
- Add product_ingestion.py for data loading
- Add scripts/README.md documentation

Frontend:
- Remove unused components (BriefConfirmation, ProductSelector)
- Fix scroll behavior in ChatPanel
- Update frontend build assets

Backend:
- Clean up unused models and imports
- Remove debug logging

Deployment flow:
1. First provision creates ACR, skips ACI (no image yet)
2. postprovision hook builds/pushes image to ACR
3. Re-runs provision to deploy ACI with image
- Updated Bicep: gpt-5.1 model, removed unused params, fixed private endpoint timing
- Added frontend build/deploy to azure.yaml postprovision hook
- Consolidated post-deploy scripts into unified post_deploy.py
- Removed redundant scripts (upload_images, load_sample_data, index_products, assign_rbac_roles)
- Added content filter error handling in frontend
- Added image generation toggle feature
- Added RAI testing framework (rai_test.py, rai_testing.py)
- Fix AZURE_DALLE_MODEL -> AZURE_OPENAI_IMAGE_MODEL in Bicep
- Add AZURE_OPENAI_GPT_IMAGE_ENDPOINT to App Service and Container Instance configs
- Update post_deploy.py with requirements file
- Add backend API module
- Update README and architecture diagram
- admin.py: Use ContentSettings object for blob upload content_type
- admin.py: Add required 'description' field mapping for Product model
- orchestrator.py: Update HandoffBuilder to use .participants([...]) method
- orchestrator.py: Pass agent instances instead of strings to set_coordinator/add_handoff
- cosmos_service.py: Add cross-partition query fallback in get_conversation
- cosmos_service.py: Add fallback logic to find correct partition key in delete_conversation
- .gitignore: Add rai_results/ to ignore RAI evaluation output files
- Remove content-gen/scripts/rai_test.py (duplicate of tests/rai_testing.py)
- orchestrator.py: Remove unused asyncio import
- frontend-server: Delete frontend-deploy.zip build artifact
- .env.template: Update with gpt-image-1 configuration
- Create docs/AZD_DEPLOYMENT.md with comprehensive azd up instructions
- Update README.md to recommend azd as primary deployment method
- Include configuration parameters, troubleshooting, and day-2 operations
hunterjam and others added 17 commits January 23, 2026 13:52
chore: added azure template validation workflow
- Add _filter_system_prompt_from_response() function to detect and filter leaked system prompt content
- Apply filtering to all 4 response output points in process_message() and send_user_response()
- Return safe fallback message when system prompt patterns are detected
- Prevents internal agent instructions from being exposed to users during follow-up queries
- Add regenerate_image() method to orchestrator for modifying generated images
- Add /api/regenerate endpoint with SSE streaming
- Add streamRegenerateImage() frontend API function
- Update App.tsx to detect image modification requests after content generation
- Fix f-string syntax error with backslash in prompt construction
- Update confirmedBrief.visual_guidelines when image regeneration succeeds
- Ensures subsequent Regenerate clicks use the updated brief with modifications
- Prevents reversion to original prompt parameters after modifications
Fr4nc3 and others added 2 commits January 27, 2026 14:40
Merge remote-tracking branch 'upstream/dev' into features/jh-to-dev

# Conflicts:
#	.github/workflows/azure-dev.yml
#	.github/workflows/create-release.yml
#	README.md
#	archive-doc-gen/.github/workflows/deploy-v2.yml
#	archive-doc-gen/.github/workflows/deploy.yml
#	archive-doc-gen/infra/main_custom.bicep
#	archive-doc-gen/infra/scripts/package_webapp.ps1
#	archive-doc-gen/infra/scripts/package_webapp.sh
#	docs/DeploymentGuide.md
#	docs/TroubleShootingSteps.md
#	src/requirements.txt
#	tests/e2e-test/pages/browsePage.py
#	tests/e2e-test/pages/draftPage.py
#	tests/e2e-test/pages/generatePage.py
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.

6 participants