added the functionalities to let the user choose whether to overwrite…#3
Open
added the functionalities to let the user choose whether to overwrite…#3
Conversation
… the original editorContent or not and to overwrite that if the user wants overwriting to happen
Weixuanf
commented
May 26, 2025
react/src/Chat.tsx
Outdated
Comment on lines
+284
to
+286
| // model: model.model, | ||
| // provider: model.provider, | ||
| // url: model.url, |
Member
Author
There was a problem hiding this comment.
这里为啥都comment掉了?如果没有这些 发到server没法更换模型请求吧?
Weixuanf
commented
May 26, 2025
| # create new session | ||
| prompt = messages[0].get('content', '') | ||
| await db_service.create_chat_session(session_id, model, provider, (prompt[:200] if isinstance(prompt, str) else '')) | ||
| # data = await request.json() |
Weixuanf
commented
May 26, 2025
| }; | ||
| // const setEditorContentWrapper = (content: string) => { | ||
| // setEditorContent(content); | ||
| // debouncedUpdateFile(content); |
Member
Author
There was a problem hiding this comment.
这个debounceUpdateFile()之后还是得加回来吧 这个是保存到磁盘上的file的
There was a problem hiding this comment.
那个setEditorContentWrapper我放到parent component里面了因为ChatInterface也需要,现在是个prop
d6c5843 to
9a08aa5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… the original editorContent or not and to overwrite that if the user wants overwriting to happen