| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- .conversation-container {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-height: 0;
- }
- .messages-container {
- flex: 1;
- overflow-y: auto;
- padding: 20px;
- background: #fafafa;
- min-height: 0;
- }
- .message-wrapper {
- margin-bottom: 20px;
- }
- .message {
- max-width: 95%;
- padding: 12px 16px;
- border-radius: 18px;
- position: relative;
- margin-bottom: 12px;
- }
- .message.user {
- background: linear-gradient(135deg, #007bff, #0056b3);
- color: white;
- border-left: 4px solid #0056b3;
- box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
- }
- .message.assistant {
- background: linear-gradient(135deg, #ffffff, #f8f9fa);
- color: #333;
- border: 1px solid #e0e0e0;
- border-left: 4px solid #6c757d;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- }
- .message-header {
- display: flex;
- align-items: center;
- margin-bottom: 8px;
- font-size: 12px;
- opacity: 0.8;
- }
- .message-icon {
- font-size: 16px;
- height: 16px;
- width: 16px;
- margin-right: 6px;
- }
- .message-role {
- font-weight: 500;
- margin-right: 8px;
- }
- .message-time {
- margin-left: auto;
- }
- .message-content {
- line-height: 1.5;
- white-space: pre-wrap;
- }
- .user .message-content {
- color: white;
- }
- .loading-spinner {
- position: absolute;
- top: 12px;
- right: 12px;
- }
- .input-container {
- display: flex;
- gap: 12px;
- padding: 16px;
- border-top: 1px solid #e0e0e0;
- background: white;
- flex-shrink: 0;
- }
- .input-field {
- flex: 1;
- }
- .send-button {
- align-self: center;
- height: 56px;
- min-width: 56px;
- }
- .empty-state {
- text-align: center;
- padding: 60px 20px;
- color: #666;
- }
- .empty-state mat-icon {
- font-size: 64px;
- height: 64px;
- width: 64px;
- margin-bottom: 16px;
- color: #ccc;
- }
- .no-session {
- padding: 20px;
- text-align: center;
- color: #666;
- background: #f5f5f5;
- }
-
- /* 可折叠标签样式 */
- details {
- margin: 8px 0;
- border-radius: 8px;
- overflow: hidden;
- }
-
- .thinking-details {
- border: 2px solid #2196f3;
- background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
- border-radius: 8px;
- box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
- }
-
- .tool-details {
- border: 2px solid #9c27b0;
- background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
- border-radius: 8px;
- box-shadow: 0 2px 8px rgba(156, 39, 176, 0.2);
- }
-
- .thinking-summary,
- .tool-summary {
- padding: 8px 12px;
- cursor: pointer;
- font-weight: 500;
- display: flex;
- align-items: center;
- gap: 6px;
- user-select: none;
- }
-
- .thinking-summary {
- color: #0d47a1;
- background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
- border-bottom: 1px solid #64b5f6;
- font-weight: 600;
- }
-
- .tool-summary {
- color: #4a148c;
- background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
- border-bottom: 1px solid #ba68c8;
- font-weight: 600;
- }
-
- /* details元素内的内容样式 */
- .thinking-details > *:not(summary),
- .tool-details > *:not(summary) {
- padding: 12px;
- border-top: 1px solid rgba(0, 0, 0, 0.05);
- }
-
- .thinking-details > *:not(summary) {
- background-color: #f0f7ff;
- color: #0d47a1;
- font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
- font-size: 0.95em;
- line-height: 1.5;
- }
-
- .tool-details > *:not(summary) {
- background-color: #f5f0ff;
- color: #4a148c;
- font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
- font-size: 0.95em;
- line-height: 1.5;
- }
-
- /* 标签样式(非折叠) */
- .thinking-tag,
- .tool-tag,
- .error-tag {
- display: inline-block;
- padding: 4px 8px;
- border-radius: 4px;
- font-size: 12px;
- font-weight: 500;
- margin-right: 8px;
- }
-
- .thinking-tag {
- background-color: #e3f2fd;
- color: #1565c0;
- }
-
- .tool-tag {
- background-color: #f3e5f5;
- color: #7b1fa2;
- }
-
- .error-tag {
- background-color: #ffebee;
- color: #c62828;
- }
-
- /* 确保markdown内容样式正确 */
- .message-content :deep(*) {
- margin-top: 8px;
- margin-bottom: 8px;
- }
-
- .message-content :deep(ul),
- .message-content :deep(ol) {
- padding-left: 24px;
- }
-
- .message-content :deep(code) {
- background-color: #f5f5f5;
- padding: 2px 4px;
- border-radius: 3px;
- font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
- font-size: 0.9em;
- }
-
- .message-content :deep(pre) {
- margin: 12px 0;
- }
-
- /* 自定义details元素图标 */
- .message-content :deep(details) {
- position: relative;
- }
-
- .message-content :deep(details summary) {
- list-style: none;
- }
-
- .message-content :deep(details summary::-webkit-details-marker) {
- display: none;
- }
-
- .message-content :deep(details summary::before) {
- content: '▶';
- font-size: 10px;
- margin-right: 6px;
- transition: transform 0.2s;
- display: inline-block;
- }
-
- .message-content :deep(details[open] summary::before) {
- transform: rotate(90deg);
- }
-
- /* 确保标签内的内容正确显示 */
- .message-content :deep(.thinking-details),
- .message-content :deep(.tool-details) {
- white-space: normal;
- word-break: break-word;
- }
|