@app-studio/web 0.8.10 → 0.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Form/CountryPicker/CountryPicker/CountryPicker.props.d.ts +0 -113
- package/dist/components/Form/CountryPicker/CountryPicker.d.ts +0 -3
- package/dist/components/Form/Select/Select/Select.props.d.ts +0 -150
- package/dist/components/Form/Select/Select.d.ts +0 -3
- package/dist/components/Form/Switch/Switch/Switch.props.d.ts +0 -40
- package/dist/components/Form/TextArea/TextArea/TextArea.props.d.ts +0 -99
- package/dist/components/Form/TextArea/TextArea.d.ts +0 -3
- package/dist/components/Form/TextField/TextField/TextField.props.d.ts +0 -80
- package/dist/components/Form/TextField/TextField.d.ts +0 -3
- package/dist/components/Formik/Formik.Form.d.ts +1 -1
- package/dist/components/Layout/Vertical/examples/index.d.ts +5 -0
- package/dist/components/Link/Link/Link.props.d.ts +0 -28
- package/dist/components/Link/Link.d.ts +0 -3
- package/dist/components/Loader/Loader/Loader.props.d.ts +0 -51
- package/dist/components/Loader/Loader.d.ts +0 -3
- package/dist/components/Text/Text/Text.props.d.ts +0 -48
- package/dist/docsLoader.d.ts +1 -0
- package/dist/pages/docs/components/LiveCode.component.d.ts +3 -0
- package/dist/pages/docs/components/MarkdownEditor.component.d.ts +5 -0
- package/dist/pages/docs/components/docs.elements.d.ts +3 -0
- package/dist/pages/docs/components/docs.request.d.ts +10 -0
- package/dist/pages/docs/components/docs.states.d.ts +5 -0
- package/dist/pages/docs/docs.page.d.ts +4 -0
- package/dist/web.cjs.development.js +1868 -2081
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +1859 -2072
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +1864 -2085
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +17 -7
- package/dist/bot/Bot.d.ts +0 -14
- package/dist/bot/Cache.d.ts +0 -13
- package/dist/bot/Config.d.ts +0 -13
- package/dist/bot/ContentFetcher.d.ts +0 -9
- package/dist/bot/DocuCode.d.ts +0 -17
- package/dist/bot/FileHandler.d.ts +0 -24
- package/dist/bot/OpenAIConnector.d.ts +0 -27
- package/dist/bot/data.d.ts +0 -19
- package/dist/bot/extractors.d.ts +0 -8
- package/dist/bot/index.d.ts +0 -1
- package/dist/bot/prompt/1-project.d.ts +0 -1
- package/dist/bot/prompt/2-response.d.ts +0 -1
- package/dist/bot/prompt/3-comment.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@app-studio/web",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/components/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"start": "react-scripts start",
|
|
14
|
+
"build:web": "react-scripts build",
|
|
14
15
|
"build": "tsdx build --format cjs,esm,umd --entry ./src/components/index.tsx --tsconfig tsconfig.build.json",
|
|
15
16
|
"test": "react-scripts test",
|
|
16
17
|
"test:unwatch": "react-scripts test --watchAll=false",
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"analyze": "size-limit --why",
|
|
38
39
|
"prerelease": "npm run build",
|
|
39
40
|
"release": "release-it",
|
|
40
|
-
"bot-doc": "ts-node
|
|
41
|
+
"bot-doc": "ts-node bot/index.ts",
|
|
41
42
|
"create-docs": "ts-node scripts/create-docs.ts",
|
|
42
43
|
"create-structure": "ts-node scripts/create-structure.ts",
|
|
43
44
|
"create-indices": "ts-node scripts/create-indices.ts",
|
|
@@ -79,6 +80,11 @@
|
|
|
79
80
|
]
|
|
80
81
|
},
|
|
81
82
|
"dependencies": {
|
|
83
|
+
"@mdx-js/loader": "^3.0.1",
|
|
84
|
+
"@mdx-js/mdx": "^3.0.1",
|
|
85
|
+
"@mdx-js/react": "^3.0.1",
|
|
86
|
+
"@mdx-js/runtime": "^2.0.0",
|
|
87
|
+
"@mdxeditor/editor": "^3.14.0",
|
|
82
88
|
"axios": "^1.6.7",
|
|
83
89
|
"cheerio": "^1.0.0-rc.12",
|
|
84
90
|
"contrast": "^1.0.1",
|
|
@@ -86,18 +92,22 @@
|
|
|
86
92
|
"date-fns": "^2.30.0",
|
|
87
93
|
"formik": "^2.2.9",
|
|
88
94
|
"install": "^0.13.0",
|
|
95
|
+
"markdown-loader": "^8.0.0",
|
|
89
96
|
"npm": "^10.5.0",
|
|
90
97
|
"openai": "^4.28.4",
|
|
91
98
|
"rc-upload": "^4.4.0",
|
|
92
99
|
"react-helmet": "^6.1.0",
|
|
100
|
+
"react-live": "^4.1.7",
|
|
93
101
|
"simple-git": "^3.22.0",
|
|
94
102
|
"typescript": "^4.9.5",
|
|
95
103
|
"zustand": "^4.3.8"
|
|
96
104
|
},
|
|
97
105
|
"devDependencies": {
|
|
98
|
-
"@babel/
|
|
99
|
-
"@babel/
|
|
100
|
-
"@babel/preset-
|
|
106
|
+
"@babel/cli": "^7.25.9",
|
|
107
|
+
"@babel/core": "^7.26.0",
|
|
108
|
+
"@babel/preset-env": "^7.26.0",
|
|
109
|
+
"@babel/preset-react": "^7.25.9",
|
|
110
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
101
111
|
"@commitlint/cli": "^19.2.0",
|
|
102
112
|
"@commitlint/config-conventional": "^19.1.0",
|
|
103
113
|
"@size-limit/preset-small-lib": "^10.0.2",
|
|
@@ -154,8 +164,8 @@
|
|
|
154
164
|
"webpack-cli": "^5.1.3"
|
|
155
165
|
},
|
|
156
166
|
"peerDependencies": {
|
|
157
|
-
"
|
|
158
|
-
"
|
|
167
|
+
"app-studio": ">= 0.4",
|
|
168
|
+
"react": ">= 17"
|
|
159
169
|
},
|
|
160
170
|
"size-limit": [
|
|
161
171
|
{
|
package/dist/bot/Bot.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Assistant } from 'openai/resources/beta/index';
|
|
2
|
-
export declare class Bot {
|
|
3
|
-
private readonly openAIConnector;
|
|
4
|
-
private readonly fileHandler;
|
|
5
|
-
private readonly cache;
|
|
6
|
-
private readonly cacheKey;
|
|
7
|
-
constructor(cacheKey: string);
|
|
8
|
-
init(name: string, fileIds: string[], cachePath: string): Promise<Assistant>;
|
|
9
|
-
createFile(fileContent: string, fileName: string): Promise<any>;
|
|
10
|
-
addFile(filePath: string): Promise<any>;
|
|
11
|
-
response(assistantId: string, propsPath: string, componentFolder: string, componentName: string): Promise<any>;
|
|
12
|
-
isObject(value: any): boolean;
|
|
13
|
-
MarkdownGeneration(componentFolder: string, componentName: string, propsPath: string): Promise<void>;
|
|
14
|
-
}
|
package/dist/bot/Cache.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare class Cache {
|
|
2
|
-
private readonly cacheDirectory;
|
|
3
|
-
constructor(cacheDirectory?: string);
|
|
4
|
-
generateCacheKey(prompt: string): string;
|
|
5
|
-
getFromCache(cacheKey: string): any | null;
|
|
6
|
-
getJsonFromCache(cacheKey: string): any;
|
|
7
|
-
saveJsonToCache(cacheKey: string, content: any): void;
|
|
8
|
-
saveToCache(cacheKey: string, content: string): void;
|
|
9
|
-
saveEachJsonToCache(cacheKey: string, content: any, fileNameKey: string): void;
|
|
10
|
-
cacheExist(cacheKey: string): boolean;
|
|
11
|
-
cacheFolderExist(cacheKey: string): boolean;
|
|
12
|
-
createFile(cacheKey: string, fileContent?: string, fileName?: string): Promise<string>;
|
|
13
|
-
}
|
package/dist/bot/Config.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
API_CONFIG : Un objet contenant les paramètres de configuration pour l'API OpenAI, tels que la clé API et l'organisation. Ces valeurs peuvent être définies directement ou récupérées à partir de variables d'environnement.
|
|
3
|
-
APPLICATION_SETTINGS : Un objet pour les paramètres généraux de l'application. Vous pouvez inclure ici des configurations telles que le mode de débogage, les paramètres de journalisation, etc.
|
|
4
|
-
*/
|
|
5
|
-
export declare const API_CONFIG: {
|
|
6
|
-
openaiApiKey: string;
|
|
7
|
-
openaiOrganization: string;
|
|
8
|
-
defaultModel: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const APPLICATION_SETTINGS: {
|
|
11
|
-
debugMode: boolean;
|
|
12
|
-
cacheDirectory: string;
|
|
13
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare class ContentFetcher {
|
|
2
|
-
private readonly cache;
|
|
3
|
-
private readonly cacheKey;
|
|
4
|
-
constructor(cacheKey: string);
|
|
5
|
-
private static isLinkValid;
|
|
6
|
-
private fetchAndProcessContent;
|
|
7
|
-
processAllLinks(links: string[]): Promise<void>;
|
|
8
|
-
private urlToMarkdown;
|
|
9
|
-
}
|
package/dist/bot/DocuCode.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare class DocuCode {
|
|
2
|
-
private readonly openAIConnector;
|
|
3
|
-
private readonly fileHandler;
|
|
4
|
-
private readonly cache;
|
|
5
|
-
private readonly cacheKey;
|
|
6
|
-
constructor(cacheKey: string);
|
|
7
|
-
commentCodeFile(filePath: string, assistantId: string): Promise<void>;
|
|
8
|
-
processComments(filePath: string, code: string, commentsJson: any): Promise<void>;
|
|
9
|
-
removeCommentsAndCleanFile(filePath: string): Promise<void>;
|
|
10
|
-
processDirectory(dirPath: string, assistantId: string): Promise<any>;
|
|
11
|
-
splitArrayToJSON(code: string): {
|
|
12
|
-
line: number;
|
|
13
|
-
code: string;
|
|
14
|
-
}[];
|
|
15
|
-
insertComments(code: string, comments: any[]): string;
|
|
16
|
-
compareStrings(line: string, codeSnippet: string): boolean;
|
|
17
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
uploadFile : Méthode pour uploader un fichier sur OpenAI. Prend le chemin du fichier et le purpose (utilisation prévue du fichier) en paramètres.
|
|
3
|
-
deleteFile : Méthode pour supprimer un fichier de OpenAI en utilisant son ID.
|
|
4
|
-
listFiles : Méthode pour lister tous les fichiers disponibles sur votre compte OpenAI.
|
|
5
|
-
*/
|
|
6
|
-
import { OpenAI } from 'openai';
|
|
7
|
-
export declare class FileHandler {
|
|
8
|
-
private readonly openai;
|
|
9
|
-
constructor(apiKey: string, organization: string);
|
|
10
|
-
readFile(filePath: string): string;
|
|
11
|
-
readFiles(folder: string): string[];
|
|
12
|
-
writeFile(fileFolder: string, filename: string, content: string): void;
|
|
13
|
-
writeWithoutCheck(filePath: string, content: string): void;
|
|
14
|
-
pathExists(filePath: string): boolean;
|
|
15
|
-
readComponentPropsFromJson: (filePath: string) => Record<string, any>;
|
|
16
|
-
uploadFile(filePath: string, purpose: 'fine-tune' | 'assistants'): Promise<string>;
|
|
17
|
-
deleteFile(fileId: string): Promise<boolean>;
|
|
18
|
-
deleteFiles(fileIds: string[]): Promise<{
|
|
19
|
-
fileId: string;
|
|
20
|
-
deleted: boolean;
|
|
21
|
-
error: null;
|
|
22
|
-
}[]>;
|
|
23
|
-
listFiles(): Promise<OpenAI.Files.FileObject[]>;
|
|
24
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Constructeur : Initialise l'instance OpenAI avec la clé API et l'organisation.
|
|
3
|
-
createFile : Méthode pour créer un fichier dans OpenAI. Utile pour charger des documents de référence.
|
|
4
|
-
sendChatMessage : Méthode pour envoyer un message à l'API de chat d'OpenAI et obtenir une réponse.
|
|
5
|
-
createThread : Crée un nouveau thread pour une conversation avec l'assistant.
|
|
6
|
-
addMessageToThread : Ajoute un message au thread spécifié. Utile pour envoyer des prompts ou des questions.
|
|
7
|
-
runAssistant : Exécute l'assistant sur le thread donné et attend la réponse. Récupère et retourne la réponse de l'assistant.
|
|
8
|
-
*/
|
|
9
|
-
import { OpenAI } from 'openai';
|
|
10
|
-
import { Assistant, Thread } from 'openai/resources/beta';
|
|
11
|
-
import { MessageCreateParams, ThreadMessage } from 'openai/resources/beta/threads';
|
|
12
|
-
export declare class OpenAIConnector {
|
|
13
|
-
private readonly apiKey;
|
|
14
|
-
private readonly organization;
|
|
15
|
-
private readonly openai;
|
|
16
|
-
private readonly fileHandler;
|
|
17
|
-
constructor(apiKey: string, organization: string);
|
|
18
|
-
sendChatMessage(model: string, messages: MessageCreateParams[]): Promise<OpenAI.Chat.Completions.ChatCompletion>;
|
|
19
|
-
createAssistant(instructions: string, name: string, fileIds: string[]): Promise<Assistant>;
|
|
20
|
-
updateAssistantFiles(assistantId: string, newFileIds: string[]): Promise<Assistant>;
|
|
21
|
-
createAssistantFiles(assistantId: string, filesIds: string[]): Promise<Assistant>;
|
|
22
|
-
deleteAssistantFiles(assistantId: string, AssistantFileId: string): Promise<OpenAI.Beta.Assistants.Files.FileDeleteResponse>;
|
|
23
|
-
getAssistantFiles(assistantId: string): Promise<OpenAI.Beta.Assistants.Files.AssistantFilesPage>;
|
|
24
|
-
createThread(): Promise<Thread>;
|
|
25
|
-
addMessageToThread(threadId: string, message: MessageCreateParams): Promise<ThreadMessage>;
|
|
26
|
-
runAssistant(assistantId: string, threadId: string): Promise<any>;
|
|
27
|
-
}
|
package/dist/bot/data.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface Sections {
|
|
2
|
-
[sectionTitle: string]: Chapter[];
|
|
3
|
-
}
|
|
4
|
-
export interface Chapter {
|
|
5
|
-
title: string;
|
|
6
|
-
subchapters: Subchapter[];
|
|
7
|
-
}
|
|
8
|
-
export interface Subchapter {
|
|
9
|
-
subtitle: string;
|
|
10
|
-
minWordCount: number;
|
|
11
|
-
maxWordCount: number;
|
|
12
|
-
summary: string;
|
|
13
|
-
points: string[];
|
|
14
|
-
}
|
|
15
|
-
export interface NewsletterSettings {
|
|
16
|
-
language: string;
|
|
17
|
-
tone: string;
|
|
18
|
-
style: string;
|
|
19
|
-
}
|
package/dist/bot/extractors.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
extractJsonCode : Extrait un bloc de code JSON d'une réponse. Utile si la réponse contient des blocs de code formatés.
|
|
3
|
-
extractTextResponse : Nettoie une réponse pour ne garder que le texte, en supprimant les blocs de code et les formattages spéciaux.
|
|
4
|
-
extractKeyValuePairs : Extrait des paires clé-valeur d'une réponse. Cette fonction peut être utile pour traiter des réponses formatées comme des listes de propriétés.
|
|
5
|
-
*/
|
|
6
|
-
export declare function extractJsonCode(response: string): any;
|
|
7
|
-
export declare const extractTextResponse: (response: string) => string;
|
|
8
|
-
export declare const extractKeyValuePairs: (response: string) => Record<string, string>;
|
package/dist/bot/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ProjectPrompt: () => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RespondPrompt: (props: string, view: string, type?: string | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CommentPrompt: (componentName: string, fileName: string, codeContent: string) => string;
|