Skip to content

Commit 8f89384

Browse files
committed
Minor changes
1 parent 584935f commit 8f89384

File tree

11 files changed

+575
-574
lines changed

11 files changed

+575
-574
lines changed

ai-assistant/.editorconfig

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# top-most EditorConfig file
4-
root = true
5-
6-
# Unix-style newlines with a newline ending every file
7-
[*]
8-
indent_style = space
9-
indent_size = 4
10-
charset = utf-8
11-
end_of_line = lf
12-
insert_final_newline = true
13-
trim_trailing_whitespace = true
14-
15-
[*.md]
16-
trim_trailing_whitespace = false
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
indent_style = space
9+
indent_size = 4
10+
charset = utf-8
11+
end_of_line = lf
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

ai-assistant/.rcappsconfig

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
{
2-
"url": "http://localhost:3000",
3-
"username": "",
4-
"password": "",
5-
"ignoredFiles": [
6-
"**/README.md",
7-
"**/package-lock.json",
8-
"**/package.json",
9-
"**/tslint.json",
10-
"**/tsconfig.json",
11-
"**/*.js",
12-
"**/*.js.map",
13-
"**/*.d.ts",
14-
"**/*.spec.ts",
15-
"**/*.test.ts",
16-
"**/dist/**",
17-
"**/.*"
18-
]
1+
{
2+
"url": "http://localhost:3000",
3+
"username": "",
4+
"password": "",
5+
"ignoredFiles": [
6+
"**/README.md",
7+
"**/package-lock.json",
8+
"**/package.json",
9+
"**/tslint.json",
10+
"**/tsconfig.json",
11+
"**/*.js",
12+
"**/*.js.map",
13+
"**/*.d.ts",
14+
"**/*.spec.ts",
15+
"**/*.test.ts",
16+
"**/dist/**",
17+
"**/.*"
18+
]
1919
}

ai-assistant/.vscode/settings.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{
2-
"editor.tabSize": 4,
3-
"editor.detectIndentation": false,
4-
"editor.insertSpaces": true,
5-
"explorer.fileNesting.enabled": true,
6-
"explorer.fileNesting.expand": false,
7-
"explorer.fileNesting.patterns": {
8-
"package.json": ".gitignore, *.json, *.yml, *.yaml, bun.lockb, .editorconfig, .rcapps*"
9-
}
10-
}
1+
{
2+
"editor.tabSize": 4,
3+
"editor.detectIndentation": false,
4+
"editor.insertSpaces": true,
5+
"explorer.fileNesting.enabled": true,
6+
"explorer.fileNesting.expand": false,
7+
"explorer.fileNesting.patterns": {
8+
"package.json": ".gitignore, *.json, *.yml, *.yaml, bun.lockb, .editorconfig, .rcapps*"
9+
}
10+
}
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
import {
2-
IHttp,
3-
IModify,
4-
IPersistence,
5-
IRead,
6-
} from "@rocket.chat/apps-engine/definition/accessors";
7-
import {
8-
ISlashCommand,
9-
SlashCommandContext,
10-
} from "@rocket.chat/apps-engine/definition/slashcommands";
11-
import { findSimilarModal } from "../modals/findSimilarModal";
12-
import { persistUIData } from "../utils/persistenceHandlers";
13-
14-
export class FindSimilarCommand implements ISlashCommand {
15-
public command = "rcc-findsimilar";
16-
public i18nParamsExample = "";
17-
public i18nDescription = "";
18-
public providesPreview = false;
19-
20-
public async executor(
21-
context: SlashCommandContext,
22-
read: IRead,
23-
modify: IModify,
24-
http: IHttp,
25-
persistence: IPersistence
26-
): Promise<void> {
27-
const userID = context.getSender().id;
28-
await persistUIData(persistence, userID, context);
29-
30-
const triggerId = context.getTriggerId();
31-
if (!triggerId) {
32-
throw new Error("No trigger ID provided");
33-
}
34-
35-
await modify
36-
.getUiController()
37-
.openSurfaceView(
38-
await findSimilarModal(),
39-
{ triggerId },
40-
context.getSender()
41-
);
42-
}
43-
}
1+
import {
2+
IHttp,
3+
IModify,
4+
IPersistence,
5+
IRead,
6+
} from "@rocket.chat/apps-engine/definition/accessors";
7+
import {
8+
ISlashCommand,
9+
SlashCommandContext,
10+
} from "@rocket.chat/apps-engine/definition/slashcommands";
11+
import { findSimilarModal } from "../modals/findSimilarModal";
12+
import { persistUIData } from "../utils/persistenceHandlers";
13+
14+
export class FindSimilarCommand implements ISlashCommand {
15+
public command = "rcc-findsimilar";
16+
public i18nParamsExample = "";
17+
public i18nDescription = "";
18+
public providesPreview = false;
19+
20+
public async executor(
21+
context: SlashCommandContext,
22+
read: IRead,
23+
modify: IModify,
24+
http: IHttp,
25+
persistence: IPersistence
26+
): Promise<void> {
27+
const userID = context.getSender().id;
28+
await persistUIData(persistence, userID, context);
29+
30+
const triggerId = context.getTriggerId();
31+
if (!triggerId) {
32+
throw new Error("No trigger ID provided");
33+
}
34+
35+
await modify
36+
.getUiController()
37+
.openSurfaceView(
38+
await findSimilarModal(),
39+
{ triggerId },
40+
context.getSender()
41+
);
42+
}
43+
}
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
import {
2-
IHttp,
3-
IModify,
4-
IPersistence,
5-
IRead,
6-
} from "@rocket.chat/apps-engine/definition/accessors";
7-
import {
8-
ISlashCommand,
9-
SlashCommandContext,
10-
} from "@rocket.chat/apps-engine/definition/slashcommands";
11-
import { styleguideModal } from "../modals/styleguideModal";
12-
import { persistUIData } from "../utils/persistenceHandlers";
13-
14-
export class StyleguideCommand implements ISlashCommand {
15-
public command = "rcc-styleguide";
16-
public i18nParamsExample = "";
17-
public i18nDescription = "";
18-
public providesPreview = false;
19-
20-
public async executor(
21-
context: SlashCommandContext,
22-
read: IRead,
23-
modify: IModify,
24-
http: IHttp,
25-
persistence: IPersistence
26-
): Promise<void> {
27-
const userID = context.getSender().id;
28-
await persistUIData(persistence, userID, context);
29-
30-
const triggerId = context.getTriggerId();
31-
if (!triggerId) {
32-
throw new Error("No trigger ID provided");
33-
}
34-
35-
await modify
36-
.getUiController()
37-
.openSurfaceView(
38-
await styleguideModal(),
39-
{ triggerId },
40-
context.getSender()
41-
);
42-
}
43-
}
1+
import {
2+
IHttp,
3+
IModify,
4+
IPersistence,
5+
IRead,
6+
} from "@rocket.chat/apps-engine/definition/accessors";
7+
import {
8+
ISlashCommand,
9+
SlashCommandContext,
10+
} from "@rocket.chat/apps-engine/definition/slashcommands";
11+
import { styleguideModal } from "../modals/styleguideModal";
12+
import { persistUIData } from "../utils/persistenceHandlers";
13+
14+
export class StyleguideCommand implements ISlashCommand {
15+
public command = "rcc-styleguide";
16+
public i18nParamsExample = "";
17+
public i18nDescription = "";
18+
public providesPreview = false;
19+
20+
public async executor(
21+
context: SlashCommandContext,
22+
read: IRead,
23+
modify: IModify,
24+
http: IHttp,
25+
persistence: IPersistence
26+
): Promise<void> {
27+
const userID = context.getSender().id;
28+
await persistUIData(persistence, userID, context);
29+
30+
const triggerId = context.getTriggerId();
31+
if (!triggerId) {
32+
throw new Error("No trigger ID provided");
33+
}
34+
35+
await modify
36+
.getUiController()
37+
.openSurfaceView(
38+
await styleguideModal(),
39+
{ triggerId },
40+
context.getSender()
41+
);
42+
}
43+
}
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
import {
2-
IHttp,
3-
IModify,
4-
IPersistence,
5-
IRead,
6-
} from "@rocket.chat/apps-engine/definition/accessors";
7-
import {
8-
ISlashCommand,
9-
SlashCommandContext,
10-
} from "@rocket.chat/apps-engine/definition/slashcommands";
11-
import { suggestModal } from "../modals/suggestModal";
12-
import { persistUIData } from "../utils/persistenceHandlers";
13-
14-
export class SuggestCommand implements ISlashCommand {
15-
public command = "rcc-suggest";
16-
public i18nParamsExample = "";
17-
public i18nDescription = "";
18-
public providesPreview = false;
19-
20-
public async executor(
21-
context: SlashCommandContext,
22-
read: IRead,
23-
modify: IModify,
24-
http: IHttp,
25-
persistence: IPersistence
26-
): Promise<void> {
27-
const userID = context.getSender().id;
28-
await persistUIData(persistence, userID, context);
29-
30-
const triggerId = context.getTriggerId();
31-
if (!triggerId) {
32-
throw new Error("No trigger ID provided");
33-
}
34-
35-
await modify
36-
.getUiController()
37-
.openSurfaceView(
38-
await suggestModal(),
39-
{ triggerId },
40-
context.getSender()
41-
);
42-
}
43-
}
1+
import {
2+
IHttp,
3+
IModify,
4+
IPersistence,
5+
IRead,
6+
} from "@rocket.chat/apps-engine/definition/accessors";
7+
import {
8+
ISlashCommand,
9+
SlashCommandContext,
10+
} from "@rocket.chat/apps-engine/definition/slashcommands";
11+
import { suggestModal } from "../modals/suggestModal";
12+
import { persistUIData } from "../utils/persistenceHandlers";
13+
14+
export class SuggestCommand implements ISlashCommand {
15+
public command = "rcc-suggest";
16+
public i18nParamsExample = "";
17+
public i18nDescription = "";
18+
public providesPreview = false;
19+
20+
public async executor(
21+
context: SlashCommandContext,
22+
read: IRead,
23+
modify: IModify,
24+
http: IHttp,
25+
persistence: IPersistence
26+
): Promise<void> {
27+
const userID = context.getSender().id;
28+
await persistUIData(persistence, userID, context);
29+
30+
const triggerId = context.getTriggerId();
31+
if (!triggerId) {
32+
throw new Error("No trigger ID provided");
33+
}
34+
35+
await modify
36+
.getUiController()
37+
.openSurfaceView(
38+
await suggestModal(),
39+
{ triggerId },
40+
context.getSender()
41+
);
42+
}
43+
}

ai-assistant/src/endpoints/purgeDB.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class PurgeDBEndpoint extends ApiEndpoint {
4646
" `vector.similarity_function`: 'COSINE'",
4747
"}};",
4848
].join("\n");
49+
4950
await db.run(query);
5051
}
5152

0 commit comments

Comments
 (0)