Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bf60b8b064 | |||
| b8498f47bb | |||
| f037aa2eeb | |||
| e6520fc26d | |||
| c9d8852609 | |||
| 11e9a257a1 | |||
| ead202ad8b | |||
| effc86e15b |
@@ -54,7 +54,7 @@ defineEmits<{
|
|||||||
<section class="modal-section">
|
<section class="modal-section">
|
||||||
<h3 class="section-label">Live Thinking</h3>
|
<h3 class="section-label">Live Thinking</h3>
|
||||||
<div class="thinking-panel">
|
<div class="thinking-panel">
|
||||||
<div class="thinking-stream" ref="thinkingStreamRef">
|
<div class="thinking-stream">
|
||||||
<div
|
<div
|
||||||
v-for="(msg, idx) in agent.thinkingStream"
|
v-for="(msg, idx) in agent.thinkingStream"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
|
|||||||
@@ -0,0 +1,260 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
import { ChevronLeft, ChevronRight, X } from '@lucide/vue'
|
||||||
|
import type { FeedEntry } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
entries: FeedEntry[]
|
||||||
|
modelValue: boolean
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
'update:modelValue': [value: boolean]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const selectedDayOffset = ref(0) // 0 = today, -1 = yesterday, etc.
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
emit('update:modelValue', false)
|
||||||
|
}
|
||||||
|
|
||||||
|
function dayLabel(offset: number): string {
|
||||||
|
if (offset === 0) return 'Heute'
|
||||||
|
if (offset === -1) return 'Gestern'
|
||||||
|
if (offset === -2) return 'Vorgestern'
|
||||||
|
const d = new Date()
|
||||||
|
d.setDate(d.getDate() + offset)
|
||||||
|
return d.toLocaleDateString('de-DE', { weekday: 'long', day: 'numeric', month: 'long' })
|
||||||
|
}
|
||||||
|
|
||||||
|
function navigateDay(dir: -1 | 1) {
|
||||||
|
const next = selectedDayOffset.value + dir
|
||||||
|
if (next >= -6 && next <= 0) {
|
||||||
|
selectedDayOffset.value = next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const filteredEntries = computed(() => {
|
||||||
|
const targetDate = new Date()
|
||||||
|
targetDate.setDate(targetDate.getDate() + selectedDayOffset.value)
|
||||||
|
const targetStr = targetDate.toISOString().slice(0, 10)
|
||||||
|
return props.entries.filter(e => e.timestamp.slice(0, 10) === targetStr)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Teleport to="body">
|
||||||
|
<div class="feed-modal-overlay" @click.self="close">
|
||||||
|
<div class="feed-modal-card">
|
||||||
|
<div class="feed-modal-header">
|
||||||
|
<h2 class="feed-modal-title">Operations Log</h2>
|
||||||
|
<button class="feed-modal-close-btn" @click="close" aria-label="Close">
|
||||||
|
<X :size="16" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="feed-modal-nav">
|
||||||
|
<button
|
||||||
|
class="feed-nav-btn"
|
||||||
|
:disabled="selectedDayOffset <= -6"
|
||||||
|
@click="navigateDay(-1)"
|
||||||
|
aria-label="Previous day"
|
||||||
|
>
|
||||||
|
<ChevronLeft :size="14" />
|
||||||
|
</button>
|
||||||
|
<span class="feed-nav-label">{{ dayLabel(selectedDayOffset) }}</span>
|
||||||
|
<button
|
||||||
|
class="feed-nav-btn"
|
||||||
|
:disabled="selectedDayOffset >= 0"
|
||||||
|
@click="navigateDay(1)"
|
||||||
|
aria-label="Next day"
|
||||||
|
>
|
||||||
|
<ChevronRight :size="14" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="feed-modal-entries">
|
||||||
|
<div v-if="filteredEntries.length === 0" class="feed-modal-empty">
|
||||||
|
Keine Einträge für diesen Tag.
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-for="(entry, idx) in filteredEntries"
|
||||||
|
:key="entry.timestamp + '-' + idx"
|
||||||
|
class="feed-modal-entry"
|
||||||
|
>
|
||||||
|
<span class="feed-time">{{ entry.time }}</span>
|
||||||
|
<span class="feed-bullet">·</span>
|
||||||
|
<span class="feed-agent" :class="'agent-' + entry.agent.toLowerCase()">
|
||||||
|
{{ entry.agent }}
|
||||||
|
</span>
|
||||||
|
<span class="feed-action">{{ entry.action }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Teleport>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.feed-modal-overlay {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
padding: 20px;
|
||||||
|
animation: feed-overlay-in 0.2s ease;
|
||||||
|
}
|
||||||
|
@keyframes feed-overlay-in {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.feed-modal-card {
|
||||||
|
background: #161b22;
|
||||||
|
border: 1px solid rgba(139, 124, 246, 0.15);
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 24px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 520px;
|
||||||
|
max-height: 80vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
|
||||||
|
animation: feed-card-in 0.25s ease;
|
||||||
|
}
|
||||||
|
@keyframes feed-card-in {
|
||||||
|
from { opacity: 0; transform: translateY(12px) scale(0.98); }
|
||||||
|
to { opacity: 1; transform: translateY(0) scale(1); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.feed-modal-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.feed-modal-title {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
.feed-modal-close-btn {
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
border: none;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
border-radius: 6px;
|
||||||
|
color: #7e8799;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s;
|
||||||
|
}
|
||||||
|
.feed-modal-close-btn:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
color: #e8eaf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feed-modal-nav {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.feed-nav-btn {
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
border: 1px solid rgba(139, 124, 246, 0.15);
|
||||||
|
background: rgba(139, 124, 246, 0.08);
|
||||||
|
border-radius: 8px;
|
||||||
|
color: #a78bfa;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s;
|
||||||
|
}
|
||||||
|
.feed-nav-btn:hover:not(:disabled) {
|
||||||
|
background: rgba(139, 124, 246, 0.16);
|
||||||
|
border-color: rgba(139, 124, 246, 0.3);
|
||||||
|
}
|
||||||
|
.feed-nav-btn:disabled {
|
||||||
|
opacity: 0.3;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
.feed-nav-label {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #d1d5db;
|
||||||
|
min-width: 100px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feed-modal-entries {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: 50vh;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
.feed-modal-empty {
|
||||||
|
text-align: center;
|
||||||
|
padding: 24px 0;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #6b7385;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feed-modal-entry {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
padding: 5px 6px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 9.5px;
|
||||||
|
line-height: 1.3;
|
||||||
|
transition: background 0.15s;
|
||||||
|
}
|
||||||
|
.feed-modal-entry:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.feed-time {
|
||||||
|
color: #6b7385;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
width: 32px;
|
||||||
|
}
|
||||||
|
.feed-bullet {
|
||||||
|
color: #6b7385;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.feed-agent {
|
||||||
|
font-weight: 600;
|
||||||
|
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;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { Activity, ChevronLeft, ChevronRight, X } from '@lucide/vue'
|
import { Activity } from '@lucide/vue'
|
||||||
import type { FeedEntry } from '../../composables/useDashboardData'
|
import type { FeedEntry } from '../../composables/useDashboardData'
|
||||||
|
import FeedDetailModal from './FeedDetailModal.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
entries: FeedEntry[]
|
entries: FeedEntry[]
|
||||||
@@ -12,41 +13,10 @@ const compactEntries = computed(() => props.entries.slice(0, 5))
|
|||||||
|
|
||||||
// ── Feed Detail Modal ──
|
// ── Feed Detail Modal ──
|
||||||
const showDetailModal = ref(false)
|
const showDetailModal = ref(false)
|
||||||
const selectedDayOffset = ref(0) // 0 = today, -1 = yesterday, etc.
|
|
||||||
|
|
||||||
function openDetailModal() {
|
function openDetailModal() {
|
||||||
selectedDayOffset.value = 0
|
|
||||||
showDetailModal.value = true
|
showDetailModal.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDetailModal() {
|
|
||||||
showDetailModal.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
function dayLabel(offset: number): string {
|
|
||||||
if (offset === 0) return 'Heute'
|
|
||||||
if (offset === -1) return 'Gestern'
|
|
||||||
if (offset === -2) return 'Vorgestern'
|
|
||||||
const d = new Date()
|
|
||||||
d.setDate(d.getDate() + offset)
|
|
||||||
return d.toLocaleDateString('de-DE', { weekday: 'long', day: 'numeric', month: 'long' })
|
|
||||||
}
|
|
||||||
|
|
||||||
function navigateDay(dir: -1 | 1) {
|
|
||||||
const next = selectedDayOffset.value + dir
|
|
||||||
if (next >= -6 && next <= 0) {
|
|
||||||
selectedDayOffset.value = next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const filteredEntries = computed(() => {
|
|
||||||
const targetDate = new Date()
|
|
||||||
targetDate.setDate(targetDate.getDate() + selectedDayOffset.value)
|
|
||||||
const targetStr = targetDate.toISOString().slice(0, 10)
|
|
||||||
return props.entries.filter(e => e.timestamp.slice(0, 10) === targetStr)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -81,55 +51,11 @@ const filteredEntries = computed(() => {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ── Feed Detail Modal ── -->
|
<FeedDetailModal
|
||||||
<Teleport to="body">
|
:entries="entries"
|
||||||
<div v-if="showDetailModal" class="modal-overlay" @click.self="closeDetailModal">
|
:model-value="showDetailModal"
|
||||||
<div class="modal-content">
|
@update:model-value="showDetailModal = $event"
|
||||||
<div class="modal-header">
|
/>
|
||||||
<h2 class="modal-title">Operations Log</h2>
|
|
||||||
<button class="modal-close-btn" @click="closeDetailModal">
|
|
||||||
<X :size="16" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-nav">
|
|
||||||
<button
|
|
||||||
class="nav-btn"
|
|
||||||
:disabled="selectedDayOffset <= -6"
|
|
||||||
@click="navigateDay(-1)"
|
|
||||||
>
|
|
||||||
<ChevronLeft :size="14" />
|
|
||||||
</button>
|
|
||||||
<span class="nav-label">{{ dayLabel(selectedDayOffset) }}</span>
|
|
||||||
<button
|
|
||||||
class="nav-btn"
|
|
||||||
:disabled="selectedDayOffset >= 0"
|
|
||||||
@click="navigateDay(1)"
|
|
||||||
>
|
|
||||||
<ChevronRight :size="14" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-entries">
|
|
||||||
<div v-if="filteredEntries.length === 0" class="modal-empty">
|
|
||||||
Keine Einträge für diesen Tag.
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-for="(entry, idx) in filteredEntries"
|
|
||||||
:key="entry.timestamp + '-' + idx"
|
|
||||||
class="feed-entry"
|
|
||||||
>
|
|
||||||
<span class="feed-time">{{ entry.time }}</span>
|
|
||||||
<span class="feed-bullet">·</span>
|
|
||||||
<span class="feed-agent" :class="'agent-' + entry.agent.toLowerCase()">
|
|
||||||
{{ entry.agent }}
|
|
||||||
</span>
|
|
||||||
<span class="feed-action">{{ entry.action }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Teleport>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -267,104 +193,4 @@ const filteredEntries = computed(() => {
|
|||||||
.feed-move {
|
.feed-move {
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Modal Overlay ── */
|
|
||||||
:global(.modal-overlay) {
|
|
||||||
position: fixed;
|
|
||||||
inset: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
background: rgba(0, 0, 0, 0.6);
|
|
||||||
backdrop-filter: blur(4px);
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
:global(.modal-content) {
|
|
||||||
background: #161b22;
|
|
||||||
border: 1px solid rgba(139, 124, 246, 0.15);
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 24px;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 520px;
|
|
||||||
max-height: 80vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
|
|
||||||
}
|
|
||||||
:global(.modal-header) {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
:global(.modal-title) {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #e8eaf0;
|
|
||||||
}
|
|
||||||
:global(.modal-close-btn) {
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
width: 28px;
|
|
||||||
height: 28px;
|
|
||||||
border: none;
|
|
||||||
background: rgba(255, 255, 255, 0.05);
|
|
||||||
border-radius: 6px;
|
|
||||||
color: #7e8799;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.15s;
|
|
||||||
}
|
|
||||||
:global(.modal-close-btn:hover) {
|
|
||||||
background: rgba(255, 255, 255, 0.1);
|
|
||||||
color: #e8eaf0;
|
|
||||||
}
|
|
||||||
:global(.modal-nav) {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
:global(.nav-btn) {
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
border: 1px solid rgba(139, 124, 246, 0.15);
|
|
||||||
background: rgba(139, 124, 246, 0.08);
|
|
||||||
border-radius: 8px;
|
|
||||||
color: #a78bfa;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.15s;
|
|
||||||
}
|
|
||||||
:global(.nav-btn:hover:not(:disabled)) {
|
|
||||||
background: rgba(139, 124, 246, 0.16);
|
|
||||||
border-color: rgba(139, 124, 246, 0.3);
|
|
||||||
}
|
|
||||||
:global(.nav-btn:disabled) {
|
|
||||||
opacity: 0.3;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
:global(.nav-label) {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #d1d5db;
|
|
||||||
min-width: 100px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
:global(.modal-entries) {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 4px;
|
|
||||||
overflow-y: auto;
|
|
||||||
max-height: 50vh;
|
|
||||||
padding-right: 4px;
|
|
||||||
}
|
|
||||||
:global(.modal-empty) {
|
|
||||||
text-align: center;
|
|
||||||
padding: 24px 0;
|
|
||||||
font-size: 11px;
|
|
||||||
color: #6b7385;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ function onDragEnd(): void {
|
|||||||
<div class="queue-header" @click="expanded = !expanded">
|
<div class="queue-header" @click="expanded = !expanded">
|
||||||
<div class="queue-header-left">
|
<div class="queue-header-left">
|
||||||
<ListTodo :size="14" class="queue-icon" />
|
<ListTodo :size="14" class="queue-icon" />
|
||||||
<h2>Queue</h2>
|
<h2>Chat Queue</h2>
|
||||||
<span class="queue-count">{{ items.length }}</span>
|
<span class="queue-count">{{ items.length }}</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="queue-toggle" aria-label="Toggle">
|
<button class="queue-toggle" aria-label="Toggle">
|
||||||
|
|||||||
+21
-1
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { Plus, Circle } from '@lucide/vue'
|
import { Plus, Circle, ChevronRight } from '@lucide/vue'
|
||||||
import type { OpenTask } from '../../composables/useDashboardData'
|
import type { OpenTask } from '../../composables/useDashboardData'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -9,6 +9,7 @@ defineProps<{
|
|||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
newTask: []
|
newTask: []
|
||||||
|
'go-board': []
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const expandedId = ref<string | null>(null)
|
const expandedId = ref<string | null>(null)
|
||||||
@@ -67,6 +68,11 @@ function toggleExpand(id: string) {
|
|||||||
</div>
|
</div>
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button class="task-board-btn" @click="emit('go-board')">
|
||||||
|
<span>Zum Task Board</span>
|
||||||
|
<ChevronRight :size="14" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -223,6 +229,20 @@ function toggleExpand(id: string) {
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.task-board-btn {
|
||||||
|
width: 100%; margin-top: 12px; padding: 10px;
|
||||||
|
display: flex; align-items: center; justify-content: center; gap: 6px;
|
||||||
|
background: rgba(139, 124, 246, 0.08);
|
||||||
|
border: 1px solid rgba(139, 124, 246, 0.15);
|
||||||
|
border-radius: 10px; color: #a78bfa;
|
||||||
|
font-size: 10px; font-weight: 600; cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
.task-board-btn:hover {
|
||||||
|
background: rgba(139, 124, 246, 0.15);
|
||||||
|
border-color: rgba(139, 124, 246, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
/* TransitionGroup */
|
/* TransitionGroup */
|
||||||
.task-enter-active {
|
.task-enter-active {
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
@@ -1,22 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onUnmounted, nextTick, computed } from 'vue'
|
import { ref, computed, toRef } from 'vue'
|
||||||
import { Bot, Code2, Server, Shield, Search, Terminal } from '@lucide/vue'
|
import { Bot, Code2, Server, Shield, Search, Terminal } from '@lucide/vue'
|
||||||
|
import type { AgentNodeData } from '../../composables/useDashboardData'
|
||||||
interface AgentData {
|
import { useTeamNetworkSvg } from '../../composables/useTeamNetworkSvg'
|
||||||
id: string
|
|
||||||
name: string
|
|
||||||
role: string
|
|
||||||
description: string
|
|
||||||
tags: string[]
|
|
||||||
color: string
|
|
||||||
icon: string
|
|
||||||
hero?: boolean
|
|
||||||
task?: string
|
|
||||||
runtime?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
agents: AgentData[]
|
agents: AgentNodeData[]
|
||||||
heroId?: string
|
heroId?: string
|
||||||
activeAgents?: string[]
|
activeAgents?: string[]
|
||||||
}>()
|
}>()
|
||||||
@@ -25,31 +14,27 @@ const emit = defineEmits<{
|
|||||||
select: [id: string]
|
select: [id: string]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
// ── Layout refs ──
|
// ── Network ref ──
|
||||||
const networkRef = ref<HTMLDivElement | null>(null)
|
const networkRef = ref<HTMLDivElement | null>(null)
|
||||||
|
|
||||||
interface CardBox {
|
|
||||||
left: number
|
|
||||||
right: number
|
|
||||||
top: number
|
|
||||||
bottom: number
|
|
||||||
cx: number
|
|
||||||
cy: number
|
|
||||||
width: number
|
|
||||||
height: number
|
|
||||||
}
|
|
||||||
const cardPositions = ref<Record<string, CardBox>>({})
|
|
||||||
const svgWidth = ref(0)
|
|
||||||
const svgHeight = ref(0)
|
|
||||||
|
|
||||||
// ── Computed data ──
|
// ── Computed data ──
|
||||||
const hero = computed(() => props.agents.find(a => a.id === props.heroId) ?? props.agents[0])
|
const heroId = computed(() => props.heroId ?? props.agents[0]?.id ?? '')
|
||||||
const childAgents = computed(() => props.agents.filter(a => a.id !== props.heroId))
|
|
||||||
|
|
||||||
function isActive(id: string): boolean {
|
function isActive(id: string): boolean {
|
||||||
return props.activeAgents?.includes(id) ?? false
|
return props.activeAgents?.includes(id) ?? false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── SVG composable ──
|
||||||
|
const {
|
||||||
|
svgWidth,
|
||||||
|
svgHeight,
|
||||||
|
childAgents,
|
||||||
|
connectionPaths,
|
||||||
|
storePathRef,
|
||||||
|
storePulseRef,
|
||||||
|
storePulseRef2,
|
||||||
|
} = useTeamNetworkSvg(networkRef, toRef(props, 'agents'), heroId, isActive)
|
||||||
|
|
||||||
// ── Icon resolver ──
|
// ── Icon resolver ──
|
||||||
function resolveIcon(iconName: string) {
|
function resolveIcon(iconName: string) {
|
||||||
switch (iconName) {
|
switch (iconName) {
|
||||||
@@ -63,204 +48,15 @@ function resolveIcon(iconName: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Position measurement ──
|
// ── Runtime formatter ──
|
||||||
function updatePositions() {
|
function formatRuntime(seconds: number): string {
|
||||||
if (!networkRef.value) return
|
const m = Math.floor(seconds / 60)
|
||||||
const rect = networkRef.value.getBoundingClientRect()
|
const s = seconds % 60
|
||||||
svgWidth.value = rect.width
|
return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`
|
||||||
svgHeight.value = rect.height
|
|
||||||
|
|
||||||
const cards = networkRef.value.querySelectorAll('[data-agent-id]')
|
|
||||||
const positions: Record<string, CardBox> = {}
|
|
||||||
cards.forEach(el => {
|
|
||||||
const id = el.getAttribute('data-agent-id')
|
|
||||||
if (!id) return
|
|
||||||
const r = el.getBoundingClientRect()
|
|
||||||
positions[id] = {
|
|
||||||
left: r.left - rect.left,
|
|
||||||
right: r.left + r.width - rect.left,
|
|
||||||
top: r.top - rect.top,
|
|
||||||
bottom: r.top + r.height - rect.top,
|
|
||||||
cx: r.left + r.width / 2 - rect.left,
|
|
||||||
cy: r.top + r.height / 2 - rect.top,
|
|
||||||
width: r.width,
|
|
||||||
height: r.height,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
cardPositions.value = positions
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── SVG path computation ──
|
// ── Hero computed ──
|
||||||
interface ConnectionPath {
|
const hero = computed(() => props.agents.find(a => a.id === heroId.value) ?? props.agents[0])
|
||||||
d: string
|
|
||||||
length: number
|
|
||||||
}
|
|
||||||
|
|
||||||
const connectionPaths = computed<Record<string, ConnectionPath | null>>(() => {
|
|
||||||
const result: Record<string, ConnectionPath | null> = {}
|
|
||||||
const pos = cardPositions.value
|
|
||||||
const heroEntry = props.agents.find(a => a.id === props.heroId)
|
|
||||||
const heroId = heroEntry?.id ?? ''
|
|
||||||
const iris = heroId ? pos[heroId] : undefined
|
|
||||||
if (!iris) return result
|
|
||||||
|
|
||||||
const children = childAgents.value
|
|
||||||
const total = children.length
|
|
||||||
if (total === 0) return result
|
|
||||||
|
|
||||||
for (let idx = 0; idx < total; idx++) {
|
|
||||||
const agent = children[idx]
|
|
||||||
const agentPos = pos[agent.id]
|
|
||||||
if (!agentPos) {
|
|
||||||
result[agent.id] = null
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spread start points across Iris bottom edge (30%-70% range)
|
|
||||||
const t = total > 1 ? idx / (total - 1) : 0.5
|
|
||||||
const startX = iris.left + iris.width * (0.38 + t * 0.24)
|
|
||||||
const startY = iris.bottom - 1
|
|
||||||
|
|
||||||
// Determine column: left or right of Iris center
|
|
||||||
const isLeftColumn = agentPos.cx < iris.cx
|
|
||||||
|
|
||||||
// End point: approach from side, 8px before card edge
|
|
||||||
const endX = isLeftColumn ? agentPos.right - 8 : agentPos.left + 8
|
|
||||||
const endY = agentPos.cy
|
|
||||||
|
|
||||||
// Bézier control points
|
|
||||||
const cp1x = startX
|
|
||||||
const cp1y = startY + 70
|
|
||||||
const cp2x = endX + (isLeftColumn ? 35 : -35)
|
|
||||||
const cp2y = endY - 10
|
|
||||||
|
|
||||||
const d = `M ${startX} ${startY} C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${endX} ${endY}`
|
|
||||||
result[agent.id] = { d, length: 0 }
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
|
|
||||||
// ── Pulse animation (JS-driven via requestAnimationFrame) ──
|
|
||||||
let animFrameId: number | null = null
|
|
||||||
let lastAnimTime = 0
|
|
||||||
|
|
||||||
const pathElements = ref<Record<string, SVGPathElement | null>>({})
|
|
||||||
const pulseElements = ref<Record<string, SVGPathElement | null>>({})
|
|
||||||
const pulseOffsets = ref<Record<string, number>>({})
|
|
||||||
|
|
||||||
function storePathRef(id: string) {
|
|
||||||
return (el: SVGPathElement | null) => {
|
|
||||||
pathElements.value[id] = el
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function storePulseRef(id: string) {
|
|
||||||
return (el: SVGPathElement | null) => {
|
|
||||||
pulseElements.value[id] = el
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function refreshPathLengths() {
|
|
||||||
for (const id of childAgents.value.map(a => a.id)) {
|
|
||||||
const pathEl = pathElements.value[id]
|
|
||||||
const pulseEl = pulseElements.value[id]
|
|
||||||
const p = connectionPaths.value[id]
|
|
||||||
if (pathEl && p) {
|
|
||||||
p.length = pathEl.getTotalLength()
|
|
||||||
}
|
|
||||||
if (pulseEl && p && p.length > 0) {
|
|
||||||
if (pulseOffsets.value[id] === undefined) {
|
|
||||||
pulseOffsets.value[id] = 0
|
|
||||||
}
|
|
||||||
pulseEl.setAttribute('stroke-dasharray', `10 ${p.length}`)
|
|
||||||
pulseEl.setAttribute('stroke-dashoffset', String(-pulseOffsets.value[id]))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function startPulseAnimation() {
|
|
||||||
const speeds: Record<string, number> = {}
|
|
||||||
|
|
||||||
refreshPathLengths()
|
|
||||||
|
|
||||||
for (const id of childAgents.value.map(a => a.id)) {
|
|
||||||
const p = connectionPaths.value[id]
|
|
||||||
if (p && p.length > 0) {
|
|
||||||
speeds[id] = p.length / 3000
|
|
||||||
if (pulseOffsets.value[id] === undefined) {
|
|
||||||
pulseOffsets.value[id] = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lastAnimTime = performance.now()
|
|
||||||
|
|
||||||
function tick(now: number) {
|
|
||||||
const dt = now - lastAnimTime
|
|
||||||
lastAnimTime = now
|
|
||||||
|
|
||||||
const children = childAgents.value
|
|
||||||
for (let i = 0; i < children.length; i++) {
|
|
||||||
const id = children[i].id
|
|
||||||
const pathEl = pathElements.value[id]
|
|
||||||
const pulseEl = pulseElements.value[id]
|
|
||||||
const p = connectionPaths.value[id]
|
|
||||||
if (!pathEl || !pulseEl || !p) continue
|
|
||||||
|
|
||||||
const len = p.length
|
|
||||||
if (len <= 0) continue
|
|
||||||
|
|
||||||
const currentOffset = pulseOffsets.value[id] ?? 0
|
|
||||||
const newOffset = currentOffset + (speeds[id] ?? len / 3000) * dt
|
|
||||||
const cycleLen = len + 10
|
|
||||||
pulseOffsets.value[id] = newOffset > cycleLen ? newOffset % cycleLen : newOffset
|
|
||||||
|
|
||||||
pulseEl.setAttribute('stroke-dashoffset', String(-pulseOffsets.value[id]))
|
|
||||||
}
|
|
||||||
|
|
||||||
animFrameId = requestAnimationFrame(tick)
|
|
||||||
}
|
|
||||||
|
|
||||||
animFrameId = requestAnimationFrame(tick)
|
|
||||||
}
|
|
||||||
|
|
||||||
function stopPulseAnimation() {
|
|
||||||
if (animFrameId !== null) {
|
|
||||||
cancelAnimationFrame(animFrameId)
|
|
||||||
animFrameId = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ── Lifecycle ──
|
|
||||||
let resizeObserver: ResizeObserver | null = null
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await nextTick()
|
|
||||||
updatePositions()
|
|
||||||
|
|
||||||
// Wait for SVG to render so path refs are populated
|
|
||||||
await nextTick()
|
|
||||||
updatePositions()
|
|
||||||
refreshPathLengths()
|
|
||||||
|
|
||||||
startPulseAnimation()
|
|
||||||
|
|
||||||
resizeObserver = new ResizeObserver(() => {
|
|
||||||
updatePositions()
|
|
||||||
// Paths changed — recalculate lengths and dasharrays
|
|
||||||
requestAnimationFrame(() => {
|
|
||||||
refreshPathLengths()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
if (networkRef.value) {
|
|
||||||
resizeObserver.observe(networkRef.value)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
stopPulseAnimation()
|
|
||||||
resizeObserver?.disconnect()
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -316,7 +112,7 @@ onUnmounted(() => {
|
|||||||
opacity="0.5"
|
opacity="0.5"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Pulse line (white dashed segment moving along) -->
|
<!-- Pulse line 1 (white dashed segment moving along) -->
|
||||||
<path
|
<path
|
||||||
v-if="connectionPaths[agent.id]"
|
v-if="connectionPaths[agent.id]"
|
||||||
:ref="storePulseRef(agent.id)"
|
:ref="storePulseRef(agent.id)"
|
||||||
@@ -328,6 +124,19 @@ onUnmounted(() => {
|
|||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
:opacity="isActive(agent.id) ? 1 : 0.4"
|
:opacity="isActive(agent.id) ? 1 : 0.4"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- Pulse line 2 (offset by half cycle) -->
|
||||||
|
<path
|
||||||
|
v-if="connectionPaths[agent.id]"
|
||||||
|
:ref="storePulseRef2(agent.id)"
|
||||||
|
:d="connectionPaths[agent.id]!.d"
|
||||||
|
stroke="white"
|
||||||
|
stroke-width="3"
|
||||||
|
fill="none"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
:opacity="isActive(agent.id) ? 0.8 : 0.3"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
@@ -356,12 +165,13 @@ onUnmounted(() => {
|
|||||||
<span class="card-role-tag" :style="{ background: `${hero.color}18`, color: hero.color, borderColor: `${hero.color}30` }">{{ hero.role }}</span>
|
<span class="card-role-tag" :style="{ background: `${hero.color}18`, color: hero.color, borderColor: `${hero.color}30` }">{{ hero.role }}</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="card-desc">{{ hero.description }}</p>
|
<p class="card-desc">{{ hero.description }}</p>
|
||||||
<div v-if="hero.task" class="task-row">
|
<div v-if="hero.currentTask" class="task-row">
|
||||||
<span class="node-task">
|
<span class="node-task">
|
||||||
<span class="node-task-dot">●</span>
|
<span class="node-task-dot">●</span>
|
||||||
{{ hero.task }}
|
{{ hero.currentTask }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="hero.runtime" class="node-runtime">{{ hero.runtime }}</span>
|
<span class="node-runtime">{{ formatRuntime(hero.runtimeSeconds) }}</span>
|
||||||
|
<span v-if="hero.model" class="node-model">{{ hero.model }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-tags">
|
<div class="card-tags">
|
||||||
<span v-for="tag in hero.tags" :key="tag" class="card-tag" :style="{ background: `${hero.color}18`, color: hero.color }">{{ tag }}</span>
|
<span v-for="tag in hero.tags" :key="tag" class="card-tag" :style="{ background: `${hero.color}18`, color: hero.color }">{{ tag }}</span>
|
||||||
@@ -403,12 +213,13 @@ onUnmounted(() => {
|
|||||||
<span class="card-role-tag" :style="{ background: `${agent.color}18`, color: agent.color, borderColor: `${agent.color}30` }">{{ agent.role }}</span>
|
<span class="card-role-tag" :style="{ background: `${agent.color}18`, color: agent.color, borderColor: `${agent.color}30` }">{{ agent.role }}</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="card-desc">{{ agent.description }}</p>
|
<p class="card-desc">{{ agent.description }}</p>
|
||||||
<div v-if="agent.task" class="task-row">
|
<div v-if="agent.currentTask" class="task-row">
|
||||||
<span class="node-task">
|
<span class="node-task">
|
||||||
<span class="node-task-dot">●</span>
|
<span class="node-task-dot">●</span>
|
||||||
{{ agent.task }}
|
{{ agent.currentTask }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="agent.runtime" class="node-runtime">{{ agent.runtime }}</span>
|
<span class="node-runtime">{{ formatRuntime(agent.runtimeSeconds) }}</span>
|
||||||
|
<span v-if="agent.model" class="node-model">{{ agent.model }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-tags">
|
<div class="card-tags">
|
||||||
<span v-for="tag in agent.tags" :key="tag" class="card-tag" :style="{ background: `${agent.color}18`, color: agent.color }">{{ tag }}</span>
|
<span v-for="tag in agent.tags" :key="tag" class="card-tag" :style="{ background: `${agent.color}18`, color: agent.color }">{{ tag }}</span>
|
||||||
@@ -469,26 +280,33 @@ onUnmounted(() => {
|
|||||||
transition: border-color 0.3s, box-shadow 0.3s;
|
transition: border-color 0.3s, box-shadow 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Agent Card (inlined from old AgentCard.vue) ── */
|
/* ── Agent Card ── */
|
||||||
.agent-card {
|
.agent-card {
|
||||||
background: var(--panel, #11141b);
|
background: rgba(18, 22, 30, 0.45);
|
||||||
border: 1px solid var(--line, #1f2330);
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border-color 0.2s, box-shadow 0.2s;
|
transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.agent-card:hover {
|
.agent-card:hover {
|
||||||
|
background: rgba(18, 22, 30, 0.65);
|
||||||
border-color: var(--card-color, #8b7cf6);
|
border-color: var(--card-color, #8b7cf6);
|
||||||
box-shadow: 0 0 16px color-mix(in srgb, var(--card-color, #8b7cf6) 10%, transparent);
|
box-shadow: 0 0 16px color-mix(in srgb, var(--card-color, #8b7cf6) 10%, transparent);
|
||||||
}
|
}
|
||||||
.hero-card {
|
.hero-card {
|
||||||
border-color: rgba(139, 124, 246, 0.2);
|
background: rgba(18, 22, 30, 0.45);
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
box-shadow: 0 0 20px rgba(139, 124, 246, 0.06);
|
box-shadow: 0 0 20px rgba(139, 124, 246, 0.06);
|
||||||
}
|
}
|
||||||
.hero-card:hover {
|
.hero-card:hover {
|
||||||
|
background: rgba(18, 22, 30, 0.65);
|
||||||
border-color: #8b7cf6;
|
border-color: #8b7cf6;
|
||||||
box-shadow: 0 0 24px rgba(139, 124, 246, 0.12);
|
box-shadow: 0 0 24px rgba(139, 124, 246, 0.12);
|
||||||
}
|
}
|
||||||
@@ -567,6 +385,13 @@ onUnmounted(() => {
|
|||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
.node-model {
|
||||||
|
font-size: 8.5px;
|
||||||
|
color: #6b7385;
|
||||||
|
font-weight: 500;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Tags ── */
|
/* ── Tags ── */
|
||||||
.card-tags {
|
.card-tags {
|
||||||
@@ -583,7 +408,7 @@ onUnmounted(() => {
|
|||||||
letter-spacing: 0.02em;
|
letter-spacing: 0.02em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Hover Arrow (bottom-right) ── */
|
/* ── Hover Arrow ── */
|
||||||
.card-arrow {
|
.card-arrow {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
|
|||||||
@@ -5,8 +5,11 @@ export interface AgentNodeData {
|
|||||||
name: string
|
name: string
|
||||||
role: string
|
role: string
|
||||||
description: string
|
description: string
|
||||||
|
tags: string[]
|
||||||
color: string
|
color: string
|
||||||
icon: string
|
icon: string
|
||||||
|
model?: string
|
||||||
|
hero?: boolean
|
||||||
currentTask: string
|
currentTask: string
|
||||||
goal: string
|
goal: string
|
||||||
progress: number
|
progress: number
|
||||||
@@ -103,14 +106,17 @@ export function useDashboardData() {
|
|||||||
name: 'Iris',
|
name: 'Iris',
|
||||||
role: 'Chief of Staff',
|
role: 'Chief of Staff',
|
||||||
description: 'Koordiniert, delegiert, hält das Team tight. Die erste Anlaufstelle zwischen Boss und Maschine.',
|
description: 'Koordiniert, delegiert, hält das Team tight. Die erste Anlaufstelle zwischen Boss und Maschine.',
|
||||||
|
tags: ['Orchestration', 'Delegation', 'Approval'],
|
||||||
color: '#8b7cf6',
|
color: '#8b7cf6',
|
||||||
icon: 'bot',
|
icon: 'bot',
|
||||||
|
hero: true,
|
||||||
currentTask: 'Orchestrating Nexus Dashboard redesign',
|
currentTask: 'Orchestrating Nexus Dashboard redesign',
|
||||||
goal: 'Complete Mission Control v3',
|
goal: 'Complete Mission Control v3',
|
||||||
progress: 85,
|
progress: 85,
|
||||||
workload: 55,
|
workload: 55,
|
||||||
active: true,
|
active: true,
|
||||||
runtimeSeconds: 28800,
|
runtimeSeconds: 28800,
|
||||||
|
model: 'GPT-5.4',
|
||||||
workingFeed: [
|
workingFeed: [
|
||||||
{ time: '22:38', text: 'Analyzed user feedback on Dashboard' },
|
{ time: '22:38', text: 'Analyzed user feedback on Dashboard' },
|
||||||
{ time: '22:36', text: 'Delegated card redesign to Developer' },
|
{ time: '22:36', text: 'Delegated card redesign to Developer' },
|
||||||
@@ -128,6 +134,7 @@ export function useDashboardData() {
|
|||||||
name: 'Developer',
|
name: 'Developer',
|
||||||
role: 'Backend & Frontend',
|
role: 'Backend & Frontend',
|
||||||
description: 'Implements features across the stack with TypeScript, C#, and Vue.',
|
description: 'Implements features across the stack with TypeScript, C#, and Vue.',
|
||||||
|
tags: ['Coding', 'Development', 'Builds'],
|
||||||
color: '#3b82f6',
|
color: '#3b82f6',
|
||||||
icon: 'code',
|
icon: 'code',
|
||||||
currentTask: 'Building Dungeon System API endpoints',
|
currentTask: 'Building Dungeon System API endpoints',
|
||||||
@@ -147,12 +154,14 @@ export function useDashboardData() {
|
|||||||
{ time: '22:23', text: 'Designing RoomFactory interface' },
|
{ time: '22:23', text: 'Designing RoomFactory interface' },
|
||||||
{ time: '22:24', text: 'Implementing corridor connection logic' },
|
{ time: '22:24', text: 'Implementing corridor connection logic' },
|
||||||
],
|
],
|
||||||
|
model: 'DeepSeek V4 Flash',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'devops',
|
id: 'devops',
|
||||||
name: 'DevOps',
|
name: 'DevOps',
|
||||||
role: 'Infrastructure & CI/CD',
|
role: 'Infrastructure & CI/CD',
|
||||||
description: 'Manages Docker, deployment pipelines, and system reliability.',
|
description: 'Manages Docker, deployment pipelines, and system reliability.',
|
||||||
|
tags: ['Deployment', 'Docker', 'CI/CD'],
|
||||||
color: '#eab308',
|
color: '#eab308',
|
||||||
icon: 'server',
|
icon: 'server',
|
||||||
currentTask: 'Optimizing Docker Compose caching',
|
currentTask: 'Optimizing Docker Compose caching',
|
||||||
@@ -172,12 +181,14 @@ export function useDashboardData() {
|
|||||||
{ time: '22:21', text: 'Benchmarking multi-stage vs single-stage' },
|
{ time: '22:21', text: 'Benchmarking multi-stage vs single-stage' },
|
||||||
{ time: '22:22', text: 'Calculating potential speedup from caching' },
|
{ time: '22:22', text: 'Calculating potential speedup from caching' },
|
||||||
],
|
],
|
||||||
|
model: 'DeepSeek V4 Pro',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'researcher',
|
id: 'researcher',
|
||||||
name: 'Researcher',
|
name: 'Researcher',
|
||||||
role: 'Analysis & Documentation',
|
role: 'Analysis & Documentation',
|
||||||
description: 'Researches APIs, patterns, and best practices. Maintains docs.',
|
description: 'Researches APIs, patterns, and best practices. Maintains docs.',
|
||||||
|
tags: ['Research', 'Analysis', 'Docs'],
|
||||||
color: '#22c55e',
|
color: '#22c55e',
|
||||||
icon: 'search',
|
icon: 'search',
|
||||||
currentTask: 'Analyzing WebSocket alternatives',
|
currentTask: 'Analyzing WebSocket alternatives',
|
||||||
@@ -196,12 +207,14 @@ export function useDashboardData() {
|
|||||||
{ time: '22:19', text: 'Checking SSE browser support matrix' },
|
{ time: '22:19', text: 'Checking SSE browser support matrix' },
|
||||||
{ time: '22:20', text: 'Drafting recommendation summary' },
|
{ time: '22:20', text: 'Drafting recommendation summary' },
|
||||||
],
|
],
|
||||||
|
model: 'DeepSeek V4 Pro',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'reviewer',
|
id: 'reviewer',
|
||||||
name: 'Reviewer',
|
name: 'Reviewer',
|
||||||
role: 'Code Quality & Testing',
|
role: 'Code Quality & Testing',
|
||||||
description: 'Reviews pull requests, enforces standards, runs test suites.',
|
description: 'Reviews pull requests, enforces standards, runs test suites.',
|
||||||
|
tags: ['Code Review', 'Testing', 'Quality'],
|
||||||
color: '#a855f7',
|
color: '#a855f7',
|
||||||
icon: 'shield',
|
icon: 'shield',
|
||||||
currentTask: 'Reviewing Dungeon System PR',
|
currentTask: 'Reviewing Dungeon System PR',
|
||||||
@@ -221,6 +234,7 @@ export function useDashboardData() {
|
|||||||
{ time: '22:16', text: 'Checking RoomValidator edge cases' },
|
{ time: '22:16', text: 'Checking RoomValidator edge cases' },
|
||||||
{ time: '22:17', text: 'Verifying integration test coverage' },
|
{ time: '22:17', text: 'Verifying integration test coverage' },
|
||||||
],
|
],
|
||||||
|
model: 'DeepSeek V4 Pro',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,266 @@
|
|||||||
|
import { ref, computed, onMounted, onUnmounted, nextTick, type Ref } from 'vue'
|
||||||
|
import type { AgentNodeData } from './useDashboardData'
|
||||||
|
|
||||||
|
export interface CardBox {
|
||||||
|
left: number
|
||||||
|
right: number
|
||||||
|
top: number
|
||||||
|
bottom: number
|
||||||
|
cx: number
|
||||||
|
cy: number
|
||||||
|
width: number
|
||||||
|
height: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConnectionPath {
|
||||||
|
d: string
|
||||||
|
length: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export function useTeamNetworkSvg(
|
||||||
|
networkRef: Ref<HTMLElement | null>,
|
||||||
|
agents: Ref<AgentNodeData[]>,
|
||||||
|
heroId: Ref<string>,
|
||||||
|
isActive: (id: string) => boolean,
|
||||||
|
) {
|
||||||
|
// ── Layout ──
|
||||||
|
const cardPositions = ref<Record<string, CardBox>>({})
|
||||||
|
const svgWidth = ref(0)
|
||||||
|
const svgHeight = ref(0)
|
||||||
|
|
||||||
|
const childAgents = computed(() => agents.value.filter(a => a.id !== heroId.value))
|
||||||
|
|
||||||
|
function updatePositions() {
|
||||||
|
const el = networkRef.value
|
||||||
|
if (!el) return
|
||||||
|
const rect = el.getBoundingClientRect()
|
||||||
|
svgWidth.value = rect.width
|
||||||
|
svgHeight.value = rect.height
|
||||||
|
|
||||||
|
const cards = el.querySelectorAll('[data-agent-id]')
|
||||||
|
const positions: Record<string, CardBox> = {}
|
||||||
|
cards.forEach(card => {
|
||||||
|
const id = card.getAttribute('data-agent-id')
|
||||||
|
if (!id) return
|
||||||
|
const r = card.getBoundingClientRect()
|
||||||
|
positions[id] = {
|
||||||
|
left: r.left - rect.left,
|
||||||
|
right: r.left + r.width - rect.left,
|
||||||
|
top: r.top - rect.top,
|
||||||
|
bottom: r.top + r.height - rect.top,
|
||||||
|
cx: r.left + r.width / 2 - rect.left,
|
||||||
|
cy: r.top + r.height / 2 - rect.top,
|
||||||
|
width: r.width,
|
||||||
|
height: r.height,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
cardPositions.value = positions
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Connection paths ──
|
||||||
|
const connectionPaths = computed<Record<string, ConnectionPath | null>>(() => {
|
||||||
|
const result: Record<string, ConnectionPath | null> = {}
|
||||||
|
const pos = cardPositions.value
|
||||||
|
const iris = pos[heroId.value]
|
||||||
|
if (!iris) return result
|
||||||
|
|
||||||
|
const children = childAgents.value
|
||||||
|
const total = children.length
|
||||||
|
if (total === 0) return result
|
||||||
|
|
||||||
|
for (let idx = 0; idx < total; idx++) {
|
||||||
|
const agent = children[idx]
|
||||||
|
const agentPos = pos[agent.id]
|
||||||
|
if (!agentPos) {
|
||||||
|
result[agent.id] = null
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spread start points across Iris bottom edge (30%-70% range)
|
||||||
|
const t = total > 1 ? idx / (total - 1) : 0.5
|
||||||
|
const startX = iris.left + iris.width * (0.38 + t * 0.24)
|
||||||
|
const startY = iris.bottom - 1
|
||||||
|
|
||||||
|
// Determine column: left or right of Iris center
|
||||||
|
const isLeftColumn = agentPos.cx < iris.cx
|
||||||
|
|
||||||
|
// End point: approach from side, 8px before card edge
|
||||||
|
const endX = isLeftColumn ? agentPos.right - 8 : agentPos.left + 8
|
||||||
|
const endY = agentPos.cy
|
||||||
|
|
||||||
|
// Bézier control points
|
||||||
|
const cp1x = startX
|
||||||
|
const cp1y = startY + 70
|
||||||
|
const cp2x = endX + (isLeftColumn ? 35 : -35)
|
||||||
|
const cp2y = endY - 10
|
||||||
|
|
||||||
|
const d = `M ${startX} ${startY} C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${endX} ${endY}`
|
||||||
|
result[agent.id] = { d, length: 0 }
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
|
||||||
|
// ── Path refs (template ref functions) ──
|
||||||
|
const pathElements = ref<Record<string, SVGPathElement | null>>({})
|
||||||
|
const pulseElements = ref<Record<string, SVGPathElement | null>>({})
|
||||||
|
const pulseElements2 = ref<Record<string, SVGPathElement | null>>({})
|
||||||
|
const pulseOffsets = ref<Record<string, number>>({})
|
||||||
|
const pulseOffsets2 = ref<Record<string, number>>({})
|
||||||
|
|
||||||
|
function storePathRef(id: string) {
|
||||||
|
return (el: SVGPathElement | null) => {
|
||||||
|
pathElements.value[id] = el
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function storePulseRef(id: string) {
|
||||||
|
return (el: SVGPathElement | null) => {
|
||||||
|
pulseElements.value[id] = el
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function storePulseRef2(id: string) {
|
||||||
|
return (el: SVGPathElement | null) => {
|
||||||
|
pulseElements2.value[id] = el
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Pulse animation ──
|
||||||
|
let animFrameId: number | null = null
|
||||||
|
let lastAnimTime = 0
|
||||||
|
const speeds: Record<string, number> = {}
|
||||||
|
|
||||||
|
function refreshPathLengths() {
|
||||||
|
for (const id of childAgents.value.map(a => a.id)) {
|
||||||
|
const pathEl = pathElements.value[id]
|
||||||
|
const pulseEl = pulseElements.value[id]
|
||||||
|
const p = connectionPaths.value[id]
|
||||||
|
if (pathEl && p) {
|
||||||
|
p.length = pathEl.getTotalLength()
|
||||||
|
}
|
||||||
|
if (pulseEl && p && p.length > 0) {
|
||||||
|
if (pulseOffsets.value[id] === undefined) {
|
||||||
|
pulseOffsets.value[id] = 0
|
||||||
|
}
|
||||||
|
pulseEl.setAttribute('stroke-dasharray', `40 ${p.length}`)
|
||||||
|
pulseEl.setAttribute('stroke-dashoffset', String(-pulseOffsets.value[id]))
|
||||||
|
}
|
||||||
|
const pulseEl2 = pulseElements2.value[id]
|
||||||
|
if (pulseEl2 && p && p.length > 0) {
|
||||||
|
if (pulseOffsets2.value[id] === undefined) {
|
||||||
|
pulseOffsets2.value[id] = 0
|
||||||
|
}
|
||||||
|
pulseEl2.setAttribute('stroke-dasharray', `40 ${p.length}`)
|
||||||
|
pulseEl2.setAttribute('stroke-dashoffset', String(-pulseOffsets2.value[id]))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function startPulseAnimation() {
|
||||||
|
refreshPathLengths()
|
||||||
|
|
||||||
|
for (const id of childAgents.value.map(a => a.id)) {
|
||||||
|
const p = connectionPaths.value[id]
|
||||||
|
if (p && p.length > 0) {
|
||||||
|
speeds[id] = p.length / 3000
|
||||||
|
if (pulseOffsets.value[id] === undefined) pulseOffsets.value[id] = 0
|
||||||
|
if (pulseOffsets2.value[id] === undefined) pulseOffsets2.value[id] = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lastAnimTime = performance.now()
|
||||||
|
|
||||||
|
function tick(now: number) {
|
||||||
|
const dt = now - lastAnimTime
|
||||||
|
lastAnimTime = now
|
||||||
|
|
||||||
|
const children = childAgents.value
|
||||||
|
for (let i = 0; i < children.length; i++) {
|
||||||
|
const id = children[i].id
|
||||||
|
const pathEl = pathElements.value[id]
|
||||||
|
const pulseEl = pulseElements.value[id]
|
||||||
|
const pulseEl2 = pulseElements2.value[id]
|
||||||
|
const p = connectionPaths.value[id]
|
||||||
|
if (!pathEl || !pulseEl || !p) continue
|
||||||
|
|
||||||
|
const len = p.length
|
||||||
|
if (len <= 0) continue
|
||||||
|
|
||||||
|
const speed = speeds[id] ?? len / 3000
|
||||||
|
const cycleLen = len + 40
|
||||||
|
|
||||||
|
// Pulse 1
|
||||||
|
const currentOffset = pulseOffsets.value[id] ?? 0
|
||||||
|
const newOffset = currentOffset + speed * dt
|
||||||
|
pulseOffsets.value[id] = newOffset > cycleLen ? newOffset % cycleLen : newOffset
|
||||||
|
pulseEl.setAttribute('stroke-dashoffset', String(-pulseOffsets.value[id]))
|
||||||
|
|
||||||
|
// Pulse 2 (offset by half cycle)
|
||||||
|
if (pulseEl2) {
|
||||||
|
const offset2 = (pulseOffsets.value[id] + cycleLen / 2) % cycleLen
|
||||||
|
pulseOffsets2.value[id] = offset2
|
||||||
|
pulseEl2.setAttribute('stroke-dashoffset', String(-offset2))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
animFrameId = requestAnimationFrame(tick)
|
||||||
|
}
|
||||||
|
|
||||||
|
animFrameId = requestAnimationFrame(tick)
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopPulseAnimation() {
|
||||||
|
if (animFrameId !== null) {
|
||||||
|
cancelAnimationFrame(animFrameId)
|
||||||
|
animFrameId = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Lifecycle ──
|
||||||
|
let resizeObserver: ResizeObserver | null = null
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await nextTick()
|
||||||
|
updatePositions()
|
||||||
|
|
||||||
|
// Wait for SVG to render so path refs are populated
|
||||||
|
await nextTick()
|
||||||
|
updatePositions()
|
||||||
|
refreshPathLengths()
|
||||||
|
|
||||||
|
startPulseAnimation()
|
||||||
|
|
||||||
|
resizeObserver = new ResizeObserver(() => {
|
||||||
|
updatePositions()
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
refreshPathLengths()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
if (networkRef.value) {
|
||||||
|
resizeObserver.observe(networkRef.value)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
stopPulseAnimation()
|
||||||
|
resizeObserver?.disconnect()
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
cardPositions,
|
||||||
|
svgWidth,
|
||||||
|
svgHeight,
|
||||||
|
childAgents,
|
||||||
|
connectionPaths,
|
||||||
|
pathElements,
|
||||||
|
pulseElements,
|
||||||
|
pulseElements2,
|
||||||
|
pulseOffsets,
|
||||||
|
pulseOffsets2,
|
||||||
|
storePathRef,
|
||||||
|
storePulseRef,
|
||||||
|
storePulseRef2,
|
||||||
|
updatePositions,
|
||||||
|
refreshPathLengths,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, onUnmounted, ref } from 'vue'
|
import { onMounted, onUnmounted, ref } from 'vue'
|
||||||
import TaskCard from '../components/dashboard/MissionCard.vue'
|
import TaskCard from '../components/dashboard/TaskCard.vue'
|
||||||
import OperationsFeed from '../components/dashboard/OperationsFeed.vue'
|
import OperationsFeed from '../components/dashboard/OperationsFeed.vue'
|
||||||
import TeamNetwork from '../components/dashboard/TeamNetwork.vue'
|
import TeamNetwork from '../components/dashboard/TeamNetwork.vue'
|
||||||
import ChatPanel from '../components/dashboard/ChatPanel.vue'
|
import ChatPanel from '../components/dashboard/ChatPanel.vue'
|
||||||
import QueuePanel from '../components/dashboard/QueuePanel.vue'
|
import QueuePanel from '../components/dashboard/QueuePanel.vue'
|
||||||
import AgentModal from '../components/dashboard/AgentModal.vue'
|
import AgentModal from '../components/dashboard/AgentModal.vue'
|
||||||
import { useDashboardData } from '../composables/useDashboardData'
|
import { useDashboardData } from '../composables/useDashboardData'
|
||||||
import type { AgentNodeData } from '../../composables/useDashboardData'
|
import type { AgentNodeData } from '../composables/useDashboardData'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
agents, openTasks, feedEntries, chatMessages,
|
agents, openTasks, feedEntries, chatMessages,
|
||||||
irisBusy, irisFocus, irisRuntime, queue,
|
irisBusy, irisFocus, queue,
|
||||||
getAgentRuntime, startRuntime, stopRuntime,
|
getAgentRuntime, startRuntime, stopRuntime,
|
||||||
sendChat, removeQueueItem, moveQueueItem, changeQueuePriority,
|
sendChat, removeQueueItem, moveQueueItem, changeQueuePriority,
|
||||||
} = useDashboardData()
|
} = useDashboardData()
|
||||||
@@ -48,7 +48,7 @@ function onQueueExecuteNow(id: string): void {
|
|||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="col-left">
|
<div class="col-left">
|
||||||
<section class="missions-section">
|
<section class="missions-section">
|
||||||
<TaskCard :tasks="openTasks" @new-task="console.log('New task requested')" />
|
<TaskCard :tasks="openTasks" @new-task="console.log('New task requested')" @go-board="console.log('Go to Task Board')" />
|
||||||
</section>
|
</section>
|
||||||
<OperationsFeed :entries="feedEntries" />
|
<OperationsFeed :entries="feedEntries" />
|
||||||
</div>
|
</div>
|
||||||
@@ -68,9 +68,6 @@ function onQueueExecuteNow(id: string): void {
|
|||||||
<TeamNetwork
|
<TeamNetwork
|
||||||
hero-id="iris"
|
hero-id="iris"
|
||||||
:agents="agents"
|
:agents="agents"
|
||||||
:iris-runtime="irisRuntime"
|
|
||||||
:get-agent-runtime="getAgentRuntime"
|
|
||||||
:iris-focus="irisFocus"
|
|
||||||
@select="onAgentSelect"
|
@select="onAgentSelect"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user