mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-14 20:37:34 +03:00
Add markdown
This commit is contained in:
parent
6106f54063
commit
e1a3fcdebc
1164
web/package-lock.json
generated
1164
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -71,6 +71,7 @@
|
|||||||
"react-icons": "^5.5.0",
|
"react-icons": "^5.5.0",
|
||||||
"react-konva": "^18.2.10",
|
"react-konva": "^18.2.10",
|
||||||
"react-router-dom": "^6.30.3",
|
"react-router-dom": "^6.30.3",
|
||||||
|
"react-markdown": "^9.0.1",
|
||||||
"react-swipeable": "^7.0.2",
|
"react-swipeable": "^7.0.2",
|
||||||
"react-tracked": "^2.0.1",
|
"react-tracked": "^2.0.1",
|
||||||
"react-transition-group": "^4.4.5",
|
"react-transition-group": "^4.4.5",
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { FaArrowUpLong } from "react-icons/fa6";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useState, useCallback } from "react";
|
import { useState, useCallback } from "react";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import ReactMarkdown from "react-markdown";
|
||||||
|
|
||||||
type ChatMessage = { role: "user" | "assistant"; content: string };
|
type ChatMessage = { role: "user" | "assistant"; content: string };
|
||||||
|
|
||||||
@ -57,7 +58,11 @@ export default function ChatPage() {
|
|||||||
: "self-start rounded-lg bg-muted px-3 py-2"
|
: "self-start rounded-lg bg-muted px-3 py-2"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{msg.content}
|
{msg.role === "assistant" ? (
|
||||||
|
<ReactMarkdown>{msg.content}</ReactMarkdown>
|
||||||
|
) : (
|
||||||
|
msg.content
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
{isLoading && (
|
{isLoading && (
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { defineConfig } from "vite";
|
|||||||
import react from "@vitejs/plugin-react-swc";
|
import react from "@vitejs/plugin-react-swc";
|
||||||
import monacoEditorPlugin from "vite-plugin-monaco-editor";
|
import monacoEditorPlugin from "vite-plugin-monaco-editor";
|
||||||
|
|
||||||
const proxyHost = process.env.PROXY_HOST || "192.168.50.106:5002";
|
const proxyHost = process.env.PROXY_HOST || "1ocalhost:5000";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user