<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>🎯 MCP反馈通道 v3.0 | AI助手交互工具</title>
    <meta name="description" content="现代化的Model Context Protocol反馈收集工具，支持文字、图片反馈，完美兼容SSH远程环境">
    <meta name="keywords" content="MCP,反馈收集,AI助手,Web界面,SSH兼容">
    <meta name="author" content="MCP Feedback Collector Team">
    
    <!-- Favicon using emoji -->
    <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🎯</text></svg>">
    
    <!-- 外部依赖 -->
    <!-- Marked.js for Markdown parsing -->
    <script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script>
    
    <!-- Mermaid.js for diagram rendering -->
    <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
    
    <!-- Prism.js for code highlighting -->
    <link href="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
    
    <!-- 加载样式 -->
    <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
    <div class="container">
        <div class="header" style="display: none;">
            <h1>🎯 AI工作反馈通道</h1>
            <p>您的反馈对我们很重要</p>
        </div>
        
        <div class="content">
            <!-- AI工作汇报区域 - 占主要空间 -->
            <div class="section work-report-section">
                <div class="section-header">
                    📋 AI工作完成汇报
                    <button type="button" class="btn btn-small" id="toggleReportBtn" onclick="toggleReportSize()">
                        📏 调整大小
                    </button>
                </div>
                <div class="section-content">
                    <div class="work-summary" id="workSummary">
                        {{ work_summary or "等待AI汇报工作内容..." }}
                    </div>
                </div>
            </div>
            
            <!-- 反馈表单 - 占较小空间 -->
            <form id="feedbackForm">
                <!-- 统一反馈区域 -->
                <div class="section feedback-section">
                    <div class="section-header">
                        💬 您的反馈（文字+图片，可选）
                        <button type="button" class="btn btn-small" id="toggleFeedbackBtn" onclick="toggleFeedbackSize()">
                            📏 展开/收起
                        </button>
                    </div>
                    <div class="section-content" id="feedbackContent">
                        <!-- 建议选项区域 -->
                        <div class="suggest-options" id="suggestOptions" style="display: none;">
                            <div class="suggest-header">💡 建议选项（点击直接提交或复制到输入框）：</div>
                            <div class="suggest-list" id="suggestList"></div>
                        </div>
                        
                        <!-- 图片预览区域 -->
                        <div class="image-preview" id="imagePreview"></div>
                        
                        <div class="form-group">
                            <textarea 
                                id="textFeedback" 
                                name="textFeedback" 
                                placeholder="请在此输入您的反馈、建议或问题...&#10;💡 提示：可直接按 Ctrl+V 粘贴图片"
                                rows="3"
                            ></textarea>
                        </div>
                        
                        <!-- 操作按钮组 -->
                        <div class="inline-button-group">
                            <button type="button" class="btn btn-icon btn-compact" id="uploadBtn" title="上传图片">
                                🖼️
                            </button>
                            <button type="button" class="btn btn-secondary btn-compact" onclick="window.close()">
                                ❌ 取消
                            </button>
                            <button type="submit" class="btn btn-success btn-compact" id="submitBtn">
                                ✅ 提交反馈
                            </button>
                        </div>
                        
                        <!-- 隐藏的文件输入 -->
                        <input type="file" id="fileInput" accept="image/*" multiple class="hidden">
                        
                        <!-- 隐藏的建议数据 -->
                        <script type="application/json" id="suggestData">{{ suggest | safe }}</script>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/feedback.js') }}"></script>
</body>
</html> 