You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-8Lines changed: 4 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,6 @@ Rocket Chatter App is an open-source AI-powered assistant designed to help devel
18
18
19
19
-**Assess Code Importance**: The app can evaluate the criticality and centrality of code entities, providing insights into their impact and dependencies, which is crucial for tasks like refactoring or introducing new features. The app will generate scores for criticality (how many other parts of the code depend on this entity), centrality (how connected this entity is to other parts), and overall importance, helping developers prioritize their efforts.
20
20
21
-
-**Enforce Style Guides**: The app can automatically check the codebase against predefined style guides and coding standards, ensuring code quality, consistency, and readability across the project. Developers can provide code snippets, and the app will suggest improvements based on the project's style guide, promoting best practices and maintainability.
22
-
23
21
-**Suggest Improvements**: The app can analyze code snippets and offer targeted refactoring suggestions, such as renaming variables, extracting code into reusable functions, removing dead code, and optimizing performance. These suggestions will help developers write cleaner, more efficient, and maintainable code while adhering to the project's coding standards.
24
22
25
23
### Accessibility and Collaboration
@@ -49,21 +47,19 @@ Rocket Chatter App is an open-source AI-powered assistant designed to help devel
49
47
50
48
### Usage
51
49
52
-
Once the application is running, you can access the Rocket Chatter App through the Rocket.Chat interface. The app provides various slash commands (e.g., `/rcc-ask`, `/rcc-diagram`, `/rcc-document`) that you can use to interact with the assistant.
50
+
Once the application is running, you can access the Rocket Chatter App through the Rocket.Chat interface. The app provides various slash commands (e.g., `/rcc-askcode`, `/rcc-diagram`, `/rcc-document`) that you can use to interact with the assistant.
53
51
54
52
## Architecture
55
53
56
54
The Rocket Chatter App follows a modular architecture with the following main components:
57
55
58
56
1.**Rocket Chat Application**: A user-friendly interface for developers to interact with the system, enabling them to ask questions, request diagrams, and access documentation directly within the Rocket.Chat environment. The application is built using the Rocket.Chat App Engine SDK and is deployed as a Rocket.Chat App. 
59
57
2.**Ingestion Server**: Responsible for parsing the Rocket.Chat codebase, extracting relevant information, and storing it in the Neo4j graph database. It utilizes compiler APIs like `ts-morph` and `jscodeshift` to handle TypeScript and JavaScript code constructs. The ingestion process involves chunking the codebase, generating embeddings for code entities, and establishing relationships between them in the graph database. 
60
-
3.**Application Server**: A middleware component built with Express.js that serves as a bridge between the database and the client application. It handles requests from the Rocket Chat App, queries the Neo4j database using cosine similarity-based searches, and generates responses using Language Models (LMs). The server employs a Retrieval Augmented Generation (RAG) pipeline to provide contextual and accurate information to developers. 
61
-
62
58
63
59
### Development Environment Setup
64
60
65
-
1. Fork the repository and clone your fork: `git clone https://github.com/your-username/rocket-chatter-app.git`
66
-
2. Navigate to the project directory: `cd rocket-chatter-app`
67
-
3. Install dependencies: `npm install`
61
+
1. Fork the repository and clone your fork: `git clone https://github.com/your-username/Apps.AI.Codebase.Assistant.git`
62
+
2. Navigate to the project directory: `cd Apps.AI.Codebase.Assistant`
63
+
3. Install dependencies: `bun install`
68
64
4. Set up the required environment variables (e.g., database credentials, API keys) by creating a `.env` file based on the provided `.env.example` file.
-[Top View of Both Categories](https://forums.rocket.chat/c/rocket-chat-apps)
22
-
-[#rocketchat-apps on Open.Rocket.Chat](https://open.rocket.chat/channel/rocketchat-apps)
2
+
3
+
Rocket Chatter is a Rocket.Chat bot that provides code-related information and assistance to developers working on the Rocket Chat project. The bot is designed to help developers understand the Rocket Chat codebase, find relevant documentation, and improve their coding practices. Rocket Chatter uses the Rocket Chat API to access the codebase and provide context-specific information and suggestions to users.
4
+
5
+
## Commands
6
+
7
+
### `/rcc-help`
8
+
9
+
Provides descriptions and usage instructions for all available Rocket Chatter commands.
10
+
11
+
```
12
+
/rcc-help
13
+
```
14
+
15
+
### `/rcc-askcode`
16
+
17
+
Allows users to ask specific code-related questions about the Rocket Chat's codebase and receive context-specific answers.
18
+
19
+
```
20
+
/rcc-askcode [your query]
21
+
```
22
+
23
+
### `/rcc-askdocs`
24
+
25
+
Accesses and provides developer documentation related to the Rocket Chat project, including setup guides, API references, and contribution guidelines.
26
+
27
+
```
28
+
/rcc-askdocs [your query]
29
+
```
30
+
31
+
### `/rcc-diagram`
32
+
33
+
Generates clarifying diagrams to visually represent the relationships and structures between an entity and it's dependencies within the Rocket Chat codebase.
34
+
35
+
```
36
+
/rcc-diagram [entity]
37
+
```
38
+
39
+
### `/rcc-document`
40
+
41
+
Generates the documentation for a specific entity within the Rocket Chat codebase.
42
+
43
+
```
44
+
/rcc-document [entity]
45
+
```
46
+
47
+
### `/rcc-findsimilar`
48
+
49
+
Finds similar entities to the one provided within the Rocket Chat codebase to reduce redundancy and improve code quality.
50
+
51
+
```
52
+
/rcc-findsimilar
53
+
```
54
+
55
+
(A modal will open to input the code snippet you want to find similar entities to)
56
+
57
+
### `/rcc-improve`
58
+
59
+
Offers suggestions for code improvements, refactoring, or enhancements based on best practices and project standards.
60
+
61
+
```
62
+
/rcc-improve
63
+
```
64
+
65
+
(A modal will open to input the code snippet you want to suggest improvements for)
66
+
67
+
### `/rcc-importance`
68
+
69
+
Determines and explains the importance of a specific code entity within the larger context of the Rocket Chat codebase.
70
+
71
+
```
72
+
/rcc-importance [entity]
73
+
```
74
+
75
+
### `/rcc-testcases`
76
+
77
+
Generates test cases for the provided code which uses Rocket Chat codebase to ensure proper functionality and test coverage.
78
+
79
+
```
80
+
/rcc-testcases
81
+
```
82
+
83
+
(A modal will open to input the code snippet you want to generate testcases for)
84
+
85
+
### `/rcc-translate`
86
+
87
+
Translates the target entity from one programming language to another for a better understanding of the codebase.
88
+
89
+
```
90
+
/rcc-translate [entity] [target language]
91
+
```
92
+
93
+
### `/rcc-whyused`
94
+
95
+
Explains why a specific entity is used within the Rocket Chat codebase.
Copy file name to clipboardExpand all lines: ai-assistant/src/commands/DocumentCommand.ts
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,13 @@ export class DocumentCommand implements ISlashCommand {
20
20
publici18nDescription="";
21
21
publicprovidesPreview=false;
22
22
23
+
/**
24
+
* Processes the HTTP request and query to generate documentation.
25
+
*
26
+
* @param http - The HTTP client.
27
+
* @param query - The user's query.
28
+
* @returns A promise that resolves to an object containing the generated JSDoc and explanation, or null if no references are found or the documentation could be generated.
29
+
*/
23
30
privateasyncprocess(
24
31
http: IHttp,
25
32
query: string
@@ -78,6 +85,15 @@ export class DocumentCommand implements ISlashCommand {
78
85
};
79
86
}
80
87
88
+
/**
89
+
* Executes the command to retrieve and display documentation for a given query.
90
+
*
91
+
* @param context - The SlashCommandContext object containing information about the command execution.
92
+
* @param read - The IRead object used to read data from the Rocket.Chat server.
93
+
* @param modify - The IModify object used to modify data on the Rocket.Chat server.
94
+
* @param http - The IHttp object used to make HTTP requests.
Copy file name to clipboardExpand all lines: ai-assistant/src/commands/HelpCommand.ts
+12-16Lines changed: 12 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -13,16 +13,23 @@ import { handleCommandResponse } from "../utils/handleCommandResponse";
13
13
constHELP_MESSAGE=`
14
14
## Rocket Chatter
15
15
16
-
Rocket Chatter is a Slack bot that provides code-related information and assistance to developers working on the Rocket Chat project. The bot is designed to help developers understand the Rocket Chat codebase, find relevant documentation, and improve their coding practices. Rocket Chatter uses the Rocket Chat API to access the codebase and provide context-specific information and suggestions to users.
16
+
Rocket Chatter is a Rocket.Chat bot that provides code-related information and assistance to developers working on the Rocket Chat project. The bot is designed to help developers understand the Rocket Chat codebase, find relevant documentation, and improve their coding practices. Rocket Chatter uses the Rocket Chat API to access the codebase and provide context-specific information and suggestions to users.
17
17
18
18
\`/rcc-help\`: Provides descriptions and usage instructions for all available Rocket Chatter commands.
19
19
\`\`\`
20
20
/rcc-help
21
21
\`\`\`
22
-
\`/rcc-ask\`: Allows users to ask specific code-related questions about the Rocket Chat's codebase and receive context-specific answers.
22
+
23
+
\`/rcc-askcode\`: Allows users to ask specific code-related questions about the Rocket Chat's codebase and receive context-specific answers.
24
+
\`\`\`
25
+
/rcc-askcode [your query]
26
+
\`\`\`
27
+
28
+
\`/rcc-askdocs\`: Accesses and provides developer documentation related to the Rocket Chat project, including setup guides, API references, and contribution guidelines.
23
29
\`\`\`
24
-
/rcc-ask [your query]
30
+
/rcc-askdocs [topic]
25
31
\`\`\`
32
+
26
33
\`/rcc-diagram\`: Generates clarifying diagrams to visually represent the relationships and structures between an entity and it's dependencies within the Rocket Chat codebase.
27
34
\`\`\`
28
35
/rcc-diagram [entity]
@@ -39,18 +46,12 @@ Rocket Chatter is a Slack bot that provides code-related information and assista
39
46
\`\`\`
40
47
(A modal will open to input the code snippet you want to find similar entities to)
41
48
42
-
\`/rcc-suggest\`: Offers suggestions for code improvements, refactoring, or enhancements based on best practices and project standards.
49
+
\`/rcc-improve\`: Offers suggestions for code improvements, refactoring, or enhancements based on best practices and project standards.
43
50
\`\`\`
44
-
/rcc-suggest
51
+
/rcc-improve
45
52
\`\`\`
46
53
(A modal will open to input the code snippet you want to suggest improvements for)
47
54
48
-
\`/rcc-styleguide\`: Formats the codebase according to the styleguide used throughout the codebase.
49
-
\`\`\`
50
-
/rcc-styleguide
51
-
\`\`\`
52
-
(A modal will open to input the code snippet you want to format)
53
-
54
55
\`/rcc-importance\`: Determines and explains the importance of a specific code entity within the larger context of the Rocket Chat codebase.
55
56
\`\`\`
56
57
/rcc-importance [entity]
@@ -71,11 +72,6 @@ Rocket Chatter is a Slack bot that provides code-related information and assista
71
72
\`\`\`
72
73
/rcc-whyused [entity]
73
74
\`\`\`
74
-
75
-
\`/rcc-devdocs\`: Accesses and provides developer documentation related to the Rocket Chat project, including setup guides, API references, and contribution guidelines.
0 commit comments