File size: 1,258 Bytes
61e6dfe
 
 
 
 
 
 
 
 
 
 
3684768
5d7086a
61e6dfe
 
 
 
 
 
 
 
 
 
 
3684768
61e6dfe
 
 
 
 
 
 
 
 
 
 
 
 
 
3684768
61e6dfe
 
 
 
 
 
3684768
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { buttonVariants } from "@/components/ui/button";
import { VariantProps } from "class-variance-authority";
import { LucideIcon } from "lucide-react";

export type DeviceType = "desktop" | "mobile";
export type ActivityType = "chat" | "code";
export type MobileTabType = "left-sidebar" | "right-sidebar";
export type ProviderType = "auto" | "cheapest" | "fastest" | string;
export enum MessageActionType {
  PUBLISH_PROJECT = "PUBLISH_PROJECT",
  SEE_LIVE_PREVIEW = "SEE_LIVE_PREVIEW",
  UPGRADE_TO_PRO = "UPGRADE_TO_PRO",
  ADD_CREDITS = "ADD_CREDITS",
}
export type MessageAction = {
  label: string;
  variant?: VariantProps<typeof buttonVariants>["variant"];
  icon?: LucideIcon;
  disabled?: boolean;
  loading?: boolean;
  type?: MessageActionType;
  projectTitle?: string;
  prompt?: string;
  messageReferrer?: number;
};
export type Message = {
  id: string;
  role: MessageRole;
  model?: string;
  content?: string;
  createdAt: Date;
  isThinking?: boolean;
  files?: string[];
  isAborted?: boolean;
  isAutomated?: boolean;
  actions?: MessageAction[];
};
export type File = {
  path: string;
  content?: string;
};
export interface Commit {
  title: string;
  oid: string;
  date: Date;
}
export type MessageRole = "user" | "assistant";