diff --git a/src/components/AppToolbar.vue b/src/components/AppToolbar.vue index e71a0f1..93934e9 100644 --- a/src/components/AppToolbar.vue +++ b/src/components/AppToolbar.vue @@ -21,7 +21,7 @@ class="toolbar-pill toolbar-pill-icon" :class="{ active: isPaneOpen('dashboard') }" @click="togglePane('dashboard')" - title="Dashboard" + title="Display" > @@ -37,7 +37,7 @@ class="toolbar-pill toolbar-pill-icon" :class="{ active: isPaneOpen('artifacts') }" @click="togglePane('artifacts')" - title="Artifacts" + title="Konsole" > diff --git a/src/components/ArtifactsPane.vue b/src/components/ArtifactsPane.vue deleted file mode 100644 index 304d777..0000000 --- a/src/components/ArtifactsPane.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - - Artifacts - - - - - - saved artifacts - - - - - - - diff --git a/src/components/DashboardPane.vue b/src/components/DashboardPane.vue deleted file mode 100644 index 99f1e61..0000000 --- a/src/components/DashboardPane.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - Dashboard - Artifacts and controls from the agent appear here - - - - - - - diff --git a/src/components/DisplayPane.vue b/src/components/DisplayPane.vue new file mode 100644 index 0000000..c6e7b65 --- /dev/null +++ b/src/components/DisplayPane.vue @@ -0,0 +1,212 @@ + + + + + Anzeige + Tables, pages and cards appear here + + + + + + + + {{ art.data.title }} + + + + + {{ col }} + + + + + {{ row[col] ?? '' }} + + + + + {{ art.meta.source }} + + + + + {{ art.data.title }} + {{ art.data.subtitle }} + + + + + {{ item.title }} + + + {{ f.label }} + {{ f.value ?? '' }} + + + + + + + + + {{ f.label }} + {{ f.value ?? '' }} + {{ f.value ?? '' }} + + + + + {{ a.label }} + + + + + + {{ art.data.title }} + + {{ section.heading }} + + + + {{ a.label }} + + + + + + + + + + + + diff --git a/src/components/KonsolePane.vue b/src/components/KonsolePane.vue new file mode 100644 index 0000000..359b614 --- /dev/null +++ b/src/components/KonsolePane.vue @@ -0,0 +1,268 @@ + + + + + Konsole + + + + + + + + + Konsole + + + + + + + + + {{ art.data.machine_id }} + {{ art.data.current }} + + {{ text }} + + {{ k }}={{ v }} + + + {{ a.label }} + + + + + + {{ a.label }} + + + + + + + {{ art.data.label }} + + {{ clamp(art.data.value) }}% + + + + ℹ + {{ art.data.label }} + + + + {{ art.data.label }} + {{ art.data.value }} + + + + + + + + + + + + + diff --git a/src/components/WorkspacePane.vue b/src/components/WorkspacePane.vue deleted file mode 100644 index 155c734..0000000 --- a/src/components/WorkspacePane.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - Workspace - Dashboard, files, artifacts - - - - - - - diff --git a/src/composables/useAgentSocket.ts b/src/composables/useAgentSocket.ts index d10be36..4bed2aa 100644 --- a/src/composables/useAgentSocket.ts +++ b/src/composables/useAgentSocket.ts @@ -56,14 +56,12 @@ export function useAgentSocket( if (data.session_id) chatStore.sessionKey = data.session_id; }, - // assay UI controls — store for later rendering - controls(_data) { - // TODO: render controls in workspace panel - }, + // assay UI controls (legacy flat list) — kept for compat, ignored for now + controls(_data) {}, - // assay artifacts — store for later rendering - artifacts(_data) { - // TODO: render artifacts in workspace panel + // assay artifacts — split into Display (pages/tables) and Konsole (machines/controls) + artifacts(data) { + chatStore.setArtifacts(data.artifacts || []); }, // assay session cleared diff --git a/src/store/chat.ts b/src/store/chat.ts index 8f4ffa6..ebb621b 100644 --- a/src/store/chat.ts +++ b/src/store/chat.ts @@ -16,9 +16,25 @@ export interface FinanceData { pricing: { prompt: number, completion: number }; } +// Artifact types that belong to each pane +const DISPLAY_TYPES = new Set(['data_table', 'document_page', 'entity_detail']); +const KONSOLE_TYPES = new Set(['machine', 'action_bar', 'status']); + export const useChatStore = defineStore('chat', () => { // --- State --- const messages = ref([]); + + // --- Artifacts --- + const artifacts = ref([]); + const displayArtifacts = computed(() => artifacts.value.filter(a => DISPLAY_TYPES.has(a.type))); + const konsoleArtifacts = computed(() => artifacts.value.filter(a => KONSOLE_TYPES.has(a.type))); + + function setArtifacts(arts: any[]) { + artifacts.value = arts; + } + function clearArtifacts() { + artifacts.value = []; + } // Two-SM architecture: channel (shared) + connection (per-user) const channelState = ref('NO_SESSION'); const connectionState = ref('CONNECTING'); @@ -66,6 +82,11 @@ export const useChatStore = defineStore('chat', () => { let _wsSend: ((payload: any) => void) | null = null; function setWsSend(fn: (payload: any) => void) { _wsSend = fn; } + // Artifact action dispatch — sends {type:'action', action, data} over WS + function sendAction(action: string, data: any = {}) { + _wsSend?.({ type: 'action', action, data }); + } + // Session actions (called from HudControls / HudRow) function newSession() { stashMessages(); @@ -201,6 +222,7 @@ export const useChatStore = defineStore('chat', () => { messages.value = []; sessionTotalTokens.value = null; finance.value = null; + artifacts.value = []; resetStreamingState(); } @@ -434,10 +456,16 @@ export const useChatStore = defineStore('chat', () => { handoverPending, isRunning, setWsSend, + sendAction, newSession, handover, stop, confirmNew, stay, + artifacts, + displayArtifacts, + konsoleArtifacts, + setArtifacts, + clearArtifacts, }; }); diff --git a/src/views/AgentsView.vue b/src/views/AgentsView.vue index 552aaa1..f40cfff 100644 --- a/src/views/AgentsView.vue +++ b/src/views/AgentsView.vue @@ -43,13 +43,13 @@ /> - + - + @@ -79,9 +79,9 @@ import { usePanels } from '../composables/usePanels'; import { LockClosedIcon, UserGroupIcon } from '@heroicons/vue/20/solid'; import ChatPane from '../components/ChatPane.vue'; import ContentLayout from '../components/ContentLayout.vue'; -import DashboardPane from '../components/DashboardPane.vue'; +import DisplayPane from '../components/DisplayPane.vue'; import FilesPane from '../components/FilesPane.vue'; -import ArtifactsPane from '../components/ArtifactsPane.vue'; +import KonsolePane from '../components/KonsolePane.vue'; import DebugColumn from '../components/DebugColumn.vue'; import router from '../router';