Skip to content

Commit 6a30da3

Browse files
committed
Fix default state for tools in the agent settings for the chat sidebar
1 parent 2470eea commit 6a30da3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interface/web/app/components/chatSidebar/chatSidebar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,12 @@ function ChatSidebarInternal({ ...props }: ChatSideBarProps) {
328328
if (agentData) {
329329
setInputTools(agentData.input_tools);
330330
setDisplayInputTools(agentData.input_tools);
331-
if (agentData.input_tools === undefined) {
331+
if (agentData.input_tools === undefined || agentData.input_tools.length === 0) {
332332
setDisplayInputTools(agentConfigurationOptions?.input_tools ? Object.keys(agentConfigurationOptions.input_tools) : []);
333333
}
334334
setOutputModes(agentData.output_modes);
335335
setDisplayOutputModes(agentData.output_modes);
336-
if (agentData.output_modes === undefined) {
336+
if (agentData.output_modes === undefined || agentData.output_modes.length === 0) {
337337
setDisplayOutputModes(agentConfigurationOptions?.output_modes ? Object.keys(agentConfigurationOptions.output_modes) : []);
338338
}
339339

0 commit comments

Comments
 (0)