dto.ts 745 B

12345678910111213141516171819202122232425262728293031323334353637
  1. export type MessageType = 'user' | 'assistant' | 'reason' | 'action' | 'error';
  2. export type ContentType = 'reason' | 'action' | 'text' | 'error';
  3. export interface ContentItem {
  4. type: ContentType;
  5. text: string;
  6. toolName?: string;
  7. args?: any;
  8. }
  9. export interface Message {
  10. id?: string | number;
  11. conversationId?: string | number;
  12. role: MessageType;
  13. timestamps: string;
  14. contents: ContentItem[];
  15. }
  16. export interface Conversation {
  17. id: string | number;
  18. title: string;
  19. timestamps: string;
  20. status: string;
  21. isPermanent?: boolean;
  22. icon?: string;
  23. }
  24. export interface Plugin {
  25. id: string;
  26. name: string;
  27. icon: string;
  28. description: string;
  29. enabled: boolean;
  30. version: string;
  31. }
  32. export type Theme = 'dark' | 'light';