feat: seperate chat page

This commit is contained in:
butterfly
2024-04-12 10:57:57 +08:00
parent 67acc38a1f
commit 0a8e5d6734
56 changed files with 3868 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import dayjs from "dayjs";
import { showToast } from "./components/ui-lib";
import Locale from "./locales";
import { RequestMessage } from "./client/api";
@@ -295,3 +296,12 @@ export function isVisionModel(model: string) {
return visionKeywords.some((keyword) => model.includes(keyword));
}
export function getTime(dateTime: string) {
const time = dayjs(dateTime);
const now = dayjs();
if (time.isBefore(now, "date")) {
return time.format("MM-DD");
}
return time.format("hh:mm");
}