|
@@ -21,6 +21,7 @@
|
|
|
align-items: flex-start;
|
|
|
max-width: 85%;
|
|
|
margin-bottom: 4px;
|
|
|
+ width: 100%; /* 添加宽度限制 */
|
|
|
}
|
|
|
|
|
|
.message.user {
|
|
@@ -34,6 +35,11 @@
|
|
|
background: #fff;
|
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
|
transition: all 0.3s ease;
|
|
|
+ max-width: 100%; /* 限制最大宽度 */
|
|
|
+ overflow-wrap: break-word; /* 确保长文本会换行 */
|
|
|
+ word-wrap: break-word; /* 兼容性支持 */
|
|
|
+ word-break: break-word; /* 允许在单词内换行 */
|
|
|
+ hyphens: auto; /* 添加连字符支持 */
|
|
|
}
|
|
|
|
|
|
.message.assistant .message-content {
|
|
@@ -71,6 +77,7 @@
|
|
|
transition: all 0.3s ease-out !important;
|
|
|
min-height: 40px !important; /* 设置固定的最小高度 */
|
|
|
max-height: 120px !important;
|
|
|
+ margin-top: 8px;
|
|
|
}
|
|
|
|
|
|
.input-wrapper:focus-within {
|
|
@@ -145,20 +152,67 @@
|
|
|
opacity: 0.1;
|
|
|
}
|
|
|
|
|
|
-/* 快捷指令面板 */
|
|
|
+/* 工具栏 */
|
|
|
+.toolbar {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end; /* 改为从右向左排列 */
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.toolbar-left,
|
|
|
+.toolbar-right {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+ flex-direction: row-reverse; /* 按钮从右向左排列 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 工具栏按钮 */
|
|
|
+.toolbar-button {
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 6px;
|
|
|
+ padding: 8px 12px; /* 只保留左内边距 */
|
|
|
+ border: none;
|
|
|
+ border-radius: 6px;
|
|
|
+ background: #f5f7fa;
|
|
|
+ color: #444;
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 500;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.2s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.toolbar-button:hover {
|
|
|
+ background: #edf2fc;
|
|
|
+ color: #1a73e8;
|
|
|
+}
|
|
|
+
|
|
|
+.toolbar-button svg {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 快捷指令面板优化 */
|
|
|
.prompt-panel {
|
|
|
position: absolute;
|
|
|
- bottom: 80px;
|
|
|
+ bottom: 100%;
|
|
|
left: 16px;
|
|
|
right: 16px;
|
|
|
+ margin-bottom: 8px;
|
|
|
background: #fff;
|
|
|
border-radius: 8px;
|
|
|
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
|
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
|
+ max-height: 400px;
|
|
|
display: none;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
.prompt-panel.show {
|
|
|
- display: block;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
animation: slideUp 0.2s ease-out;
|
|
|
}
|
|
|
|
|
@@ -168,42 +222,47 @@
|
|
|
align-items: center;
|
|
|
padding: 12px 16px;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
+ background: #f8f9fa;
|
|
|
}
|
|
|
|
|
|
.prompt-header h3 {
|
|
|
margin: 0;
|
|
|
- font-size: 16px;
|
|
|
+ font-size: 14px;
|
|
|
color: #333;
|
|
|
-}
|
|
|
-
|
|
|
-.close-prompt {
|
|
|
- background: none;
|
|
|
- border: none;
|
|
|
- font-size: 20px;
|
|
|
- color: #666;
|
|
|
- cursor: pointer;
|
|
|
- padding: 4px 8px;
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
|
|
|
.prompt-list {
|
|
|
- padding: 8px;
|
|
|
- max-height: 300px;
|
|
|
+ flex: 1;
|
|
|
overflow-y: auto;
|
|
|
+ padding: 8px;
|
|
|
}
|
|
|
|
|
|
.prompt-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
width: 100%;
|
|
|
- padding: 12px;
|
|
|
+ padding: 10px 12px;
|
|
|
text-align: left;
|
|
|
background: none;
|
|
|
border: none;
|
|
|
border-radius: 6px;
|
|
|
cursor: pointer;
|
|
|
transition: all 0.2s;
|
|
|
+ color: #333;
|
|
|
+ font-size: 13px;
|
|
|
+ line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.prompt-item:hover {
|
|
|
- background: #f5f5f5;
|
|
|
+ background: #f0f4f8;
|
|
|
+}
|
|
|
+
|
|
|
+.prompt-item svg {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ margin-right: 8px;
|
|
|
+ color: #666;
|
|
|
}
|
|
|
|
|
|
@keyframes slideUp {
|
|
@@ -382,10 +441,12 @@
|
|
|
|
|
|
.message-content pre {
|
|
|
background: #f6f8fa;
|
|
|
- padding: 12px;
|
|
|
+ padding: 16px;
|
|
|
border-radius: 6px;
|
|
|
overflow-x: auto;
|
|
|
margin: 8px 0;
|
|
|
+ max-width: 100%; /* 限制最大宽度 */
|
|
|
+ white-space: pre-wrap; /* 允许代码块换行 */
|
|
|
}
|
|
|
|
|
|
.message-content code {
|
|
@@ -399,11 +460,15 @@
|
|
|
.message-content pre code {
|
|
|
padding: 0;
|
|
|
background: none;
|
|
|
+ font-size: 0.9em;
|
|
|
+ line-height: 1.5;
|
|
|
+ white-space: pre-wrap; /* 允许代码换行 */
|
|
|
}
|
|
|
|
|
|
.message-content a {
|
|
|
color: #1a73e8;
|
|
|
text-decoration: none;
|
|
|
+ word-break: break-all; /* 确保长链接可以换行 */
|
|
|
}
|
|
|
|
|
|
.message-content a:hover {
|
|
@@ -523,6 +588,8 @@
|
|
|
border-radius: 6px;
|
|
|
overflow-x: auto;
|
|
|
margin: 8px 0;
|
|
|
+ max-width: 100%; /* 限制最大宽度 */
|
|
|
+ white-space: pre-wrap; /* 允许代码块换行 */
|
|
|
}
|
|
|
|
|
|
.message-content pre code {
|
|
@@ -530,6 +597,7 @@
|
|
|
background: none;
|
|
|
font-size: 0.9em;
|
|
|
line-height: 1.5;
|
|
|
+ white-space: pre-wrap; /* 允许代码换行 */
|
|
|
}
|
|
|
|
|
|
/* 打断按钮样式 */
|
|
@@ -779,3 +847,41 @@
|
|
|
overflow-y: auto !important;
|
|
|
box-sizing: border-box !important; /* 添加盒模型设置 */
|
|
|
}
|
|
|
+
|
|
|
+/* 快捷指令面板头部 */
|
|
|
+.prompt-header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 12px 16px;
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ background: #f8f9fa;
|
|
|
+}
|
|
|
+
|
|
|
+/* 关闭按钮样式优化 */
|
|
|
+.close-prompt {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ padding: 0;
|
|
|
+ border: none;
|
|
|
+ border-radius: 4px;
|
|
|
+ background: transparent;
|
|
|
+ color: #666;
|
|
|
+ font-size: 18px;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.2s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.close-prompt:hover {
|
|
|
+ background: rgba(0, 0, 0, 0.05);
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+/* 使用SVG图标替代文字 */
|
|
|
+.close-prompt svg {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+}
|