sidebar.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>派维斯智能体助手</title>
  6. <link rel="stylesheet" href="css/sidebar.css" />
  7. <link rel="stylesheet" href="css/chat.css" />
  8. </head>
  9. <body>
  10. <div class="sidebar-header">
  11. <h1>派维斯智能体助手</h1>
  12. <button id="close-sidebar" class="close-btn">×</button>
  13. </div>
  14. <div class="chat-container">
  15. <!-- 聊天消息区域 -->
  16. <div class="chat-messages" id="chat-messages">
  17. <!-- 欢迎消息 -->
  18. <div class="message assistant">
  19. <div class="message-content">
  20. <p>你好!我是派维斯智能助手。</p>
  21. <p>使用说明:</p>
  22. <ul>
  23. <li>直接发送消息开始对话</li>
  24. <li>使用快捷指令快速操作</li>
  25. <li>可选:输入 /setapi YOUR_API_KEY 设置自定义API密钥</li>
  26. </ul>
  27. </div>
  28. </div>
  29. </div>
  30. <!-- 输入区域 -->
  31. <div class="chat-input-container">
  32. <div class="input-wrapper">
  33. <textarea
  34. id="chat-input"
  35. placeholder="输入消息..."
  36. rows="1"
  37. autofocus
  38. ></textarea>
  39. <div class="input-buttons">
  40. <button id="prompt-button" class="icon-button" title="快捷指令">
  41. <svg viewBox="0 0 24 24" width="20" height="20">
  42. <path
  43. fill="currentColor"
  44. d="M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z"
  45. />
  46. </svg>
  47. </button>
  48. <button id="send-button" class="icon-button" title="发送">
  49. <svg viewBox="0 0 24 24" width="20" height="20">
  50. <path
  51. fill="currentColor"
  52. d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"
  53. />
  54. </svg>
  55. </button>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- 快捷指令面板 -->
  60. <div class="prompt-panel" id="prompt-panel">
  61. <div class="prompt-header">
  62. <h3>快捷指令</h3>
  63. <button class="close-prompt">×</button>
  64. </div>
  65. <div class="prompt-list">
  66. <button class="prompt-item">分析当前页面内容</button>
  67. <button class="prompt-item">总结主要观点</button>
  68. <button class="prompt-item">提取关键信息</button>
  69. <button class="prompt-item">翻译选中内容</button>
  70. </div>
  71. </div>
  72. </div>
  73. <script src="js/config.js"></script>
  74. <script src="js/utils.js"></script>
  75. <script src="js/ai-service.js"></script>
  76. <script src="js/chat-ui.js"></script>
  77. <script src="js/sidebar.js"></script>
  78. </body>
  79. </html>