Skip to content

Commit

Permalink
fix: Remove useless openai package
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Jul 23, 2024
1 parent ff93cd7 commit 345e703
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 61 deletions.
105 changes: 52 additions & 53 deletions package-lock.json

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

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
"localforage": "^1.10.0",
"marked": "^12.0.2",
"marked-highlight": "^2.1.3",
"openai": "^4.52.7",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"quasar": "^2.16.6",
"stream": "^0.0.3",
"uuid": "^10.0.0",
"viem": "^2.17.5",
"viem": "^2.17.10",
"vue": "^3.4.33",
"vue-router": "^4.4.0",
"web3": "^4.11.0",
Expand All @@ -49,8 +48,8 @@
"@quasar/app-vite": "^1.9.3",
"@types/dompurify": "^3.0.5",
"@types/node": "^20.14.11",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@vue/eslint-config-typescript": "^13.0.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
Expand All @@ -59,7 +58,7 @@
"postcss": "^8.4.39",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.6",
"typescript": "^5.5.3",
"typescript": "^5.5.4",
"vite-plugin-node-polyfills": "^0.22.0",
"vue-eslint-parser": "^9.4.3"
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/MarkdownRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="markdown-component" v-html="renderedContent"></div>
</template>

<script setup lang="ts">
<script lang="ts" setup>
import { ref, watch } from 'vue';
import { Marked } from 'marked';
import { markedHighlight } from 'marked-highlight';
Expand Down Expand Up @@ -32,9 +32,9 @@ const marked = new Marked(
const renderedContent = ref('');
function updateContent(content) {
async function updateContent(content: string) {
// content = DOMPurify.sanitize(content);
renderedContent.value = DOMPurify.sanitize(marked.parse(content));
renderedContent.value = DOMPurify.sanitize(await marked.parse(content));
}
updateContent(props.content);
Expand Down

0 comments on commit 345e703

Please sign in to comment.