30e840489d
Wires the existing "AI Assistent" button in the TopBar and adds a 420px slide-in drawer with context-aware suggestions, message thread, loading animation, and action cards requiring manual confirmation. Template-based mock service returns German-language answers keyed by route + question keywords — no real LLM calls, no invented facts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
878 B
TypeScript
39 lines
878 B
TypeScript
import type { WorkspaceType } from './enums'
|
|
|
|
export interface AssistantContext {
|
|
currentRoute: string
|
|
workspace: WorkspaceType | null
|
|
selectedEntityType?: string
|
|
selectedEntityId?: string
|
|
visibleScores?: Record<string, number>
|
|
visibleRisks?: string[]
|
|
visibleMissingData?: string[]
|
|
availableActions?: string[]
|
|
userRole: string
|
|
organizationId: string
|
|
}
|
|
|
|
export interface AssistantAction {
|
|
id: string
|
|
label: string
|
|
description: string
|
|
actionType: 'NAVIGATE' | 'OPEN_REVIEW' | 'ADD_TO_SHORTLIST' | 'REQUEST_DATA' | 'SEND_TO_REVIEW'
|
|
payload?: Record<string, unknown>
|
|
}
|
|
|
|
export interface AssistantMessage {
|
|
id: string
|
|
role: 'user' | 'assistant'
|
|
content: string
|
|
createdAt: string
|
|
confidence?: number
|
|
sources?: string[]
|
|
actions?: AssistantAction[]
|
|
}
|
|
|
|
export interface SuggestedQuestion {
|
|
id: string
|
|
question: string
|
|
category: string
|
|
}
|