diff --git a/frontend/app/src/components/chat-engine/edit-option-boolean-form.tsx b/frontend/app/src/components/chat-engine/edit-option-boolean-form.tsx
new file mode 100644
index 00000000..0af4839c
--- /dev/null
+++ b/frontend/app/src/components/chat-engine/edit-option-boolean-form.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import { type ChatEngine, type ChatEngineOptions, updateChatEngine } from '@/api/chat-engines';
+import { EditPropertyForm } from '@/components/chat-engine/edit-property-form';
+import { FormSwitch } from '@/components/form/control-widget';
+import { useRefresh } from '@/components/nextjs/app-router-hooks';
+import { toast } from 'sonner';
+import { z } from 'zod';
+
+type KeyOfType
= keyof { [P in keyof T as T[P] extends Value ? P : never]: any }
+
+export interface EditOptionBooleanFormProps> {
+ property: P;
+ chatEngine: ChatEngine;
+}
+
+const booleanSchema = z.boolean();
+
+export function EditOptionBooleanForm
> ({ property, chatEngine }: EditOptionBooleanFormProps
) {
+ const [refreshing, refresh] = useRefresh();
+
+ return (
+ {
+ const options = { ...chatEngine.engine_options, ...data };
+ await updateChatEngine(chatEngine.id, { engine_options: options });
+ refresh();
+ toast(`ChatEngine's option ${property} successfully updated.`);
+ }}
+ disabled={refreshing}
+ >
+
+
+ );
+}
diff --git a/frontend/app/src/components/chat/conversation-message-groups.tsx b/frontend/app/src/components/chat/conversation-message-groups.tsx
index 82f65417..38b40a48 100644
--- a/frontend/app/src/components/chat/conversation-message-groups.tsx
+++ b/frontend/app/src/components/chat/conversation-message-groups.tsx
@@ -1,4 +1,4 @@
-import { type ChatMessageGroup, useChatPostState, useCurrentChatController } from '@/components/chat/chat-hooks';
+import { type ChatMessageGroup, useChatInfo, useChatPostState, useCurrentChatController } from '@/components/chat/chat-hooks';
import { DebugInfo } from '@/components/chat/debug-info';
import { MessageAnnotationHistory } from '@/components/chat/message-annotation-history';
import { StackVMMessageAnnotationHistory } from '@/components/chat/message-annotation-history-stackvm';
@@ -71,6 +71,7 @@ export function ConversationMessageGroups ({ groups }: { groups: ChatMessageGrou
function ConversationMessageGroup ({ group, isLastGroup }: { group: ChatMessageGroup, isLastGroup: boolean }) {
const enableDebug = /* !!me && */ !process.env.NEXT_PUBLIC_DISABLE_DEBUG_PANEL;
+ const { engine_options } = useChatInfo(useCurrentChatController()) ?? {};
const { params } = useChatPostState(useCurrentChatController());
@@ -107,9 +108,9 @@ function ConversationMessageGroup ({ group, isLastGroup }: { group: ChatMessageG
{group.assistant?.version === 'Legacy' && }
{group.assistant?.version === 'StackVM' && }
-
+ {!engine_options?.hide_sources &&
-
+ }