diff --git a/src/components/change-key-form.tsx b/src/components/change-key-form.tsx index 9e6b370f..ac665cc7 100644 --- a/src/components/change-key-form.tsx +++ b/src/components/change-key-form.tsx @@ -142,7 +142,7 @@ export function ChangeKeyForm({ id="currentKey" {...register("currentKey", { required: true, validate: { - databaseId: userKeyValidator + currentKey: userKeyValidator } })} /> diff --git a/src/components/chat.tsx b/src/components/chat.tsx index 86748c64..9430d89a 100644 --- a/src/components/chat.tsx +++ b/src/components/chat.tsx @@ -229,7 +229,9 @@ export function Chat() { - No + { + chatContext.setAgentFinishedDialogOpen(false); + }}>No { chatContext.newChat(); diff --git a/src/contexts/chat-context.tsx b/src/contexts/chat-context.tsx index 91ec8571..317fb17e 100644 --- a/src/contexts/chat-context.tsx +++ b/src/contexts/chat-context.tsx @@ -133,6 +133,7 @@ export type ChatContextType = { sendMessages: (msg: CreateMessagesEnvelope, includeExistingMessagesAsContext?: boolean) => void; autoCheck: (messages: MessageEx[], providerName?: string, modelName?: string) => void; agentFinishedDialogOpen: boolean; + setAgentFinishedDialogOpen: (open: boolean) => void; agentFinishMessage: string; chatOpen: boolean, setChatOpen: (value: boolean) => void; @@ -179,6 +180,7 @@ export const ChatContext = createContext({ sendMessages: (msg: CreateMessagesEnvelope, includeExistingMessagesAsContext: boolean = true) => {}, chatOpen: false, agentFinishedDialogOpen: false, + setAgentFinishedDialogOpen: (open: boolean) => {}, agentFinishMessage: '', setChatOpen: (value: boolean) => {}, isStreaming: false,