Commit Graph

5 Commits

Author SHA1 Message Date
Claude
49b5b2a6aa Standardize agent architecture and update comprehensive documentation
- Implement agent-specific JavaScript utilities for container-like isolation
- Standardize HTML structure across all 5 agents with agent-container grid layout
- Fix Data Analyzer wallet positioning by moving wallet-section to separate grid column
- Reduce Data Analyzer custom CSS from 400+ lines to ~78 lines essential styles
- Apply unified theme system (professional/creative/minimal) consistently
- Add agent isolation with DataAnalyzerUtils, WeatherUtils, SocialAdsUtils, etc.
- Update CLAUDE.md with comprehensive agent architecture documentation
- Document standardization improvements, layout rules, and JavaScript isolation patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:28:37 +05:30
Claude
ea944072aa Implement custom display functions for all agents
## Overview
Replace generic `AgentUtils.displayResults()` with specialized display functions
for each agent to provide optimized content formatting and presentation.

## Changes Made

### Custom Display Functions Created
- **Job Posting Generator**: Professional business formatting with structured headers
- **Social Ads Generator**: Engaging ad copy styling with creative glassmorphism effects
- **Weather Reporter**: Clean weather data presentation with metric highlighting
- **Data Analyzer**: Already had custom function with rich analysis formatting

### Agent-Specific Features

#### Job Posting Generator
- Professional headers with border styling and proper hierarchy
- Clean business formatting for requirements and responsibilities
- Justified text alignment for formal presentation
- Enhanced bold text for key information

#### Social Ads Generator
- Creative pink/purple theme matching creative agent styling
- Eye-catching call-to-action highlighting with background effects
- Sparkle emoji bullets for engaging list presentation
- Glassmorphism wrapper effects for modern visual appeal

#### Weather Reporter
- Clean blue theme for weather data presentation
- Temperature and metric highlighting with background colors
- Organized weather sections with proper data structure
- Subtle background styling for data containers

### Removed Generic Function
- Removed `AgentUtils.displayResults()` from agent-utils.js
- Added explanatory comment about custom display logic
- Kept shared utilities: showToast, updateWalletBalance, etc.

## Benefits
- **Specialized Content Handling**: Each agent optimizes its specific data structure
- **Better User Experience**: Content formatted appropriately for each use case
- **Enhanced Visual Appeal**: Custom styling matches each agent's theme and purpose
- **Maintainability**: Agent-specific logic contained within each agent
- **Performance**: No unnecessary generic field checking

## Technical Implementation
- Custom content extraction with priority field ordering
- Agent-specific markdown/text formatting functions
- Proper error handling and wallet balance updates
- Consistent success/error messaging patterns
- Type-safe content handling with fallbacks

## Testing
- All agent templates render successfully
- Django project passes system checks
- Custom display functions handle content extraction properly
- Maintained compatibility with existing agent workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 23:08:05 +05:30
Claude
f83c2497cc Fix data analyzer TypeError and enhance markdown parsing
## Issues Fixed
- Fixed TypeError: text.replace is not a function in parseMarkdown
- Enhanced type checking for null/undefined inputs in agent-utils.js
- Data analyzer now properly handles all response data types

## Enhancements
- Improved parseMarkdown function with better type safety
- Enhanced markdown parsing with proper HTML styling
- Added custom parseMarkdownToHTML for data analyzer with rich formatting
- Better handling of headers, lists, bold text, and paragraphs

## Data Analyzer Improvements
- Custom markdown parser with styled headers and lists
- Proper content extraction priority: report_text > insights_summary > raw_response.analysis
- Enhanced visual formatting with CSS variables for consistent theming
- Better error handling and fallback content

## Technical Changes
- Added typeof checks to prevent non-string inputs causing errors
- Enhanced bullet point and numbered list conversion
- Improved paragraph formatting and line break handling
- Consistent styling across all markdown elements

## Test Results
- Data analyzer successfully processes PDF files
- Returns proper JSON responses with formatted analysis
- Markdown parsing works correctly with complex content structure
- No more JavaScript type errors in console

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 22:56:27 +05:30
Claude
aeaf0be031 Implement unified CSS system and fix data analyzer network errors
## Unified Agent Architecture
- Create agent-base.css with theme support (professional, creative, minimal)
- Implement shared JavaScript utilities in agent-utils.js
- Standardize form submission patterns across all agents
- Reduce code duplication by ~600 lines

## CSS Theme System
- Professional theme: Job posting, data analyzer, weather reporter
- Creative theme: Social ads generator (glassmorphism effects)
- Minimal theme: Available for future agents
- Consistent component library with CSS custom properties

## Text Display Standardization
- Replace complex markdown parsing with simple text formatting
- Remove external dependencies (Marked.js + DOMPurify)
- Implement basic text cleaning: remove **, convert line breaks to <br>
- Fix layout stretching issues in job posting results

## Data Analyzer Fixes
- Fix network errors by converting from button click to form submission
- Update to use unified CSS system and professional theme
- Improve file upload handling with conditional checks
- Standardize template structure with other agents

## Form Submission Improvements
- Unified form submission pattern across all agents
- Automatic CSRF token handling via FormData(form)
- Consistent error handling and user feedback
- Reliable polling mechanism for webhook-based agents

## Documentation Updates
- Document unified CSS system and theme architecture
- Add text display standardization guidelines
- Update agent examples with current features
- Include form submission best practices

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 19:30:04 +05:30
Claude
8cc9bb0609 agent polling fix 2025-07-13 17:46:26 +05:30