Skip to content

Commit

Permalink
fix(deps): upgrade graasp deps
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this template is compatible with versions
of @graasp/sdk >1.1.** and @graasp/apps-query-client > 2.**

also upgrade other deps

test: update tests for @graasp/sdk 1.1.*

chore(main): release 1.0.0 (#4)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Use APP_KEY instead of APP_ID (#6)

* build: use APP_KEY instead of APP_ID

close #5

* chore(deps): minor upgrade

feat: update template (#9)

* fix: add demo

* fix: create unity demo

* fix: demo

* fix: update template

* fix: tests and workflows

* fix: update readme

* fix: update deps

* fix: tests

* fix: add renovate

fix: env variable for VITE_API_HOST in README.md (#22)

* fix: update value of env variables in readme

* fix: set the time in deploy workflow

* fix: add time to prod and stage deployements

* fix: remove env variable as it is set in the vite.config.ts

fix(test): update member emails (#24)

chore(deps): update commitlint packages to v18.4.3

chore(deps): update devdependencies (non-major)

fix(deps): update dependency @mui/lab to v5.0.0-alpha.153

fix(deps): update dependency @types/node to v20.9.5

fix(deps): update react monorepo

chore(deps): update eslint packages to v6.12.0

fix(deps): update dependency @types/node to v20.10.0 (#26)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix(deps): update dependency typescript to v5.3.2 (#27)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix(deps): update dependency @graasp/sdk to v3.1.0 (#25)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix(deps): update dependency @sentry/react to v7.81.1 (#23)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

chore(deps): update dependency cypress to v13.6.0 (#20)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: update template

chore: update deps (#36)

* chore: update deps

* fix: update workflow variables

fix: variables

fix: udpate release-please condition

fix: work in progress
  • Loading branch information
swouf authored and spaenleh committed Dec 18, 2023
1 parent 4bc997c commit 1059da3
Show file tree
Hide file tree
Showing 41 changed files with 3,447 additions and 993 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ jobs:

- name: Build
run: yarn build

- name: Unit Tests
run: yarn vitest
23 changes: 19 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"homepage": ".",
"type": "module",
"dependencies": {
"@codemirror/lang-javascript": "^6.2.1",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@graasp/apps-query-client": "3.2.1",
"@graasp/apps-query-client": "github:graasp/graasp-apps-query-client#222-query-setting-by-name",
"@graasp/sdk": "3.3.0",
"@graasp/ui": "4.1.1",
"@mui/icons-material": "5.14.19",
Expand All @@ -24,11 +25,22 @@
"@types/node": "20.10.4",
"@types/react": "18.2.42",
"@types/react-dom": "18.2.17",
"i18next": "23.7.8",
"@uiw/react-codemirror": "^4.21.21",
"file-saver": "^2.0.5",
"i18next": "^23.7.9",
"lodash.groupby": "^4.6.0",
"lucide-react": "^0.297.0",
"prism-react-renderer": "^2.3.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "13.5.0",
"react-i18next": "^13.5.0",
"react-markdown": "^9.0.1",
"react-mde": "12",
"react-router-dom": "^6.21.0",
"react-toastify": "9.1.3",
"remark-breaks": "^4.0.0",
"remark-gfm": "^4.0.0",
"stylis-plugin-rtl": "^2.1.1",
"typescript": "5.3.3"
},
"scripts": {
Expand Down Expand Up @@ -58,7 +70,9 @@
"@commitlint/config-conventional": "18.4.3",
"@cypress/code-coverage": "3.12.13",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/file-saver": "^2",
"@types/i18n": "0.13.10",
"@types/lodash.groupby": "^4.6.9",
"@types/uuid": "9.0.7",
"@typescript-eslint/eslint-plugin": "6.13.2",
"@typescript-eslint/parser": "6.13.2",
Expand Down Expand Up @@ -87,7 +101,8 @@
"uuid": "9.0.1",
"vite": "^5.0.6",
"vite-plugin-checker": "^0.6.2",
"vite-plugin-istanbul": "^5.0.0"
"vite-plugin-istanbul": "^5.0.0",
"vitest": "^1.0.4"
},
"browserslist": {
"production": [
Expand Down
8 changes: 0 additions & 8 deletions src/@types/i18next.d.ts

This file was deleted.

9 changes: 9 additions & 0 deletions src/config/appActions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const AppActionsType = {
// Message actions
Create: 'create_comment',
Edit: 'edit_comment',
Delete: 'delete_comment',
Reply: 'reply_comment',
// chatbot actions
AskChatbot: 'ask_chatbot',
} as const;
20 changes: 20 additions & 0 deletions src/config/appData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { AppData } from '@graasp/sdk';

export const AppDataTypes = {
UserComment: 'comment',
BotComment: 'bot-comment',
};

export const COMMENT_APP_DATA_TYPES: string[] = [
AppDataTypes.UserComment,
AppDataTypes.BotComment,
];

export type VisibilityVariants = 'member' | 'item';

export type CommentData = {
content: string;
parent: string | null;
chatbotPromptSettingId?: string;
};
export type CommentAppData = AppData<CommentData>;
26 changes: 26 additions & 0 deletions src/config/appSetting.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export const SettingsKeys = {
ChatbotPrompt: 'chatbot-prompt',
} as const;

export type ChatCompletionMessageRoles = 'system' | 'user' | 'assistant';

export type ChatCompletionMessage = {
role: ChatCompletionMessageRoles;
content: string;
};

// Chatbot Prompt Setting keys
export enum ChatbotPromptSettingsKeys {
InitialPrompt = 'initialPrompt',
ChatbotCue = 'chatbotCue',
ChatbotName = 'chatbotName',
}

export type ChatbotPromptSettings = {
[ChatbotPromptSettingsKeys.InitialPrompt]: ChatCompletionMessage[];
[ChatbotPromptSettingsKeys.ChatbotCue]: string;
[ChatbotPromptSettingsKeys.ChatbotName]: string;

// used to allow access using settings[settingKey] syntax
// [key: string]: unknown;
};
1 change: 1 addition & 0 deletions src/config/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export const SETTING_INITIAL_PROMPT_CODE_EDITOR_CY =
export const SETTING_CHATBOT_PROMPT_LINE_NUMBER_CY =
'setting_chatbot_prompt_line_number';
export const SETTING_MAX_COMMENT_LENGTH = 'setting_max_comment_length';
export const SETTING_MAX_THREAD_LENGTH = 'setting_max_thread_length';
export const SETTING_ADD_CHATBOT_PROMPT_CY = 'setting_add_chatbot_prompt';

export const REPL_RUN_CODE_BUTTON_CY = 'repl_run_code_button';
Expand Down
6 changes: 6 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const DEFAULT_BOT_USERNAME = 'Graasp Bot';
export const ANONYMOUS_USER = 'Anonymous';

// UI
export const SMALL_BORDER_RADIUS = '4px';
export const BIG_BORDER_RADIUS = '8px';
Loading

0 comments on commit 1059da3

Please sign in to comment.