Skip to content

Commit

Permalink
feat: thinking in storage
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 23, 2023
1 parent 05b5c33 commit fd21f16
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 5 deletions.
59 changes: 59 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@tiptap/react": "^2.1.12",
"@tiptap/starter-kit": "^2.1.12",
"@tiptap/suggestion": "^2.1.12",
"handlebars": "^4.7.8",
"markdown-it": "^13.0.2",
"next": "latest",
"prosemirror-changeset": "^2.2.1",
Expand Down
10 changes: 10 additions & 0 deletions prompts/prebuild/menubar-prompts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {FacetType, OutputForm, PromptAction} from "../../types/custom-action.type";

const MenubarPrompts: PromptAction[] = [
{
name: 'File',
template: '',
facetType: FacetType.TOOLBAR_MENU,
outputForm: OutputForm.CHAT,
}
];
8 changes: 8 additions & 0 deletions prompts/prompts-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Handlebars from 'handlebars'

class PromptsManager {
compile (string, data) {
const template = Handlebars.compile(string)
return template(data)
}
}
11 changes: 6 additions & 5 deletions types/custom-action.type.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
enum FacetType {
export enum FacetType {
TOOLBAR_MENU = 0,
BUBBLE_MENU = 1,
CONTEXT_MENU = 2,
SLASH_COMMAND = 3,
QUICK_INSERT = 4,
}

enum OutputForm {
export enum OutputForm {
STREAMING = 0,
NORMAL = 1,
CHAT = 2,
INSIDE_BOX = 3,
NOTIFICATION = 4,
}

enum VariableType {
export enum VariableType {
BEFORE_CURSOR,
AFTER_CURSOR,
SELECTION,
Expand All @@ -23,9 +23,10 @@ enum VariableType {
RELATED_CHUNKS,
}

interface CustomAction {
export interface PromptAction {
name: string;
template: string;
facetType: FacetType;
outputForm: OutputForm;
content?: any;
}

0 comments on commit fd21f16

Please sign in to comment.