interintel 1.0.15 → 1.0.16
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/README.md +4 -5
- package/package.json +1 -1
- package/setup.js +15 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## INTERINTEL
|
|
2
2
|
|
|
3
|
-
The application `
|
|
3
|
+
The application `interintel` is a command line interface (CLI) application implemented in Node.js. It essentially is an interactive communication tool between the user and an AI model, only GPTs for now.
|
|
4
4
|
|
|
5
5
|
Here's a brief overview of the main functionalities, as contained in the index.js file:
|
|
6
6
|
|
|
@@ -14,8 +14,8 @@ Here's a brief overview of the main functionalities, as contained in the index.j
|
|
|
14
14
|
- If a user types '//writefile', the application prompts the user to provide a name for the file and then a prompt for the AI. It then automatically generates some text (by communicating with OpenAI's GPT-3 model), writes this to a file and stores it in the application's directory.
|
|
15
15
|
|
|
16
16
|
### //readRefs
|
|
17
|
-
- If a user writes '//readRefs', the application reads the content of the specified files in the
|
|
18
|
-
- So as you work on your project and files change or you move to other parts of the code base you can adjust where
|
|
17
|
+
- If a user writes '//readRefs', the application reads the content of the specified files in the interintel.config.js (in the current implementation) and uses this as part of the conversation with the AI.
|
|
18
|
+
- So as you work on your project and files change or you move to other parts of the code base you can adjust where interintel points and what is referenced by AI conversation.
|
|
19
19
|
|
|
20
20
|
### everything else
|
|
21
21
|
- For all user inputs outside of these special keywords, the chat conversation is simply updated with the user's message and a call is made to the OpenAI API to generate the AI's response. This is then displayed on the console.
|
|
@@ -24,7 +24,6 @@ The application relies heavily on async-await pattern for handling the asynchron
|
|
|
24
24
|
|
|
25
25
|
Keep in mind that this is a high level overview and each functionality has its own level of implementation detail.
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
File Structure
|
|
29
28
|
|
|
30
29
|
project/
|
|
@@ -35,5 +34,5 @@ project/
|
|
|
35
34
|
│ ├── messageUtils.js
|
|
36
35
|
│ ├── writeFileHandler.js
|
|
37
36
|
│ └── readRefsHandler.js
|
|
38
|
-
├──
|
|
37
|
+
├── interintel.config.js
|
|
39
38
|
└── index.js
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"name": "interintel",
|
|
8
8
|
"description": "The application `Interintel` is a command line interface (CLI) application implemented in Node.js. It essentially is an interactive communication tool between the user and an AI model, only openai models for now.",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.16",
|
|
10
10
|
"main": "index.js",
|
|
11
11
|
"directories": {
|
|
12
12
|
"doc": "docs"
|
package/setup.js
CHANGED
|
@@ -3,10 +3,10 @@ const path = require('path');
|
|
|
3
3
|
const colors = require('colors')
|
|
4
4
|
|
|
5
5
|
const configPath = path.join('../../interintel.config.js');
|
|
6
|
-
const templatePath = path.join(__dirname, '
|
|
6
|
+
const templatePath = path.join(__dirname, '/resources/interintel.config.template.js');
|
|
7
7
|
|
|
8
8
|
const readMePath = path.join('../../interintelReadMe.md');
|
|
9
|
-
const readMeTemplate = path.join(__dirname, '
|
|
9
|
+
const readMeTemplate = path.join(__dirname, '/README.md');
|
|
10
10
|
|
|
11
11
|
try {
|
|
12
12
|
if (!fs.existsSync(configPath)) {
|
|
@@ -14,15 +14,25 @@ try {
|
|
|
14
14
|
fs.copyFileSync(templatePath, configPath);
|
|
15
15
|
console.log('Interintel config created. Please update it with your settings.'.yellow);
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
} else {
|
|
18
|
+
console.log('Interintel config file already exists.');
|
|
19
|
+
}
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.error('Error occurred during setup:', error);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
if (!fs.existsSync(readMePath)) {
|
|
27
|
+
console.log('Readme file does not exist, creating...');
|
|
18
28
|
fs.copyFileSync(readMeTemplate, readMePath);
|
|
19
29
|
console.log('Interintel readme created. Please update it with your settings.'.yellow);
|
|
20
30
|
|
|
21
31
|
} else {
|
|
22
|
-
console.log('Interintel
|
|
32
|
+
console.log('Interintel readme file already exists.');
|
|
23
33
|
}
|
|
24
34
|
} catch (error) {
|
|
25
35
|
console.error('Error occurred during setup:', error);
|
|
26
36
|
}
|
|
27
37
|
|
|
28
|
-
console.log("Finished setup.js script.");
|
|
38
|
+
console.log("Finished running setup.js script.");
|