-
-
Notifications
You must be signed in to change notification settings - Fork 24.4k
feat: add password visibility toggle (eye icon) for all password fields #6399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
859dc5f
35691ae
3320eff
156edee
64c83ec
565796a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -115,7 +115,9 @@ export const utilGetChatMessage = async ({ | |||||||||
| }, | ||||||||||
| order: { | ||||||||||
| createdDate: sortOrder === 'DESC' ? 'DESC' : 'ASC' | ||||||||||
| } | ||||||||||
| }, | ||||||||||
| skip: page > -1 && pageSize > -1 ? page * pageSize : undefined, | ||||||||||
| take: page > -1 && pageSize > -1 ? pageSize : undefined | ||||||||||
|
Comment on lines
+119
to
+120
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pagination logic is inconsistent with the 1-indexed paging used elsewhere in the project (e.g., in
Suggested change
References
|
||||||||||
| }) | ||||||||||
|
|
||||||||||
| return messages | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,14 +59,17 @@ const Agentflows = () => { | |
| setCurrentPage(page) | ||
| setPageLimit(pageLimit) | ||
| localStorage.setItem('agentFlowPageSize', pageLimit) | ||
| refresh(page, pageLimit, agentflowVersion) | ||
| refresh(page, pageLimit, agentflowVersion, search) | ||
| } | ||
|
|
||
| const refresh = (page, limit, nextView) => { | ||
| const refresh = (page, limit, nextView, searchTerm) => { | ||
| const params = { | ||
| page: page || currentPage, | ||
| limit: limit || pageLimit | ||
| } | ||
| if (searchTerm) { | ||
| params.search = searchTerm | ||
| } | ||
| getAllAgentflows.request(nextView === 'v2' ? 'AGENTFLOW' : 'MULTIAGENT', params) | ||
| } | ||
|
|
||
|
|
@@ -84,16 +87,25 @@ const Agentflows = () => { | |
| } | ||
|
|
||
| const onSearchChange = (event) => { | ||
| setSearch(event.target.value) | ||
| const searchValue = event.target.value | ||
| setSearch(searchValue) | ||
| // Reset to page 1 when search changes | ||
| setCurrentPage(1) | ||
| // Debounce API call | ||
| if (window.searchTimeout) clearTimeout(window.searchTimeout) | ||
| window.searchTimeout = setTimeout(() => { | ||
|
Comment on lines
+95
to
+96
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Attaching a timeout ID to the |
||
| refresh(1, pageLimit, agentflowVersion, searchValue) | ||
| }, 300) | ||
| } | ||
|
|
||
| function filterFlows(data) { | ||
| return ( | ||
| data.name.toLowerCase().indexOf(search.toLowerCase()) > -1 || | ||
| (data.category && data.category.toLowerCase().indexOf(search.toLowerCase()) > -1) || | ||
| data.id.toLowerCase().indexOf(search.toLowerCase()) > -1 | ||
| ) | ||
| } | ||
| // Remove client-side filter function - now using server-side search | ||
| // function filterFlows(data) { | ||
| // return ( | ||
| // data.name.toLowerCase().indexOf(search.toLowerCase()) > -1 || | ||
| // (data.category && data.category.toLowerCase().indexOf(search.toLowerCase()) > -1) || | ||
| // data.id.toLowerCase().indexOf(search.toLowerCase()) > -1 | ||
| // ) | ||
| // } | ||
|
Comment on lines
+101
to
+108
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| const addNew = () => { | ||
| if (agentflowVersion === 'v2') { | ||
|
|
@@ -346,7 +358,7 @@ const Agentflows = () => { | |
| <> | ||
| {!view || view === 'card' ? ( | ||
| <Box display='grid' gridTemplateColumns='repeat(3, 1fr)' gap={gridSpacing}> | ||
| {getAllAgentflows.data?.data.filter(filterFlows).map((data, index) => ( | ||
| {getAllAgentflows.data?.data.map((data, index) => ( | ||
| <ItemCard | ||
| key={index} | ||
| onClick={() => goToCanvas(data)} | ||
|
|
@@ -366,7 +378,6 @@ const Agentflows = () => { | |
| icons={icons} | ||
| scheduleStatuses={scheduleStatuses} | ||
| isLoading={isLoading} | ||
| filterFunction={filterFlows} | ||
| updateFlowsApi={getAllAgentflows} | ||
| setError={setError} | ||
| currentPage={currentPage} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In JavaScript,
String.prototype.replace()with a string pattern only replaces the first occurrence. If the prompt template contains multiple instances of the{history}or{session_history}placeholders, only the first one will be substituted. It is recommended to use.replaceAll()to ensure all instances are correctly replaced.References