Initial commit: AI chat assistant with workflow chat, workspace, and profile tabs
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
59
types/index.uts
Normal file
59
types/index.uts
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* AI Chat Assistant — Type Definitions
|
||||
*/
|
||||
|
||||
// Workflow types
|
||||
export type WorkflowId = 'general' | 'code' | 'document' | 'data' | 'creative'
|
||||
|
||||
export interface WorkflowDef {
|
||||
id: WorkflowId
|
||||
name: string
|
||||
icon: string
|
||||
description: string
|
||||
color: string
|
||||
}
|
||||
|
||||
// Message types
|
||||
export type MessageRole = 'user' | 'assistant'
|
||||
export type MessageStatus = 'sending' | 'sent' | 'error'
|
||||
|
||||
export interface Message {
|
||||
id: string
|
||||
role: MessageRole
|
||||
content: string
|
||||
timestamp: number
|
||||
status: MessageStatus
|
||||
}
|
||||
|
||||
// Conversation types
|
||||
export interface Conversation {
|
||||
id: string
|
||||
title: string
|
||||
workflowId: WorkflowId
|
||||
messages: Message[]
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
}
|
||||
|
||||
// Workspace types
|
||||
export type WorkspaceItemType = 'code_snippet' | 'document' | 'analysis_report' | 'creative_output'
|
||||
|
||||
export interface WorkspaceItem {
|
||||
id: string
|
||||
conversationId: string
|
||||
workflowId: WorkflowId
|
||||
type: WorkspaceItemType
|
||||
title: string
|
||||
content: string
|
||||
summary: string
|
||||
createdAt: number
|
||||
}
|
||||
|
||||
// Parsed markdown segment
|
||||
export interface ParsedSegment {
|
||||
type: 'text' | 'code' | 'bold'
|
||||
value: string
|
||||
}
|
||||
|
||||
// Bottom tab keys
|
||||
export type TabKey = 'workspace' | 'chat' | 'profile'
|
||||
Reference in New Issue
Block a user