diff --git a/.github/workflows/dockerToHub.yml b/.github/workflows/dockerToHub.yml index 7d689b86d..1e3d40d41 100644 --- a/.github/workflows/dockerToHub.yml +++ b/.github/workflows/dockerToHub.yml @@ -1,9 +1,9 @@ -name: PRO DEPLOY +name: BUILD DOCKER IMAGE on: workflow_dispatch: - push: - branches: - - main +# push: +# branches: +# - main # paths: # - 'app/**' # - 'public/**' diff --git a/Dockerfile b/Dockerfile index a3408e8ad..187226af7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM sijinhui/chatgpt-next-web:buildcache as deps +FROM sijinhui/chatgpt-next-web:buildcache AS deps WORKDIR /app diff --git a/README.md b/README.md index c9f195771..da1adb6a5 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,8 @@ For enterprise inquiries, please contact: **business@nextchat.dev** - [x] Artifacts: Easily preview, copy and share generated content/webpages through a separate window [#5092](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/5092) - [x] Plugins: support artifacts, network search, calculator, any other apis etc. [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) - [x] artifacts - - [ ] network search, network search, calculator, any other apis etc. [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) + - [ ] network search, calculator, any other apis etc. [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) +- [ ] local knowledge base ## What's New @@ -128,6 +129,7 @@ For enterprise inquiries, please contact: **business@nextchat.dev** - [x] 插件机制,支持 artifacts,联网搜索、计算器、调用其他平台 api [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) - [x] artifacts - [ ] 支持联网搜索、计算器、调用其他平台 api [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) + - [ ] 本地知识库 ## 最新动态 diff --git a/app/components/chat.module.scss b/app/components/chat.module.scss index fa932bc3f..286b9a286 100644 --- a/app/components/chat.module.scss +++ b/app/components/chat.module.scss @@ -356,6 +356,12 @@ display: flex; flex-wrap: nowrap; } + + .chat-model-name { + font-size: 12px; + color: var(--black); + margin-left: 6px; + } } .chat-message-container { diff --git a/app/components/chat.tsx b/app/components/chat.tsx index b508a09d4..183e37c76 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1623,6 +1623,11 @@ function _Chat() { > )} + {!isUser && ( +
+ {props.children}
+ {showToggle && collapsed && (
+
+
+
+ )}
+
+ >
+ );
+}
+
function escapeDollarNumber(text: string) {
let escapedText = "";
@@ -211,6 +251,7 @@ function _MarkDownContent(props: { content: string }) {
]}
components={{
pre: PreCode as any,
+ code: CustomCode as any,
p: (pProps) => ,
a: (aProps) => {
const href = aProps.href || "";
diff --git a/app/config/server.ts b/app/config/server.ts
index 0daaa8c3a..098e4a9aa 100644
--- a/app/config/server.ts
+++ b/app/config/server.ts
@@ -1,5 +1,5 @@
import md5 from "spark-md5";
-import { DEFAULT_MODELS } from "../constant";
+import { DEFAULT_MODELS, DEFAULT_GA_ID } from "../constant";
declare global {
namespace NodeJS {
@@ -219,6 +219,7 @@ export const getServerSideConfig = () => {
cloudflareKVTTL: process.env.CLOUDFLARE_KV_TTL,
gtmId: process.env.GTM_ID,
+ gaId: process.env.GA_ID || DEFAULT_GA_ID,
needCode: ACCESS_CODES.size > 0,
code: process.env.CODE,
diff --git a/app/constant.ts b/app/constant.ts
index c74cdbb22..67d2d410a 100644
--- a/app/constant.ts
+++ b/app/constant.ts
@@ -483,4 +483,5 @@ export const internalAllowedWebDavEndpoints = [
"https://app.koofr.net/dav/Koofr",
];
+export const DEFAULT_GA_ID = "G-89WN60ZK2E";
export const PLUGINS = [{ name: "Stable Diffusion", path: Path.Sd }];
diff --git a/app/layout.tsx b/app/layout.tsx
index 711850236..46f6ca8ba 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -6,7 +6,7 @@ import { getClientConfig } from "./config/client";
import type { Metadata, Viewport } from "next";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { getServerSideConfig } from "./config/server";
-import { GoogleTagManager } from "@next/third-parties/google";
+import { GoogleTagManager, GoogleAnalytics } from "@next/third-parties/google";
const serverConfig = getServerSideConfig();
import { Providers } from "@/app/providers";
// import { Viewport } from "next";
@@ -92,6 +92,11 @@ export default function RootLayout({