Skip to content

Commit

Permalink
Merge pull request #2 from ashu565/main
Browse files Browse the repository at this point in the history
Golem Rendering + API Integration
  • Loading branch information
dresslife-shbh authored Jul 4, 2024
2 parents 53342af + d165678 commit b9b3920
Show file tree
Hide file tree
Showing 86 changed files with 13,221 additions and 281 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
69 changes: 22 additions & 47 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,54 +1,29 @@
# Ignore node_modules directory
# ignore modules pulled in from npm
node_modules/

# Ignore log files
*.log

# Ignore OS generated files
.DS_Store
Thumbs.db

# Ignore build output
# rc-apps package output
dist/
build/

# Ignore dependency directories
vendor/
public/

# Ignore IDE specific files
.vscode/
# JetBrains IDEs
out/
.idea/
*.sublime-project
*.sublime-workspace

# Ignore environment variables files
.env
.env.local
.env.*.local
.idea_modules/

# Ignore Python specific files
__pycache__/
*.pyc
*.pyo
*.pyd
.Python

# Ignore Java specific files
target/
*.class
*.jar
*.war
*.ear

# Ignore macOS Finder metadata
# macOS
.DS_Store

# Ignore Linux file system metadata
*~

# Ignore Windows file system metadata
Thumbs.db
ehthumbs.db

package-lock.json
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
_nuxt
19 changes: 19 additions & 0 deletions .rcappsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"url": "http://localhost:3000",
"username": "",
"password": "",
"ignoredFiles": [
"**/README.md",
"**/package-lock.json",
"**/package.json",
"**/tslint.json",
"**/tsconfig.json",
"**/*.js",
"**/*.js.map",
"**/*.d.ts",
"**/*.spec.ts",
"**/*.test.ts",
"**/dist/**",
"**/.*"
]
}
9 changes: 9 additions & 0 deletions .txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Send Message

Use Case :

1. when user will write a message and press send button to interact with LLM.

Technical Overview :

1.
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"EditorConfig.editorconfig",
"eamodio.gitlens",
"eg2.vscode-npm-script",
"wayou.vscode-todo-highlight",
"minhthai.vscode-todo-parser",
"ms-vscode.vscode-typescript-tslint-plugin",
"rbbit.typescript-hero"
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
73 changes: 73 additions & 0 deletions BaseCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import {
IHttp,
IModify,
IPersistence,
IRead,
ILogger,
} from "@rocket.chat/apps-engine/definition/accessors";
import {
ISlashCommand,
SlashCommandContext,
} from "@rocket.chat/apps-engine/definition/slashcommands";

import { Block } from "@rocket.chat/ui-kit";

import {
ButtonElement,
PlainText,
SectionBlock, ActionsBlock
} from "@rocket.chat/ui-kit";

import { sendNotification} from "./helpers"

export class Base implements ISlashCommand {
public command = "llm";
public i18nDescription = "";
public providesPreview = false;
public i18nParamsExample = "";
public _logger: ILogger;
public _appId: string;

constructor(logger: ILogger, appId: string) {
this._logger = logger;
this._appId = appId;
}

public async executor(
context: SlashCommandContext,
read: IRead,
modify: IModify,
http: IHttp,
persist: IPersistence
): Promise<void> {

const mainSection:SectionBlock = {
appId: this._appId,

type:"section",
text: {
type: "plain_text",
text: "Would you like to open prompt editor?"
},
accessory: {
appId: this._appId,
blockId: "block#create_new_chat",
actionId: "action#create_new_chat",
type: "button",
text: {
type: "plain_text",
text: "Yes"
},
value: "create_new_chat",
style: "primary",
url: "http://localhost:3000/api/apps/public/8d4acc61-d871-46e2-94b5-db161448483c/prompt-editor"
},
}

await sendNotification(context, modify, read, [mainSection])

return

}
}

Loading

0 comments on commit b9b3920

Please sign in to comment.