Consolidate AI Panel Chat into Vitto — Implementation
Phase 1–2 complete. One chat system everywhere.
Session 171: Consolidate AI Panel Chat into Vitto
Summary
Phases 1 and 2 of the consolidate-ai-panel-chat-feature-into-vitto plan are implemented. Vitto is now the single chat system for Studio (gograb-space), panel (gograb-ai), and panel-legacy.
Phase 1: Port Panel Features to Vitto
1A. Draggable Outputs
- Added
outputs?: ActionableOutput[]toVittoChatSession - Added
addOutput(output)toVittoChatPersistenceService DraggableOutputComponentalready exists in vitto-chat
1B. Context-Aware Capabilities
- Added
ChatContext,ChatCapabilitytypes toVittoChatContextService - Ported
CONTEXT_CAPABILITIESandWELCOME_MESSAGESmaps - Added
getCapabilitiesForContext(),getWelcomeMessage()methods
1C. Session Metadata
- Added
metadata?: { totalTokens, totalCost, outputCount }toVittoChatSession addMessage()accumulates tokens and cost from message metadata
1D. Export/Import
- Added
exportSession(id): string | nullandimportSession(json): booleantoVittoChatPersistenceService
Phase 2: Route Studio Panel to Vitto
2A. Replace AIPanelComponent with UnifiedChatShellComponent
- ai-panel-tabs: Studio tab now renders
lib-unified-chat(UnifiedChatShellComponent) instead oflib-ai-panel - Uses
createStandardPluginSetwith generation components (image, module, video, widget), teach, prompts - Resolves userId from AuthService, spaceId from UniverseContextService
- panel-legacy route: Now loads
VittoChatPanelComponentinstead ofExtensionPanelComponent
2B. Unify Session ID Format
createSession()inVittoChatPersistenceServicenow useschat-{timestamp}-{random}(replacesvitto-*andsession-*)
Phase 3: Partial (Deferred)
- Added
@deprecatedtoPanelSessionPersistenceServiceandExtensionPanelComponent - Full removal of Panel persistence, AIPanelComponent, and PanelIntelligenceService chat orchestration deferred to a follow-up
- AIPanelComponent remains in ai-panel-core for now (no route loads it)
Verification
npx nx run gograb-space:build— ✅ Success- gograb-admin, gograb-dev use ai-panel-tabs — both now get Vitto chat
Files Modified
| File | Change |
|---|---|
libs/libs-ai/vitto-chat/.../vitto-chat-persistence.service.ts |
metadata, outputs, export/import, session ID format |
libs/libs-ai/vitto-chat/.../vitto-chat-context.service.ts |
ChatContext, CONTEXT_CAPABILITIES, WELCOME_MESSAGES |
libs/libs-ai/ai-panel-core/.../ai-panel-tabs.component.ts |
Replace AIPanelComponent with UnifiedChatShellComponent |
libs/libs-ai/ai-panel-core/.../ai-panel-tabs.component.html |
lib-unified-chat instead of lib-ai-panel |
apps/gograb-ai/.../app.routes.ts |
panel-legacy → VittoChatPanelComponent |
apps/gograb-space/.../main-layout.* |
Remove capability/message/output handlers |