File size: 3,829 Bytes
89f06c7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
```javascript
class AgenticTimeline extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
}
connectedCallback() {
this.render();
}
render() {
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
margin-top: 2rem;
}
.timeline-header {
display: flex;
align-items: center;
margin-bottom: 1rem;
}
.timeline-container {
position: relative;
padding-left: 1.5rem;
border-left: 2px solid #e5e7eb;
}
.timeline-item {
position: relative;
padding-bottom: 1.5rem;
}
.timeline-dot {
position: absolute;
left: -1.5rem;
top: 0;
width: 1rem;
height: 1rem;
border-radius: 50%;
background-color: #3b82f6;
transform: translateX(-50%);
}
.timeline-content {
padding: 0.75rem;
background-color: white;
border-radius: 0.375rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.timeline-time {
font-size: 0.75rem;
color: #6b7280;
margin-bottom: 0.25rem;
}
.timeline-title {
font-weight: 500;
margin-bottom: 0.25rem;
}
.timeline-desc {
font-size: 0.875rem;
color: #4b5563;
}
.tool-call {
margin-top: 0.5rem;
padding: 0.5rem;
background-color: #f9fafb;
border-radius: 0.25rem;
font-size: 0.75rem;
}
.human-review {
margin-top: 0.5rem;
padding: 0.5rem;
border-radius: 0.25rem;
font-size: 0.75rem;
}
.review-approved {
background-color: #d1fae5;
color: #065f46;
}
.review-pending {
background-color: #fef3c7;
color: #92400e;
}
</style>
<div class="timeline-header">
<h3 class="text-lg font-medium">Execution Timeline</h3>
</div>
<div class="timeline-container">
<div class="timeline-item">
<div class="timeline-dot"></div>
<div class="timeline-content">
<div class="timeline-time">2 minutes ago</div>
<div class="timeline-title">Cell #3 Completed</div>
<div class="timeline-desc">Data visualization generated</div>
<div class="human-review review-pending">
<div>🧍 Human Review Required</div>
<div class="mt-1">Status: Pending</div>
</div>
<div class="tool-call">
<div> |