mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Set chatSidebar prompt, Setting name fields to empty str if value null
TextArea and Input field values cannot be null.
This commit is contained in:
@@ -502,7 +502,7 @@ function ChatSidebarInternal({ ...props }: ChatSideBarProps) {
|
|||||||
<SidebarMenuItem className="list-none">
|
<SidebarMenuItem className="list-none">
|
||||||
<Textarea
|
<Textarea
|
||||||
className="w-full h-32 resize-none hover:resize-y"
|
className="w-full h-32 resize-none hover:resize-y"
|
||||||
value={customPrompt}
|
value={customPrompt || ""}
|
||||||
onChange={(e) => handleCustomPromptChange(e.target.value)}
|
onChange={(e) => handleCustomPromptChange(e.target.value)}
|
||||||
readOnly={!isEditable}
|
readOnly={!isEditable}
|
||||||
disabled={!isEditable} />
|
disabled={!isEditable} />
|
||||||
|
|||||||
@@ -746,7 +746,7 @@ export default function SettingsView() {
|
|||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
onChange={(e) => setName(e.target.value)}
|
onChange={(e) => setName(e.target.value)}
|
||||||
value={name}
|
value={name || ""}
|
||||||
className="w-full border border-gray-300 rounded-lg p-4 py-6"
|
className="w-full border border-gray-300 rounded-lg p-4 py-6"
|
||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user