-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat config and plugin UI/UX rework #3050
Conversation
model_config_name: string; | ||
selectedPresetName: string; | ||
custom_preset_config: SamplingParameters; | ||
custom_presets: Array<{ name: string; config: SamplingParameters }>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be used in the next PR when I implement #3035
|
||
const CHAT_CONFIG_KEY = "CHAT_CONFIG"; | ||
const CHAT_CONFIG_KEY = "CHAT_CONFIG_V2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bump the cache key here
@@ -1,6 +1,6 @@ | |||
{ | |||
"compilerOptions": { | |||
"target": "es5", | |||
"target": "ESNext", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allow to use new feature, Next doesn't use tsconfig to compile code, so there is no runtime change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this big refactor ♥.
Unfortunately, there are so many changes I don't believe I can review and give good feedback, so I will just approve.
Please refrain from doing PRs with 1000 line changes in the future. Probably every item on the list could be done in a different PR.
Ah sorry the big PR, I also plan to separate the plugin UI/UI to a different PR, but the change needs to make it work correctly with the new cache pretty overlap with the UI , so I include it in this PR too. Will try to make the up coming Prs much smaller |
❌ pre-commit failed. |
Also removed outdated `initialChats` since we fetch everything client side now. Desktop: ![image](https://user-images.githubusercontent.com/24505302/236681802-9d41d8bf-c86e-401b-8d75-f871d51b2cf1.png) Mobile: ![image](https://user-images.githubusercontent.com/24505302/236682359-cb799a3f-1771-494e-a83d-8c961b8547ea.png) Currently only enabled in development since some features are still missing. Blocked by #3050
This PR addresses the following fixes and modifications: - Some plugin url-s are with text/json content_type so downloading and parsing fails. This is now fixed with content_type check + using response.text() + json.loads - Some plugins openapi specifications don't have operation-id so tool name becomes "", I now added a fallback to endpoint.path if that is the case. - Some plugins do not have the full openapi spec URL specified in their description, so parsing of it fails. This is now fixed with the detection of such cases and than merging plugins config url + openapi spec path. - If users add a bunch of plugins, there was no height or scrolling inside of a PluginChooser dropdown, this is fixed now. (will leave this out as #3050 already solves this) --------- Co-authored-by: Oliver <olivergestanley@gmail.com>
ChatConfigForm
only to avoid conditional race. Also theChatConfigForm
now have local states, we can't sync the local state if we render 2 form. I think we should apply this to theChatListBase
as wellPluginChoose
UI/UXenabled
plugins to the inference only, so the inference can remove the enabled check.