mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-02 17:08:22 +02:00
Add properly random icons to assistant creation page (#2044)
This commit is contained in:
parent
6d67d472cd
commit
66e4dded91
web/src/app
@ -100,6 +100,14 @@ export function AssistantEditor({
|
||||
"#6FFFFF",
|
||||
];
|
||||
|
||||
// state to persist across formik reformatting
|
||||
const [defautIconColor, _setDeafultIconColor] = useState(
|
||||
colorOptions[Math.floor(Math.random() * colorOptions.length)]
|
||||
);
|
||||
const [defaultIconShape, _setDeafultIconShape] = useState(
|
||||
generateRandomIconShape().encodedGrid
|
||||
);
|
||||
|
||||
const isPaidEnterpriseFeaturesEnabled = usePaidEnterpriseFeaturesEnabled();
|
||||
|
||||
// EE only
|
||||
@ -207,8 +215,8 @@ export function AssistantEditor({
|
||||
existingPersona?.llm_model_version_override ?? null,
|
||||
starter_messages: existingPersona?.starter_messages ?? [],
|
||||
enabled_tools_map: enabledToolsMap,
|
||||
icon_color: existingPersona?.icon_color ?? "#FF6FBF",
|
||||
icon_shape: existingPersona?.icon_shape ?? 123242312,
|
||||
icon_color: existingPersona?.icon_color ?? defautIconColor,
|
||||
icon_shape: existingPersona?.icon_shape ?? defaultIconShape,
|
||||
uploaded_image: null,
|
||||
|
||||
// search_tool_enabled: existingPersona
|
||||
|
@ -77,11 +77,9 @@ const ToggleSwitch = () => {
|
||||
};
|
||||
|
||||
export default function FunctionalWrapper({
|
||||
// children,
|
||||
initiallyToggled,
|
||||
content,
|
||||
}: {
|
||||
// children: React.ReactNode;
|
||||
content: (toggledSidebar: boolean, toggle: () => void) => ReactNode;
|
||||
initiallyToggled: boolean;
|
||||
}) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user