mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-10 03:03:43 +08:00
feat: seperate chat page
This commit is contained in:
10
app/utils.ts
10
app/utils.ts
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user