mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-17 23:43:41 +08:00
Compare commits
4 Commits
74a87c5692
...
Leizhenpen
Author | SHA1 | Date | |
---|---|---|---|
|
c9ef6d58ed | ||
|
11b37c15bd | ||
|
1d0038f17d | ||
|
619fa519c0 |
11
README.md
11
README.md
@@ -40,13 +40,12 @@ English / [简体中文](./README_CN.md)
|
||||
|
||||
</div>
|
||||
|
||||
## 🥳 Cheer for DeepSeek, China's AI star!
|
||||
> Purpose-Built UI for DeepSeek Reasoner Model
|
||||
## 🥳 Cheer for NextChat iOS Version Online!
|
||||
> [ 👉 Click Here Install Now](https://apps.apple.com/us/app/nextchat-ai/id6743085599)
|
||||
|
||||

|
||||
|
||||
|
||||
<img src="https://github.com/user-attachments/assets/f3952210-3af1-4dc0-9b81-40eaa4847d9a"/>
|
||||
|
||||
|
||||
|
||||
## 🫣 NextChat Support MCP !
|
||||
> Before build, please set env ENABLE_MCP=true
|
||||
|
||||
|
@@ -1494,36 +1494,20 @@ function _Chat() {
|
||||
|
||||
// remember unfinished input
|
||||
useEffect(() => {
|
||||
// Define the key for storing unfinished input based on the session ID.
|
||||
// try to load from local storage
|
||||
const key = UNFINISHED_INPUT(session.id);
|
||||
|
||||
// Attempt to load unfinished input from local storage.
|
||||
const mayBeUnfinishedInput = localStorage.getItem(key);
|
||||
if (mayBeUnfinishedInput && userInput.length === 0) {
|
||||
setUserInput(mayBeUnfinishedInput);
|
||||
// Clear the unfinished input from local storage after loading it.
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
|
||||
// Capture the current value of the input reference.
|
||||
const currentInputRef = inputRef.current;
|
||||
|
||||
// This function will be called when the component unmounts or dependencies change.
|
||||
const dom = inputRef.current;
|
||||
return () => {
|
||||
// Save the current input to local storage only if it is not a command.
|
||||
// Use the captured value from the input reference.
|
||||
const currentInputValue = currentInputRef?.value ?? "";
|
||||
// Save the input to local storage only if it's not empty and not a command.
|
||||
if (currentInputValue && !currentInputValue.startsWith(ChatCommandPrefix)) {
|
||||
localStorage.setItem(key, currentInputValue);
|
||||
} else {
|
||||
// If there's no value, ensure we don't create an empty key in local storage.
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
localStorage.setItem(key, dom?.value ?? "");
|
||||
};
|
||||
// The effect should depend on the session ID to ensure it runs when the session changes.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [session.id]);
|
||||
}, []);
|
||||
|
||||
const handlePaste = useCallback(
|
||||
async (event: React.ClipboardEvent<HTMLTextAreaElement>) => {
|
||||
|
@@ -417,6 +417,14 @@ export const KnowledgeCutOffDate: Record<string, string> = {
|
||||
"gpt-4-turbo": "2023-12",
|
||||
"gpt-4-turbo-2024-04-09": "2023-12",
|
||||
"gpt-4-turbo-preview": "2023-12",
|
||||
"gpt-4.1": "2024-06",
|
||||
"gpt-4.1-2025-04-14": "2024-06",
|
||||
"gpt-4.1-mini": "2024-06",
|
||||
"gpt-4.1-mini-2025-04-14": "2024-06",
|
||||
"gpt-4.1-nano": "2024-06",
|
||||
"gpt-4.1-nano-2025-04-14": "2024-06",
|
||||
"gpt-4.5-preview": "2023-10",
|
||||
"gpt-4.5-preview-2025-02-27": "2023-10",
|
||||
"gpt-4o": "2023-10",
|
||||
"gpt-4o-2024-05-13": "2023-10",
|
||||
"gpt-4o-2024-08-06": "2023-10",
|
||||
@@ -458,6 +466,7 @@ export const DEFAULT_TTS_VOICES = [
|
||||
export const VISION_MODEL_REGEXES = [
|
||||
/vision/,
|
||||
/gpt-4o/,
|
||||
/gpt-4\.1/,
|
||||
/claude-3/,
|
||||
/gemini-1\.5/,
|
||||
/gemini-exp/,
|
||||
@@ -485,6 +494,14 @@ const openaiModels = [
|
||||
"gpt-4-32k-0613",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4-turbo-preview",
|
||||
"gpt-4.1",
|
||||
"gpt-4.1-2025-04-14",
|
||||
"gpt-4.1-mini",
|
||||
"gpt-4.1-mini-2025-04-14",
|
||||
"gpt-4.1-nano",
|
||||
"gpt-4.1-nano-2025-04-14",
|
||||
"gpt-4.5-preview",
|
||||
"gpt-4.5-preview-2025-02-27",
|
||||
"gpt-4o",
|
||||
"gpt-4o-2024-05-13",
|
||||
"gpt-4o-2024-08-06",
|
||||
|
Reference in New Issue
Block a user