mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 13:32:57 +00:00
**View Separation Completed:** - **agents/api_views.py** - REST API endpoints (execute_agent, execution_list/detail) - **agents/chat_views.py** - Chat session management and message handling - **agents/web_views.py** - Web interface views (marketplace, agent detail pages) - **agents/direct_access_views.py** - External form integration handlers - **agents/utils.py** - Utility functions (webhook validation, message formatting, AgentCompat class) **Benefits:** ✅ Better code navigation and maintainability (1,433 lines → 5 focused modules) ✅ Clear separation of concerns (API vs web vs chat vs external forms) ✅ Easier to add new agent types in the future ✅ Follows Django best practices ✅ Maintains full backwards compatibility through main views.py imports **Architecture Status:** - All 8 agents working perfectly (4 webhook + 4 direct access) - File-based agent system with production-ready caching - Wallet balance updates immediately after execution - PDF analyzer showing properly formatted results - Job posting generator with clean formatting - "Explore Other Agents" button functioning correctly - N8N webhook communication working seamlessly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
"""
|
|
Agents views - Main imports and legacy compatibility.
|
|
This file now imports from focused modules for better code organization.
|
|
"""
|
|
|
|
# Import all views from specialized modules for backwards compatibility
|
|
from .api_views import (
|
|
execute_agent,
|
|
execution_list,
|
|
execution_detail
|
|
)
|
|
|
|
from .chat_views import (
|
|
start_chat_session,
|
|
send_chat_message,
|
|
get_chat_history,
|
|
end_chat_session,
|
|
get_session_status,
|
|
export_chat
|
|
)
|
|
|
|
from .web_views import (
|
|
agents_marketplace,
|
|
agent_detail_view,
|
|
chat_agent_view
|
|
)
|
|
|
|
from .direct_access_views import (
|
|
career_navigator_access,
|
|
career_navigator_view,
|
|
ai_brand_strategist_view,
|
|
ai_brand_strategist_access,
|
|
lean_six_sigma_expert_view,
|
|
lean_six_sigma_expert_access,
|
|
swot_analysis_expert_view,
|
|
swot_analysis_expert_access,
|
|
direct_access_handler,
|
|
direct_access_display
|
|
)
|
|
|
|
# Import utility functions for backwards compatibility
|
|
from .utils import (
|
|
validate_webhook_url,
|
|
format_agent_message,
|
|
AgentCompat
|
|
)
|
|
|
|
# All functionality is now available through focused modules
|
|
# This maintains backwards compatibility while improving code organization |