Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export function DefineConversation(props) {
// set the default path
useEffect(() => {
const index = currentStorageIndex.current;
updateForm('location')(null, storages[index].path);
if (storages[index]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this did fixed the issue, approving it now, but @liweitian can you confirm, why we are checking storages here when "creating dialog"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also @lei9444 please review the design of this component here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess it's because this control is shared between "creating bot" and "creating dialog"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will take this for now but I echo Dong's questions - let's understand this a bit more

updateForm('location')(null, storages[index].path);
}
}, [storages]);

const updateForm = field => (e, newValue) => {
Expand Down