Open History to see the last commit
1<script setup lang="ts">
2import { ref, computed } from 'vue'
3
4const props = defineProps<{
5 content: string
6 isComplete: boolean
7}>()
8
9const isExpanded = ref(false)
10
11const displayContent = computed(() => {
12 if (isExpanded.value) {
13 return props.content
14 }
15 // Show first 150 characters when collapsed
16 if (props.content.length > 150) {
17 return props.content.substring(0, 150) + '...'
18 }
19 return props.content
20})
21</script>
22
23<template>
24 <div class="p-4 bg-gray-800/50 border border-gray-700/50 rounded-lg">
25 <div class="flex items-center gap-2 mb-2">
26 <div v-if="!isComplete" class="animate-pulse flex items-center gap-1">
27 <span class="w-2 h-2 bg-orange-500 rounded-full"></span>
28 <span
29 class="w-2 h-2 bg-orange-500 rounded-full animation-delay-200"
30 ></span>
31 <span
32 class="w-2 h-2 bg-orange-500 rounded-full animation-delay-400"
33 ></span>
34 </div>
35 <span class="text-sm text-gray-400 font-medium">
36 {{ isComplete ? '💭 Thought Process' : '💭 Thinking...' }}
37 </span>
38 </div>
39 <div class="text-sm text-gray-300 whitespace-pre-wrap">
40 {{ displayContent }}
41 </div>
42 <button
43 v-if="content.length > 150"
44 @click="isExpanded = !isExpanded"
45 class="mt-2 text-xs text-orange-400 hover:text-orange-300"
46 >
47 {{ isExpanded ? 'Show less' : 'Show more' }}
48 </button>
49 </div>
50</template>
51
52<style scoped>
53.animation-delay-200 {
54 animation-delay: 0.2s;
55}
56.animation-delay-400 {
57 animation-delay: 0.4s;
58}
59</style>