diff --git a/templates/index.html b/templates/index.html index 21a4a16..2bce544 100644 --- a/templates/index.html +++ b/templates/index.html @@ -86,13 +86,17 @@ .thinking-toggle { font-size: 12px; color: #667eea; } .thinking-content { margin-top: 12px; display: none; } .thinking-content.expanded { display: block; } - .search-results-box { margin: 8px 0; padding: 12px; background: #f8f9fa; border-radius: 8px; border: 1px solid #e9ecef; } - .search-results-box h5 { margin: 0 0 8px; font-size: 14px; color: #495057; } - .search-result-item { margin-bottom: 8px; padding: 8px; background: white; border-radius: 6px; } + .search-results-box { margin: 12px 0; padding: 10px 12px; background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%); border-radius: 8px; border: 1px solid #d0e8f0; } + .search-results-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; } + .search-results-header h5 { margin: 0; font-size: 13px; color: #10a37f; display: flex; align-items: center; gap: 6px; } + .search-results-toggle { font-size: 12px; color: #666; } + .search-results-content { margin-top: 10px; display: none; } + .search-results-content.expanded { display: block; } + .search-result-item { margin-bottom: 8px; padding: 8px 10px; background: white; border-radius: 6px; border: 1px solid #eee; } .search-result-item:last-child { margin-bottom: 0; } .search-result-title { font-size: 13px; color: #10a37f; font-weight: 500; margin-bottom: 4px; } .search-result-snippet { font-size: 12px; color: #666; line-height: 1.4; } - .search-result-url { font-size: 11px; color: #999; margin-top: 4px; } + .search-result-url { font-size: 11px; color: #999; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; } /* Agent信息 */ .agent-info { font-size: 12px; color: #999; margin-top: 8px; } @@ -635,12 +639,37 @@ if (!results || results.length === 0) return; const container = document.getElementById('messagesContainer'); - const div = document.createElement('div'); - div.className = 'message assistant'; - let html = `