ThinkingLive.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <script setup>
  2. /**
  3. * v1.1:区域 ② —— 实时状态(覆盖式)
  4. * 显示 Hermes 当前正在做什么,如"压缩上下文中"、"第 N 轮 LLM 调用"、"正在调用 read_file"。
  5. * 空状态时折叠,避免占用空间。
  6. */
  7. import { computed } from 'vue'
  8. const props = defineProps({
  9. status: { type: String, default: '' },
  10. })
  11. const isEmpty = computed(() => !props.status || !props.status.trim())
  12. </script>
  13. <template>
  14. <div v-if="!isEmpty" class="thinking-live">
  15. <span class="dot"></span>
  16. <span class="text">{{ status }}</span>
  17. </div>
  18. </template>
  19. <style scoped>
  20. /* v1.1:实时状态行,深色风格(紫色脉冲点 + 等宽字体) */
  21. .thinking-live {
  22. display: flex;
  23. align-items: center;
  24. gap: 6px;
  25. padding: 4px 10px;
  26. font-size: 11px;
  27. font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace;
  28. color: var(--text-secondary, #b0b0b0);
  29. margin: 4px 10px 6px;
  30. }
  31. .dot {
  32. width: 6px;
  33. height: 6px;
  34. border-radius: 50%;
  35. background: #c084fc;
  36. box-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
  37. animation: pulse 1.4s ease-in-out infinite;
  38. flex-shrink: 0;
  39. }
  40. .text {
  41. font-weight: 500;
  42. color: #c084fc;
  43. }
  44. @keyframes pulse {
  45. 0%, 100% { opacity: 1; transform: scale(1); }
  46. 50% { opacity: 0.5; transform: scale(0.8); }
  47. }
  48. </style>