🔄 refactor(EditPresetDialog): Update Model on Endpoint Change (#2936)

* refactor(EditPresetDialog): dynamically update current editable preset model on endpoint change

* feat: Add null check for models in EditPresetDialog

* chore(AlertDialogPortal): typing

* fix(EditPresetDialog): prevent Unknown endpoint edge case for custom endpoints
This commit is contained in:
Danny Avila 2024-05-31 11:43:14 -04:00 committed by GitHub
parent 248dfb8b5b
commit f9a0166352
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 98 additions and 13 deletions

View file

@ -196,6 +196,7 @@ export type TEditPresetProps = {
title?: string;
};
export type TSetOptions = (options: Record<string, unknown>) => void;
export type TSetOptionsPayload = {
setOption: TSetOption;
setExample: TSetExample;
@ -205,6 +206,7 @@ export type TSetOptionsPayload = {
// getConversation: () => TConversation | TPreset | null;
checkPluginSelection: (value: string) => boolean;
setTools: (newValue: string, remove?: boolean) => void;
setOptions?: TSetOptions;
};
export type TPresetItemProps = {