diff --git a/package.json b/package.json index 4f1ab27..9ddd7e7 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "dependencies": { "@anthropic-ai/claude-code": "^0.2.0", "@tauri-apps/api": "^2.0.0", - "@tauri-apps/plugin-shell": "^2.0.0" + "@tauri-apps/plugin-shell": "^2.0.0", + "marked": "^18.0.0" } } diff --git a/src/lib/components/ChatPanel.svelte b/src/lib/components/ChatPanel.svelte index a5b8869..ba38fb4 100644 --- a/src/lib/components/ChatPanel.svelte +++ b/src/lib/components/ChatPanel.svelte @@ -1,20 +1,47 @@ + +
+
+

🛡️ Guard-Rails

+ +
+ + + {#if showAddForm} +
+
+ +
+
+ + + +
+
+ + +
+
+ {/if} + + {#if loading} +
Lade...
+ {:else} + +
+

Aktive Regeln ({permissions.length})

+ {#if permissions.length === 0} +
Keine Regeln definiert
+ {:else} +
+ {#each permissions as perm} +
+
+ + {perm.action === 'Allow' ? '✅' : '🚫'} + + {perm.pattern} + {#if perm.tool} + {perm.tool} + {/if} +
+
+ + {perm.permission_type === 'Permanent' ? '💾' : '⏱️'} + + {perm.use_count}x + +
+
+ {/each} +
+ {/if} +
+ + +
+

🚫 Immer blockiert ({blockedPatterns.length})

+
+ {#each blockedPatterns as pattern} +
+ {pattern} +
+ {/each} +
+
+ {/if} +
+ + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2a55b3a..6e90bc0 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,6 +2,26 @@ import ChatPanel from '$lib/components/ChatPanel.svelte'; import ActivityPanel from '$lib/components/ActivityPanel.svelte'; import AgentView from '$lib/components/AgentView.svelte'; + import MemoryPanel from '$lib/components/MemoryPanel.svelte'; + import AuditLog from '$lib/components/AuditLog.svelte'; + import GuardRailsPanel from '$lib/components/GuardRailsPanel.svelte'; + + // Tab-State für mittleres Panel + let activeMiddleTab = 'activity'; + + // Tab-State für rechtes Panel + let activeRightTab = 'agents'; + + const middleTabs = [ + { id: 'activity', label: 'Aktivität', icon: '📋' }, + { id: 'memory', label: 'Gedächtnis', icon: '🧠' }, + { id: 'audit', label: 'Historie', icon: '📝' }, + ]; + + const rightTabs = [ + { id: 'agents', label: 'Agents', icon: '🤖' }, + { id: 'guards', label: 'Guard-Rails', icon: '🛡️' }, + ];
@@ -10,20 +30,50 @@ - +
- - + {#each middleTabs as tab} + + {/each}
- + {#if activeMiddleTab === 'activity'} + + {:else if activeMiddleTab === 'memory'} + + {:else if activeMiddleTab === 'audit'} + + {/if}
- +
- +
+ {#each rightTabs as tab} + + {/each} +
+
+ {#if activeRightTab === 'agents'} + + {:else if activeRightTab === 'guards'} + + {/if} +
@@ -52,12 +102,14 @@ .tab { flex: 1; padding: var(--spacing-sm) var(--spacing-md); - font-size: 0.875rem; + font-size: 0.8rem; color: var(--text-secondary); background: transparent; border: none; + border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.2s ease; + white-space: nowrap; } .tab:hover { @@ -67,7 +119,7 @@ .tab.active { color: var(--accent); - border-bottom: 2px solid var(--accent); + border-bottom-color: var(--accent); } .panel-content { @@ -75,7 +127,7 @@ overflow: auto; } - /* Responsive: Auf kleineren Bildschirmen stapeln */ + /* Responsive */ @media (max-width: 1200px) { .panels { grid-template-columns: 1fr 1fr;