refactor: clean up settings file for better structure

This commit is contained in:
Siddhant Rai
2024-04-05 23:33:27 +05:30
parent 0dc7333563
commit 0a5832ec75
10 changed files with 930 additions and 1000 deletions

View File

@@ -3,3 +3,37 @@ export type ActiveState = 'ACTIVE' | 'INACTIVE';
export type User = {
avatar: string;
};
export type Doc = {
location: string;
name: string;
language: string;
version: string;
description: string;
fullName: string;
date: string;
docLink: string;
model: string;
};
export type PromptProps = {
prompts: { name: string; id: string; type: string }[];
selectedPrompt: { name: string; id: string; type: string };
onSelectPrompt: (name: string, id: string, type: string) => void;
setPrompts: (prompts: { name: string; id: string; type: string }[]) => void;
apiHost: string;
};
export type DocumentsProps = {
documents: Doc[] | null;
handleDeleteDocument: (index: number, document: Doc) => void;
};
export type CreateAPIKeyModalProps = {
close: () => void;
createAPIKey: (payload: { name: string; source: string }) => void;
};
export type SaveAPIKeyModalProps = {
apiKey: string;
close: () => void;
};