-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
188 lines (164 loc) · 4.34 KB
/
types.ts
File metadata and controls
188 lines (164 loc) · 4.34 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
export enum AiProvider {
Google = "Google",
Mistral = "Mistral",
OpenAI = "OpenAI",
OpenRouter = "OpenRouter",
}
export interface ModelParameter {
id: 'temperature' | 'topP' | 'topK' | 'maxLength' | 'thinkingBudget';
name: string;
type: 'slider';
min: number;
max: number;
step: number;
defaultValue: number;
}
export interface AIModelConfig {
id: string; // e.g., 'gemini-2.5-flash-preview-04-17'
name: string; // e.g., 'Gemini 2.5 Flash'
provider: AiProvider;
parameters: ModelParameter[];
supportsVision: boolean;
supportsSearch: boolean; // Gemini-specific
description: string;
}
// Changed from enum to string to allow for custom roles
export type ExpertRole = string;
export interface Expert {
name: ExpertRole;
emoji: string;
description:string;
bgColor: string;
textColor: string;
isCustom?: boolean; // Flag to identify user-created experts
}
export interface SearchCitation {
uri: string;
title: string;
}
export interface DiscussionMessage {
id: string;
expert: Expert;
text: string;
thoughts?: string[];
work?: string; // For code, markdown tables, etc.
isCommandResponse?: boolean;
timestamp: number;
isError?: boolean;
searchCitations?: SearchCitation[] | null;
}
export interface Command {
name: string;
arguments: string;
description: string;
example?: string;
}
// New interfaces for auto-generation
export interface GeminiGeneratedTask {
description: string;
assignedTo?: ExpertRole;
}
export interface GeminiGeneratedStory {
userStory: string;
benefit: string;
acceptanceCriteria: string[];
priority?: StoryPriority;
sprintPoints?: number;
}
// Matches the expected JSON output structure from Gemini
export interface GeminiResponseJson {
expert: ExpertRole;
emoji: string;
message: string;
thoughts?: string[];
work?: string;
isCommandResponse?: boolean;
memoryEntry?: string | null;
groundingData?: Array<{ web: { uri: string; title: string; } }> | null;
tasks?: GeminiGeneratedTask[];
stories?: GeminiGeneratedStory[];
}
export interface CommandHandlerResult {
userMessageText: string;
aiInstructionText?: string;
action: 'local' | 'single_ai_response' | 'round_robin_ai_response' | 'error' | 'no_action';
targetExpert?: ExpertRole;
newTopic?: string;
errorMessage?: string;
assignedTasksContext?: string;
}
export interface UploadedFile {
name: string;
type: string; // The actual MIME type from the file object
mimeType: string; // The MIME type to be sent to Gemini (for images) or used for processing (text)
size: number;
base64Data?: string; // For images
textContent?: string; // For text files
}
export enum QuestionStatus {
Open = "Open",
Addressing = "Addressing",
Addressed = "Addressed",
Dismissed = "Dismissed",
}
export interface TrackedQuestion {
id: string;
text: string;
expertRole: ExpertRole;
expertEmoji: string;
status: QuestionStatus;
timestamp: number;
originalMessageId: string;
}
export enum TaskStatus {
ToDo = "To Do",
InProgress = "In Progress",
Done = "Done",
}
export interface TrackedTask {
id: string;
description: string;
status: TaskStatus;
assignedTo?: ExpertRole;
createdBy: ExpertRole | 'User' | 'AI';
timestamp: number;
topicContext: string; // Topic at the time of creation
storyId?: string;
}
export enum StoryStatus {
Backlog = "Backlog",
SelectedForSprint = "Selected for Sprint",
InProgress = "In Progress",
Done = "Done",
Rejected = "Rejected",
}
export type StoryPriority = 'Low' | 'Medium' | 'High' | 'Critical';
export interface TrackedStory {
id: string;
userStory: string;
acceptanceCriteria: string[];
benefit: string;
status: StoryStatus;
priority: StoryPriority;
sprintPoints?: number;
assignedTo?: ExpertRole; // Potentially assigned to a lead expert for refinement
createdBy: ExpertRole | 'User' | 'AI';
timestamp: number;
topicContext: string;
fromQuestionId?: string; // Optional link back to the question it came from
}
// Renamed from SupportedModel to avoid confusion
export interface DEPRECATED_SupportedModel {
id: string;
name: string;
provider: AiProvider;
description: string;
supportsSearch: boolean;
}
export interface AIConfig {
provider: AiProvider;
modelId: string;
params: Record<string, any>;
apiKeys: Partial<Record<AiProvider, string>>;
useGeminiPreprocessing?: boolean;
}