diff --git a/examples/ai_chat_stream.html b/examples/ai_chat_stream.html index 1ecb54b4f..d561a468d 100644 --- a/examples/ai_chat_stream.html +++ b/examples/ai_chat_stream.html @@ -137,58 +137,135 @@ cursor: pointer; } + /* 插件选项 - 胶囊样式 */ .plugin-options { width: 100%; max-width: var(--ai-max-width); - margin: 0 auto 16px; - padding: 16px; - background: var(--ai-surface); - border-radius: 8px; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); + margin: 0 auto 12px; + padding: 0; + background: transparent; + box-shadow: none; box-sizing: border-box; } .plugin-options h3 { - margin: 0 0 12px; - font-size: 14px; - color: #666; + display: none; } .plugin-list { display: flex; - gap: 20px; + gap: 8px; flex-wrap: wrap; + align-items: center; + } + + .plugin-sep { + width: 1px; + height: 20px; + background: var(--ai-muted); + margin: 0 4px; + } + + .plugin-group-label { + font-size: 12px; + color: #999; + margin-right: 2px; + } + + .plugin-or { + font-size: 11px; + color: #bbb; + font-style: italic; } .plugin-item { - display: flex; - align-items: center; - gap: 8px; + position: relative; + cursor: pointer; + user-select: none; } .plugin-item input { - width: 18px; - height: 18px; - cursor: pointer; + position: absolute; + opacity: 0; + width: 0; + height: 0; } .plugin-item label { - cursor: pointer; - font-size: 14px; + display: inline-flex; + align-items: center; + gap: 6px; + padding: 6px 14px; + border-radius: 20px; + font-size: 13px; + font-weight: 500; + line-height: 1.4; + border: 1px solid var(--ai-muted); + background: var(--ai-surface); + color: #666; + transition: all 0.2s ease; + white-space: nowrap; } - .plugin-item .plugin-status { - font-size: 12px; - color: #999; - margin-left: 4px; + .plugin-item input:checked+label { + background: #e6f0ff; + border-color: var(--ai-accent); + color: var(--ai-accent); } - .plugin-item .plugin-status.loaded { - color: #52c41a; + .plugin-item input:disabled+label, + .plugin-item input[disabled]+label { + opacity: 0.5; + pointer-events: none; + } + + .plugin-item .status-dot { + width: 7px; + height: 7px; + border-radius: 50%; + background: transparent; + transition: background 0.3s ease; + flex-shrink: 0; } - .plugin-item .plugin-status.loading { - color: #faad14; + .plugin-item .status-dot.loading { + background: #faad14; + animation: pulse-dot 1s infinite; + } + + .plugin-item .status-dot.loaded { + background: #52c41a; + } + + @keyframes pulse-dot { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.3; } + } + + /* 消息选择器 */ + .msg-picker { + width: 100%; + max-width: var(--ai-max-width); + margin: 0 auto 12px; + box-sizing: border-box; + } + + .msg-picker-label { + font-size: 13px; + color: #666; + margin-bottom: 8px; + } + + .msg-picker-list { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + + .j-msg-pick-btn:disabled, + .j-msg-pick-btn[disabled] { + opacity: 0.5; + cursor: not-allowed; } .custom-input { @@ -230,8 +307,12 @@ } .plugin-list { - flex-direction: column; - gap: 12px; + gap: 6px; + } + + .plugin-item label { + font-size: 12px; + padding: 5px 10px; } } @@ -243,39 +324,33 @@