Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b25aad918 | |||
| 3c95281119 | |||
| 9fb90f9c05 |
@@ -0,0 +1,286 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { X } from '@lucide/vue'
|
||||||
|
import type { AgentNodeData } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
agent: AgentNodeData
|
||||||
|
runtime: string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
defineEmits<{
|
||||||
|
close: []
|
||||||
|
}>()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Teleport to="body">
|
||||||
|
<div class="modal-overlay" @click.self="$emit('close')">
|
||||||
|
<div class="modal-card" :style="{ '--agent-color': agent.color }">
|
||||||
|
<!-- Header -->
|
||||||
|
<div class="modal-header">
|
||||||
|
<div class="modal-title-row">
|
||||||
|
<div class="modal-avatar" :style="{ background: `${agent.color}18`, color: agent.color }">
|
||||||
|
<span class="avatar-letter">{{ agent.name.charAt(0) }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h2>{{ agent.name }}</h2>
|
||||||
|
<span class="modal-role">{{ agent.role }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="modal-close-btn" @click="$emit('close')" aria-label="Close">
|
||||||
|
<X :size="16" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Description -->
|
||||||
|
<p class="modal-desc">{{ agent.description }}</p>
|
||||||
|
|
||||||
|
<!-- Current Task -->
|
||||||
|
<section class="modal-section">
|
||||||
|
<h3 class="section-label">Current Task</h3>
|
||||||
|
<p class="section-value">{{ agent.currentTask }}</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Goal + Progress -->
|
||||||
|
<section class="modal-section">
|
||||||
|
<h3 class="section-label">Goal</h3>
|
||||||
|
<p class="section-value">{{ agent.goal }}</p>
|
||||||
|
<div class="progress-row">
|
||||||
|
<span class="progress-pct">{{ agent.progress }}%</span>
|
||||||
|
<div class="progress-track">
|
||||||
|
<div
|
||||||
|
class="progress-fill"
|
||||||
|
:style="{ width: `${agent.progress}%` }"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Working Feed -->
|
||||||
|
<section class="modal-section">
|
||||||
|
<h3 class="section-label">Working Feed</h3>
|
||||||
|
<div class="work-feed">
|
||||||
|
<div
|
||||||
|
v-for="(step, idx) in agent.workingFeed"
|
||||||
|
:key="idx"
|
||||||
|
class="work-step"
|
||||||
|
>
|
||||||
|
<span class="step-dot"></span>
|
||||||
|
<span class="step-text">{{ step }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Footer Stats -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<span class="footer-badge">Runtime: {{ runtime }}</span>
|
||||||
|
<span
|
||||||
|
class="footer-badge"
|
||||||
|
:style="{
|
||||||
|
color: agent.workload > 65 ? '#eab308' : '#22c55e',
|
||||||
|
borderColor: agent.workload > 65 ? 'rgba(234,179,8,0.2)' : 'rgba(34,197,94,0.2)',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
Workload: {{ agent.workload }}%
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Teleport>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.modal-overlay {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
padding: 24px;
|
||||||
|
background: rgba(0, 0, 0, 0.55);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
animation: overlay-in 0.2s ease;
|
||||||
|
}
|
||||||
|
@keyframes overlay-in {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-card {
|
||||||
|
width: min(480px, 100%);
|
||||||
|
max-height: 80vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 24px;
|
||||||
|
background: rgba(18, 22, 30, 0.96);
|
||||||
|
border: 1px solid color-mix(in srgb, var(--agent-color) 25%, transparent);
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
|
||||||
|
animation: card-in 0.25s ease;
|
||||||
|
backdrop-filter: blur(16px);
|
||||||
|
-webkit-backdrop-filter: blur(16px);
|
||||||
|
}
|
||||||
|
@keyframes card-in {
|
||||||
|
from { opacity: 0; transform: translateY(12px) scale(0.98); }
|
||||||
|
to { opacity: 1; transform: translateY(0) scale(1); }
|
||||||
|
}
|
||||||
|
.modal-card::-webkit-scrollbar {
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
.modal-card::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.modal-card::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(139, 124, 246, 0.2);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
.modal-title-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 14px;
|
||||||
|
}
|
||||||
|
.modal-avatar {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 12px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.avatar-letter {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.modal-title-row h2 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.modal-role {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #6b7385;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.modal-close-btn {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: #6b7385;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.modal-close-btn:hover {
|
||||||
|
border-color: rgba(255, 255, 255, 0.15);
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-desc {
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 1.55;
|
||||||
|
color: #7e8799;
|
||||||
|
margin: 0 0 18px;
|
||||||
|
padding-bottom: 14px;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-section {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
.section-label {
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
color: #6b7385;
|
||||||
|
margin: 0 0 6px;
|
||||||
|
}
|
||||||
|
.section-value {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #e8eaf0;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Progress */
|
||||||
|
.progress-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
.progress-pct {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #7e8799;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.progress-track {
|
||||||
|
flex: 1;
|
||||||
|
height: 4px;
|
||||||
|
background: rgba(255, 255, 255, 0.06);
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.progress-fill {
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: var(--agent-color);
|
||||||
|
transition: width 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Working Feed */
|
||||||
|
.work-feed {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
.work-step {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.step-dot {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--agent-color);
|
||||||
|
flex-shrink: 0;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
.step-text {
|
||||||
|
font-size: 10.5px;
|
||||||
|
color: #7e8799;
|
||||||
|
line-height: 1.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
.modal-footer {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
padding-top: 14px;
|
||||||
|
margin-top: 6px;
|
||||||
|
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
}
|
||||||
|
.footer-badge {
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 4px 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: rgba(255, 255, 255, 0.04);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
color: #7e8799;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue'
|
||||||
|
import { Code2, Server, Search, Shield, Bot } from '@lucide/vue'
|
||||||
|
import type { AgentNodeData } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
agent: AgentNodeData
|
||||||
|
runtime: string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
select: [agentId: string]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const iconComponent = computed(() => {
|
||||||
|
switch (props.agent.icon) {
|
||||||
|
case 'code': return Code2
|
||||||
|
case 'server': return Server
|
||||||
|
case 'search': return Search
|
||||||
|
case 'shield': return Shield
|
||||||
|
default: return Bot
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/* Workload Ring */
|
||||||
|
const R = 18
|
||||||
|
const STROKE = 3
|
||||||
|
const CIRCUMFERENCE = 2 * Math.PI * R
|
||||||
|
|
||||||
|
const workloadOffset = computed(() => {
|
||||||
|
const pct = Math.min(props.agent.workload, 100)
|
||||||
|
return CIRCUMFERENCE - (CIRCUMFERENCE * pct) / 100
|
||||||
|
})
|
||||||
|
|
||||||
|
const workloadRingColor = computed(() => {
|
||||||
|
const w = props.agent.workload
|
||||||
|
if (w < 40) return '#22c55e'
|
||||||
|
if (w < 65) return '#eab308'
|
||||||
|
if (w < 85) return '#f97316'
|
||||||
|
return '#ef4444'
|
||||||
|
})
|
||||||
|
|
||||||
|
const cardClass = computed(() =>
|
||||||
|
props.agent.active ? 'agent-card pulse-active' : 'agent-card node-idle'
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<article
|
||||||
|
:class="cardClass"
|
||||||
|
:style="{ '--agent-color': agent.color }"
|
||||||
|
@click="emit('select', agent.id)"
|
||||||
|
tabindex="0"
|
||||||
|
@keyup.enter="emit('select', agent.id)"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<!-- Workload Ring -->
|
||||||
|
<svg class="wl-ring" viewBox="0 0 44 44" width="44" height="44">
|
||||||
|
<circle
|
||||||
|
cx="22" cy="22" :r="R"
|
||||||
|
fill="none"
|
||||||
|
stroke="rgba(255,255,255,0.05)"
|
||||||
|
:stroke-width="STROKE"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cx="22" cy="22" :r="R"
|
||||||
|
fill="none"
|
||||||
|
:stroke="workloadRingColor"
|
||||||
|
:stroke-width="STROKE"
|
||||||
|
stroke-linecap="round"
|
||||||
|
:stroke-dasharray="CIRCUMFERENCE"
|
||||||
|
:stroke-dashoffset="workloadOffset"
|
||||||
|
transform="rotate(-90 22 22)"
|
||||||
|
class="ring-fill"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<!-- Icon -->
|
||||||
|
<div class="node-icon" :style="{ background: `${agent.color}18`, color: agent.color }">
|
||||||
|
<component :is="iconComponent" :size="18" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Info -->
|
||||||
|
<div class="node-info">
|
||||||
|
<div class="node-name-row">
|
||||||
|
<h3 class="node-name">{{ agent.name }}</h3>
|
||||||
|
<span
|
||||||
|
class="node-status-dot"
|
||||||
|
:class="{ active: agent.active }"
|
||||||
|
:style="{ background: agent.active ? agent.color : '#6b7385' }"
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
<span class="node-role">{{ agent.role }}</span>
|
||||||
|
<span class="node-task" :title="agent.currentTask">{{ agent.currentTask }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Runtime -->
|
||||||
|
<div class="node-runtime">{{ runtime }}</div>
|
||||||
|
</article>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.agent-card {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 14px;
|
||||||
|
background: rgba(22, 27, 34, 0.75);
|
||||||
|
border: 1px solid color-mix(in srgb, var(--agent-color) 15%, transparent);
|
||||||
|
border-radius: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
position: relative;
|
||||||
|
backdrop-filter: blur(6px);
|
||||||
|
-webkit-backdrop-filter: blur(6px);
|
||||||
|
}
|
||||||
|
.agent-card:hover {
|
||||||
|
border-color: color-mix(in srgb, var(--agent-color) 40%, transparent);
|
||||||
|
box-shadow: 0 0 24px color-mix(in srgb, var(--agent-color) 8%, transparent);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
.agent-card:focus-visible {
|
||||||
|
outline: 2px solid var(--agent-color);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
.node-idle {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Workload SVG Ring */
|
||||||
|
.wl-ring {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.ring-fill {
|
||||||
|
transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Icon */
|
||||||
|
.node-icon {
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Info */
|
||||||
|
.node-info {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
.node-name-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
.node-name {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.node-status-dot {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.node-status-dot.active {
|
||||||
|
box-shadow: 0 0 6px currentColor;
|
||||||
|
}
|
||||||
|
.node-role {
|
||||||
|
font-size: 9px;
|
||||||
|
color: #6b7385;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.node-task {
|
||||||
|
font-size: 9.5px;
|
||||||
|
color: #7e8799;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 160px;
|
||||||
|
}
|
||||||
|
.node-runtime {
|
||||||
|
font-size: 10px;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
color: #6b7385;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-weight: 600;
|
||||||
|
min-width: 40px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pulse active dot */
|
||||||
|
.pulse-active .node-status-dot {
|
||||||
|
animation: pulse-dot 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
@keyframes pulse-dot {
|
||||||
|
0%, 100% { transform: scale(1); }
|
||||||
|
50% { transform: scale(1.4); }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,296 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, nextTick, watch } from 'vue'
|
||||||
|
import { Bot, Send, LoaderCircle } from '@lucide/vue'
|
||||||
|
import type { ChatMessage } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
messages: ChatMessage[]
|
||||||
|
irisBusy: boolean
|
||||||
|
irisFocus: string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
send: [text: string]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const inputText = ref('')
|
||||||
|
const chatListRef = ref<HTMLElement | null>(null)
|
||||||
|
|
||||||
|
function sendMessage(): void {
|
||||||
|
if (!inputText.value.trim()) return
|
||||||
|
emit('send', inputText.value)
|
||||||
|
inputText.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.messages.length,
|
||||||
|
async () => {
|
||||||
|
await nextTick()
|
||||||
|
if (chatListRef.value) {
|
||||||
|
chatListRef.value.scrollTop = chatListRef.value.scrollHeight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="chat-panel">
|
||||||
|
<div class="chat-header">
|
||||||
|
<div class="chat-header-left">
|
||||||
|
<Bot :size="16" class="chat-header-icon" />
|
||||||
|
<h2>Iris Chat</h2>
|
||||||
|
</div>
|
||||||
|
<div v-if="irisBusy" class="busy-badge">
|
||||||
|
<LoaderCircle :size="10" class="spin" />
|
||||||
|
<span>Busy</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Focus Bar -->
|
||||||
|
<div v-if="irisBusy && irisFocus" class="focus-bar">
|
||||||
|
<span class="focus-label">Current Focus</span>
|
||||||
|
<span class="focus-text">{{ irisFocus }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Messages -->
|
||||||
|
<div ref="chatListRef" class="chat-messages">
|
||||||
|
<div
|
||||||
|
v-for="msg in messages"
|
||||||
|
:key="msg.id"
|
||||||
|
:class="['msg-row', msg.sender === 'user' ? 'msg-user' : 'msg-iris']"
|
||||||
|
>
|
||||||
|
<div v-if="msg.sender === 'iris'" class="msg-avatar">
|
||||||
|
<Bot :size="12" />
|
||||||
|
</div>
|
||||||
|
<div class="msg-bubble">
|
||||||
|
<p>{{ msg.text }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="messages.length === 0" class="empty-state">
|
||||||
|
<p>No messages yet. Start a conversation with Iris.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Input -->
|
||||||
|
<div class="chat-input-row">
|
||||||
|
<input
|
||||||
|
v-model="inputText"
|
||||||
|
type="text"
|
||||||
|
placeholder="Type a message..."
|
||||||
|
@keyup.enter="sendMessage"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
class="send-btn"
|
||||||
|
:disabled="!inputText.trim()"
|
||||||
|
@click="sendMessage"
|
||||||
|
aria-label="Send"
|
||||||
|
>
|
||||||
|
<Send :size="14" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.chat-panel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 360px;
|
||||||
|
max-height: 480px;
|
||||||
|
background: rgba(22, 27, 34, 0.75);
|
||||||
|
border: 1px solid rgba(139, 124, 246, 0.12);
|
||||||
|
border-radius: 16px;
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
|
||||||
|
transition: border-color 0.2s ease;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.chat-panel:hover {
|
||||||
|
border-color: rgba(139, 124, 246, 0.18);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 14px 16px;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
}
|
||||||
|
.chat-header-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.chat-header-icon {
|
||||||
|
color: #a78bfa;
|
||||||
|
}
|
||||||
|
.chat-header h2 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.busy-badge {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #eab308;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background: rgba(234, 179, 8, 0.08);
|
||||||
|
border: 1px solid rgba(234, 179, 8, 0.15);
|
||||||
|
}
|
||||||
|
.spin {
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes spin {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Focus Bar */
|
||||||
|
.focus-bar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 3px;
|
||||||
|
padding: 8px 16px;
|
||||||
|
background: rgba(234, 179, 8, 0.04);
|
||||||
|
border-bottom: 1px solid rgba(234, 179, 8, 0.08);
|
||||||
|
}
|
||||||
|
.focus-label {
|
||||||
|
font-size: 8px;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
color: #eab308;
|
||||||
|
}
|
||||||
|
.focus-text {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #7e8799;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Messages */
|
||||||
|
.chat-messages {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 12px 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.chat-messages::-webkit-scrollbar {
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
.chat-messages::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.chat-messages::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(139, 124, 246, 0.2);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.msg-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
max-width: 85%;
|
||||||
|
}
|
||||||
|
.msg-user {
|
||||||
|
align-self: flex-end;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
}
|
||||||
|
.msg-avatar {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgba(167, 139, 250, 0.15);
|
||||||
|
color: #a78bfa;
|
||||||
|
flex-shrink: 0;
|
||||||
|
align-self: flex-end;
|
||||||
|
}
|
||||||
|
.msg-bubble {
|
||||||
|
padding: 8px 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 10.5px;
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
.msg-iris .msg-bubble {
|
||||||
|
background: rgba(167, 139, 250, 0.08);
|
||||||
|
border: 1px solid rgba(167, 139, 250, 0.1);
|
||||||
|
color: #d4d8e0;
|
||||||
|
}
|
||||||
|
.msg-user .msg-bubble {
|
||||||
|
background: rgba(59, 130, 246, 0.12);
|
||||||
|
border: 1px solid rgba(59, 130, 246, 0.15);
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.msg-bubble p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
flex: 1;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.empty-state p {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #6b7385;
|
||||||
|
max-width: 180px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Input */
|
||||||
|
.chat-input-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
}
|
||||||
|
.chat-input-row input {
|
||||||
|
flex: 1;
|
||||||
|
padding: 8px 12px;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgba(0, 0, 0, 0.3);
|
||||||
|
color: #e8eaf0;
|
||||||
|
font-size: 10px;
|
||||||
|
font-family: inherit;
|
||||||
|
outline: none;
|
||||||
|
transition: border-color 0.2s;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.chat-input-row input:focus {
|
||||||
|
border-color: #a78bfa;
|
||||||
|
}
|
||||||
|
.chat-input-row input::placeholder {
|
||||||
|
color: #6b7385;
|
||||||
|
}
|
||||||
|
.send-btn {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: #a78bfa;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
}
|
||||||
|
.send-btn:disabled {
|
||||||
|
opacity: 0.35;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.send-btn:not(:disabled):hover {
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue'
|
||||||
|
import { Clock, ChevronRight } from '@lucide/vue'
|
||||||
|
import type { MissionData } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
mission: MissionData
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const statusColor: Record<string, string> = {
|
||||||
|
healthy: '#22c55e',
|
||||||
|
attention: '#eab308',
|
||||||
|
blocked: '#ef4444',
|
||||||
|
paused: '#6b7280',
|
||||||
|
}
|
||||||
|
|
||||||
|
const statusLabel = computed(() => {
|
||||||
|
const map: Record<string, string> = {
|
||||||
|
healthy: 'Healthy',
|
||||||
|
attention: 'Warning',
|
||||||
|
blocked: 'Blocked',
|
||||||
|
paused: 'Paused',
|
||||||
|
}
|
||||||
|
return map[props.mission.status] ?? props.mission.status
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<article class="mission-card" tabindex="0">
|
||||||
|
<div class="mission-head">
|
||||||
|
<h3>{{ mission.name }}</h3>
|
||||||
|
<span
|
||||||
|
class="mission-status"
|
||||||
|
:style="{ color: statusColor[mission.status] }"
|
||||||
|
>
|
||||||
|
{{ statusLabel }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="progress-track">
|
||||||
|
<div
|
||||||
|
class="progress-fill"
|
||||||
|
:style="{
|
||||||
|
width: `${mission.progress}%`,
|
||||||
|
background: `linear-gradient(90deg, ${statusColor[mission.status]}, color-mix(in srgb, ${statusColor[mission.status]} 65%, #fff))`,
|
||||||
|
}"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mission-body">
|
||||||
|
<div class="mission-detail">
|
||||||
|
<span class="detail-label">Current Task</span>
|
||||||
|
<span class="detail-value">{{ mission.currentTask }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mission-footer">
|
||||||
|
<div class="mission-meta">
|
||||||
|
<Clock :size="10" />
|
||||||
|
<span>{{ mission.lastActivity }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="mission-tasks">
|
||||||
|
<span class="tasks-count">{{ mission.remainingTasks }}</span>
|
||||||
|
<span class="tasks-label">remaining</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mission-arrow">
|
||||||
|
<ChevronRight :size="14" />
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.mission-card {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 14px;
|
||||||
|
background: rgba(22, 27, 34, 0.65);
|
||||||
|
border: 1px solid rgba(139, 124, 246, 0.08);
|
||||||
|
border-radius: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
backdrop-filter: blur(6px);
|
||||||
|
-webkit-backdrop-filter: blur(6px);
|
||||||
|
}
|
||||||
|
.mission-card:hover {
|
||||||
|
border-color: rgba(139, 124, 246, 0.2);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
.mission-card:focus-visible {
|
||||||
|
outline: 2px solid #a78bfa;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mission-head {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.mission-head h3 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #e8eaf0;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.mission-status {
|
||||||
|
font-size: 8px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: capitalize;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-track {
|
||||||
|
height: 3px;
|
||||||
|
background: rgba(255, 255, 255, 0.06);
|
||||||
|
border-radius: 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.progress-fill {
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 3px;
|
||||||
|
transition: width 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mission-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.mission-detail {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 3px;
|
||||||
|
}
|
||||||
|
.detail-label {
|
||||||
|
font-size: 8px;
|
||||||
|
color: #6b7385;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
}
|
||||||
|
.detail-value {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #7e8799;
|
||||||
|
line-height: 1.35;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mission-footer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.mission-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
font-size: 9px;
|
||||||
|
color: #6b7385;
|
||||||
|
}
|
||||||
|
.mission-tasks {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
.tasks-count {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #a78bfa;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.tasks-label {
|
||||||
|
font-size: 8px;
|
||||||
|
color: #6b7385;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mission-arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
bottom: 10px;
|
||||||
|
color: #6b7385;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||||
|
}
|
||||||
|
.mission-card:hover .mission-arrow {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateX(2px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,98 +1,38 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue'
|
import { Activity } from '@lucide/vue'
|
||||||
|
import type { FeedEntry } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
type FeedStatus = 'running' | 'done' | 'waiting' | 'error' | 'info'
|
defineProps<{
|
||||||
|
entries: FeedEntry[]
|
||||||
interface FeedItem {
|
}>()
|
||||||
time: string
|
|
||||||
status: FeedStatus
|
|
||||||
text: string
|
|
||||||
label: string
|
|
||||||
date: 'today' | 'yesterday' | 'week'
|
|
||||||
}
|
|
||||||
|
|
||||||
const allFeed: FeedItem[] = [
|
|
||||||
{ time: '09:17', status: 'running', text: 'OpenClaw analysiert Memory-Datenbank.', label: 'Memory', date: 'today' },
|
|
||||||
{ time: '09:19', status: 'done', text: 'Repository Refactoring abgeschlossen.', label: 'Coding', date: 'today' },
|
|
||||||
{ time: '09:21', status: 'done', text: '3 neue Erinnerungen gespeichert.', label: 'Memory', date: 'today' },
|
|
||||||
{ time: '09:25', status: 'done', text: 'Dungeon-Service erfolgreich kompiliert.', label: 'Coding', date: 'today' },
|
|
||||||
{ time: '09:28', status: 'error', text: 'Build fehlgeschlagen — NullReferenceException in EnemyFactory.', label: 'Coding', date: 'today' },
|
|
||||||
{ time: '09:31', status: 'waiting', text: 'Iris hat "Steuerunterlagen" auf Freitag verschoben.', label: 'Personal', date: 'today' },
|
|
||||||
{ time: '10:02', status: 'running', text: 'Programmer arbeitet an TeamView-Redesign.', label: 'Coding', date: 'today' },
|
|
||||||
{ time: '10:15', status: 'done', text: 'AgentDetailView deployed.', label: 'System', date: 'today' },
|
|
||||||
{ time: '10:22', status: 'running', text: 'Architekt prüft Compose-Konfiguration.', label: 'System', date: 'today' },
|
|
||||||
{ time: '10:45', status: 'done', text: 'Reviewer: Code-Review abgeschlossen, keine Findings.', label: 'Agenten', date: 'today' },
|
|
||||||
{ time: '11:00', status: 'running', text: 'Researcher analysiert API-Dokumentation.', label: 'Research', date: 'today' },
|
|
||||||
{ time: '11:30', status: 'waiting', text: 'Executor wartet auf Deployment-Freigabe.', label: 'System', date: 'today' },
|
|
||||||
{ time: '15:22', status: 'done', text: 'Nexus Dashboard Migration geplant.', label: 'Coding', date: 'yesterday' },
|
|
||||||
{ time: '16:05', status: 'done', text: 'Docker Compose Optimierung abgeschlossen.', label: 'System', date: 'yesterday' },
|
|
||||||
]
|
|
||||||
|
|
||||||
const feedFilter = ref<string | null>(null)
|
|
||||||
const filterLabels = ['Alle', 'Coding', 'Research', 'Personal', 'Memory', 'Agenten', 'System']
|
|
||||||
|
|
||||||
const filteredFeed = computed(() => {
|
|
||||||
if (!feedFilter.value || feedFilter.value === 'Alle') return allFeed
|
|
||||||
return allFeed.filter(item => item.label === feedFilter.value)
|
|
||||||
})
|
|
||||||
|
|
||||||
const feedGroups = computed(() => {
|
|
||||||
const groups: { date: string; items: FeedItem[] }[] = []
|
|
||||||
const dates = ['today', 'yesterday', 'week'] as const
|
|
||||||
for (const d of dates) {
|
|
||||||
const items = filteredFeed.value.filter(i => i.date === d)
|
|
||||||
if (items.length) {
|
|
||||||
groups.push({
|
|
||||||
date: d === 'today' ? 'Heute' : d === 'yesterday' ? 'Gestern' : 'Diese Woche',
|
|
||||||
items,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return groups
|
|
||||||
})
|
|
||||||
|
|
||||||
const statusColor = (s: FeedStatus): string => {
|
|
||||||
const m: Record<FeedStatus, string> = {
|
|
||||||
running: '#3b82f6',
|
|
||||||
done: '#22c55e',
|
|
||||||
waiting: '#eab308',
|
|
||||||
error: '#ef4444',
|
|
||||||
info: '#6b7385',
|
|
||||||
}
|
|
||||||
return m[s]
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="feed-panel">
|
<div class="feed-panel">
|
||||||
<h2 class="feed-title">Operations Feed</h2>
|
<div class="feed-header">
|
||||||
|
<Activity :size="14" class="feed-icon" />
|
||||||
<div class="filter-pills">
|
<h2>Operations Feed</h2>
|
||||||
<button
|
|
||||||
v-for="label in filterLabels"
|
|
||||||
:key="label"
|
|
||||||
:class="{ active: feedFilter === label || (!feedFilter && label === 'Alle') }"
|
|
||||||
@click="feedFilter = label === 'Alle' ? null : label"
|
|
||||||
>
|
|
||||||
{{ label }}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="feed-list">
|
<div class="feed-list">
|
||||||
<template v-for="group in feedGroups" :key="group.date">
|
<TransitionGroup name="feed">
|
||||||
<div class="feed-date-heading">{{ group.date }}</div>
|
<div
|
||||||
<TransitionGroup name="feed-item" tag="div" class="feed-group-items">
|
v-for="(entry, idx) in entries.slice(0, 8)"
|
||||||
<div
|
:key="entry.timestamp + '-' + idx"
|
||||||
v-for="(item, idx) in group.items"
|
class="feed-entry"
|
||||||
:key="group.date + '-' + idx"
|
>
|
||||||
class="feed-item"
|
<span class="feed-time">{{ entry.time }}</span>
|
||||||
>
|
<span class="feed-bullet">·</span>
|
||||||
<span class="feed-time">{{ item.time }}</span>
|
<span class="feed-agent" :class="'agent-' + entry.agent.toLowerCase()">
|
||||||
<span class="feed-dot" :style="{ background: statusColor(item.status) }"></span>
|
{{ entry.agent }}
|
||||||
<span class="feed-text">{{ item.text }}</span>
|
</span>
|
||||||
</div>
|
<span class="feed-action">{{ entry.action }}</span>
|
||||||
</TransitionGroup>
|
</div>
|
||||||
</template>
|
</TransitionGroup>
|
||||||
|
|
||||||
|
<div v-if="entries.length === 0" class="feed-empty">
|
||||||
|
<span>No operations recorded yet.</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -101,134 +41,115 @@ const statusColor = (s: FeedStatus): string => {
|
|||||||
.feed-panel {
|
.feed-panel {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 10px;
|
||||||
min-height: 420px;
|
padding: 14px;
|
||||||
padding: 18px;
|
background: rgba(22, 27, 34, 0.65);
|
||||||
background: rgba(22, 27, 34, 0.8);
|
border: 1px solid rgba(139, 124, 246, 0.08);
|
||||||
border: 1px solid rgba(139, 124, 246, 0.12);
|
border-radius: 14px;
|
||||||
border-radius: 16px;
|
transition: border-color 0.2s ease;
|
||||||
box-shadow: 0 4px 24px rgba(0,0,0,0.3);
|
backdrop-filter: blur(6px);
|
||||||
backdrop-filter: blur(12px);
|
-webkit-backdrop-filter: blur(6px);
|
||||||
-webkit-backdrop-filter: blur(12px);
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
}
|
}
|
||||||
.feed-panel:hover {
|
.feed-panel:hover {
|
||||||
border-color: rgba(139, 124, 246, 0.18);
|
border-color: rgba(139, 124, 246, 0.15);
|
||||||
}
|
}
|
||||||
.feed-title {
|
|
||||||
font-size: 14px;
|
.feed-header {
|
||||||
font-weight: 600;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
.feed-icon {
|
||||||
|
color: #a78bfa;
|
||||||
|
}
|
||||||
|
.feed-header h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
color: #e8eaf0;
|
color: #e8eaf0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Filter pills */
|
|
||||||
.filter-pills {
|
|
||||||
display: flex;
|
|
||||||
gap: 4px;
|
|
||||||
overflow-x: auto;
|
|
||||||
scrollbar-width: none;
|
|
||||||
-ms-overflow-style: none;
|
|
||||||
padding-bottom: 2px;
|
|
||||||
}
|
|
||||||
.filter-pills::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.filter-pills button {
|
|
||||||
flex-shrink: 0;
|
|
||||||
padding: 4px 10px;
|
|
||||||
border: 1px solid rgba(139, 124, 246, 0.08);
|
|
||||||
border-radius: 20px;
|
|
||||||
background: transparent;
|
|
||||||
color: #6b7385;
|
|
||||||
font-size: 9px;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.filter-pills button:hover {
|
|
||||||
border-color: rgba(139, 124, 246, 0.25);
|
|
||||||
color: #7e8799;
|
|
||||||
}
|
|
||||||
.filter-pills button.active {
|
|
||||||
background: rgba(139, 124, 246, 0.12);
|
|
||||||
border-color: rgba(139, 124, 246, 0.25);
|
|
||||||
color: #a78bfa;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Feed list */
|
|
||||||
.feed-list {
|
.feed-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
overflow-y: auto;
|
position: relative;
|
||||||
flex: 1;
|
|
||||||
}
|
}
|
||||||
.feed-group-items {
|
|
||||||
display: contents;
|
.feed-entry {
|
||||||
}
|
|
||||||
.feed-date-heading {
|
|
||||||
font-size: 9px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: #6b7385;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
padding: 8px 0 4px;
|
|
||||||
}
|
|
||||||
.feed-item {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 5px;
|
||||||
padding: 5px 6px;
|
padding: 5px 6px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
font-size: 9.5px;
|
||||||
|
line-height: 1.3;
|
||||||
transition: background 0.15s;
|
transition: background 0.15s;
|
||||||
}
|
}
|
||||||
.feed-item:hover {
|
.feed-entry:hover {
|
||||||
background: rgba(139, 124, 246, 0.04);
|
background: rgba(255, 255, 255, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.feed-time {
|
.feed-time {
|
||||||
font-size: 9px;
|
|
||||||
color: #6b7385;
|
color: #6b7385;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 36px;
|
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
|
width: 32px;
|
||||||
}
|
}
|
||||||
.feed-dot {
|
.feed-bullet {
|
||||||
width: 7px;
|
color: #6b7385;
|
||||||
height: 7px;
|
|
||||||
border-radius: 50%;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
box-shadow: 0 0 4px currentColor;
|
|
||||||
}
|
}
|
||||||
.feed-text {
|
.feed-agent {
|
||||||
font-size: 10.5px;
|
font-weight: 600;
|
||||||
line-height: 1.3;
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.agent-iris {
|
||||||
|
color: #a78bfa;
|
||||||
|
}
|
||||||
|
.agent-developer {
|
||||||
|
color: #3b82f6;
|
||||||
|
}
|
||||||
|
.agent-devops {
|
||||||
|
color: #eab308;
|
||||||
|
}
|
||||||
|
.agent-researcher {
|
||||||
|
color: #22c55e;
|
||||||
|
}
|
||||||
|
.agent-reviewer {
|
||||||
|
color: #a855f7;
|
||||||
|
}
|
||||||
|
.feed-action {
|
||||||
color: #7e8799;
|
color: #7e8799;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TransitionGroup animations */
|
.feed-empty {
|
||||||
.feed-item-enter-active {
|
text-align: center;
|
||||||
transition: all 0.3s ease;
|
padding: 12px 0;
|
||||||
}
|
font-size: 10px;
|
||||||
.feed-item-leave-active {
|
color: #6b7385;
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
.feed-item-enter-from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateX(-12px);
|
|
||||||
}
|
|
||||||
.feed-item-leave-to {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateX(12px);
|
|
||||||
}
|
|
||||||
.feed-item-move {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
/* TransitionGroup */
|
||||||
.feed-panel {
|
.feed-enter-active {
|
||||||
order: 2;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
.feed-leave-active {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.feed-enter-from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(-10px);
|
||||||
|
}
|
||||||
|
.feed-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(10px);
|
||||||
|
}
|
||||||
|
.feed-move {
|
||||||
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,344 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import {
|
||||||
|
ListTodo,
|
||||||
|
ChevronUp,
|
||||||
|
ChevronDown,
|
||||||
|
ArrowUp,
|
||||||
|
ArrowDown,
|
||||||
|
Trash2,
|
||||||
|
Zap,
|
||||||
|
} from '@lucide/vue'
|
||||||
|
import type { QueueItem } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
items: QueueItem[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
remove: [id: string]
|
||||||
|
moveUp: [id: string]
|
||||||
|
moveDown: [id: string]
|
||||||
|
changePriority: [id: string, priority: QueueItem['priority']]
|
||||||
|
executeNow: [id: string]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const expanded = ref(true)
|
||||||
|
|
||||||
|
const priorityColor: Record<string, string> = {
|
||||||
|
high: '#ef4444',
|
||||||
|
medium: '#eab308',
|
||||||
|
low: '#6b7385',
|
||||||
|
}
|
||||||
|
|
||||||
|
const dragIndex = ref<number | null>(null)
|
||||||
|
const dragOverIndex = ref<number | null>(null)
|
||||||
|
|
||||||
|
function onDragStart(idx: number): void {
|
||||||
|
dragIndex.value = idx
|
||||||
|
}
|
||||||
|
|
||||||
|
function onDragOver(e: DragEvent, idx: number): void {
|
||||||
|
e.preventDefault()
|
||||||
|
dragOverIndex.value = idx
|
||||||
|
}
|
||||||
|
|
||||||
|
function onDrop(): void {
|
||||||
|
if (dragIndex.value !== null && dragOverIndex.value !== null && dragIndex.value !== dragOverIndex.value) {
|
||||||
|
const id = props.items[dragIndex.value]?.id
|
||||||
|
if (id) {
|
||||||
|
const targetId = props.items[dragOverIndex.value]?.id
|
||||||
|
if (targetId) {
|
||||||
|
if (dragIndex.value < dragOverIndex.value) {
|
||||||
|
for (let i = dragIndex.value; i < dragOverIndex.value; i++) {
|
||||||
|
emit('moveDown', props.items[i]!.id)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = dragIndex.value; i > dragOverIndex.value; i--) {
|
||||||
|
emit('moveUp', props.items[i]!.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dragIndex.value = null
|
||||||
|
dragOverIndex.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
function onDragEnd(): void {
|
||||||
|
dragIndex.value = null
|
||||||
|
dragOverIndex.value = null
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="queue-panel">
|
||||||
|
<div class="queue-header" @click="expanded = !expanded">
|
||||||
|
<div class="queue-header-left">
|
||||||
|
<ListTodo :size="14" class="queue-icon" />
|
||||||
|
<h2>Queue</h2>
|
||||||
|
<span class="queue-count">{{ items.length }}</span>
|
||||||
|
</div>
|
||||||
|
<button class="queue-toggle" aria-label="Toggle">
|
||||||
|
<ChevronUp v-if="expanded" :size="14" />
|
||||||
|
<ChevronDown v-else :size="14" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Transition name="queue-expand">
|
||||||
|
<div v-if="expanded" class="queue-list">
|
||||||
|
<div
|
||||||
|
v-for="(item, idx) in items"
|
||||||
|
:key="item.id"
|
||||||
|
class="queue-item"
|
||||||
|
:class="{
|
||||||
|
'drag-source': dragIndex === idx,
|
||||||
|
'drag-over': dragOverIndex === idx && dragIndex !== idx,
|
||||||
|
}"
|
||||||
|
draggable="true"
|
||||||
|
@dragstart="onDragStart(idx)"
|
||||||
|
@dragover="onDragOver($event, idx)"
|
||||||
|
@drop="onDrop"
|
||||||
|
@dragend="onDragEnd"
|
||||||
|
>
|
||||||
|
<div class="queue-item-body">
|
||||||
|
<div class="queue-item-head">
|
||||||
|
<span
|
||||||
|
class="priority-badge"
|
||||||
|
:style="{
|
||||||
|
color: priorityColor[item.priority],
|
||||||
|
borderColor: `${priorityColor[item.priority]}30`,
|
||||||
|
background: `${priorityColor[item.priority]}10`,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ item.priority }}
|
||||||
|
</span>
|
||||||
|
<span class="queue-wait">{{ item.waitTime }}</span>
|
||||||
|
</div>
|
||||||
|
<p class="queue-text">{{ item.text }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="queue-actions">
|
||||||
|
<button
|
||||||
|
class="q-action-btn"
|
||||||
|
title="Execute now"
|
||||||
|
@click.stop="emit('executeNow', item.id)"
|
||||||
|
>
|
||||||
|
<Zap :size="12" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="q-action-btn"
|
||||||
|
title="Move up"
|
||||||
|
:disabled="idx === 0"
|
||||||
|
@click.stop="emit('moveUp', item.id)"
|
||||||
|
>
|
||||||
|
<ArrowUp :size="12" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="q-action-btn"
|
||||||
|
title="Move down"
|
||||||
|
:disabled="idx === items.length - 1"
|
||||||
|
@click.stop="emit('moveDown', item.id)"
|
||||||
|
>
|
||||||
|
<ArrowDown :size="12" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="q-action-btn q-action-danger"
|
||||||
|
title="Remove"
|
||||||
|
@click.stop="emit('remove', item.id)"
|
||||||
|
>
|
||||||
|
<Trash2 :size="12" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="items.length === 0" class="queue-empty">
|
||||||
|
<p>Queue is empty</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Transition>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.queue-panel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background: rgba(22, 27, 34, 0.75);
|
||||||
|
border: 1px solid rgba(139, 124, 246, 0.12);
|
||||||
|
border-radius: 16px;
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
|
||||||
|
transition: border-color 0.2s ease;
|
||||||
|
}
|
||||||
|
.queue-panel:hover {
|
||||||
|
border-color: rgba(139, 124, 246, 0.18);
|
||||||
|
}
|
||||||
|
|
||||||
|
.queue-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.queue-header-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 7px;
|
||||||
|
}
|
||||||
|
.queue-icon {
|
||||||
|
color: #a78bfa;
|
||||||
|
}
|
||||||
|
.queue-header h2 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.queue-count {
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #a78bfa;
|
||||||
|
padding: 1px 7px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgba(167, 139, 250, 0.1);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.queue-toggle {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: transparent;
|
||||||
|
color: #6b7385;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
.queue-toggle:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.04);
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.queue-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0 10px 10px;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.queue-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 8px 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
transition: background 0.15s, opacity 0.15s;
|
||||||
|
cursor: grab;
|
||||||
|
}
|
||||||
|
.queue-item:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.03);
|
||||||
|
}
|
||||||
|
.queue-item:active {
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
|
.drag-source {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
.drag-over {
|
||||||
|
background: rgba(167, 139, 250, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.queue-item-body {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.queue-item-head {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
.priority-badge {
|
||||||
|
font-size: 7px;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
padding: 1px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
.queue-wait {
|
||||||
|
font-size: 8px;
|
||||||
|
color: #6b7385;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.queue-text {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 9.5px;
|
||||||
|
color: #7e8799;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
.queue-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 2px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.15s;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
.queue-item:hover .queue-actions {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.q-action-btn {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: transparent;
|
||||||
|
color: #6b7385;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s;
|
||||||
|
}
|
||||||
|
.q-action-btn:hover:not(:disabled) {
|
||||||
|
background: rgba(255, 255, 255, 0.06);
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.q-action-btn:disabled {
|
||||||
|
opacity: 0.25;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.q-action-danger:hover {
|
||||||
|
color: #ef4444;
|
||||||
|
background: rgba(239, 68, 68, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.queue-empty {
|
||||||
|
text-align: center;
|
||||||
|
padding: 16px 0;
|
||||||
|
}
|
||||||
|
.queue-empty p {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #6b7385;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Transition */
|
||||||
|
.queue-expand-enter-active,
|
||||||
|
.queue-expand-leave-active {
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
.queue-expand-enter-from,
|
||||||
|
.queue-expand-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-8px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,345 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, ref } from 'vue'
|
||||||
|
import { Bot, Sparkles } from '@lucide/vue'
|
||||||
|
import AgentNode from './AgentNode.vue'
|
||||||
|
import AgentModal from './AgentModal.vue'
|
||||||
|
import type { AgentNodeData } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
agents: AgentNodeData[]
|
||||||
|
irisRuntime: string
|
||||||
|
getAgentRuntime: (id: string) => string
|
||||||
|
irisFocus: string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const selectedAgent = ref<AgentNodeData | null>(null)
|
||||||
|
|
||||||
|
function onAgentSelect(agentId: string): void {
|
||||||
|
const agent = props.agents.find(a => a.id === agentId)
|
||||||
|
if (agent) selectedAgent.value = agent
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeModal(): void {
|
||||||
|
selectedAgent.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
const agentColorMap: Record<string, string> = {
|
||||||
|
developer: '#3b82f6',
|
||||||
|
devops: '#eab308',
|
||||||
|
researcher: '#22c55e',
|
||||||
|
reviewer: '#a855f7',
|
||||||
|
}
|
||||||
|
|
||||||
|
const agentLineActive: Record<string, boolean> = {
|
||||||
|
developer: true,
|
||||||
|
devops: false,
|
||||||
|
researcher: true,
|
||||||
|
reviewer: false,
|
||||||
|
}
|
||||||
|
|
||||||
|
const NETWORK_W = 440
|
||||||
|
const IRIS_CX = NETWORK_W / 2
|
||||||
|
const IRIS_CY = 80
|
||||||
|
const AGENT_START_Y = 170
|
||||||
|
|
||||||
|
const agentPositions = computed(() => [
|
||||||
|
{ id: 'developer', x: 60, y: AGENT_START_Y },
|
||||||
|
{ id: 'researcher', x: NETWORK_W - 60, y: AGENT_START_Y },
|
||||||
|
{ id: 'devops', x: 60, y: AGENT_START_Y + 110 },
|
||||||
|
{ id: 'reviewer', x: NETWORK_W - 60, y: AGENT_START_Y + 110 },
|
||||||
|
])
|
||||||
|
|
||||||
|
const activeLines = computed(() =>
|
||||||
|
agentPositions.value.filter(p => agentLineActive[p.id])
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="team-network">
|
||||||
|
<!-- Iris Node -->
|
||||||
|
<div class="iris-node">
|
||||||
|
<div class="iris-avatar-ring">
|
||||||
|
<svg class="ring-svg" viewBox="0 0 60 60" width="60" height="60">
|
||||||
|
<circle cx="30" cy="30" r="27" fill="none" stroke="rgba(167,139,250,0.12)" stroke-width="2" />
|
||||||
|
<circle
|
||||||
|
cx="30" cy="30" r="27"
|
||||||
|
fill="none" stroke="#a78bfa" stroke-width="2"
|
||||||
|
stroke-dasharray="169.6" stroke-dashoffset="42"
|
||||||
|
stroke-linecap="round"
|
||||||
|
transform="rotate(-90 30 30)"
|
||||||
|
class="ring-arc"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<div class="iris-avatar-inner">
|
||||||
|
<Bot :size="26" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="iris-name-block">
|
||||||
|
<h2>Iris</h2>
|
||||||
|
<span class="iris-role-label">Chief of Staff</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="iris-tagline">Breaking down tasks and coordinating specialists</p>
|
||||||
|
|
||||||
|
<div class="iris-runtime">
|
||||||
|
<span class="rt-label">Session Runtime</span>
|
||||||
|
<span class="rt-value">{{ irisRuntime }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- SVG Connections -->
|
||||||
|
<svg
|
||||||
|
class="network-svg"
|
||||||
|
:viewBox="`0 0 ${NETWORK_W} 400`"
|
||||||
|
preserveAspectRatio="xMidYMid meet"
|
||||||
|
>
|
||||||
|
<defs>
|
||||||
|
<filter id="lineglow">
|
||||||
|
<feGaussianBlur stdDeviation="2" result="blur" />
|
||||||
|
<feMerge>
|
||||||
|
<feMergeNode in="blur" />
|
||||||
|
<feMergeNode in="SourceGraphic" />
|
||||||
|
</feMerge>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<line
|
||||||
|
v-for="pos in agentPositions"
|
||||||
|
:key="'conn-' + pos.id"
|
||||||
|
:x1="IRIS_CX" :y1="IRIS_CY + 32"
|
||||||
|
:x2="pos.x + 22" :y2="pos.y"
|
||||||
|
:stroke="agentColorMap[pos.id]"
|
||||||
|
:stroke-width="agentLineActive[pos.id] ? 1.5 : 1"
|
||||||
|
:opacity="agentLineActive[pos.id] ? 0.4 : 0.1"
|
||||||
|
class="conn-line"
|
||||||
|
:class="{ 'line-pulse': agentLineActive[pos.id] }"
|
||||||
|
filter="url(#lineglow)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<g v-for="pos in activeLines" :key="'fx-' + pos.id">
|
||||||
|
<circle
|
||||||
|
:cx="pos.x + 22" :cy="pos.y"
|
||||||
|
r="2.5" fill="#ffffff"
|
||||||
|
class="pulse-end" :style="{ '--pulse-color': agentColorMap[pos.id] }"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
:cx="IRIS_CX" :cy="IRIS_CY + 32"
|
||||||
|
r="2.5" fill="#ffffff"
|
||||||
|
class="pulse-origin"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<!-- Agent Cards -->
|
||||||
|
<div class="agents-grid">
|
||||||
|
<AgentNode
|
||||||
|
v-for="agent in agents"
|
||||||
|
:key="agent.id"
|
||||||
|
:agent="agent"
|
||||||
|
:runtime="getAgentRuntime(agent.id)"
|
||||||
|
@select="onAgentSelect"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Focus Banner -->
|
||||||
|
<div v-if="irisFocus" class="focus-banner">
|
||||||
|
<Sparkles :size="12" class="focus-icon" />
|
||||||
|
<span>{{ irisFocus }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Agent Modal -->
|
||||||
|
<AgentModal
|
||||||
|
v-if="selectedAgent"
|
||||||
|
:agent="selectedAgent"
|
||||||
|
:runtime="getAgentRuntime(selectedAgent.id)"
|
||||||
|
@close="closeModal"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.team-network {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 24px 20px 20px;
|
||||||
|
background: rgba(22, 27, 34, 0.75);
|
||||||
|
border: 1px solid rgba(139, 124, 246, 0.12);
|
||||||
|
border-radius: 16px;
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
|
||||||
|
transition: border-color 0.2s ease;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 520px;
|
||||||
|
}
|
||||||
|
.team-network:hover {
|
||||||
|
border-color: rgba(139, 124, 246, 0.18);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Iris Node */
|
||||||
|
.iris-node {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 20px 28px;
|
||||||
|
background: rgba(167, 139, 250, 0.06);
|
||||||
|
border: 1px solid rgba(167, 139, 250, 0.15);
|
||||||
|
border-radius: 14px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 320px;
|
||||||
|
}
|
||||||
|
.iris-avatar-ring {
|
||||||
|
position: relative;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
.ring-svg {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
}
|
||||||
|
.ring-arc {
|
||||||
|
animation: iris-spin 3s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes iris-spin {
|
||||||
|
to { transform: rotate(270deg); }
|
||||||
|
}
|
||||||
|
.iris-avatar-inner {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(167, 139, 250, 0.15);
|
||||||
|
color: #a78bfa;
|
||||||
|
}
|
||||||
|
.iris-name-block {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
.iris-name-block h2 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.iris-role-label {
|
||||||
|
font-size: 9px;
|
||||||
|
color: #a78bfa;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
}
|
||||||
|
.iris-tagline {
|
||||||
|
margin: 2px 0 0;
|
||||||
|
font-size: 10.5px;
|
||||||
|
color: #6b7385;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.35;
|
||||||
|
}
|
||||||
|
.iris-runtime {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: 6px;
|
||||||
|
padding: 5px 14px;
|
||||||
|
background: rgba(167, 139, 250, 0.08);
|
||||||
|
border: 1px solid rgba(167, 139, 250, 0.1);
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
.rt-label {
|
||||||
|
font-size: 8px;
|
||||||
|
color: #7e8799;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
}
|
||||||
|
.rt-value {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
color: #a78bfa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SVG Lines */
|
||||||
|
.network-svg {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.conn-line {
|
||||||
|
transition: opacity 0.4s ease, stroke-width 0.4s ease;
|
||||||
|
}
|
||||||
|
.line-pulse {
|
||||||
|
animation: line-glow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
@keyframes line-glow {
|
||||||
|
0%, 100% { opacity: 0.4; }
|
||||||
|
50% { opacity: 0.7; }
|
||||||
|
}
|
||||||
|
.pulse-origin {
|
||||||
|
animation: pulse-origin 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
.pulse-end {
|
||||||
|
animation: pulse-end 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
@keyframes pulse-origin {
|
||||||
|
0%, 100% { opacity: 0; r: 1.5; }
|
||||||
|
50% { opacity: 0.8; r: 3.5; }
|
||||||
|
}
|
||||||
|
@keyframes pulse-end {
|
||||||
|
0%, 100% { opacity: 0.2; r: 1.5; }
|
||||||
|
50% { opacity: 0.9; r: 3; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Agent Cards */
|
||||||
|
.agents-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 10px;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Focus Banner */
|
||||||
|
.focus-banner {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 16px;
|
||||||
|
background: rgba(234, 179, 8, 0.05);
|
||||||
|
border: 1px solid rgba(234, 179, 8, 0.1);
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-top: 4px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.focus-icon {
|
||||||
|
color: #eab308;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.focus-banner span {
|
||||||
|
font-size: 10.5px;
|
||||||
|
color: #eab308;
|
||||||
|
line-height: 1.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.agents-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,297 @@
|
|||||||
|
import { ref, reactive, computed } from 'vue'
|
||||||
|
|
||||||
|
export interface AgentNodeData {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
role: string
|
||||||
|
description: string
|
||||||
|
color: string
|
||||||
|
icon: string
|
||||||
|
currentTask: string
|
||||||
|
goal: string
|
||||||
|
progress: number
|
||||||
|
workload: number // 0-100
|
||||||
|
active: boolean
|
||||||
|
runtimeSeconds: number
|
||||||
|
workingFeed: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MissionData {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
progress: number
|
||||||
|
currentTask: string
|
||||||
|
lastActivity: string
|
||||||
|
remainingTasks: number
|
||||||
|
status: 'healthy' | 'attention' | 'blocked' | 'paused'
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FeedEntry {
|
||||||
|
time: string
|
||||||
|
agent: string
|
||||||
|
action: string
|
||||||
|
timestamp: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChatMessage {
|
||||||
|
id: string
|
||||||
|
sender: 'user' | 'iris'
|
||||||
|
text: string
|
||||||
|
timestamp: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface QueueItem {
|
||||||
|
id: string
|
||||||
|
text: string
|
||||||
|
priority: 'high' | 'medium' | 'low'
|
||||||
|
waitTime: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const now = Date.now()
|
||||||
|
|
||||||
|
export function useDashboardData() {
|
||||||
|
const sessionStart = Date.now()
|
||||||
|
|
||||||
|
// Runtime counter
|
||||||
|
const runtimeSeconds = ref(0)
|
||||||
|
let runtimeInterval: ReturnType<typeof setInterval> | null = null
|
||||||
|
|
||||||
|
function startRuntime() {
|
||||||
|
const startTs = sessionStart
|
||||||
|
runtimeSeconds.value = Math.floor((Date.now() - startTs) / 1000)
|
||||||
|
runtimeInterval = setInterval(() => {
|
||||||
|
runtimeSeconds.value = Math.floor((Date.now() - startTs) / 1000)
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopRuntime() {
|
||||||
|
if (runtimeInterval) {
|
||||||
|
clearInterval(runtimeInterval)
|
||||||
|
runtimeInterval = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatRuntime = (seconds: number): string => {
|
||||||
|
const m = Math.floor(seconds / 60)
|
||||||
|
const s = seconds % 60
|
||||||
|
return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const irisRuntime = computed(() => formatRuntime(runtimeSeconds.value))
|
||||||
|
|
||||||
|
// Agent runtimes (simulated)
|
||||||
|
const agentStartTimes = reactive<Record<string, number>>({
|
||||||
|
developer: now - 3600000,
|
||||||
|
devops: now - 1800000,
|
||||||
|
researcher: now - 2700000,
|
||||||
|
reviewer: now - 900000,
|
||||||
|
})
|
||||||
|
|
||||||
|
const getAgentRuntime = (id: string): string => {
|
||||||
|
const start = agentStartTimes[id]
|
||||||
|
if (!start) return '00:00'
|
||||||
|
const secs = Math.floor((now - start) / 1000)
|
||||||
|
const m = Math.floor(secs / 60)
|
||||||
|
const s = secs % 60
|
||||||
|
return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Agents
|
||||||
|
const agents = ref<AgentNodeData[]>([
|
||||||
|
{
|
||||||
|
id: 'developer',
|
||||||
|
name: 'Developer',
|
||||||
|
role: 'Backend & Frontend',
|
||||||
|
description: 'Implements features across the stack with TypeScript, C#, and Vue.',
|
||||||
|
color: '#3b82f6',
|
||||||
|
icon: 'code',
|
||||||
|
currentTask: 'Building Dungeon System API endpoints',
|
||||||
|
goal: 'Complete Dungeon CRUD + room generation',
|
||||||
|
progress: 62,
|
||||||
|
workload: 65,
|
||||||
|
active: true,
|
||||||
|
runtimeSeconds: 3600,
|
||||||
|
workingFeed: [
|
||||||
|
'Created DungeonController',
|
||||||
|
'Defined dungeon schema',
|
||||||
|
'Implementing room generation algorithm',
|
||||||
|
'Writing unit tests for RoomFactory',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'devops',
|
||||||
|
name: 'DevOps',
|
||||||
|
role: 'Infrastructure & CI/CD',
|
||||||
|
description: 'Manages Docker, deployment pipelines, and system reliability.',
|
||||||
|
color: '#eab308',
|
||||||
|
icon: 'server',
|
||||||
|
currentTask: 'Optimizing Docker Compose caching',
|
||||||
|
goal: 'Reduce build times by 40%',
|
||||||
|
progress: 45,
|
||||||
|
workload: 40,
|
||||||
|
active: false,
|
||||||
|
runtimeSeconds: 1800,
|
||||||
|
workingFeed: [
|
||||||
|
'Analyzed Docker layer cache',
|
||||||
|
'Optimized COPY order in Dockerfile',
|
||||||
|
'Added .dockerignore for node_modules',
|
||||||
|
'Testing incremental builds',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'researcher',
|
||||||
|
name: 'Researcher',
|
||||||
|
role: 'Analysis & Documentation',
|
||||||
|
description: 'Researches APIs, patterns, and best practices. Maintains docs.',
|
||||||
|
color: '#22c55e',
|
||||||
|
icon: 'search',
|
||||||
|
currentTask: 'Analyzing WebSocket alternatives',
|
||||||
|
goal: 'Recommend real-time communication strategy',
|
||||||
|
progress: 30,
|
||||||
|
workload: 25,
|
||||||
|
active: true,
|
||||||
|
runtimeSeconds: 2700,
|
||||||
|
workingFeed: [
|
||||||
|
'Evaluated WebSocket vs SSE vs WebRTC',
|
||||||
|
'Documented SignalR limitations',
|
||||||
|
'Prototyping WebSocket fallback',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'reviewer',
|
||||||
|
name: 'Reviewer',
|
||||||
|
role: 'Code Quality & Testing',
|
||||||
|
description: 'Reviews pull requests, enforces standards, runs test suites.',
|
||||||
|
color: '#a855f7',
|
||||||
|
icon: 'shield',
|
||||||
|
currentTask: 'Reviewing Dungeon System PR',
|
||||||
|
goal: 'Zero critical findings before merge',
|
||||||
|
progress: 80,
|
||||||
|
workload: 50,
|
||||||
|
active: false,
|
||||||
|
runtimeSeconds: 900,
|
||||||
|
workingFeed: [
|
||||||
|
'Reviewed DungeonController.cs',
|
||||||
|
'Found 3 minor style issues',
|
||||||
|
'Approved RoomValidator',
|
||||||
|
'Running integration tests',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
// Missions
|
||||||
|
const missions = ref<MissionData[]>([
|
||||||
|
{
|
||||||
|
id: 'dungeon-system',
|
||||||
|
name: 'Dungeon System',
|
||||||
|
progress: 62,
|
||||||
|
currentTask: 'Implement room generation',
|
||||||
|
lastActivity: '3 min ago',
|
||||||
|
remainingTasks: 8,
|
||||||
|
status: 'healthy',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'dashboard-redesign',
|
||||||
|
name: 'Dashboard Redesign',
|
||||||
|
progress: 45,
|
||||||
|
currentTask: 'AI Team Network layout',
|
||||||
|
lastActivity: 'Just now',
|
||||||
|
remainingTasks: 6,
|
||||||
|
status: 'healthy',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'infra-optimization',
|
||||||
|
name: 'Infra Optimization',
|
||||||
|
progress: 30,
|
||||||
|
currentTask: 'Optimize build caching',
|
||||||
|
lastActivity: '12 min ago',
|
||||||
|
remainingTasks: 4,
|
||||||
|
status: 'attention',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'auth-system',
|
||||||
|
name: 'Auth System',
|
||||||
|
progress: 88,
|
||||||
|
currentTask: 'Finalize refresh token flow',
|
||||||
|
lastActivity: '45 min ago',
|
||||||
|
remainingTasks: 2,
|
||||||
|
status: 'healthy',
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
// Feed
|
||||||
|
const feedEntries = ref<FeedEntry[]>([
|
||||||
|
{ time: '20:42', agent: 'Developer', action: 'Created DungeonController endpoints', timestamp: now - 60000 },
|
||||||
|
{ time: '20:38', agent: 'DevOps', action: 'Optimized Docker COPY order', timestamp: now - 300000 },
|
||||||
|
{ time: '20:35', agent: 'Iris', action: 'Delegated room generation to Developer', timestamp: now - 540000 },
|
||||||
|
{ time: '20:28', agent: 'Researcher', action: 'Documented WebSocket vs SSE analysis', timestamp: now - 780000 },
|
||||||
|
{ time: '20:22', agent: 'Reviewer', action: 'Approved RoomValidator PR', timestamp: now - 900000 },
|
||||||
|
{ time: '20:15', agent: 'DevOps', action: 'Added .dockerignore for node_modules', timestamp: now - 1200000 },
|
||||||
|
{ time: '20:08', agent: 'Iris', action: 'Broke down Dungeon System tasks', timestamp: now - 1500000 },
|
||||||
|
{ time: '19:55', agent: 'Developer', action: 'Defined dungeon schema models', timestamp: now - 1800000 },
|
||||||
|
])
|
||||||
|
|
||||||
|
// Chat
|
||||||
|
const chatMessages = ref<ChatMessage[]>([
|
||||||
|
{ id: 'm1', sender: 'iris', text: 'Guten Abend, Bao. Ready to continue the Dungeon System?', timestamp: now - 600000 },
|
||||||
|
{ id: 'm2', sender: 'user', text: "Yes, what's the status?", timestamp: now - 540000 },
|
||||||
|
{ id: 'm3', sender: 'iris', text: "Developer is at 62% on room generation. Reviewer approved the schema. I'd recommend focusing on the room connection logic next.", timestamp: now - 480000 },
|
||||||
|
])
|
||||||
|
|
||||||
|
const irisBusy = ref(true)
|
||||||
|
const irisFocus = ref('Breaking down Dungeon System for DevOps and Developer')
|
||||||
|
|
||||||
|
// Queue
|
||||||
|
const queue = ref<QueueItem[]>([
|
||||||
|
{ id: 'q1', text: 'Deploy latest dashboard build to preview', priority: 'high', waitTime: '2 min' },
|
||||||
|
{ id: 'q2', text: 'Review infrastructure cost analysis', priority: 'medium', waitTime: '8 min' },
|
||||||
|
{ id: 'q3', text: 'Schedule B2 German lesson review', priority: 'low', waitTime: '15 min' },
|
||||||
|
{ id: 'q4', text: 'Update project roadmap document', priority: 'medium', waitTime: '12 min' },
|
||||||
|
])
|
||||||
|
|
||||||
|
function sendChat(text: string): void {
|
||||||
|
if (!text.trim()) return
|
||||||
|
chatMessages.value.push({
|
||||||
|
id: `user-${Date.now()}`,
|
||||||
|
sender: 'user',
|
||||||
|
text: text.trim(),
|
||||||
|
timestamp: Date.now(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeQueueItem(id: string): void {
|
||||||
|
const idx = queue.value.findIndex(q => q.id === id)
|
||||||
|
if (idx !== -1) queue.value.splice(idx, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
function moveQueueItem(fromIdx: number, toIdx: number): void {
|
||||||
|
if (toIdx < 0 || toIdx >= queue.value.length) return
|
||||||
|
const [item] = queue.value.splice(fromIdx, 1)
|
||||||
|
queue.value.splice(toIdx, 0, item)
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeQueuePriority(id: string, priority: QueueItem['priority']): void {
|
||||||
|
const item = queue.value.find(q => q.id === id)
|
||||||
|
if (item) item.priority = priority
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
agents,
|
||||||
|
missions,
|
||||||
|
feedEntries,
|
||||||
|
chatMessages,
|
||||||
|
irisBusy,
|
||||||
|
irisFocus,
|
||||||
|
irisRuntime,
|
||||||
|
queue,
|
||||||
|
runtimeSeconds,
|
||||||
|
getAgentRuntime,
|
||||||
|
startRuntime,
|
||||||
|
stopRuntime,
|
||||||
|
formatRuntime,
|
||||||
|
sendChat,
|
||||||
|
removeQueueItem,
|
||||||
|
moveQueueItem,
|
||||||
|
changeQueuePriority,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import { ref, onMounted, onUnmounted } from 'vue'
|
||||||
|
|
||||||
|
export function useTimer() {
|
||||||
|
const elapsed = ref(0)
|
||||||
|
let interval: ReturnType<typeof setInterval> | null = null
|
||||||
|
|
||||||
|
function start() {
|
||||||
|
if (interval !== null) return
|
||||||
|
const startTime = Date.now()
|
||||||
|
elapsed.value = 0
|
||||||
|
interval = setInterval(() => {
|
||||||
|
elapsed.value = Math.floor((Date.now() - startTime) / 1000)
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop() {
|
||||||
|
if (interval !== null) {
|
||||||
|
clearInterval(interval)
|
||||||
|
interval = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function format(minutes: number, seconds: number): string {
|
||||||
|
return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatted = (): string => {
|
||||||
|
const m = Math.floor(elapsed.value / 60)
|
||||||
|
const s = elapsed.value % 60
|
||||||
|
return format(m, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(start)
|
||||||
|
onUnmounted(stop)
|
||||||
|
|
||||||
|
return { elapsed, formatted, start, stop }
|
||||||
|
}
|
||||||
@@ -1,116 +1,85 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import IrisPanel from '../components/dashboard/IrisPanel.vue'
|
import { onMounted, onUnmounted } from 'vue'
|
||||||
|
import MissionCard from '../components/dashboard/MissionCard.vue'
|
||||||
import OperationsFeed from '../components/dashboard/OperationsFeed.vue'
|
import OperationsFeed from '../components/dashboard/OperationsFeed.vue'
|
||||||
import AgendaPanel from '../components/dashboard/AgendaPanel.vue'
|
import TeamNetwork from '../components/dashboard/TeamNetwork.vue'
|
||||||
import ActiveInitiatives from '../components/dashboard/ActiveInitiatives.vue'
|
import ChatPanel from '../components/dashboard/ChatPanel.vue'
|
||||||
import RecentlyFinished from '../components/dashboard/RecentlyFinished.vue'
|
import QueuePanel from '../components/dashboard/QueuePanel.vue'
|
||||||
|
import { useDashboardData } from '../composables/useDashboardData'
|
||||||
|
|
||||||
|
const {
|
||||||
|
agents, missions, feedEntries, chatMessages,
|
||||||
|
irisBusy, irisFocus, irisRuntime, queue,
|
||||||
|
getAgentRuntime, startRuntime, stopRuntime,
|
||||||
|
sendChat, removeQueueItem, moveQueueItem, changeQueuePriority,
|
||||||
|
} = useDashboardData()
|
||||||
|
|
||||||
|
onMounted(startRuntime)
|
||||||
|
onUnmounted(stopRuntime)
|
||||||
|
|
||||||
|
function onChatSend(text: string): void { sendChat(text) }
|
||||||
|
|
||||||
|
function onQueueMoveUp(id: string): void {
|
||||||
|
const idx = queue.value.findIndex(q => q.id === id)
|
||||||
|
if (idx > 0) moveQueueItem(idx, idx - 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
function onQueueMoveDown(id: string): void {
|
||||||
|
const idx = queue.value.findIndex(q => q.id === id)
|
||||||
|
if (idx < queue.value.length - 1) moveQueueItem(idx, idx + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
function onQueueExecuteNow(id: string): void {
|
||||||
|
const item = queue.value.find(q => q.id === id)
|
||||||
|
if (item) console.log('[Dashboard] Execute now:', item.text)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<!-- Top Bar -->
|
<div class="col-left">
|
||||||
<div class="topbar">
|
<section class="missions-section">
|
||||||
<span class="eyebrow">MISSION CONTROL</span>
|
<h2 class="column-title">Active Missions</h2>
|
||||||
<h1>Übersicht</h1>
|
<MissionCard v-for="m in missions" :key="m.id" :mission="m" />
|
||||||
|
</section>
|
||||||
|
<OperationsFeed :entries="feedEntries" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-center">
|
||||||
<!-- Three-column row -->
|
<TeamNetwork
|
||||||
<div class="columns">
|
:agents="agents"
|
||||||
<IrisPanel />
|
:iris-runtime="irisRuntime"
|
||||||
<OperationsFeed />
|
:get-agent-runtime="getAgentRuntime"
|
||||||
<AgendaPanel />
|
:iris-focus="irisFocus"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-right">
|
||||||
|
<ChatPanel :messages="chatMessages" :iris-busy="irisBusy" :iris-focus="irisFocus" @send="onChatSend" />
|
||||||
|
<QueuePanel :items="queue" @remove="removeQueueItem" @move-up="onQueueMoveUp" @move-down="onQueueMoveDown" @change-priority="changeQueuePriority" @execute-now="onQueueExecuteNow" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Bottom sections -->
|
|
||||||
<ActiveInitiatives />
|
|
||||||
<RecentlyFinished />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.dashboard {
|
.dashboard {
|
||||||
--panel-bg: rgba(22, 27, 34, 0.8);
|
display: grid; grid-template-columns: 280px 1fr 320px; gap: 14px;
|
||||||
--panel-border: rgba(139, 124, 246, 0.12);
|
height: 100%; min-height: 0;
|
||||||
--text-primary: #e8eaf0;
|
animation: fade-in 0.35s ease-out;
|
||||||
--text-secondary: #7e8799;
|
|
||||||
--text-muted: #6b7385;
|
|
||||||
--iris-accent: #a78bfa;
|
|
||||||
--blue: #3b82f6;
|
|
||||||
--green: #22c55e;
|
|
||||||
--yellow: #eab308;
|
|
||||||
--red: #ef4444;
|
|
||||||
--gray: #6b7280;
|
|
||||||
--bg-base: #0d1117;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 10px;
|
|
||||||
max-width: 1280px;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
||||||
color: var(--text-primary);
|
|
||||||
|
|
||||||
animation: dashboard-fade-in 0.4s ease-out;
|
|
||||||
}
|
}
|
||||||
|
@keyframes fade-in {
|
||||||
@keyframes dashboard-fade-in {
|
from { opacity: 0; transform: translateY(8px); }
|
||||||
from {
|
to { opacity: 1; transform: translateY(0); }
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(8px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.dashboard ::-webkit-scrollbar { width: 5px; height: 5px; }
|
||||||
/* Custom scrollbar */
|
.dashboard ::-webkit-scrollbar-track { background: transparent; }
|
||||||
.dashboard ::-webkit-scrollbar {
|
.dashboard ::-webkit-scrollbar-thumb { background: rgba(139,124,246,0.2); border-radius: 3px; }
|
||||||
width: 5px;
|
.dashboard ::-webkit-scrollbar-thumb:hover { background: rgba(139,124,246,0.35); }
|
||||||
height: 5px;
|
.col-left { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 4px; }
|
||||||
}
|
.col-center { overflow-y: auto; padding: 0 4px; min-height: 0; }
|
||||||
.dashboard ::-webkit-scrollbar-track {
|
.col-right { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-left: 4px; }
|
||||||
background: transparent;
|
.missions-section { display: flex; flex-direction: column; gap: 8px; }
|
||||||
}
|
.column-title { margin: 0; font-size: 13px; font-weight: 600; color: #e8eaf0; letter-spacing: 0.01em; }
|
||||||
.dashboard ::-webkit-scrollbar-thumb {
|
@media (max-width: 1100px) {
|
||||||
background: rgba(139, 124, 246, 0.2);
|
.dashboard { grid-template-columns: 1fr; }
|
||||||
border-radius: 3px;
|
.col-left, .col-center, .col-right { overflow: visible; padding: 0; }
|
||||||
}
|
|
||||||
.dashboard ::-webkit-scrollbar-thumb:hover {
|
|
||||||
background: rgba(139, 124, 246, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
.topbar {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
padding: 4px 0;
|
|
||||||
}
|
|
||||||
.eyebrow {
|
|
||||||
font-size: 9px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
color: var(--iris-accent);
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
.topbar h1 {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columns {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 280px 1fr 260px;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
|
||||||
.columns {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
.topbar h1 {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user