before_code stringlengths 30 149k | reviewer_comment stringlengths 16 20.6k | after_code stringlengths 30 163k | diff_context stringlengths 0 22.4k | file_path stringlengths 6 155 | comment_line int64 0 26 | language stringclasses 19
values | quality_score float64 0.07 1 | comment_type stringclasses 9
values | comment_length int64 16 20.6k | before_lines int64 2 4.61k | after_lines int64 2 4.4k | is_negative bool 2
classes | pr_title stringlengths 7 140 | pr_number int64 18 61.2k | repo_name stringclasses 29
values | repo_stars int64 321 56k | repo_language stringclasses 14
values | reviewer_username stringclasses 378
values | author_username stringclasses 739
values | user stringlengths 361 200k | assistant stringlengths 16 20.6k | system stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type: 'string',
placeholder: 'documents',
additionalParams: true,
optional: true
},
{
label: 'Top K',
name: 'topK',
description: 'Number of top results to fetch. Default to 4',
... | No issues found. | type: 'string',
placeholder: 'documents',
additionalParams: true,
optional: true
},
{
label: 'Top K',
name: 'topK',
description: 'Number of top results to fetch. Default to 4',
... | @@ -0,0 +1,173 @@
+import { ICommonObject, INode, INodeData, INodeOutputsValue, INodeParams } from '../../../src/Interface'
+import { Embeddings } from 'langchain/embeddings/base'
+import { Document } from 'langchain/document'
+import { DataSourceOptions } from 'typeorm'
+import { TypeORMVectorStore, TypeORMVectorStore... | packages/components/nodes/vectorstores/Postgres_Existing/Postgres_Exisiting.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Add Postgres vector store using pgvector | 782 | FlowiseAI/Flowise | 45,241 | TypeScript | fabiovalencio | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/vectorstores/Postgres_Existing/Postgres_Exisiting.ts
PR Title: Add Postgres vector store using pgvector
BEFORE CODE: type: 'string',
placeholder: 'documents',
additionalParams: true,... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class GoogleMakerSuite implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Google MakerSuite'
this.name = 'googleMakerSuit... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class GoogleMakerSuite implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Google MakerSuite'
this.name = 'googleMakerSuit... | @@ -0,0 +1,26 @@
+import { INodeParams, INodeCredential } from '../src/Interface'
+
+class GoogleMakerSuite implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ description: string
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'Google MakerSuite'
+ ... | packages/components/credentials/GoogleMakerSuite.credential.ts | 0 | TypeScript | 1 | none | 16 | 27 | 27 | true | PaLM API LLM component | 882 | FlowiseAI/Flowise | 45,241 | TypeScript | mdda | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/GoogleMakerSuite.credential.ts
PR Title: PaLM API LLM component
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class GoogleMakerSuite implements INodeCredential {
label: string
name: st... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
type: string
icon: string
category: string
description: string
baseClasses: string[]
credential: INodeParams
inputs: INodeParams[]
constructor() {
this.label = 'Google PaLM Embeddings'
this.name = 'googlePaLMEmbeddings'
this.version = 1.0
this.type = 'Goo... | No issues found. | type: string
icon: string
category: string
description: string
baseClasses: string[]
credential: INodeParams
inputs: INodeParams[]
constructor() {
this.label = 'Google PaLM Embeddings'
this.name = 'googlePaLMEmbeddings'
this.version = 1.0
this.type = 'Goo... | @@ -0,0 +1,65 @@
+import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Interface'
+import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
+import { GooglePaLMEmbeddings, GooglePaLMEmbeddingsParams } from 'langchain/embeddings/googlepalm'
+
+class GooglePaLMEmbed... | packages/components/nodes/embeddings/GooglePaLMEmbedding/GooglePaLMEmbedding.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | PaLM API Chat and Embedding components | 891 | FlowiseAI/Flowise | 45,241 | TypeScript | mdda | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/embeddings/GooglePaLMEmbedding/GooglePaLMEmbedding.ts
PR Title: PaLM API Chat and Embedding components
BEFORE CODE: type: string
icon: string
category: string
description: string
baseClasses: string[]
crede... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class UpstashRedisMemoryApi implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Upstash Redis Memory API'
this.name = 'ups... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class UpstashRedisMemoryApi implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Upstash Redis Memory API'
this.name = 'ups... | @@ -0,0 +1,26 @@
+import { INodeParams, INodeCredential } from '../src/Interface'
+
+class UpstashRedisMemoryApi implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ description: string
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'Upstash Redis Memory A... | packages/components/credentials/UpstashRedisMemoryApi.credential.ts | 0 | TypeScript | 1 | none | 16 | 27 | 27 | true | Added Upstash Redis Memory support | 1,002 | FlowiseAI/Flowise | 45,241 | TypeScript | ayushjain6013 | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/UpstashRedisMemoryApi.credential.ts
PR Title: Added Upstash Redis Memory support
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class UpstashRedisMemoryApi implements INodeCredential {
labe... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
type: 'TextSplitter',
optional: true
},
{
label: 'Metadata',
name: 'metadata',
type: 'json',
optional: true,
additionalParams: true
}
]
this.outputs = [
... | No issues found. | type: 'TextSplitter',
optional: true
},
{
label: 'Metadata',
name: 'metadata',
type: 'json',
optional: true,
additionalParams: true
}
]
this.outputs = [
... | @@ -1,6 +1,8 @@
-import { INode, INodeData, INodeParams } from '../../../src/Interface'
+import { INode, INodeData, INodeOutputsValue, INodeParams } from '../../../src/Interface'
import { TextSplitter } from 'langchain/text_splitter'
import { TextLoader } from 'langchain/document_loaders/fs/text'
+import { Document }... | packages/components/nodes/documentloaders/Text/Text.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Text output for Text File and Plain Text components | 1,029 | FlowiseAI/Flowise | 45,241 | TypeScript | jan-stanek | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/documentloaders/Text/Text.ts
PR Title: Text output for Text File and Plain Text components
BEFORE CODE: type: 'TextSplitter',
optional: true
},
{
label: 'Meta... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { VectorStore } from 'langchain/vectorstores/base'
import { RedisVectorStore, RedisVectorStoreConfig } from 'langchain/vectorstores/redis'
import { escapeAllStrings } from './utils'
class RedisUpsert_VectorStores extends RedisSearchBase implements INode {
constructor() {
super()
this.label =... | No issues found. | import { VectorStore } from 'langchain/vectorstores/base'
import { RedisVectorStore, RedisVectorStoreConfig } from 'langchain/vectorstores/redis'
import { escapeAllStrings } from './utils'
class RedisUpsert_VectorStores extends RedisSearchBase implements INode {
constructor() {
super()
this.label =... | @@ -0,0 +1,61 @@
+import { ICommonObject, INode, INodeData } from '../../../src/Interface'
+import { Embeddings } from 'langchain/embeddings/base'
+import { Document } from 'langchain/document'
+
+import { flatten } from 'lodash'
+import { RedisSearchBase } from './RedisSearchBase'
+import { VectorStore } from 'langcha... | packages/components/nodes/vectorstores/Redis/Redis_Upsert.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Feature/RedisVectorStore | 1,108 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/vectorstores/Redis/Redis_Upsert.ts
PR Title: Feature/RedisVectorStore
BEFORE CODE: import { VectorStore } from 'langchain/vectorstores/base'
import { RedisVectorStore, RedisVectorStoreConfig } from 'langchain/vectorstores/redis'
i... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
if (targetTypes.some((t) => sourceTypes.includes(t))) {
let targetNode = reactFlowInstance.getNode(target)
if (!targetNode) {
if (!reactFlowInstance.getEdges().find((e) => e.targetHandle === targetHandle)) {
return true
}
} else {
const t... | No issues found. |
if (targetTypes.some((t) => sourceTypes.includes(t))) {
let targetNode = reactFlowInstance.getNode(target)
if (!targetNode) {
if (!reactFlowInstance.getEdges().find((e) => e.targetHandle === targetHandle)) {
return true
}
} else {
const t... | @@ -423,10 +423,14 @@ export const removeDuplicateURL = (message) => {
if (!message.sourceDocuments) return newSourceDocuments
message.sourceDocuments.forEach((source) => {
- if (isValidURL(source.metadata.source) && !visitedURLs.includes(source.metadata.source)) {
- visitedURLs.push(sourc... | packages/ui/src/utils/genericHelper.js | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Feature/Add vectara chain | 1,259 | FlowiseAI/Flowise | 45,241 | TypeScript | HenryHengZJ | Review this pull request change.
Language: JavaScript
File: packages/ui/src/utils/genericHelper.js
PR Title: Feature/Add vectara chain
BEFORE CODE:
if (targetTypes.some((t) => sourceTypes.includes(t))) {
let targetNode = reactFlowInstance.getNode(target)
if (!targetNode) {
if (!rea... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
key: new Date().getTime() + Math.random(),
variant: 'error',
persist: true,
action: (key) => (
<Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
<IconX />
... | No issues found. | key: new Date().getTime() + Math.random(),
variant: 'error',
persist: true,
action: (key) => (
<Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
<IconX />
... | @@ -0,0 +1,252 @@
+import { createPortal } from 'react-dom'
+import { useDispatch } from 'react-redux'
+import { useState, useEffect } from 'react'
+import PropTypes from 'prop-types'
+import { enqueueSnackbar as enqueueSnackbarAction, closeSnackbar as closeSnackbarAction, SET_CHATFLOW } from 'store/actions'
+
+// mate... | packages/ui/src/ui-component/dialog/StarterPromptsDialog.js | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | FEATURE/Starter Prompts: Ability to create a set of predefined prompts to initiate the chat dialogue | 1,278 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: JavaScript
File: packages/ui/src/ui-component/dialog/StarterPromptsDialog.js
PR Title: FEATURE/Starter Prompts: Ability to create a set of predefined prompts to initiate the chat dialogue
BEFORE CODE: key: new Date().getTime() + Math.random(),
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { Request, Response, NextFunction } from 'express'
import sanitizeHtml from 'sanitize-html'
export function sanitizeMiddleware(req: Request, res: Response, next: NextFunction): void {
// decoding is necessary as the url is encoded by the browser
const decodedURI = decodeURI(req.url)
req.url = saniti... | No issues found. | import { Request, Response, NextFunction } from 'express'
import sanitizeHtml from 'sanitize-html'
export function sanitizeMiddleware(req: Request, res: Response, next: NextFunction): void {
// decoding is necessary as the url is encoded by the browser
const decodedURI = decodeURI(req.url)
req.url = saniti... | @@ -0,0 +1,13 @@
+import { Request, Response, NextFunction } from 'express'
+import sanitizeHtml from 'sanitize-html'
+
+export function sanitizeMiddleware(req: Request, res: Response, next: NextFunction): void {
+ // decoding is necessary as the url is encoded by the browser
+ const decodedURI = decodeURI(req.ur... | packages/server/src/utils/XSS.ts | 0 | TypeScript | 1 | none | 16 | 14 | 14 | true | Bugfix/xss | 1,327 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: TypeScript
File: packages/server/src/utils/XSS.ts
PR Title: Bugfix/xss
BEFORE CODE: import { Request, Response, NextFunction } from 'express'
import sanitizeHtml from 'sanitize-html'
export function sanitizeMiddleware(req: Request, res: Response, next: NextFunction): void... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['googleGenerativeAI'],
optional: false,
description: 'Google Generative AI credential.'
}
this.inputs = [
{
label: 'M... | No issues found. | label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['googleGenerativeAI'],
optional: false,
description: 'Google Generative AI credential.'
}
this.inputs = [
{
label: 'M... | @@ -0,0 +1,104 @@
+import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Interface'
+import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
+import { GoogleGenerativeAIEmbeddings, GoogleGenerativeAIEmbeddingsParams } from '@langchain/google-genai'
+import { TaskT... | packages/components/nodes/embeddings/GoogleGenerativeAIEmbedding/GoogleGenerativeAIEmbedding.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | FEATURE/Google Gemini - Support for Chat Model, Credential & Embeddings | 1,396 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/embeddings/GoogleGenerativeAIEmbedding/GoogleGenerativeAIEmbedding.ts
PR Title: FEATURE/Google Gemini - Support for Chat Model, Credential & Embeddings
BEFORE CODE: label: 'Connect Credential',
name: 'crede... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
label: string
name: string
version: number
description: string
type: string
icon: string
category: string
baseClasses: string[]
inputs: INodeParams[]
constructor() {
this.label = 'Simple Prompt Moderation'
this.name = 'inputModerationSimple'
this.version ... | No issues found. | label: string
name: string
version: number
description: string
type: string
icon: string
category: string
baseClasses: string[]
inputs: INodeParams[]
constructor() {
this.label = 'Simple Prompt Moderation'
this.name = 'inputModerationSimple'
this.version ... | @@ -2,6 +2,7 @@ import { INode, INodeData, INodeParams } from '../../../src/Interface'
import { getBaseClasses } from '../../../src'
import { Moderation } from '../Moderation'
import { SimplePromptModerationRunner } from './SimplePromptModerationRunner'
+import { BaseChatModel } from 'langchain/chat_models/base'
... | packages/components/nodes/moderation/SimplePromptModeration/SimplePromptModeration.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Feature/LLM Moderation | 1,439 | FlowiseAI/Flowise | 45,241 | TypeScript | HenryHengZJ | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/moderation/SimplePromptModeration/SimplePromptModeration.ts
PR Title: Feature/LLM Moderation
BEFORE CODE: label: string
name: string
version: number
description: string
type: string
icon: string
categor... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class LocalAIApi implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
constructor() {
this.label = 'LocalAI API'
this.name = 'localAIApi'
this.version = 1.0
this... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class LocalAIApi implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
constructor() {
this.label = 'LocalAI API'
this.name = 'localAIApi'
this.version = 1.0
this... | @@ -0,0 +1,23 @@
+import { INodeParams, INodeCredential } from '../src/Interface'
+
+class LocalAIApi implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'LocalAI API'
+ this.name = 'localAIApi'
+ th... | packages/components/credentials/LocalAIApi.credential.ts | 0 | TypeScript | 1 | none | 16 | 24 | 24 | true | FEATURE: LocalAI Credential, Optional LocalAI Auth, Model list env var | 1,495 | FlowiseAI/Flowise | 45,241 | TypeScript | kkacsh321 | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/LocalAIApi.credential.ts
PR Title: FEATURE: LocalAI Credential, Optional LocalAI Auth, Model list env var
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class LocalAIApi implements INodeCredent... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
const handleOpen = () => {
setOpen(true)
}
return (
<>
<NodeCardWrapper
content={false}
sx={{
padding: 0,
borderColor: data.selected ? theme.palette.primary.main : theme.palette.text.secondary,
... | No issues found. | }
const handleOpen = () => {
setOpen(true)
}
return (
<>
<NodeCardWrapper
content={false}
sx={{
padding: 0,
borderColor: data.selected ? theme.palette.primary.main : theme.palette.text.secondary,
... | @@ -0,0 +1,103 @@
+import PropTypes from 'prop-types'
+import { useContext, useState } from 'react'
+import { useSelector } from 'react-redux'
+
+// material-ui
+import { useTheme } from '@mui/material/styles'
+
+// project imports
+import NodeCardWrapper from '../../ui-component/cards/NodeCardWrapper'
+import NodeTool... | packages/ui/src/views/canvas/StickyNote.js | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | FEATURE: Sticky Note node | 1,513 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: JavaScript
File: packages/ui/src/views/canvas/StickyNote.js
PR Title: FEATURE: Sticky Note node
BEFORE CODE: }
const handleOpen = () => {
setOpen(true)
}
return (
<>
<NodeCardWrapper
content={false}
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
{
label: 'Pinecone Metadata Filter',
name: 'pineconeMetadataFilter',
type: 'json',
optional: true,
additionalParams: true
},
{
label: 'Top K',
name: 'topK',
... | No issues found. | {
label: 'Pinecone Metadata Filter',
name: 'pineconeMetadataFilter',
type: 'json',
optional: true,
additionalParams: true
},
{
label: 'Top K',
name: 'topK',
... | @@ -108,8 +108,7 @@ class Pinecone_VectorStores implements INode {
const pineconeEnv = getCredentialParam('pineconeEnv', credentialData, nodeData)
const client = new Pinecone({
- apiKey: pineconeApiKey,
- environment: pineconeEnv
+ apiKey: pinecon... | packages/components/nodes/vectorstores/Pinecone/Pinecone.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | support pinecone serverless indexes | 1,561 | FlowiseAI/Flowise | 45,241 | TypeScript | niztal | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/vectorstores/Pinecone/Pinecone.ts
PR Title: support pinecone serverless indexes
BEFORE CODE: {
label: 'Pinecone Metadata Filter',
name: 'pineconeMetadataFilter',
type: 'j... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
id={inputParam.id}
isValidConnection={(connection) => isValidConnection(connection, reactFlowInstance)}
style={{
height: 10,
width: 10,
... | No issues found. | id={inputParam.id}
isValidConnection={(connection) => isValidConnection(connection, reactFlowInstance)}
style={{
height: 10,
width: 10,
... | @@ -28,14 +28,15 @@ import ToolDialog from 'views/tools/ToolDialog'
import AssistantDialog from 'views/assistants/AssistantDialog'
import ExpandTextDialog from 'ui-component/dialog/ExpandTextDialog'
import FormatPromptValuesDialog from 'ui-component/dialog/FormatPromptValuesDialog'
+import PromptLangsmithHubDialog f... | packages/ui/src/views/canvas/NodeInputHandler.js | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | FEATURE: Select which links should be used in web scraper nodes (cheerio, puppeteer, and playwright) | 1,566 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: JavaScript
File: packages/ui/src/views/canvas/NodeInputHandler.js
PR Title: FEATURE: Select which links should be used in web scraper nodes (cheerio, puppeteer, and playwright)
BEFORE CODE: id={inputParam.id}
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { Request, Response, NextFunction } from 'express'
import sanitizeHtml from 'sanitize-html'
export function sanitizeMiddleware(req: Request, res: Response, next: NextFunction): void {
// decoding is necessary as the url is encoded by the browser
const decodedURI = decodeURI(req.url)
req.url = saniti... | No issues found. | import { Request, Response, NextFunction } from 'express'
import sanitizeHtml from 'sanitize-html'
export function sanitizeMiddleware(req: Request, res: Response, next: NextFunction): void {
// decoding is necessary as the url is encoded by the browser
const decodedURI = decodeURI(req.url)
req.url = saniti... | @@ -18,3 +18,28 @@ export function sanitizeMiddleware(req: Request, res: Response, next: NextFuncti
}
next()
}
+
+export function getAllowedCorsOrigins(): string {
+ // Expects FQDN separated by commas, otherwise nothing or * for all.
+ return process.env.CORS_ORIGINS ?? '*'
+}
+
+export function getCo... | packages/server/src/utils/XSS.ts | 0 | TypeScript | 1 | none | 16 | 46 | 46 | true | Implementing CORS and CSP headers from config | 1,608 | FlowiseAI/Flowise | 45,241 | TypeScript | automaton82 | Review this pull request change.
Language: TypeScript
File: packages/server/src/utils/XSS.ts
PR Title: Implementing CORS and CSP headers from config
BEFORE CODE: import { Request, Response, NextFunction } from 'express'
import sanitizeHtml from 'sanitize-html'
export function sanitizeMiddleware(req: Request, res: ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
options: {
key: new Date().getTime() + Math.random(),
variant: 'error',
persist: true,
action: (key) => (
<Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
... | No issues found. | options: {
key: new Date().getTime() + Math.random(),
variant: 'error',
persist: true,
action: (key) => (
<Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
... | @@ -16,20 +16,31 @@ import {
Stack,
Typography
} from '@mui/material'
-import { IconTrash } from '@tabler/icons'
+import { IconTrash, IconX } from '@tabler/icons'
import PerfectScrollbar from 'react-perfect-scrollbar'
import { BackdropLoader } from 'ui-component/loading/BackdropLoader'
import { StyledBu... | packages/ui/src/ui-component/dialog/ManageScrapedLinksDialog.js | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Fix: relative links method and limit not applying to manage links | 1,687 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: JavaScript
File: packages/ui/src/ui-component/dialog/ManageScrapedLinksDialog.js
PR Title: Fix: relative links method and limit not applying to manage links
BEFORE CODE: options: {
key: new Date().getTime() + Math.random(),
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
name: 'humanPrefix',
type: 'string',
default: 'human',
additionalParams: true
},
{
label: 'Memory Key',
name: 'memoryKey',
type: 'string',
default: 'chat_history',
... | No issues found. | name: 'humanPrefix',
type: 'string',
default: 'human',
additionalParams: true
},
{
label: 'Memory Key',
name: 'memoryKey',
type: 'string',
default: 'chat_history',
... | @@ -17,7 +17,7 @@ class ZepMemory_Memory implements INode {
inputs: INodeParams[]
constructor() {
- this.label = 'Zep Memory'
+ this.label = 'Zep Memory - Open Source'
this.name = 'ZepMemory'
this.version = 2.0
this.type = 'ZepMemory'
@@ -97,11 +97,11 @@ class ZepMem... | packages/components/nodes/memory/ZepMemory/ZepMemory.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Zep cloud setup | 1,760 | FlowiseAI/Flowise | 45,241 | TypeScript | paul-paliychuk | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/memory/ZepMemory/ZepMemory.ts
PR Title: Zep cloud setup
BEFORE CODE: name: 'humanPrefix',
type: 'string',
default: 'human',
additionalParams: true
},
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
onConfirm()
} catch (error) {
const errorData = error.response.data || `${error.response.status}: ${error.response.statusText}`
enqueueSnackbar({
message: `Failed to save Allowed Origins: ${errorData}`,
options: {
... | No issues found. | }
onConfirm()
} catch (error) {
const errorData = error.response.data || `${error.response.status}: ${error.response.statusText}`
enqueueSnackbar({
message: `Failed to save Allowed Origins: ${errorData}`,
options: {
... | @@ -0,0 +1,215 @@
+import { createPortal } from 'react-dom'
+import { useDispatch } from 'react-redux'
+import { useState, useEffect } from 'react'
+import PropTypes from 'prop-types'
+import { enqueueSnackbar as enqueueSnackbarAction, closeSnackbar as closeSnackbarAction, SET_CHATFLOW } from 'store/actions'
+
+// mate... | packages/ui/src/ui-component/dialog/AllowedDomainsDialog.js | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Feature: Allowed domains for chatflows | 1,765 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: JavaScript
File: packages/ui/src/ui-component/dialog/AllowedDomainsDialog.js
PR Title: Feature: Allowed domains for chatflows
BEFORE CODE: }
onConfirm()
} catch (error) {
const errorData = error.response.data || `${error.response... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<string | object> {
const memory = nodeData.inputs?.memory
const chain = prepareChain(nodeData, options, this.sessionId)
const moderations = nodeData.inputs?.inputModeration as Moderation[]
if (moderatio... | No issues found. |
async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<string | object> {
const memory = nodeData.inputs?.memory
const chain = prepareChain(nodeData, options, this.sessionId)
const moderations = nodeData.inputs?.inputModeration as Moderation[]
if (moderatio... | @@ -1,14 +1,30 @@
import { ConversationChain } from 'langchain/chains'
-import { ChatPromptTemplate, HumanMessagePromptTemplate, MessagesPlaceholder, SystemMessagePromptTemplate } from '@langchain/core/prompts'
+import {
+ ChatPromptTemplate,
+ HumanMessagePromptTemplate,
+ MessagesPlaceholder,
+ SystemMes... | packages/components/nodes/chains/ConversationChain/ConversationChain.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Claude 3 - Adding Support for Image Uploads / Multimodal Inputs | 1,898 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/chains/ConversationChain/ConversationChain.ts
PR Title: Claude 3 - Adding Support for Image Uploads / Multimodal Inputs
BEFORE CODE:
async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<string | obje... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class ConfluenceServerDCApi implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Confluence Server/Data Center API'
this.na... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class ConfluenceServerDCApi implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Confluence Server/Data Center API'
this.na... | @@ -0,0 +1,27 @@
+import { INodeParams, INodeCredential } from '../src/Interface'
+
+class ConfluenceServerDCApi implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ description: string
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'Confluence Server/Data... | packages/components/credentials/ConfluenceServerDCApi.credential.ts | 0 | TypeScript | 1 | none | 16 | 28 | 28 | true | Extend Confluence Document Loader to Support Server/Data Center with PAT | 1,998 | FlowiseAI/Flowise | 45,241 | TypeScript | mrkhachaturov | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/ConfluenceServerDCApi.credential.ts
PR Title: Extend Confluence Document Loader to Support Server/Data Center with PAT
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class ConfluenceServerDCApi... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
type: 'BaseChatModel_LlamaIndex'
},
{
label: 'System Message',
name: 'systemMessage',
type: 'string',
rows: 4,
optional: true,
additionalParams: true
}
]
th... | No issues found. | type: 'BaseChatModel_LlamaIndex'
},
{
label: 'System Message',
name: 'systemMessage',
type: 'string',
rows: 4,
optional: true,
additionalParams: true
}
]
th... | @@ -0,0 +1,139 @@
+import { flatten } from 'lodash'
+import { ChatMessage, OpenAI, OpenAIAgent } from 'llamaindex'
+import { getBaseClasses } from '../../../src/utils'
+import { FlowiseMemory, ICommonObject, IMessage, INode, INodeData, INodeParams, IUsedTool } from '../../../src/Interface'
+
+class OpenAIFunctionAgent_... | packages/components/nodes/agents/OpenAIToolAgent/OpenAIToolAgent_LlamaIndex.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Chore/Upgrade llamaindex | 2,017 | FlowiseAI/Flowise | 45,241 | TypeScript | HenryHengZJ | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/agents/OpenAIToolAgent/OpenAIToolAgent_LlamaIndex.ts
PR Title: Chore/Upgrade llamaindex
BEFORE CODE: type: 'BaseChatModel_LlamaIndex'
},
{
label: 'System Message',
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
let variableValue = get(executedNode.data, 'instance')
// Handle path such as `<variableNodeId>.data.instance.key`
if (variableFullPathParts.length > 3) {
let variableObj = null
switch (typeof variableValue) {
... | No issues found. | let variableValue = get(executedNode.data, 'instance')
// Handle path such as `<variableNodeId>.data.instance.key`
if (variableFullPathParts.length > 3) {
let variableObj = null
switch (typeof variableValue) {
... | @@ -41,6 +41,8 @@ import { Assistant } from '../database/entities/Assistant'
import { DataSource } from 'typeorm'
import { CachePool } from '../CachePool'
import { Variable } from '../database/entities/Variable'
+import { InternalFlowiseError } from '../errors/internalFlowiseError'
+import { StatusCodes } from 'http... | packages/server/src/utils/index.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Optimize `getEndingNodes` | 2,133 | FlowiseAI/Flowise | 45,241 | TypeScript | mokeyish | Review this pull request change.
Language: TypeScript
File: packages/server/src/utils/index.ts
PR Title: Optimize `getEndingNodes`
BEFORE CODE: let variableValue = get(executedNode.data, 'instance')
// Handle path such as `<variableNodeId>.data.instance.key`
if (vari... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
{
label: 'Similarity',
name: 'qdrantSimilarity',
description: 'Similarity measure used in Qdrant.',
type: 'options',
default: 'Cosine',
options: [
{
label: 'Cosine',
... | No issues found. | {
label: 'Similarity',
name: 'qdrantSimilarity',
description: 'Similarity measure used in Qdrant.',
type: 'options',
default: 'Cosine',
options: [
{
label: 'Cosine',
... | @@ -26,7 +26,7 @@ class QdrantUpsert_VectorStores implements INode {
constructor() {
this.label = 'Qdrant Upsert Document'
this.name = 'qdrantUpsert'
- this.version = 2.0
+ this.version = 3.0
this.type = 'Qdrant'
this.icon = 'qdrant.png'
this.category = 'V... | packages/components/nodes/vectorstores/Qdrant/Qdrant_Upsert.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Add batchSize parameter to Qdrant_VectorStores and QdrantUpsert_Vecto… | 2,215 | FlowiseAI/Flowise | 45,241 | TypeScript | mrabbah | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/vectorstores/Qdrant/Qdrant_Upsert.ts
PR Title: Add batchSize parameter to Qdrant_VectorStores and QdrantUpsert_Vecto…
BEFORE CODE: {
label: 'Similarity',
name: 'qdrantSimilarity',
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import dotenv from 'dotenv'
export default defineConfig(async ({ mode }) => {
let proxy = undefined
if (mode === 'development') {
const serverPort = parseInt(dotenv.config({ processEnv: {}, path:... | No issues found. | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import dotenv from 'dotenv'
export default defineConfig(async ({ mode }) => {
let proxy = undefined
if (mode === 'development') {
const serverPort = parseInt(dotenv.config({ processEnv: {}, path:... | @@ -3,21 +3,36 @@ import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import dotenv from 'dotenv'
-dotenv.config()
-
-export default defineConfig({
- plugins: [react()],
- resolve: {
- alias: {
- '@': resolve(__dirname, 'src')
+export default defineConfig(async ({ mode })... | packages/ui/vite.config.js | 0 | JavaScript | 1 | none | 16 | 39 | 39 | true | feat(ui): auto proxy backend | 2,238 | FlowiseAI/Flowise | 45,241 | TypeScript | mokeyish | Review this pull request change.
Language: JavaScript
File: packages/ui/vite.config.js
PR Title: feat(ui): auto proxy backend
BEFORE CODE: import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import dotenv from 'dotenv'
export default defineConfig(async ({ mod... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
)
}
if (isFlowReusable()) {
nodeToExecuteData = appServer.chatflowPool.activeChatflows[chatflowid].endingNodeData as INodeData
isStreamValid = isFlowValidForStream(nodes, nodeToExecuteData)
logger.debug(
`[server]: Reuse existing chatflow ... | No issues found. | )
}
if (isFlowReusable()) {
nodeToExecuteData = appServer.chatflowPool.activeChatflows[chatflowid].endingNodeData as INodeData
isStreamValid = isFlowValidForStream(nodes, nodeToExecuteData)
logger.debug(
`[server]: Reuse existing chatflow ... | @@ -78,7 +78,8 @@ export const utilBuildChatflow = async (req: Request, socketIO?: Server, isInter
}
// Run Speech to Text conversion
- if (upload.mime === 'audio/webm' || upload.mime === 'audio/mp4') {
+ if (upload.mime === 'audio/webm' || upload.mime =... | packages/server/src/utils/buildChatflow.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | [FEATURE] Added support for LocalAI Speech To Text configuration | 2,376 | FlowiseAI/Flowise | 45,241 | TypeScript | clates | Review this pull request change.
Language: TypeScript
File: packages/server/src/utils/buildChatflow.ts
PR Title: [FEATURE] Added support for LocalAI Speech To Text configuration
BEFORE CODE: )
}
if (isFlowReusable()) {
nodeToExecuteData = appServer.chatflowPool.activeChatflo... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class OpenSearchUrl implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'OpenSearch'
this.name = 'openSearchUrl'
th... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class OpenSearchUrl implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'OpenSearch'
this.name = 'openSearchUrl'
th... | @@ -0,0 +1,24 @@
+import { INodeParams, INodeCredential } from '../src/Interface'
+
+class OpenSearchUrl implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ description: string
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'OpenSearch'
+ this.name... | packages/components/credentials/OpenSearchUrl.credential.ts | 0 | TypeScript | 1 | none | 16 | 25 | 25 | true | Added Opensearch credential | 2,458 | FlowiseAI/Flowise | 45,241 | TypeScript | patrickreinan | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/OpenSearchUrl.credential.ts
PR Title: Added Opensearch credential
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class OpenSearchUrl implements INodeCredential {
label: string
name: str... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
return fs.readFileSync(fileInStorage)
}
}
/**
* Prepare storage path
*/
export const getStoragePath = (): string => {
return process.env.BLOB_STORAGE_PATH ? path.join(process.env.BLOB_STORAGE_PATH) : path.join(getUserHome(), '.flowise', 'storage')
}
/**
* Get the storage type - local or s3
*/
expo... | No issues found. | return fs.readFileSync(fileInStorage)
}
}
/**
* Prepare storage path
*/
export const getStoragePath = (): string => {
return process.env.BLOB_STORAGE_PATH ? path.join(process.env.BLOB_STORAGE_PATH) : path.join(getUserHome(), '.flowise', 'storage')
}
/**
* Get the storage type - local or s3
*/
expo... | @@ -1,6 +1,13 @@
import path from 'path'
import fs from 'fs'
-import { DeleteObjectsCommand, GetObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from '@aws-sdk/client-s3'
+import {
+ DeleteObjectsCommand,
+ GetObjectCommand,
+ ListObjectsV2Command,
+ PutObjectCommand,
+ S3Client,
+ ... | packages/components/src/storageUtils.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Feature: Support role-based authentication for AWS | 2,470 | FlowiseAI/Flowise | 45,241 | TypeScript | danieldabate | Review this pull request change.
Language: TypeScript
File: packages/components/src/storageUtils.ts
PR Title: Feature: Support role-based authentication for AWS
BEFORE CODE: return fs.readFileSync(fileInStorage)
}
}
/**
* Prepare storage path
*/
export const getStoragePath = (): string => {
retur... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
type: 'string'
},
{
label: 'Top K',
name: 'topK',
description: 'Number of top results to fetch. Default to 4',
placeholder: '4',
type: 'number',
additionalParams: true,
... | No issues found. | type: 'string'
},
{
label: 'Top K',
name: 'topK',
description: 'Number of top results to fetch. Default to 4',
placeholder: '4',
type: 'number',
additionalParams: true,
... | @@ -23,7 +23,7 @@ class OpenSearch_VectorStores implements INode {
constructor() {
this.label = 'OpenSearch'
this.name = 'openSearch'
- this.version = 2.0
+ this.version = 3.0
this.type = 'OpenSearch'
this.icon = 'opensearch.svg'
this.category = 'Vector St... | packages/components/nodes/vectorstores/OpenSearch/OpenSearch.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Improve OpenSearchURL credential storing user and password in separate fields from the URL | 2,549 | FlowiseAI/Flowise | 45,241 | TypeScript | danieldabate | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/vectorstores/OpenSearch/OpenSearch.ts
PR Title: Improve OpenSearchURL credential storing user and password in separate fields from the URL
BEFORE CODE: type: 'string'
},
{
la... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
let headers = {}
if (chatflowApiKey) headers = { Authorization: `Bearer ${chatflowApiKey}` }
let toolInput = ''
if (useQuestionFromChat) {
toolInput = input
} else if (!customInput) {
toolInput = customInput
}
let name = _name || 'chatfl... | No issues found. |
let headers = {}
if (chatflowApiKey) headers = { Authorization: `Bearer ${chatflowApiKey}` }
let toolInput = ''
if (useQuestionFromChat) {
toolInput = input
} else if (!customInput) {
toolInput = customInput
}
let name = _name || 'chatfl... | @@ -22,7 +22,7 @@ class ChatflowTool_Tools implements INode {
constructor() {
this.label = 'Chatflow Tool'
this.name = 'ChatflowTool'
- this.version = 1.0
+ this.version = 2.0
this.type = 'ChatflowTool'
this.icon = 'chatflowTool.svg'
this.category = 'Tools... | packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Bugfix - Add x-forwarded-proto as source for http protocol for base url and add base url field to ChatflowTool | 2,592 | FlowiseAI/Flowise | 45,241 | TypeScript | danieldabate | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts
PR Title: Bugfix - Add x-forwarded-proto as source for http protocol for base url and add base url field to ChatflowTool
BEFORE CODE:
let headers = {}
if (chatflowApiKey) headers... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class FireworksApi implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
constructor() {
this.label = 'Fireworks API'
this.name = 'fireworksApi'
this.version = 1.0
... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class FireworksApi implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
constructor() {
this.label = 'Fireworks API'
this.name = 'fireworksApi'
this.version = 1.0
... | @@ -0,0 +1,23 @@
+import { INodeParams, INodeCredential } from '../src/Interface'
+
+class FireworksApi implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'Fireworks API'
+ this.name = 'fireworksApi'
+ ... | packages/components/credentials/FireworksApi.credential.ts | 0 | TypeScript | 1 | none | 16 | 24 | 24 | true | Fireworks ai chat model | 2,596 | FlowiseAI/Flowise | 45,241 | TypeScript | mingxin0607 | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/FireworksApi.credential.ts
PR Title: Fireworks ai chat model
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class FireworksApi implements INodeCredential {
label: string
name: string
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
)
}
const apikey = await getApiKey(req.params.apikey)
if (!apikey) {
return res.status(401).send('Unauthorized')
}
const apiResponse = await chatflowsService.getChatflowByApiKey(apikey.id, req.query.keyonly)
return res.json(apiResponse)
} catch... | No issues found. | )
}
const apikey = await getApiKey(req.params.apikey)
if (!apikey) {
return res.status(401).send('Unauthorized')
}
const apiResponse = await chatflowsService.getChatflowByApiKey(apikey.id, req.query.keyonly)
return res.json(apiResponse)
} catch... | @@ -1,11 +1,11 @@
-import { Request, Response, NextFunction } from 'express'
-import chatflowsService from '../../services/chatflows'
+import { NextFunction, Request, Response } from 'express'
+import { StatusCodes } from 'http-status-codes'
import { ChatFlow } from '../../database/entities/ChatFlow'
-import { createR... | packages/server/src/controllers/chatflows/index.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Feature/extract import all | 2,796 | FlowiseAI/Flowise | 45,241 | TypeScript | chungyau97 | Review this pull request change.
Language: TypeScript
File: packages/server/src/controllers/chatflows/index.ts
PR Title: Feature/extract import all
BEFORE CODE: )
}
const apikey = await getApiKey(req.params.apikey)
if (!apikey) {
return res.status(401).send('Unauthori... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
type: 'string',
description: 'UID for the index to answer from'
},
{
label: 'Top K',
name: 'K',
type: 'number',
description: 'number of top searches to return as context',
additionalPa... | No issues found. | type: 'string',
description: 'UID for the index to answer from'
},
{
label: 'Top K',
name: 'K',
type: 'number',
description: 'number of top searches to return as context',
additionalPa... | @@ -0,0 +1,174 @@
+import { getCredentialData, getCredentialParam } from '../../../src'
+import { ICommonObject, INode, INodeData, INodeOutputsValue, INodeParams } from '../../../src/Interface'
+import { Meilisearch } from 'meilisearch'
+import { MeilisearchRetriever } from './core'
+import { flatten } from 'lodash'
+i... | packages/components/nodes/vectorstores/Meilisearch/Meilisearch.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Added meilisearch retriever component | 2,824 | FlowiseAI/Flowise | 45,241 | TypeScript | MohamedYasserOaf | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/vectorstores/Meilisearch/Meilisearch.ts
PR Title: Added meilisearch retriever component
BEFORE CODE: type: 'string',
description: 'UID for the index to answer from'
},
{
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
constructor(baseUrl: string, configurationId: string) {
this.baseUrl = baseUrl
this.configurationId = configurationId
}
}
export class NemoClient {
private readonly config: Config
constructor(baseUrl: string, configurationId: string) {
this.config = new ClientConfig(baseUrl, c... | No issues found. |
constructor(baseUrl: string, configurationId: string) {
this.baseUrl = baseUrl
this.configurationId = configurationId
}
}
export class NemoClient {
private readonly config: Config
constructor(baseUrl: string, configurationId: string) {
this.config = new ClientConfig(baseUrl, c... | @@ -0,0 +1,70 @@
+import { AIMessage, BaseMessage, HumanMessage, SystemMessage } from '@langchain/core/messages'
+
+export interface Config {
+ baseUrl: string
+ configurationId: string
+}
+
+export class ClientConfig implements Config {
+ baseUrl: string
+ configurationId: string
+
+ constructor(baseUrl... | packages/components/nodes/chatmodels/ChatNemoGuardrails/NemoClient.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Added NeMo Guardrails Chat component | 3,331 | FlowiseAI/Flowise | 45,241 | TypeScript | patrickreinan | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/chatmodels/ChatNemoGuardrails/NemoClient.ts
PR Title: Added NeMo Guardrails Chat component
BEFORE CODE:
constructor(baseUrl: string, configurationId: string) {
this.baseUrl = baseUrl
this.configurationId = con... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
langWatch: {}
}
if (Object.prototype.hasOwnProperty.call(this.handlers, 'langSmith')) {
if (!parentIds || !Object.keys(parentIds).length) {
const parentRunConfig: RunTreeConfig = {
name,
run_type: 'chain',
... | No issues found. | langWatch: {}
}
if (Object.prototype.hasOwnProperty.call(this.handlers, 'langSmith')) {
if (!parentIds || !Object.keys(parentIds).length) {
const parentRunConfig: RunTreeConfig = {
name,
run_type: 'chain',
... | @@ -243,12 +243,14 @@ class ExtendedLunaryHandler extends LunaryHandler {
databaseEntities: IDatabaseEntity
currentRunId: string | null
thread: any
+ apiMessageId: string
constructor({ flowiseOptions, ...options }: any) {
super(options)
this.appDataSource = flowiseOptions.appD... | packages/components/src/handler.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Lunary: feedback tracking | 3,332 | FlowiseAI/Flowise | 45,241 | TypeScript | vincelwt | Review this pull request change.
Language: TypeScript
File: packages/components/src/handler.ts
PR Title: Lunary: feedback tracking
BEFORE CODE: langWatch: {}
}
if (Object.prototype.hasOwnProperty.call(this.handlers, 'langSmith')) {
if (!parentIds || !Object.keys(parentIds).l... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
constructor(optionsOrLegacyFilePath: UnstructuredLoaderOptions) {
super()
const options = optionsOrLegacyFilePath
this.apiKey = options.apiKey
this.apiUrl = options.apiUrl || this.apiUrl
this.strategy = options.strategy || this.strategy
this.encoding = options.encodi... | No issues found. | constructor(optionsOrLegacyFilePath: UnstructuredLoaderOptions) {
super()
const options = optionsOrLegacyFilePath
this.apiKey = options.apiKey
this.apiUrl = options.apiUrl || this.apiUrl
this.strategy = options.strategy || this.strategy
this.encoding = options.encodi... | @@ -29,9 +29,9 @@ type Element = {
export class UnstructuredLoader extends BaseDocumentLoader {
public filePath: string
- private apiUrl = 'https://api.unstructuredapp.io/general/v0/general'
+ private apiUrl = process.env.UNSTRUCTURED_API_URL || 'https://api.unstructuredapp.io/general/v0/general'
- p... | packages/components/nodes/documentloaders/Unstructured/Unstructured.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | [Usntructured loaders] Make Unstructured API URL optional when environment variable is present | 3,414 | FlowiseAI/Flowise | 45,241 | TypeScript | JJK801 | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/documentloaders/Unstructured/Unstructured.ts
PR Title: [Usntructured loaders] Make Unstructured API URL optional when environment variable is present
BEFORE CODE: constructor(optionsOrLegacyFilePath: UnstructuredLoaderOptions)... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
this.loadHistory()
}
addToHistory(input) {
if (!input.trim()) return
if (this.history[0] !== input) {
this.history.unshift(input)
if (this.history.length > this.maxHistory) {
this.history.pop()
}
}
this.currentIndex = -... | No issues found. | this.loadHistory()
}
addToHistory(input) {
if (!input.trim()) return
if (this.history[0] !== input) {
this.history.unshift(input)
if (this.history.length > this.maxHistory) {
this.history.pop()
}
}
this.currentIndex = -... | @@ -0,0 +1,62 @@
+export class ChatInputHistory {
+ constructor(maxHistory = 10) {
+ this.history = []
+ this.currentIndex = -1
+ this.tempInput = ''
+ this.maxHistory = maxHistory
+ this.loadHistory()
+ }
+
+ addToHistory(input) {
+ if (!input.trim()) return
+ ... | packages/ui/src/views/chatmessage/ChatInputHistory.js | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Add Up and Down arrow functionality to chat messages | 3,440 | FlowiseAI/Flowise | 45,241 | TypeScript | tgmerritt | Review this pull request change.
Language: JavaScript
File: packages/ui/src/views/chatmessage/ChatInputHistory.js
PR Title: Add Up and Down arrow functionality to chat messages
BEFORE CODE: this.loadHistory()
}
addToHistory(input) {
if (!input.trim()) return
if (this.history[0] !== ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
case 'active':
case 'paused':
case 'pending':
case 'queued':
await new Promise((resolve) => setTimeout(resolve, Math.max(checkInterval, 2) * 1000))
break
... | No issues found. | }
case 'active':
case 'paused':
case 'pending':
case 'queued':
await new Promise((resolve) => setTimeout(resolve, Math.max(checkInterval, 2) * 1000))
break
... | @@ -194,19 +194,21 @@ class FirecrawlApp {
interface FirecrawlLoaderParameters {
url: string
apiKey?: string
+ apiUrl?: string
mode?: 'crawl' | 'scrape'
params?: Record<string, unknown>
}
class FireCrawlLoader extends BaseDocumentLoader {
private apiKey: string
+ private apiUrl: stri... | packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | feat: Add Custom Api Url Param for Self-hosted FireCrawl endpoint | 3,480 | FlowiseAI/Flowise | 45,241 | TypeScript | ZacharyQin | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts
PR Title: feat: Add Custom Api Url Param for Self-hosted FireCrawl endpoint
BEFORE CODE: }
case 'active':
case 'paused':
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
llm,
interrupt,
agent: await createAgent(
nodeData,
options,
agentName,
state,
llm,
interrupt,
... | No issues found. | llm,
interrupt,
agent: await createAgent(
nodeData,
options,
agentName,
state,
llm,
interrupt,
... | @@ -19,7 +19,8 @@ import {
IDatabaseEntity,
IUsedTool,
IDocument,
- IStateWithMessages
+ IStateWithMessages,
+ ConversationHistorySelection
} from '../../../src/Interface'
import { ToolCallingAgentOutputParser, AgentExecutor, SOURCE_DOCUMENTS_PREFIX, ARTIFACTS_PREFIX } from '../../../src/agent... | packages/components/nodes/sequentialagents/Agent/Agent.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | feat: Add options to filter conversation history messages used in sequential LLM and Agent nodes | 3,653 | FlowiseAI/Flowise | 45,241 | TypeScript | jeanibarz | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/sequentialagents/Agent/Agent.ts
PR Title: feat: Add options to filter conversation history messages used in sequential LLM and Agent nodes
BEFORE CODE: llm,
interrupt,
ag... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
{
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['groqApi']
},
{
label: 'Language',
name: 'language',
type: 'string',
... | No issues found. | {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['groqApi']
},
{
label: 'Language',
name: 'language',
type: 'string',
... | @@ -17,6 +17,7 @@ import { Dropdown } from '@/ui-component/dropdown/Dropdown'
import openAISVG from '@/assets/images/openai.svg'
import assemblyAIPng from '@/assets/images/assemblyai.png'
import localAiPng from '@/assets/images/localai.png'
+import azureSvg from '@/assets/images/azure_openai.svg'
import groqPng fro... | packages/ui/src/ui-component/extended/SpeechToText.jsx | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Feature/Add Azure Cognitive speech-to-text functionality | 3,718 | FlowiseAI/Flowise | 45,241 | TypeScript | ghondar | Review this pull request change.
Language: JavaScript
File: packages/ui/src/ui-component/extended/SpeechToText.jsx
PR Title: Feature/Add Azure Cognitive speech-to-text functionality
BEFORE CODE: {
label: 'Connect Credential',
name: 'credential',
type: 'cre... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeCredential, INodeParams } from '../src/Interface'
class DeepseekApi implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
constructor() {
this.label = 'DeepseekAI API'
this.name = 'deepseekApi'
this.version = 1.0
... | No issues found. | import { INodeCredential, INodeParams } from '../src/Interface'
class DeepseekApi implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
constructor() {
this.label = 'DeepseekAI API'
this.name = 'deepseekApi'
this.version = 1.0
... | @@ -0,0 +1,23 @@
+import { INodeCredential, INodeParams } from '../src/Interface'
+
+class DeepseekApi implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'DeepseekAI API'
+ this.name = 'deepseekApi'
+ ... | packages/components/credentials/DeepseekApi.credential.ts | 0 | TypeScript | 1 | none | 16 | 24 | 24 | true | Feat/deepseek chat node | 3,732 | FlowiseAI/Flowise | 45,241 | TypeScript | nguyenhung10012003 | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/DeepseekApi.credential.ts
PR Title: Feat/deepseek chat node
BEFORE CODE: import { INodeCredential, INodeParams } from '../src/Interface'
class DeepseekApi implements INodeCredential {
label: string
name: string
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
memoryType,
sessionId,
startDate,
endDate,
messageId,
feedback,
feedbackTypes
}: GetChatMessageParams): Promise<ChatMessage[]> => {
const appServer = getRunningExpressApp()
if (feedback) {
const query = await appServer.AppDataSource.getRepository(ChatMessage).createQueryBuil... | No issues found. | memoryType,
sessionId,
startDate,
endDate,
messageId,
feedback,
feedbackTypes
}: GetChatMessageParams): Promise<ChatMessage[]> => {
const appServer = getRunningExpressApp()
if (feedback) {
const query = await appServer.AppDataSource.getRepository(ChatMessage).createQueryBuil... | @@ -1,9 +1,9 @@
-import { MoreThanOrEqual, LessThanOrEqual } from 'typeorm'
+import { MoreThanOrEqual, LessThanOrEqual, Between } from 'typeorm'
import { ChatMessageRatingType, ChatType } from '../Interface'
import { ChatMessage } from '../database/entities/ChatMessage'
import { ChatMessageFeedback } from '../databa... | packages/server/src/utils/getChatMessage.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Get/Delete ChatMessage based on startDateTime / endDateTime | 3,867 | FlowiseAI/Flowise | 45,241 | TypeScript | ryanhalliday | Review this pull request change.
Language: TypeScript
File: packages/server/src/utils/getChatMessage.ts
PR Title: Get/Delete ChatMessage based on startDateTime / endDateTime
BEFORE CODE: memoryType,
sessionId,
startDate,
endDate,
messageId,
feedback,
feedbackTypes
}: GetChatMessageParams... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
if (response.SecretString) {
const secretObj = JSON.parse(response.SecretString)
decryptedDataStr = JSON.stringify(secretObj)
} else {
throw new Error('Failed to retrieve secret value.')
}
} else {
... | No issues found. | if (response.SecretString) {
const secretObj = JSON.parse(response.SecretString)
decryptedDataStr = JSON.stringify(secretObj)
} else {
throw new Error('Failed to retrieve secret value.')
}
} else {
... | @@ -543,6 +543,15 @@ const getEncryptionKey = async (): Promise<string> => {
return process.env.FLOWISE_SECRETKEY_OVERWRITE
}
try {
+ if (USE_AWS_SECRETS_MANAGER && secretsManagerClient) {
+ const secretId = process.env.SECRETKEY_AWS_NAME || 'FlowiseEncryptionKey'
+ const... | packages/components/src/utils.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Update how credential data is saved in db when using aws secrets manager | 4,271 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: TypeScript
File: packages/components/src/utils.ts
PR Title: Update how credential data is saved in db when using aws secrets manager
BEFORE CODE: if (response.SecretString) {
const secretObj = JSON.parse(response.SecretString)
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
})
dispatch({ type: SET_CHATFLOW, chatflow: saveResp.data })
}
} catch (error) {
enqueueSnackbar({
message: `Failed to save File Upload Configuration: ${
typeof error.response.data === 'object' ? er... | No issues found. | }
})
dispatch({ type: SET_CHATFLOW, chatflow: saveResp.data })
}
} catch (error) {
enqueueSnackbar({
message: `Failed to save File Upload Configuration: ${
typeof error.response.data === 'object' ? er... | @@ -5,7 +5,7 @@ import { enqueueSnackbar as enqueueSnackbarAction, closeSnackbar as closeSnackba
import parser from 'html-react-parser'
// material-ui
-import { Button, Box } from '@mui/material'
+import { Button, Box, Typography } from '@mui/material'
import { IconX, IconBulb } from '@tabler/icons-react'
// Pr... | packages/ui/src/ui-component/extended/FileUpload.jsx | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | changes & fixes for various issues in chatflow config | 4,314 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: JavaScript
File: packages/ui/src/ui-component/extended/FileUpload.jsx
PR Title: changes & fixes for various issues in chatflow config
BEFORE CODE: }
})
dispatch({ type: SET_CHATFLOW, chatflow: saveResp.data })
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
process.env.REDIS_KEEP_ALIVE && !isNaN(parseInt(process.env.REDIS_KEEP_ALIVE, 10))
? parseInt(process.env.REDIS_KEEP_ALIVE, 10)
: undefined // milliseconds
}
})
await redisClie... | No issues found. | process.env.REDIS_KEEP_ALIVE && !isNaN(parseInt(process.env.REDIS_KEEP_ALIVE, 10))
? parseInt(process.env.REDIS_KEEP_ALIVE, 10)
: undefined // milliseconds
}
})
await redisClie... | @@ -147,7 +147,15 @@ class Redis_VectorStores implements INode {
}
try {
- const redisClient = createClient({ url: redisUrl })
+ const redisClient = createClient({
+ url: redisUrl,
+ socket: {
+ keepAl... | packages/components/nodes/vectorstores/Redis/Redis.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Fix: Add keep-alive options to Redis clients to prevent idle timeouts and socket closing. | 4,377 | FlowiseAI/Flowise | 45,241 | TypeScript | Nek-11 | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/vectorstores/Redis/Redis.ts
PR Title: Fix: Add keep-alive options to Redis clients to prevent idle timeouts and socket closing.
BEFORE CODE: process.env.REDIS_KEEP_ALIVE && !isNaN(parseInt(process.env.R... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
- Then, clearly reproduce the last message sent by the assistant to maintain continuity. Make sure the whole message is reproduced.
- Finally, ask the user if they would like to proceed, or provide any feedback on the last assistant message
## Output Format The output should be structured in three parts in text:
- A ... | No issues found. | - Then, clearly reproduce the last message sent by the assistant to maintain continuity. Make sure the whole message is reproduced.
- Finally, ask the user if they would like to proceed, or provide any feedback on the last assistant message
## Output Format The output should be structured in three parts in text:
- A ... | @@ -39,37 +39,45 @@ export const DEFAULT_HUMAN_INPUT_DESCRIPTION_HTML = `<p>Summarize the conversati
</ul>
`
-export const CONDITION_AGENT_SYSTEM_PROMPT = `You are part of a multi-agent system designed to make agent coordination and execution easy. Your task is to analyze the given input and select one matching sce... | packages/components/nodes/agentflow/prompt.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | feat: Add configurable system prompt to Condition Agent | 4,587 | FlowiseAI/Flowise | 45,241 | TypeScript | toi500 | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/agentflow/prompt.ts
PR Title: feat: Add configurable system prompt to Condition Agent
BEFORE CODE: - Then, clearly reproduce the last message sent by the assistant to maintain continuity. Make sure the whole message is reproduced.... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
if (userActiveRole) setSelectedRole(userActiveRole)
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [getAllRolesApi.data])
useEffect(() => {
if (dialogProps.data) {
getAllRolesApi.request(currentUser.activeOrganizationId)
... | No issues found. | if (userActiveRole) setSelectedRole(userActiveRole)
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [getAllRolesApi.data])
useEffect(() => {
if (dialogProps.data) {
getAllRolesApi.request(currentUser.activeOrganizationId)
... | @@ -0,0 +1,211 @@
+import { createPortal } from 'react-dom'
+import PropTypes from 'prop-types'
+import { useState, useEffect } from 'react'
+import { useDispatch, useSelector } from 'react-redux'
+
+// Material
+import {
+ Button,
+ Dialog,
+ DialogActions,
+ DialogContent,
+ DialogTitle,
+ Box,
+ ... | packages/ui/src/views/workspace/EditWorkspaceUserRoleDialog.jsx | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | New Feature: Ability to change role for a workspace user. | 4,616 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: JavaScript
File: packages/ui/src/views/workspace/EditWorkspaceUserRoleDialog.jsx
PR Title: New Feature: Ability to change role for a workspace user.
BEFORE CODE: if (userActiveRole) setSelectedRole(userActiveRole)
}
}
// eslint-d... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class OxylabsApiCredential implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Oxylabs API'
this.name = 'oxylabsApi'
... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class OxylabsApiCredential implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Oxylabs API'
this.name = 'oxylabsApi'
... | @@ -0,0 +1,30 @@
+import { INodeParams, INodeCredential } from '../src/Interface'
+
+class OxylabsApiCredential implements INodeCredential {
+ label: string
+ name: string
+ version: number
+ description: string
+ inputs: INodeParams[]
+
+ constructor() {
+ this.label = 'Oxylabs API'
+ t... | packages/components/credentials/OxylabsApi.credential.ts | 0 | TypeScript | 1 | none | 16 | 31 | 31 | true | Add Oxylabs Document Loader | 4,625 | FlowiseAI/Flowise | 45,241 | TypeScript | oxy-rostyslav | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/OxylabsApi.credential.ts
PR Title: Add Oxylabs Document Loader
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class OxylabsApiCredential implements INodeCredential {
label: string
name:... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { StatusCodes } from 'http-status-codes'
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
import exportImportService from '../../services/export-import'
const exportData = async (req: Request, res: Response, next: NextFunction) => {
try {
const apiResponse = await exportImpor... | No issues found. | import { StatusCodes } from 'http-status-codes'
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
import exportImportService from '../../services/export-import'
const exportData = async (req: Request, res: Response, next: NextFunction) => {
try {
const apiResponse = await exportImpor... | @@ -39,7 +39,7 @@ const importData = async (req: Request, res: Response, next: NextFunction) => {
}
await exportImportService.importData(importData, orgId, workspaceId, subscriptionId)
- return res.json({ message: 'success' })
+ return res.status(StatusCodes.OK).json({ message: 'succes... | packages/server/src/controllers/export-import/index.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Optimize export import | 4,795 | FlowiseAI/Flowise | 45,241 | TypeScript | chungyau97 | Review this pull request change.
Language: TypeScript
File: packages/server/src/controllers/export-import/index.ts
PR Title: Optimize export import
BEFORE CODE: import { StatusCodes } from 'http-status-codes'
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
import exportImportService from '.... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
console.error(e)
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [getAllCustomTemplatesApi.data])
useEffect(() => {
if (getAllCustomTemplatesApi.error && setError) {
setError(getAllCustomTemplatesApi.error)
}
// esli... | No issues found. | console.error(e)
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [getAllCustomTemplatesApi.data])
useEffect(() => {
if (getAllCustomTemplatesApi.error && setError) {
setError(getAllCustomTemplatesApi.error)
}
// esli... | @@ -20,7 +20,11 @@ import {
ToggleButtonGroup,
MenuItem,
Button,
- Tabs
+ Tabs,
+ Autocomplete,
+ TextField,
+ Chip,
+ Tooltip
} from '@mui/material'
import { useTheme } from '@mui/material/styles'
import { IconLayoutGrid, IconList, IconX } from '@tabler/icons-react'
@@ -621,63 +625,... | packages/ui/src/views/marketplaces/index.jsx | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Marketplace page UI/ UX enhancements | 4,819 | FlowiseAI/Flowise | 45,241 | TypeScript | anoopw3bdev | Review this pull request change.
Language: JavaScript
File: packages/ui/src/views/marketplaces/index.jsx
PR Title: Marketplace page UI/ UX enhancements
BEFORE CODE: console.error(e)
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [getAllCustomTemplatesA... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
this.baseClasses = [this.type, ...getBaseClasses(VertexAIEmbeddings)]
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['googleVertexAuth'],
optional: true,
description:
... | No issues found. | this.baseClasses = [this.type, ...getBaseClasses(VertexAIEmbeddings)]
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['googleVertexAuth'],
optional: true,
description:
... | @@ -1,7 +1,7 @@
-import { VertexAIEmbeddings, GoogleVertexAIEmbeddingsInput } from '@langchain/google-vertexai'
+import { GoogleVertexAIEmbeddingsInput, VertexAIEmbeddings } from '@langchain/google-vertexai'
import { ICommonObject, INode, INodeData, INodeOptionsValue, INodeParams } from '../../../src/Interface'
+impor... | packages/components/nodes/embeddings/GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Added region support to chatGoogleVertexAi | 4,839 | FlowiseAI/Flowise | 45,241 | TypeScript | Stono | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/embeddings/GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts
PR Title: Added region support to chatGoogleVertexAi
BEFORE CODE: this.baseClasses = [this.type, ...getBaseClasses(VertexAIEmbeddings)]
this.credential ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { useEffect } from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
import { store } from '@/store'
import { loginSuccess } from '@/store/reducers/authSlice'
import authApi from '@/api/auth'
const SSOSuccess = () => {
const location = useLocation()
const navigate = useNavigate()
... | No issues found. | import { useEffect } from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
import { store } from '@/store'
import { loginSuccess } from '@/store/reducers/authSlice'
import authApi from '@/api/auth'
const SSOSuccess = () => {
const location = useLocation()
const navigate = useNavigate()
... | @@ -2,26 +2,36 @@ import { useEffect } from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
import { store } from '@/store'
import { loginSuccess } from '@/store/reducers/authSlice'
+import authApi from '@/api/auth'
const SSOSuccess = () => {
const location = useLocation()
const navi... | packages/ui/src/views/auth/ssoSuccess.jsx | 0 | JavaScript | 1 | none | 16 | 47 | 47 | true | SSO token caching and retrieval in CachePool | 4,931 | FlowiseAI/Flowise | 45,241 | TypeScript | vinodkiran | Review this pull request change.
Language: JavaScript
File: packages/ui/src/views/auth/ssoSuccess.jsx
PR Title: SSO token caching and retrieval in CachePool
BEFORE CODE: import { useEffect } from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
import { store } from '@/store'
import { loginSucces... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
const getAllChatflowsCount = async (type?: ChatflowType, workspaceId?: string): Promise<number> => {
try {
const appServer = getRunningExpressApp()
if (type) {
const dbResponse = await appServer.AppDataSource.getRepository(ChatFlow).countBy({
type,
...g... | No issues found. | }
const getAllChatflowsCount = async (type?: ChatflowType, workspaceId?: string): Promise<number> => {
try {
const appServer = getRunningExpressApp()
if (type) {
const dbResponse = await appServer.AppDataSource.getRepository(ChatFlow).countBy({
type,
...g... | @@ -339,31 +339,6 @@ const updateChatflow = async (
}
}
-// Get specific chatflow via id (PUBLIC endpoint, used when sharing chatbot link)
-const getSinglePublicChatflow = async (chatflowId: string): Promise<any> => {
- try {
- const appServer = getRunningExpressApp()
- const dbResponse = await... | packages/server/src/services/chatflows/index.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Feature update public-chatflow access control | 4,978 | FlowiseAI/Flowise | 45,241 | TypeScript | chungyau97 | Review this pull request change.
Language: TypeScript
File: packages/server/src/services/chatflows/index.ts
PR Title: Feature update public-chatflow access control
BEFORE CODE: }
const getAllChatflowsCount = async (type?: ChatflowType, workspaceId?: string): Promise<number> => {
try {
const appServer =... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
rows: 4,
description:
'Each document loader comes with a default set of metadata keys that are extracted from the document. You can use this field to omit some of the default metadata keys. The value should be a list of keys, seperated by comma. Use * to omit all meta... | No issues found. | rows: 4,
description:
'Each document loader comes with a default set of metadata keys that are extracted from the document. You can use this field to omit some of the default metadata keys. The value should be a list of keys, seperated by comma. Use * to omit all meta... | @@ -1,10 +1,11 @@
-import { omit } from 'lodash'
-import { ICommonObject, IDocument, INode, INodeData, INodeParams } from '../../../src/Interface'
-import { TextSplitter } from 'langchain/text_splitter'
import { Browser, Page, PuppeteerWebBaseLoader, PuppeteerWebBaseLoaderOptions } from '@langchain/community/document_... | packages/components/nodes/documentloaders/Puppeteer/Puppeteer.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Puppeteer / Playwright web crawler bug fixes/improvements | 4,998 | FlowiseAI/Flowise | 45,241 | TypeScript | Mewyii | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/documentloaders/Puppeteer/Puppeteer.ts
PR Title: Puppeteer / Playwright web crawler bug fixes/improvements
BEFORE CODE: rows: 4,
description:
'Each document loader comes with a d... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
description: 'Optional to override Default set credentials'
},
{
label: 'Available Actions',
name: 'mcpActions',
type: 'asyncMultiOptions',
loadMethod: 'listActions',
refresh: true
}
... | No issues found. | description: 'Optional to override Default set credentials'
},
{
label: 'Available Actions',
name: 'mcpActions',
type: 'asyncMultiOptions',
loadMethod: 'listActions',
refresh: true
}
... | @@ -0,0 +1,147 @@
+import { Tool } from '@langchain/core/tools'
+import { ICommonObject, INode, INodeData, INodeOptionsValue, INodeParams } from '../../../../src/Interface'
+import { getCredentialData, getCredentialParam } from '../../../../src/utils'
+import { MCPToolkit } from '../core'
+import hash from 'object-hash... | packages/components/nodes/tools/MCP/Teradata/TeradataMCP.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Feature - add Teradata MCP server | 5,002 | FlowiseAI/Flowise | 45,241 | TypeScript | vilashjagani | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/tools/MCP/Teradata/TeradataMCP.ts
PR Title: Feature - add Teradata MCP server
BEFORE CODE: description: 'Optional to override Default set credentials'
},
{
label: 'Available ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { MigrationInterface, QueryRunner } from 'typeorm'
import { EnumChatflowType } from '../../entities/ChatFlow'
export class ModifyChatflowType1755066758601 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TABLE "te... | No issues found. | import { MigrationInterface, QueryRunner } from 'typeorm'
import { EnumChatflowType } from '../../entities/ChatFlow'
export class ModifyChatflowType1755066758601 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TABLE "te... | @@ -0,0 +1,40 @@
+import { MigrationInterface, QueryRunner } from 'typeorm'
+import { EnumChatflowType } from '../../entities/ChatFlow'
+
+export class ModifyChatflowType1755066758601 implements MigrationInterface {
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`
+ ... | packages/server/src/database/migrations/sqlite/1755066758601-ModifyChatflowType.ts | 0 | TypeScript | 1 | none | 16 | 41 | 41 | true | Fix chatflow's type null or blank | 5,065 | FlowiseAI/Flowise | 45,241 | TypeScript | chungyau97 | Review this pull request change.
Language: TypeScript
File: packages/server/src/database/migrations/sqlite/1755066758601-ModifyChatflowType.ts
PR Title: Fix chatflow's type null or blank
BEFORE CODE: import { MigrationInterface, QueryRunner } from 'typeorm'
import { EnumChatflowType } from '../../entities/ChatFlow'... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
this.connection = {
host: process.env.REDIS_HOST || 'localhost',
port: parseInt(process.env.REDIS_PORT || '6379'),
username: process.env.REDIS_USERNAME || undefined,
password: process.env.REDIS_PASSWORD || undefined,
tls: tlsOpt... | No issues found. | this.connection = {
host: process.env.REDIS_HOST || 'localhost',
port: parseInt(process.env.REDIS_PORT || '6379'),
username: process.env.REDIS_USERNAME || undefined,
password: process.env.REDIS_PASSWORD || undefined,
tls: tlsOpt... | @@ -12,7 +12,6 @@ import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'
import { Express } from 'express'
import { UsageCacheManager } from '../UsageCacheManager'
import { ExpressAdapter } from '@bull-board/express'
-import logger from '../utils/logger'
const QUEUE_NAME = process.env.QUEUE_NAME || 'flowis... | packages/server/src/queue/QueueManager.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Chore/remove redundant loggers | 5,067 | FlowiseAI/Flowise | 45,241 | TypeScript | HenryHengZJ | Review this pull request change.
Language: TypeScript
File: packages/server/src/queue/QueueManager.ts
PR Title: Chore/remove redundant loggers
BEFORE CODE: this.connection = {
host: process.env.REDIS_HOST || 'localhost',
port: parseInt(process.env.REDIS_PORT || '6379'),
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
jest.mock('@opentelemetry/exporter-trace-otlp-proto', () => {
return {
ProtoOTLPTraceExporter: jest.fn().mockImplementation((args) => {
return { args }
})
}
})
import { OTLPTraceExporter as ProtoOTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'
describe('URL Hand... | No issues found. |
jest.mock('@opentelemetry/exporter-trace-otlp-proto', () => {
return {
ProtoOTLPTraceExporter: jest.fn().mockImplementation((args) => {
return { args }
})
}
})
import { OTLPTraceExporter as ProtoOTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'
describe('URL Hand... | @@ -0,0 +1,51 @@
+import { getPhoenixTracer } from './handler'
+
+jest.mock('@opentelemetry/exporter-trace-otlp-proto', () => {
+ return {
+ ProtoOTLPTraceExporter: jest.fn().mockImplementation((args) => {
+ return { args }
+ })
+ }
+})
+
+import { OTLPTraceExporter as ProtoOTLPTraceExpor... | packages/components/src/handler.test.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | feat: Enable Tracing Support For Self-Hosted & Cloud Phoenix Instance | 5,114 | FlowiseAI/Flowise | 45,241 | TypeScript | ialisaleh | Review this pull request change.
Language: TypeScript
File: packages/components/src/handler.test.ts
PR Title: feat: Enable Tracing Support For Self-Hosted & Cloud Phoenix Instance
BEFORE CODE:
jest.mock('@opentelemetry/exporter-trace-otlp-proto', () => {
return {
ProtoOTLPTraceExporter: jest.fn().mockI... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
protected async stopProcess() {
// Overridden method by child class
}
protected onTerminate() {
return async () => {
try {
// Shut down the app after timeout if it ever stuck removing pools
setTimeout(async () => {
logger.info(... | No issues found. | protected async stopProcess() {
// Overridden method by child class
}
protected onTerminate() {
return async () => {
try {
// Shut down the app after timeout if it ever stuck removing pools
setTimeout(async () => {
logger.info(... | @@ -77,7 +77,8 @@ export abstract class BaseCommand extends Command {
ENABLE_BULLMQ_DASHBOARD: Flags.string(),
CUSTOM_MCP_SECURITY_CHECK: Flags.string(),
CUSTOM_MCP_PROTOCOL: Flags.string(),
- HTTP_DENY_LIST: Flags.string()
+ HTTP_DENY_LIST: Flags.string(),
+ TRUST_PROXY:... | packages/server/src/commands/base.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Add environment variable control for trust proxy setting | 5,226 | FlowiseAI/Flowise | 45,241 | TypeScript | chungyau97 | Review this pull request change.
Language: TypeScript
File: packages/server/src/commands/base.ts
PR Title: Add environment variable control for trust proxy setting
BEFORE CODE: protected async stopProcess() {
// Overridden method by child class
}
protected onTerminate() {
return async (... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { MigrationInterface, QueryRunner } from 'typeorm'
export class AddChatFlowNameIndex1759424903973 implements MigrationInterface {
name = 'AddChatFlowNameIndex1759424903973'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_chatfl... | No issues found. | import { MigrationInterface, QueryRunner } from 'typeorm'
export class AddChatFlowNameIndex1759424903973 implements MigrationInterface {
name = 'AddChatFlowNameIndex1759424903973'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_chatfl... | @@ -0,0 +1,13 @@
+import { MigrationInterface, QueryRunner } from 'typeorm'
+
+export class AddChatFlowNameIndex1759424903973 implements MigrationInterface {
+ name = 'AddChatFlowNameIndex1759424903973'
+
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`CREATE INDEX I... | packages/server/src/database/migrations/postgres/1759424903973-AddChatFlowNameIndex.ts | 0 | TypeScript | 1 | none | 16 | 14 | 14 | true | fix: migration errors for text to speech and chatflow name index | 5,287 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: TypeScript
File: packages/server/src/database/migrations/postgres/1759424903973-AddChatFlowNameIndex.ts
PR Title: fix: migration errors for text to speech and chatflow name index
BEFORE CODE: import { MigrationInterface, QueryRunner } from 'typeorm'
export class AddChatFl... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import express from 'express'
import predictionsController from '../../controllers/predictions'
import { getMulterStorage } from '../../utils'
const router = express.Router()
// NOTE: extractChatflowId function in XSS.ts extracts the chatflow ID from the prediction URL.
// It assumes the URL format is /prediction/{ch... | No issues found. | import express from 'express'
import predictionsController from '../../controllers/predictions'
import { getMulterStorage } from '../../utils'
const router = express.Router()
// NOTE: extractChatflowId function in XSS.ts extracts the chatflow ID from the prediction URL.
// It assumes the URL format is /prediction/{ch... | @@ -4,6 +4,8 @@ import { getMulterStorage } from '../../utils'
const router = express.Router()
+// NOTE: extractChatflowId function in XSS.ts extracts the chatflow ID from the prediction URL.
+// It assumes the URL format is /prediction/{chatflowId}. Make sure to update the function if the URL format changes.
// ... | packages/server/src/routes/predictions/index.ts | 0 | TypeScript | 1 | none | 16 | 18 | 18 | true | Fix: CORS-related issues | 5,310 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: TypeScript
File: packages/server/src/routes/predictions/index.ts
PR Title: Fix: CORS-related issues
BEFORE CODE: import express from 'express'
import predictionsController from '../../controllers/predictions'
import { getMulterStorage } from '../../utils'
const router = e... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { INodeParams, INodeCredential } from '../src/Interface'
class CerebrasAPIAuth implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Cerebras API Key'
this.name = 'cerebrasAIApi'
... | No issues found. | import { INodeParams, INodeCredential } from '../src/Interface'
class CerebrasAPIAuth implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Cerebras API Key'
this.name = 'cerebrasAIApi'
... | @@ -10,13 +10,14 @@ class CerebrasAPIAuth implements INodeCredential {
constructor() {
this.label = 'Cerebras API Key'
this.name = 'cerebrasAIApi'
- this.version = 1.0
+ this.version = 2.0
+ this.description = 'Get your free API key from Cerebras Cloud'
this.inputs =... | packages/components/credentials/CerebrasApi.credential.ts | 0 | TypeScript | 1 | none | 16 | 27 | 27 | true | feat: Enhance ChatCerebras integration (v3.0) | 5,508 | FlowiseAI/Flowise | 45,241 | TypeScript | sebastiand-cerebras | Review this pull request change.
Language: TypeScript
File: packages/components/credentials/CerebrasApi.credential.ts
PR Title: feat: Enhance ChatCerebras integration (v3.0)
BEFORE CODE: import { INodeParams, INodeCredential } from '../src/Interface'
class CerebrasAPIAuth implements INodeCredential {
label: st... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [feedbackTypeFilter])
const agentReasoningArtifacts = (artifacts) => {
const newArtifacts = cloneDeep(artifacts)
for (let i = 0; i < newArtifacts.length; i++) {
const artifact = newArtifacts[i]
if (artifa... | No issues found. | // eslint-disable-next-line react-hooks/exhaustive-deps
}, [feedbackTypeFilter])
const agentReasoningArtifacts = (artifacts) => {
const newArtifacts = cloneDeep(artifacts)
for (let i = 0; i < newArtifacts.length; i++) {
const artifact = newArtifacts[i]
if (artifa... | @@ -57,11 +57,12 @@ import { HIDE_CANVAS_DIALOG, SHOW_CANVAS_DIALOG } from '@/store/actions'
// API
import chatmessageApi from '@/api/chatmessage'
import feedbackApi from '@/api/feedback'
+import exportImportApi from '@/api/exportimport'
import useApi from '@/hooks/useApi'
import useConfirm from '@/hooks/useConfir... | packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Fix: Disclosures | 5,562 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: JavaScript
File: packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx
PR Title: Fix: Disclosures
BEFORE CODE: // eslint-disable-next-line react-hooks/exhaustive-deps
}, [feedbackTypeFilter])
const agentReasoningArtifacts = (artifacts) => {
co... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
/**
* Map MimeType to InputField
* @param {string} mimeType
* @returns {string}
*/
export const mapMimeTypeToInputField = (mimeType: string) => {
switch (mimeType) {
case 'text/plain':
return 'txtFile'
case 'application/pdf':
return 'pdfFile'
case 'application/jso... | No issues found. | /**
* Map MimeType to InputField
* @param {string} mimeType
* @returns {string}
*/
export const mapMimeTypeToInputField = (mimeType: string) => {
switch (mimeType) {
case 'text/plain':
return 'txtFile'
case 'application/pdf':
return 'pdfFile'
case 'application/jso... | @@ -1130,6 +1130,18 @@ export const mapMimeTypeToExt = (mimeType: string) => {
case 'application/jsonl':
case 'text/jsonl':
return 'jsonl'
+ // YAML types
+ case 'application/vnd.yaml':
+ case 'application/x-yaml':
+ case 'text/vnd.yaml':
+ case 'text/x-... | packages/components/src/utils.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Add MIME type and extension validation for file uploads | 5,596 | FlowiseAI/Flowise | 45,241 | TypeScript | jocelynlin-wd | Review this pull request change.
Language: TypeScript
File: packages/components/src/utils.ts
PR Title: Add MIME type and extension validation for file uploads
BEFORE CODE: /**
* Map MimeType to InputField
* @param {string} mimeType
* @returns {string}
*/
export const mapMimeTypeToInputField = (mimeType: string)... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
<span style={{ color: 'rgb(116,66,16)', marginLeft: 10 }}>{inputParam.warning}</span>
</div>
)}
{inputParam.type === 'credential' && (
<CredentialInputHandler
... | No issues found. | <span style={{ color: 'rgb(116,66,16)', marginLeft: 10 }}>{inputParam.warning}</span>
</div>
)}
{inputParam.type === 'credential' && (
<CredentialInputHandler
... | @@ -146,6 +146,9 @@ const DocStoreInputHandler = ({ inputParam, data, disabled = false, onNodeDataCh
onSelect={(newValue) => {
data.credential = newValue
data.inputs[FLOWISE_CREDENTIAL_ID] = newValue // in case da... | packages/ui/src/views/docstore/DocStoreInputHandler.jsx | 0 | JavaScript | 1 | none | 16 | 51 | 51 | true | Add validation for Agentflow generation | 5,607 | FlowiseAI/Flowise | 45,241 | TypeScript | VanRitzOwen | Review this pull request change.
Language: JavaScript
File: packages/ui/src/views/docstore/DocStoreInputHandler.jsx
PR Title: Add validation for Agentflow generation
BEFORE CODE: <span style={{ color: 'rgb(116,66,16)', marginLeft: 10 }}>{inputParam.warning}</span>
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
apiRequestChain: LLMChain
apiDocs: string
headers = {}
inputKey = 'question'
outputKey = 'output'
get inputKeys() {
return [this.inputKey]
}
get outputKeys() {
return [this.outputKey]
}
constructor(fields: APIChainInput) {
super(fields)
thi... | No issues found. |
apiRequestChain: LLMChain
apiDocs: string
headers = {}
inputKey = 'question'
outputKey = 'output'
get inputKeys() {
return [this.inputKey]
}
get outputKeys() {
return [this.outputKey]
}
constructor(fields: APIChainInput) {
super(fields)
thi... | @@ -1,9 +1,9 @@
-import { BaseLanguageModel } from '@langchain/core/language_models/base'
import { CallbackManagerForChainRun } from '@langchain/core/callbacks/manager'
-import { BaseChain, ChainInputs, LLMChain, SerializedAPIChain } from 'langchain/chains'
+import { BaseLanguageModel } from '@langchain/core/language_... | packages/components/nodes/chains/ApiChain/postCore.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Fix: Fix DNS Rebinding/TOCTOU Vulernability | 5,653 | FlowiseAI/Flowise | 45,241 | TypeScript | christopherholland-workday | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/chains/ApiChain/postCore.ts
PR Title: Fix: Fix DNS Rebinding/TOCTOU Vulernability
BEFORE CODE:
apiRequestChain: LLMChain
apiDocs: string
headers = {}
inputKey = 'question'
outputKey = 'output'
get inp... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
const successes = res.filter((r) => r.status === 'fulfilled').map((r) => r.value)
return successes
}
}
export async function MCPTool({
toolkit,
name,
description,
argsSchema
}: {
toolkit: MCPToolkit
name: string
description: string
argsSchema: any
}): Promise<Tool> {... | No issues found. | const successes = res.filter((r) => r.status === 'fulfilled').map((r) => r.value)
return successes
}
}
export async function MCPTool({
toolkit,
name,
description,
argsSchema
}: {
toolkit: MCPToolkit
name: string
description: string
argsSchema: any
}): Promise<Tool> {... | @@ -246,7 +246,7 @@ export const validateCommandInjection = (args: string[]): void => {
}
export const validateEnvironmentVariables = (env: Record<string, any>): void => {
- const dangerousEnvVars = ['PATH', 'LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH']
+ const dangerousEnvVars = ['PATH', 'LD_LIBRARY_PATH', 'DYLD_L... | packages/components/nodes/tools/MCP/core.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Fix Paramater Override Bypass | 5,667 | FlowiseAI/Flowise | 45,241 | TypeScript | christopherholland-workday | Review this pull request change.
Language: TypeScript
File: packages/components/nodes/tools/MCP/core.ts
PR Title: Fix Paramater Override Bypass
BEFORE CODE: const successes = res.filter((r) => r.status === 'fulfilled').map((r) => r.value)
return successes
}
}
export async function MCPTool({
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
'/api/v1/account/reset-password',
'/api/v1/account/basic-auth',
'/api/v1/loginmethod',
'/api/v1/pricing',
'/api/v1/user/test',
'/api/v1/oauth2-credential/callback',
'/api/v1/oauth2-credential/refresh',
'/api/v1/text-to-speech/generate',
'/api/v1/text-to-speech/abort',
AzureSSO.LO... | No issues found. | '/api/v1/account/reset-password',
'/api/v1/account/basic-auth',
'/api/v1/loginmethod',
'/api/v1/pricing',
'/api/v1/user/test',
'/api/v1/oauth2-credential/callback',
'/api/v1/oauth2-credential/refresh',
'/api/v1/text-to-speech/generate',
'/api/v1/text-to-speech/abort',
AzureSSO.LO... | @@ -57,6 +57,7 @@ export const WHITELIST_URLS = [
export const API_KEY_BLACKLIST_URLS = ['/api/v1/nvidia-nim']
export const enum GeneralErrorMessage {
+ FORBIDDEN = 'Forbidden',
UNAUTHORIZED = 'Unauthorized',
UNHANDLED_EDGE_CASE = 'Unhandled Edge Case',
INVALID_PASSWORD = 'Invalid Password', | packages/server/src/utils/constants.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | fix: update loginmethod endpoints | 5,681 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: TypeScript
File: packages/server/src/utils/constants.ts
PR Title: fix: update loginmethod endpoints
BEFORE CODE: '/api/v1/account/reset-password',
'/api/v1/account/basic-auth',
'/api/v1/loginmethod',
'/api/v1/pricing',
'/api/v1/user/test',
'/api/v1/... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
chatHistory,
undefined,
flowConfig,
uploadedFilesContent,
availableVariables,
variableOverrides
)
resolvedInstances.push(resolvedInstanc... | No issues found. | chatHistory,
undefined,
flowConfig,
uploadedFilesContent,
availableVariables,
variableOverrides
)
resolvedInstances.push(resolvedInstanc... | @@ -1661,6 +1661,81 @@ export const generateEncryptKey = (): string => {
return randomBytes(24).toString('base64')
}
+/**
+ * Returns the directory where auth secrets are stored (same as encryption key directory).
+ * Used for file-based storage of TOKEN_HASH_SECRET, EXPRESS_SESSION_SECRET, JWT_*, etc.
+ */
+ex... | packages/server/src/utils/index.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Updates to environment and initialization logic | 5,683 | FlowiseAI/Flowise | 45,241 | TypeScript | 0xi4o | Review this pull request change.
Language: TypeScript
File: packages/server/src/utils/index.ts
PR Title: Updates to environment and initialization logic
BEFORE CODE: chatHistory,
undefined,
flowConfig,
uploadedFilesConte... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
it('removes credential field from node data', () => {
const flowData = makeFlowData([
makeNode({ model: 'gpt-4' }, [{ name: 'model', type: 'string' }], { credential: 'cred-uuid-123' })
])
const result = JSON.parse(sanitizeFlowDataForPublicEndpoint(flowData))
... | No issues found. |
it('removes credential field from node data', () => {
const flowData = makeFlowData([
makeNode({ model: 'gpt-4' }, [{ name: 'model', type: 'string' }], { credential: 'cred-uuid-123' })
])
const result = JSON.parse(sanitizeFlowDataForPublicEndpoint(flowData))
... | @@ -0,0 +1,160 @@
+import { sanitizeFlowDataForPublicEndpoint } from '../../src/utils/sanitizeFlowData'
+
+const makeFlowData = (nodes: object[], edges: object[] = []) => JSON.stringify({ nodes, edges, viewport: { x: 0, y: 0, zoom: 1 } })
+
+const makeNode = (inputs: Record<string, unknown>, inputParams: object[], extr... | packages/server/test/utils/sanitizeFlowData.test.ts | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | Remove flowData from getSinglePublicChatbotConfig response | 5,751 | FlowiseAI/Flowise | 45,241 | TypeScript | christopherholland-workday | Review this pull request change.
Language: TypeScript
File: packages/server/test/utils/sanitizeFlowData.test.ts
PR Title: Remove flowData from getSinglePublicChatbotConfig response
BEFORE CODE:
it('removes credential field from node data', () => {
const flowData = makeFlowData([
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
// Handle generated flow from dialog
const handleFlowGenerated = useCallback(
(generatedNodes: FlowData['nodes'], generatedEdges: FlowData['edges']) => {
setLocalNodes(generatedNodes)
setLocalEdges(generatedEdges)
setDirty(true)
if (onFlowGenerated) {
... | No issues found. | // Handle generated flow from dialog
const handleFlowGenerated = useCallback(
(generatedNodes: FlowData['nodes'], generatedEdges: FlowData['edges']) => {
setLocalNodes(generatedNodes)
setLocalEdges(generatedEdges)
setDirty(true)
if (onFlowGenerated) {
... | @@ -16,6 +16,7 @@ import {
useFlowNodes
} from './features/canvas'
import { GenerateFlowDialog } from './features/generator'
+import { EditNodeDialog } from './features/node-editor'
import { AddNodesDrawer, StyledFab } from './features/node-palette'
import { useAgentflowContext, useConfigContext } from './infr... | packages/agentflow/src/Agentflow.tsx | 0 | TypeScript | 1 | none | 16 | 51 | 51 | true | feat(agentflow): wire functionality to edit nodes | 5,786 | FlowiseAI/Flowise | 45,241 | TypeScript | j-sanaa | Review this pull request change.
Language: TypeScript
File: packages/agentflow/src/Agentflow.tsx
PR Title: feat(agentflow): wire functionality to edit nodes
BEFORE CODE: // Handle generated flow from dialog
const handleFlowGenerated = useCallback(
(generatedNodes: FlowData['nodes'], generatedEdges: ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import genesis as gs
gs.init()
scene = gs.Scene(
show_viewer=True,
viewer_options=gs.options.ViewerOptions(
res=(1280, 960),
camera_pos=(3.5, 0.0, 2.5),
camera_lookat=(0.0, 0.0, 0.5),
camera_fov=40,
max_FPS=60,
),
vis_options=gs.options.VisOptions(
show_... | I think it might be better to have a separate example for specific env rendering. | import genesis as gs
gs.init()
scene = gs.Scene(
show_viewer=True,
viewer_options=gs.options.ViewerOptions(
res=(1280, 960),
camera_pos=(3.5, 0.0, 2.5),
camera_lookat=(0.0, 0.0, 0.5),
camera_fov=40,
max_FPS=60,
),
vis_options=gs.options.VisOptions(
show_... | @@ -18,6 +18,8 @@
show_cameras=False,
plane_reflection=True,
ambient_light=(0.1, 0.1, 0.1),
+ rendered_envs_idx=[10, 11, 12, 13, 14], # render the 11th to 15th environments | examples/tutorials/visualization.py | 21 | Python | 0.286 | suggestion | 82 | 46 | 46 | false | [FEATURE] Modify n_rendered_envs to rendered_envs_idx | 752 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Kashu7100 | lupinjia | Review this pull request change.
Language: Python
File: examples/tutorials/visualization.py
PR Title: [FEATURE] Modify n_rendered_envs to rendered_envs_idx
BEFORE CODE: import genesis as gs
gs.init()
scene = gs.Scene(
show_viewer=True,
viewer_options=gs.options.ViewerOptions(
res=(1280, 960),
... | I think it might be better to have a separate example for specific env rendering. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
pos = tool_entity.pos[self.sim.cur_substep_local].to_numpy()
quat = tool_entity.quat[self.sim.cur_substep_local].to_numpy()
pose = gu.trans_quat_to_T(pos, quat)
self.set_node_pose(self.static_nodes[tool_entity.uid], pose=pose)
def set_reflection_mat(s... | Beware this would trigger a copy since ‘self.rendered_envs_idx’ is not a slice but a list. No sure about the overall performance penalty it induces. | [
[1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, -1.0, height * 2],
[0.0, 0.0, 0.0, 1.0],
],
dtype=np.float32,
)
def on_rigid(self):
if self.sim.rigid_solver.is_active():
# TODO: ... | @@ -285,7 +285,7 @@ def on_rigid(self):
mesh = geom.get_sdf_trimesh()
else:
mesh = geom.get_trimesh()
- geom_T = geoms_T[geom.idx][: self.n_rendered_envs]
+ geom_T = geoms_T[geom.idx][self.rendered_envs_idx] | genesis/vis/rasterizer_context.py | 26 | Python | 0.5 | performance | 148 | 51 | 51 | false | [FEATURE] Modify n_rendered_envs to rendered_envs_idx | 752 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | lupinjia | Review this pull request change.
Language: Python
File: genesis/vis/rasterizer_context.py
PR Title: [FEATURE] Modify n_rendered_envs to rendered_envs_idx
BEFORE CODE: pos = tool_entity.pos[self.sim.cur_substep_local].to_numpy()
quat = tool_entity.quat[self.sim.cur_substep_local].to_n... | Beware this would trigger a copy since ‘self.rendered_envs_idx’ is not a slice but a list. No sure about the overall performance penalty it induces. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
self.link_frame_shown = False
self.camera_frustum_shown = False
self.world_frame_mesh = mu.create_frame(
origin_radius=0.012,
axis_radius=0.005,
axis_length=self.world_frame_size,
head_radius=0.01,
head_length=0.03,
)
... | I don't think the assumption of consecutive `rendered_envs_idx` is good. What we should do instead is to measure the overhead introduced by list indexing and verify it won't add more overhead compared to the current version. | self.world_frame_mesh = mu.create_frame(
origin_radius=0.012,
axis_radius=0.005,
axis_length=self.world_frame_size,
head_radius=0.01,
head_length=0.03,
)
self.link_frame_mesh = trimesh.creation.axis(origin_size=0.03, axis_radius=0.025,... | @@ -64,6 +64,7 @@ def build(self, scene):
if self.rendered_envs_idx is None:
self.rendered_envs_idx = list(range(self.sim._B))
+ self.rendered_envs_idx_slice = slice(self.rendered_envs_idx[0], self.rendered_envs_idx[-1] + 1) | genesis/vis/rasterizer_context.py | 26 | Python | 0.643 | suggestion | 225 | 51 | 51 | false | [FEATURE] Modify n_rendered_envs to rendered_envs_idx | 752 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Kashu7100 | lupinjia | Review this pull request change.
Language: Python
File: genesis/vis/rasterizer_context.py
PR Title: [FEATURE] Modify n_rendered_envs to rendered_envs_idx
BEFORE CODE: self.link_frame_shown = False
self.camera_frustum_shown = False
self.world_frame_mesh = mu.create_frame(
origin_... | I don't think the assumption of consecutive `rendered_envs_idx` is good. What we should do instead is to measure the overhead introduced by list indexing and verify it won't add more overhead compared to the current version. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
MeshLight(
mesh=mesh,
transform=gu.trans_quat_to_T(np.array(pos), np.array(quat)),
surface=gs.surfaces.Plastic(
color=(color[0], color[1], color[2], color[3] if color.shape[0] == 4 else 1.0),
emissive=(
... | I don't think the assumption of consecutive rendered_envs_idx is good. | self.lights.append(
MeshLight(
mesh=mesh,
transform=gu.trans_quat_to_T(np.array(pos), np.array(quat)),
surface=gs.surfaces.Plastic(
color=(color[0], color[1], color[2], color[3] if color.shape[0] == 4 else 1.0),
... | @@ -208,7 +208,8 @@ def build(self, scene):
self.sim = scene.sim
self.visualizer = scene.visualizer
if self.rendered_envs_idx is None:
- self.rendered_envs = list(range(self.sim._B))
+ self.rendered_envs_idx = list(range(self.sim._B))
+ self.rendered_envs_idx_slic... | genesis/vis/raytracer.py | 26 | Python | 0.214 | suggestion | 70 | 51 | 51 | false | [FEATURE] Modify n_rendered_envs to rendered_envs_idx | 752 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Kashu7100 | lupinjia | Review this pull request change.
Language: Python
File: genesis/vis/raytracer.py
PR Title: [FEATURE] Modify n_rendered_envs to rendered_envs_idx
BEFORE CODE: MeshLight(
mesh=mesh,
transform=gu.trans_quat_to_T(np.array(pos), np.array(quat)),
surface=gs.surf... | I don't think the assumption of consecutive rendered_envs_idx is good. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
[
[1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, -1.0, height * 2],
[0.0, 0.0, 0.0, 1.0],
],
dtype=np.float32,
)
def on_rigid(self):
if self.sim.rigid_solver.is_active():
# TODO: ... | should keep `self.rendered_envs_idx` but make sure this won't affect the performance. | def on_rigid(self):
if self.sim.rigid_solver.is_active():
# TODO: support dynamic switching in GUI later
for rigid_entity in self.sim.rigid_solver.entities:
if rigid_entity.surface.vis_mode == "visual":
geoms = rigid_entity.vgeoms
... | @@ -285,7 +286,7 @@ def on_rigid(self):
mesh = geom.get_sdf_trimesh()
else:
mesh = geom.get_trimesh()
- geom_T = geoms_T[geom.idx][self.rendered_envs_idx]
+ geom_T = geoms_T[geom.idx][self.rendered_envs_idx_slic... | genesis/vis/rasterizer_context.py | 26 | Python | 0.571 | performance | 85 | 51 | 51 | false | [FEATURE] Modify n_rendered_envs to rendered_envs_idx | 752 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Kashu7100 | lupinjia | Review this pull request change.
Language: Python
File: genesis/vis/rasterizer_context.py
PR Title: [FEATURE] Modify n_rendered_envs to rendered_envs_idx
BEFORE CODE: [
[1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, -1.0, height * 2],
... | should keep `self.rendered_envs_idx` but make sure this won't affect the performance. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
pyrender.Mesh.from_trimesh(
mesh=mesh,
poses=geom_T,
smooth=geom.surface.smooth if "collision" not in rigid_entity.surface.vis_mode else False,
double_sided=(
... | should keep self.rendered_envs_idx but make sure this won't affect the performance. | )
)
if isinstance(rigid_entity._morph, gs.morphs.Plane):
self.set_reflection_mat(geom_T)
def update_rigid(self, buffer_updates):
if self.sim.rigid_solver.is_active():
for rigid_entity in self.sim.rigid_solve... | @@ -312,7 +313,7 @@ def update_rigid(self, buffer_updates):
geoms_T = self.sim.rigid_solver._geoms_render_T
for geom in geoms:
- geom_T = geoms_T[geom.idx][self.rendered_envs_idx]
+ geom_T = geoms_T[geom.idx][self.rendered_envs_idx_slice] | genesis/vis/rasterizer_context.py | 26 | Python | 0.429 | performance | 83 | 51 | 51 | false | [FEATURE] Modify n_rendered_envs to rendered_envs_idx | 752 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Kashu7100 | lupinjia | Review this pull request change.
Language: Python
File: genesis/vis/rasterizer_context.py
PR Title: [FEATURE] Modify n_rendered_envs to rendered_envs_idx
BEFORE CODE: pyrender.Mesh.from_trimesh(
mesh=mesh,
poses=geom_T,
... | should keep self.rendered_envs_idx but make sure this won't affect the performance. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
self.entities_state[i, b].hibernated = False
self.awake_entities[i, b] = i
ti.loop_config(serialize=self._para_level < gs.PARA_LEVEL.PARTIAL)
for b in range(self._B):
self.n_awake_entities[b] = self.n_entities
def _init_equality_fields(self):... | You should not specify `self._sol_contact_resolve_time` because equality constraints are NOT contact. Just leave this field empty: `_sanitize_sol_params(equalities_sol_params, self._substep_dt)` | for i_d in range(entities_dof_start[i], entities_dof_end[i]):
self.dofs_info[i_d].dof_start = entities_dof_start[i]
if ti.static(self._use_hibernation):
ti.loop_config(serialize=self._para_level < gs.PARA_LEVEL.PARTIAL)
for i, b in ti.ndrange(self.n_e... | @@ -1174,13 +1174,19 @@ def _init_equality_fields(self):
)
if self.n_equalities > 0:
equalities = self.equalities
+
+ equalities_sol_params = np.array([equality.sol_params for equality in equalities], dtype=gs.np_float)
+ equalities_sol_params = _sanitize_sol_params(... | genesis/engine/solvers/rigid/rigid_solver_decomp.py | 26 | Python | 0.571 | security | 194 | 51 | 51 | false | [FEATURE] Add equality joint constraint | 919 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/rigid_solver_decomp.py
PR Title: [FEATURE] Add equality joint constraint
BEFORE CODE: self.entities_state[i, b].hibernated = False
self.awake_entities[i, b] = i
ti.loop_config(serialize=... | You should not specify `self._sol_contact_resolve_time` because equality constraints are NOT contact. Just leave this field empty: `_sanitize_sol_params(equalities_sol_params, self._substep_dt)` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# Add all bodies to this entity
all_infos = list(zip(l_infos, links_j_infos, links_g_infos))
if world_g_info:
# Only take into account the world if it features at least one geometry
all_infos.append((world_l_info, world_j_info, world_g_info))
for l_info, link_j_in... | Missing error for `WELD` equality type | # Add all bodies to this entity
all_infos = list(zip(l_infos, links_j_infos, links_g_infos))
if world_g_info:
# Only take into account the world if it features at least one geometry
all_infos.append((world_l_info, world_j_info, world_g_info))
for l_info, link_j_in... | @@ -351,20 +351,14 @@ def _load_MJCF(self, morph, surface):
for i_e in range(mj.neq):
e_info = mju.parse_equality(mj, i_e, morph.scale, ordered_links_idx)
- if e_info["type"] == gs.EQUALITY_TYPE.CONNECT: # only this type is supported right now | genesis/engine/entities/rigid_entity/rigid_entity.py | 26 | Python | 0.357 | suggestion | 38 | 51 | 51 | false | [FEATURE] Add equality joint constraint | 919 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/entities/rigid_entity/rigid_entity.py
PR Title: [FEATURE] Add equality joint constraint
BEFORE CODE: # Add all bodies to this entity
all_infos = list(zip(l_infos, links_j_infos, links_g_infos))
if world_g_info:
... | Missing error for `WELD` equality type | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
break
actuator_kp, actuator_kv = biasprm[1:3]
gear = mj.actuator_gear[i_a, 0]
j_info["dofs_kp"] = np.tile(-gear * actuator_kp, (n_dofs,))
j_info["dofs_kv"] = np.tile(-gear * actuator_kv, (n_dofs,))
if mj.actuato... | Add comment to explain what you are doing and why this is important. | break
actuator_kp, actuator_kv = biasprm[1:3]
gear = mj.actuator_gear[i_a, 0]
j_info["dofs_kp"] = np.tile(-gear * actuator_kp, (n_dofs,))
j_info["dofs_kv"] = np.tile(-gear * actuator_kv, (n_dofs,))
if mj.actuato... | @@ -209,6 +209,7 @@ def parse_link(mj, i_l, scale):
l_info["invweight"] /= scale**3
for j_info in j_infos:
j_info["pos"] *= scale
+ j_infos = [j_info for j_info in j_infos if j_info["n_dofs"] > 0] | genesis/utils/mjcf.py | 26 | Python | 0.214 | suggestion | 68 | 51 | 51 | false | [FEATURE] Add equality joint constraint | 919 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/utils/mjcf.py
PR Title: [FEATURE] Add equality joint constraint
BEFORE CODE: break
actuator_kp, actuator_kv = biasprm[1:3]
gear = mj.actuator_gear[i_a, 0]
j_info["dofs_kp"] = ... | Add comment to explain what you are doing and why this is important. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
pos=(0.0, 0.0, 0.8),
),
surface=gs.surfaces.Default(
color=(0.5, 0.7, 0.9, 1.0),
),
)
scene.build()
ball.set_dofs_velocity(np.random.rand(ball.n_dofs) * 0.8)
for i in range(1500):
scene.step()
qvel = scene.sim.rigid_solver.dofs_state.vel.to_n... | `assert gs_sim.rigid_solver.n_equalities == 1` would do fine in this case, or `assert (gs_sim.rigid_solver.n_equalities == 1).all()` in case it is a vector. |
if show_viewer:
scene.viewer.stop()
def test_nonconvex_collision(show_viewer):
scene = gs.Scene(show_viewer=show_viewer, show_FPS=False)
tank = scene.add_entity(
gs.morphs.Mesh(
file="meshes/tank.obj",
scale=5.0,
fixed=True,
euler=(90, 0, 0)... | @@ -430,3 +431,20 @@ def test_nonconvex_collision(show_viewer):
if show_viewer:
scene.viewer.stop()
+
+
+@pytest.mark.parametrize("xml_path", ["xml/test_equality.xml"])
+@pytest.mark.parametrize("gs_solver", [gs.constraint_solver.CG])
+@pytest.mark.parametrize("gs_integrator", [gs.integrator.Euler])
+@p... | tests/test_rigid_physics.py | 26 | Python | 0.5 | suggestion | 156 | 35 | 51 | false | [FEATURE] Add equality joint constraint | 919 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: tests/test_rigid_physics.py
PR Title: [FEATURE] Add equality joint constraint
BEFORE CODE: pos=(0.0, 0.0, 0.8),
),
surface=gs.surfaces.Default(
color=(0.5, 0.7, 0.9, 1.0),
),
)
scene.build()
ball.set... | `assert gs_sim.rigid_solver.n_equalities == 1` would do fine in this case, or `assert (gs_sim.rigid_solver.n_equalities == 1).all()` in case it is a vector. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
ball.set_dofs_velocity(np.random.rand(ball.n_dofs) * 0.8)
for i in range(1500):
scene.step()
qvel = scene.sim.rigid_solver.dofs_state.vel.to_numpy()[:, 0]
np.testing.assert_allclose(qvel, 0, atol=0.1)
if show_viewer:
scene.viewer.stop()
@pytest.mark.parametrize("xml_path", ["xml/... | You cannot do better than that in terms of precision ? This is pretty bad. | gs.morphs.Mesh(
file="meshes/tank.obj",
scale=5.0,
fixed=True,
euler=(90, 0, 0),
),
)
ball = scene.add_entity(
gs.morphs.Sphere(
radius=0.05,
pos=(0.0, 0.0, 0.8),
),
surface=gs.surfaces.Default(
... | @@ -430,3 +431,20 @@ def test_nonconvex_collision(show_viewer):
if show_viewer:
scene.viewer.stop()
+
+
+@pytest.mark.parametrize("xml_path", ["xml/test_equality.xml"])
+@pytest.mark.parametrize("gs_solver", [gs.constraint_solver.CG])
+@pytest.mark.parametrize("gs_integrator", [gs.integrator.Euler])
+@p... | tests/test_rigid_physics.py | 26 | Python | 0.286 | suggestion | 74 | 27 | 45 | false | [FEATURE] Add equality joint constraint | 919 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: tests/test_rigid_physics.py
PR Title: [FEATURE] Add equality joint constraint
BEFORE CODE: ball.set_dofs_velocity(np.random.rand(ball.n_dofs) * 0.8)
for i in range(1500):
scene.step()
qvel = scene.sim.rigid_solver.dofs_state.vel.to_numpy()... | You cannot do better than that in terms of precision ? This is pretty bad. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
enable_self_collision : bool, optional
Whether to enable self collision within each entity. Defaults to False.
enable_adjacent_collision : bool, optional
Whether to enable collision between successive parent-child body pairs within each entity. Defaults to False.
disable_constraint: bool, op... | For the next PR, remove the original doc. It is already explaining that one must refer to constraint_resolve_time instead. | enable_self_collision : bool, optional
Whether to enable self collision within each entity. Defaults to False.
enable_adjacent_collision : bool, optional
Whether to enable collision between successive parent-child body pairs within each entity. Defaults to False.
disable_constraint: bool, op... | @@ -163,7 +165,9 @@ class RigidOptions(Options):
sparse_solve : bool, optional
Whether to exploit sparsity in the constraint system. Defaults to False.
contact_resolve_time : float, optional
- Time to resolve a contact. The smaller the value, the more stiff the constraint. Defaults to 0.02. (c... | genesis/options/solvers.py | 26 | Python | 0.429 | suggestion | 122 | 51 | 51 | false | [FEATURE] Add equality joint constraint | 919 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/options/solvers.py
PR Title: [FEATURE] Add equality joint constraint
BEFORE CODE: enable_self_collision : bool, optional
Whether to enable self collision within each entity. Defaults to False.
enable_adjacent_collision : bool, optional
... | For the next PR, remove the original doc. It is already explaining that one must refer to constraint_resolve_time instead. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if show_viewer:
scene.viewer.stop()
@pytest.mark.parametrize("model_name", ["mimic_hinges"])
@pytest.mark.parametrize("gs_solver", [gs.constraint_solver.CG])
@pytest.mark.parametrize("gs_integrator", [gs.integrator.Euler])
@pytest.mark.parametrize("backend", [gs.cpu], indirect=True)
def test_equality_joi... | Just use `gs_sim`. No need to create the whole scene yourself. |
if show_viewer:
scene.viewer.stop()
@pytest.mark.parametrize("model_name", ["mimic_hinges"])
@pytest.mark.parametrize("gs_solver", [gs.constraint_solver.CG])
@pytest.mark.parametrize("gs_integrator", [gs.integrator.Euler])
@pytest.mark.parametrize("backend", [gs.cpu], indirect=True)
def test_equality_joi... | @@ -466,3 +466,41 @@ def test_equality_joint(gs_sim, mj_sim):
# check if the two joints are equal
gs_qpos = gs_sim.rigid_solver.qpos.to_numpy()[:, 0]
np.testing.assert_allclose(gs_qpos[0], gs_qpos[1], atol=1e-9)
+
+
+@pytest.mark.parametrize("backend", [gs.cpu], indirect=True)
+def test_urdf_mimic_panda(... | tests/test_rigid_physics.py | 26 | Python | 0.429 | suggestion | 62 | 51 | 50 | false | [FEATURE] Support mimic joint in URDF | 928 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: tests/test_rigid_physics.py
PR Title: [FEATURE] Support mimic joint in URDF
BEFORE CODE:
if show_viewer:
scene.viewer.stop()
@pytest.mark.parametrize("model_name", ["mimic_hinges"])
@pytest.mark.parametrize("gs_solver", [gs.constraint_solver.CG]... | Just use `gs_sim`. No need to create the whole scene yourself. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
qvel = np.array((1, -0.3))
simulate_and_check_mujoco_consistency(gs_sim, mj_sim, qpos, qvel, num_steps=300, atol=1e-8)
# check if the two joints are equal
gs_qpos = gs_sim.rigid_solver.qpos.to_numpy()[:, 0]
np.testing.assert_allclose(gs_qpos[0], gs_qpos[1], atol=1e-9)
@pytest.mark.parametrize("ba... | Could you check the number of mimic joints ? | qvel = np.array((1, -0.3))
simulate_and_check_mujoco_consistency(gs_sim, mj_sim, qpos, qvel, num_steps=300, atol=1e-8)
# check if the two joints are equal
gs_qpos = gs_sim.rigid_solver.qpos.to_numpy()[:, 0]
np.testing.assert_allclose(gs_qpos[0], gs_qpos[1], atol=1e-9)
@pytest.mark.parametrize("ba... | @@ -466,3 +466,41 @@ def test_equality_joint(gs_sim, mj_sim):
# check if the two joints are equal
gs_qpos = gs_sim.rigid_solver.qpos.to_numpy()[:, 0]
np.testing.assert_allclose(gs_qpos[0], gs_qpos[1], atol=1e-9)
+
+
+@pytest.mark.parametrize("backend", [gs.cpu], indirect=True)
+def test_urdf_mimic_panda(... | tests/test_rigid_physics.py | 26 | Python | 0.143 | question | 44 | 45 | 36 | false | [FEATURE] Support mimic joint in URDF | 928 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: tests/test_rigid_physics.py
PR Title: [FEATURE] Support mimic joint in URDF
BEFORE CODE: qvel = np.array((1, -0.3))
simulate_and_check_mujoco_consistency(gs_sim, mj_sim, qpos, qvel, num_steps=300, atol=1e-8)
# check if the two joints are equal
... | Could you check the number of mimic joints ? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
l_info["inertial_mass"] *= morph.scale**3
if l_info["inertial_i"] is not None:
l_info["inertial_i"] *= morph.scale**5
for g_info in l_info["g_infos"]:
g_info["pos"] *= morph.scale
# TODO: parse friction
g_info["friction"] = gu.default_frictio... | Try keeping all lines shorter than 120 characters. This is unreadable in review. | l_info["inertial_mass"] *= morph.scale**3
if l_info["inertial_i"] is not None:
l_info["inertial_i"] *= morph.scale**5
for g_info in l_info["g_infos"]:
g_info["pos"] *= morph.scale
# TODO: parse friction
g_info["friction"] = gu.default_frictio... | @@ -358,7 +358,42 @@ def parse_urdf(morph, surface):
for j_info in j_infos:
j_info["pos"] *= morph.scale
- return l_infos, j_infos
+ equalities = parse_equality(robot, morph, j_infos)
+
+ return l_infos, j_infos, equalities
+
+
+def parse_equality(robot, morph, j_infos):
+ equalities = []
+
... | genesis/utils/urdf.py | 26 | Python | 0.214 | suggestion | 80 | 51 | 51 | false | [FEATURE] Support mimic joint in URDF | 928 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/utils/urdf.py
PR Title: [FEATURE] Support mimic joint in URDF
BEFORE CODE: l_info["inertial_mass"] *= morph.scale**3
if l_info["inertial_i"] is not None:
l_info["inertial_i"] *= morph.scale**5
for g_info in l_in... | Try keeping all lines shorter than 120 characters. This is unreadable in review. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if ti.static(self.sparse_solve):
for i_c in range(self.n_constraints[i_b]):
jac_n_relevant_dofs = self.jac_n_relevant_dofs[i_c, i_b]
for i_d1_ in range(jac_n_relevant_dofs):
i_d1 = self.jac_relevant_dofs[i_c, i_d1_, i_b]
if ti.a... | The TODO comment indicates that rotational invweight should be used for the orientation part of the constraint. Consider implementing rotational invweight here to ensure consistency with the physics model.
```suggestion
diag = rotational_invweight * (1.0 - imp) / (imp + gs.EPS)
``` | jac_qvel = ti.Vector([0.0, 0.0, 0.0])
for i_d in range(self._solver.n_dofs):
# quat2 = neg(q1)*(jac0-jac1)
# quat3 = neg(q1)*(jac0-jac1)*q0*relpose
jac_diff_r = ti.Vector(
[self.jac[n_con, i_d, i_b], self.jac[n_con + 1, i_d, i_b], self.jac[n_con + 2, i... | @@ -351,10 +350,172 @@ def add_equality_constraints(self):
if self._solver.equality_info[i_e].eq_type == gs.EQUALITY_TYPE.CONNECT:
self._func_equality_connect(i_b, i_e)
elif self._solver.equality_info[i_e].eq_type == gs.EQUALITY_TYPE.WELD:
- pass... | genesis/engine/solvers/rigid/constraint_solver_decomp.py | 26 | Python | 0.857 | suggestion | 294 | 51 | 51 | false | [FEATURE] Add weld constraint | 948 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Copilot | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/constraint_solver_decomp.py
PR Title: [FEATURE] Add weld constraint
BEFORE CODE: if ti.static(self.sparse_solve):
for i_c in range(self.n_constraints[i_b]):
jac_n_relevant_dofs = self.jac_n_relev... | The TODO comment indicates that rotational invweight should be used for the orientation part of the constraint. Consider implementing rotational invweight here to ensure consistency with the physics model.
```suggestion
diag = rotational_invweight * (1.0 - imp) / (imp + gs.EPS)
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import genesis as gs
gs.init(backend=gs.cpu)
scene = gs.Scene(
viewer_options=gs.options.ViewerOptions(
camera_pos=(10, 0, 10),
camera_lookat=(0.0, 0.0, 3),
camera_fov=60,
),
)
franka = scene.add_entity(
gs.morphs.MJCF(
file="xml/four_bar_linkage.xml",
),
)
scene.buil... | Are you sure about this sleep ? I guess it is on purpose to clearly see what happens |
def main_equality_weld():
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--vis", action="store_true", default=False)
args = parser.parse_args()
########################## init ##########################
gs.init(backend=gs.cpu)
scene = gs.Scene(
show_viewer=args.vis,
... | @@ -1,21 +1,55 @@
import genesis as gs
+import argparse
+import time
-gs.init(backend=gs.cpu)
-
-scene = gs.Scene(
- viewer_options=gs.options.ViewerOptions(
- camera_pos=(10, 0, 10),
- camera_lookat=(0.0, 0.0, 3),
- camera_fov=60,
- ),
-)
-
-franka = scene.add_entity(
- gs.morphs.MJCF(... | examples/rigid/closed_loop.py | 22 | Python | 0.214 | suggestion | 84 | 22 | 33 | false | [FEATURE] Add weld constraint | 948 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: examples/rigid/closed_loop.py
PR Title: [FEATURE] Add weld constraint
BEFORE CODE: import genesis as gs
gs.init(backend=gs.cpu)
scene = gs.Scene(
viewer_options=gs.options.ViewerOptions(
camera_pos=(10, 0, 10),
camera_lookat=(0.0, 0.0, 3)... | Are you sure about this sleep ? I guess it is on purpose to clearly see what happens | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
for i in range(100):
scene.step()
# reach
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.65, 0.0, 0.130]),
quat=np.array([0, 1, 0, 0]),
)
franka.control_dofs_position(qpos[:-2], motors_dof)
for i in range(50):
scene.step()
rigid... | There appear to be duplicate calls to 'add_weld_constraint' in the suction branch. Consider removing the redundant call to ensure the constraint is added only once.
```suggestion
``` | for i in range(100):
scene.step()
# reach
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.65, 0.0, 0.130]),
quat=np.array([0, 1, 0, 0]),
)
franka.control_dofs_position(qpos[:-2], motors_dof)
for i in range(50):
scene.step()
rigid... | @@ -454,11 +453,22 @@ def test_inverse_kinematics(show_viewer):
for i in range(50):
scene.step()
+ rigid = scene.sim.rigid_solver
+
# grasp
- franka.control_dofs_position(qpos[:-2], motors_dof)
- franka.control_dofs_force(np.array([-0.5, -0.5]), fingers_dof)
- for i in range(50):
- ... | tests/test_rigid_physics.py | 26 | Python | 0.786 | refactor | 183 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Copilot | YilingQiao | Review this pull request change.
Language: Python
File: tests/test_rigid_physics.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: for i in range(100):
scene.step()
# reach
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.65, 0.0, 0.130]),
quat=np.a... | There appear to be duplicate calls to 'add_weld_constraint' in the suction branch. Consider removing the redundant call to ensure the constraint is added only once.
```suggestion
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import torch
from scipy.spatial.transform import Rotation
import genesis as gs
# ------------------------------------------------------------------------------------
# ------------------------------------- taichi ----------------------------------------
# ---------------------------------------------------------------... | The sign pattern in the computation of the quaternion 'x' component differs from the standard quaternion multiplication formula. Please verify that this change is intentional and consistent with the rest of the system.
```suggestion
x = terms[0, 1] + terms[1, 0] + terms[2, 3] - terms[3, 2]
``` | import torch
from scipy.spatial.transform import Rotation
import genesis as gs
# ------------------------------------------------------------------------------------
# ------------------------------------- taichi ----------------------------------------
# ---------------------------------------------------------------... | @@ -23,7 +23,12 @@ def ti_transform_quat_by_quat(v, u):
@ti.func
def ti_quat_mul(u, v):
- return ti_transform_quat_by_quat(v, u)
+ terms = v.outer_product(u)
+ w = terms[0, 0] - terms[1, 1] - terms[2, 2] - terms[3, 3]
+ x = terms[0, 1] + terms[1, 0] - terms[2, 3] + terms[3, 2] | genesis/utils/geom.py | 26 | Python | 0.857 | suggestion | 298 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | Copilot | YilingQiao | Review this pull request change.
Language: Python
File: genesis/utils/geom.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: import torch
from scipy.spatial.transform import Rotation
import genesis as gs
# ------------------------------------------------------------------------------------
# --------------------... | The sign pattern in the computation of the quaternion 'x' component differs from the standard quaternion multiplication formula. Please verify that this change is intentional and consistent with the rest of the system.
```suggestion
x = terms[0, 1] + terms[1, 0] + terms[2, 3] - terms[3, 2]
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import genesis as gs
import numpy as np
def test_suction_cup():
gs.init()
show_viewer = True
# create and build the scene
scene = gs.Scene(
sim_options=gs.options.SimOptions(
dt=0.01,
),
rigid_options=gs.options.RigidOptions(
box_box_detection=True,
... | Could you use the usual argparse approach with backend and viewer mode ? So that all examples work the same | import genesis as gs
import numpy as np
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--vis", action="store_true", default=False)
parser.add_argument("-c", "--cpu", action="store_true", default=False)
args = parser.parse_args()
########################... | @@ -0,0 +1,129 @@
+import genesis as gs
+import numpy as np
+
+
+def test_suction_cup(): | examples/rigid/suction_cup.py | 5 | Python | 0.429 | question | 107 | 30 | 30 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: examples/rigid/suction_cup.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: import genesis as gs
import numpy as np
def test_suction_cup():
gs.init()
show_viewer = True
# create and build the scene
scene = gs.Scene(
sim_options=gs.... | Could you use the usual argparse approach with backend and viewer mode ? So that all examples work the same | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# lift
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.65, 0.0, 0.28]),
quat=np.array([0, 1, 0, 0]),
)
franka.control_dofs_position(qpos[:-2], motors_dof)
for i in range(50):
scene.step()
# reach
qpos = franka.inverse_kinematics(
... | Usually we do not add test in examples | scene.step()
# add suction / weld constraint
rigid = scene.sim.rigid_solver
link_cube = np.array([cube.get_link("box_baselink").idx], dtype=gs.np_int)
link_franka = np.array([franka.get_link("hand").idx], dtype=gs.np_int)
rigid.add_weld_constraint(link_cube, link_franka)
# lift
qpo... | @@ -0,0 +1,129 @@
+import genesis as gs
+import numpy as np
+
+
+def test_suction_cup():
+ gs.init()
+ show_viewer = True
+ # create and build the scene
+ scene = gs.Scene(
+ sim_options=gs.options.SimOptions(
+ dt=0.01,
+ ),
+ rigid_options=gs.options.RigidOptions(
+ ... | examples/rigid/suction_cup.py | 26 | Python | 0.071 | suggestion | 38 | 36 | 37 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: examples/rigid/suction_cup.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: # lift
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.65, 0.0, 0.28]),
quat=np.array([0, 1, 0, 0]),
)
franka.control_do... | Usually we do not add test in examples | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
franka.control_dofs_position(qpos[:-2], motors_dof)
for i in range(50):
scene.step()
# reach
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.4, 0.2, 0.18]),
quat=np.array([0, 1, 0, 0]),
)
franka.control_dofs_position(qpos[:-2], motors_dof)
... | Same. No need to do this in examples. | rigid.add_weld_constraint(link_cube, link_franka)
# lift
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.65, 0.0, 0.28]),
quat=np.array([0, 1, 0, 0]),
)
franka.control_dofs_position(qpos[:-2], motors_dof)
for i in range(50):
scene.step()
... | @@ -0,0 +1,129 @@
+import genesis as gs
+import numpy as np
+
+
+def test_suction_cup():
+ gs.init()
+ show_viewer = True
+ # create and build the scene
+ scene = gs.Scene(
+ sim_options=gs.options.SimOptions(
+ dt=0.01,
+ ),
+ rigid_options=gs.options.RigidOptions(
+ ... | examples/rigid/suction_cup.py | 26 | Python | 0.071 | suggestion | 37 | 30 | 31 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: examples/rigid/suction_cup.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: franka.control_dofs_position(qpos[:-2], motors_dof)
for i in range(50):
scene.step()
# reach
qpos = franka.inverse_kinematics(
link=end_effector,
... | Same. No need to do this in examples. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import taichi as ti
import genesis as gs
import genesis.utils.geom as gu
@ti.data_oriented
class ConstraintSolver:
def __init__(self, rigid_solver):
self._solver = rigid_solver
self._collider = rigid_solver.collider
self._B = rigid_solver._B
self._para_level = rigid_solver._para_l... | Usually I prefer the keyword `candidate` rather than `potential` which remains me potential energy. | import taichi as ti
import genesis as gs
import genesis.utils.geom as gu
@ti.data_oriented
class ConstraintSolver:
def __init__(self, rigid_solver):
self._solver = rigid_solver
self._collider = rigid_solver.collider
self._B = rigid_solver._B
self._para_level = rigid_solver._para_l... | @@ -24,9 +24,11 @@ def __init__(self, rigid_solver):
self.len_constraints = (
5 * self._collider._max_contact_pairs
+ np.logical_not(np.isinf(self._solver.dofs_info.limit.to_numpy()[:, 0])).sum()
- + self._solver.n_equalities * 6
+ + self._solver.n_equalities_pot... | genesis/engine/solvers/rigid/constraint_solver_decomp.py | 26 | Python | 0.429 | suggestion | 99 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/constraint_solver_decomp.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: import taichi as ti
import genesis as gs
import genesis.utils.geom as gu
@ti.data_oriented
class ConstraintSolver:
def __init__(self, rigid_solver)... | Usually I prefer the keyword `candidate` rather than `potential` which remains me potential energy. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
self._links = self.links
self._joints = self.joints
self._equalities = self.equalities
base_links_idx = {link.idx for link in self.links if link.is_fixed}
for joint in tuple(chain.from_iterable(self.joints)):
if joint.type == gs.JOINT_TYPE.FREE:
base_... | At least, move this on top before the definition of the class, in upper case. | self._links = self.links
self._joints = self.joints
self._equalities = self.equalities
base_links_idx = {link.idx for link in self.links if link.is_fixed}
for joint in tuple(chain.from_iterable(self.joints)):
if joint.type == gs.JOINT_TYPE.FREE:
base_... | @@ -174,7 +174,9 @@ def build(self):
self.n_vfaces_ = max(1, self.n_vfaces)
self.n_vverts_ = max(1, self.n_vverts)
self.n_entities_ = max(1, self.n_entities)
- self.n_equalities_ = max(1, self.n_equalities)
+
+ n_reserved_equality = 8 # TODO: made this a parameter | genesis/engine/solvers/rigid/rigid_solver_decomp.py | 26 | Python | 0.286 | refactor | 77 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/rigid_solver_decomp.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: self._links = self.links
self._joints = self.joints
self._equalities = self.equalities
base_links_idx = {link.idx for link in ... | At least, move this on top before the definition of the class, in upper case. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def set_geom_friction(self, friction, geoms_idx):
self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_friction(self, geoms_idx: ti.i32, friction: ti.f32):
self.geoms_info[geoms_idx].friction = friction
def set_geoms_friction(self, friction, geoms_idx=No... | I think it would be better to refactor `_sanitize_1D_io_variables` to support your use case. Here you are abusing the output tensor, which is not great.
```python
_, link1_idx, envs_idx = self._sanitize_1D_io_variables(
None, link1_idx, self.n_links, envs_idx, idx_name="links_idx", skip_allocation=True, unsafe... | def set_geom_friction(self, friction, geoms_idx):
self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_friction(self, geoms_idx: ti.i32, friction: ti.f32):
self.geoms_info[geoms_idx].friction = friction
def set_geoms_friction(self, friction, geoms_idx=Non... | @@ -4652,6 +4659,87 @@ def _kernel_set_geoms_friction(
for i_g_ in ti.ndrange(geoms_idx.shape[0]):
self.geoms_info[geoms_idx[i_g_]].friction = friction[i_g_]
+ def add_weld_constraint(self, link1_idx, link2_idx, envs_idx=None, *, unsafe=False):
+ link1_idx, link2_idx, envs_idx = self._... | genesis/engine/solvers/rigid/rigid_solver_decomp.py | 26 | Python | 0.857 | security | 489 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/rigid_solver_decomp.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE:
def set_geom_friction(self, friction, geoms_idx):
self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_fri... | I think it would be better to refactor `_sanitize_1D_io_variables` to support your use case. Here you are abusing the output tensor, which is not great.
```python
_, link1_idx, envs_idx = self._sanitize_1D_io_variables(
None, link1_idx, self.n_links, envs_idx, idx_name="links_idx", skip_allocation=True, unsafe... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def _kernel_set_geoms_friction(
self,
friction: ti.types.ndarray(),
geoms_idx: ti.types.ndarray(),
):
ti.loop_config(serialize=self._para_level < gs.PARA_LEVEL.PARTIAL)
for i_g_ in ti.ndrange(geoms_idx.shape[0]):
self.geoms_info[geoms_idx[i_g_]].friction = fri... | Add a "warning" print if exceeding the max number of dynamic constraints. | self,
friction: ti.types.ndarray(),
geoms_idx: ti.types.ndarray(),
):
ti.loop_config(serialize=self._para_level < gs.PARA_LEVEL.PARTIAL)
for i_g_ in ti.ndrange(geoms_idx.shape[0]):
self.geoms_info[geoms_idx[i_g_]].friction = friction[i_g_]
def add_weld_constr... | @@ -4652,6 +4659,87 @@ def _kernel_set_geoms_friction(
for i_g_ in ti.ndrange(geoms_idx.shape[0]):
self.geoms_info[geoms_idx[i_g_]].friction = friction[i_g_]
+ def add_weld_constraint(self, link1_idx, link2_idx, envs_idx=None, *, unsafe=False):
+ link1_idx, link2_idx, envs_idx = self._... | genesis/engine/solvers/rigid/rigid_solver_decomp.py | 26 | Python | 0.214 | suggestion | 73 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/rigid_solver_decomp.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: def _kernel_set_geoms_friction(
self,
friction: ti.types.ndarray(),
geoms_idx: ti.types.ndarray(),
):
ti.loop_config(se... | Add a "warning" print if exceeding the max number of dynamic constraints. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_friction(self, geoms_idx: ti.i32, friction: ti.f32):
self.geoms_info[geoms_idx].friction = friction
def set_geoms_friction(self, friction, geoms_idx=None, *, unsafe=False):
friction, geoms_idx, _ = ... | missing `skip_allocation=True` | self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_friction(self, geoms_idx: ti.i32, friction: ti.f32):
self.geoms_info[geoms_idx].friction = friction
def set_geoms_friction(self, friction, geoms_idx=None, *, unsafe=False):
friction, geoms_idx, _ = ... | @@ -4652,6 +4658,101 @@ def _kernel_set_geoms_friction(
for i_g_ in ti.ndrange(geoms_idx.shape[0]):
self.geoms_info[geoms_idx[i_g_]].friction = friction[i_g_]
+ def add_weld_constraint(self, link1_idx, link2_idx, envs_idx=None, *, unsafe=False):
+ original_envs_idx = envs_idx
+ ... | genesis/engine/solvers/rigid/rigid_solver_decomp.py | 26 | Python | 0.214 | suggestion | 30 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/rigid_solver_decomp.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_friction(self, geoms_idx: ti.i32, friction: ti.f32):
... | missing `skip_allocation=True` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
)
self.equality_info[i_e, i_b].eq_type = gs.ti_int(gs.EQUALITY_TYPE.WELD)
self.equality_info[i_e, i_b].eq_obj1id = l1
self.equality_info[i_e, i_b].eq_obj2id = l2
for i_3 in range(3):
self.equality_info[i_e, i_b].eq_data[i_3 + 3] = pos1[i_3]
... | you should not have to keep track go the original env indices. | self.equality_info[i_e, i_b].eq_obj2id = l2
for i_3 in range(3):
self.equality_info[i_e, i_b].eq_data[i_3 + 3] = pos1[i_3]
self.equality_info[i_e, i_b].eq_data[i_3] = pos2[i_3]
relpose = gu.ti_quat_mul(gu.ti_inv_quat(self.links_state[l1, i_b].quat), ... | @@ -4652,6 +4658,101 @@ def _kernel_set_geoms_friction(
for i_g_ in ti.ndrange(geoms_idx.shape[0]):
self.geoms_info[geoms_idx[i_g_]].friction = friction[i_g_]
+ def add_weld_constraint(self, link1_idx, link2_idx, envs_idx=None, *, unsafe=False):
+ original_envs_idx = envs_idx
+ ... | genesis/engine/solvers/rigid/rigid_solver_decomp.py | 26 | Python | 0.286 | suggestion | 62 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/rigid_solver_decomp.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE: )
self.equality_info[i_e, i_b].eq_type = gs.ti_int(gs.EQUALITY_TYPE.WELD)
self.equality_info[i_e, i_b].eq_obj1id = l1
... | you should not have to keep track go the original env indices. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def set_geom_friction(self, friction, geoms_idx):
self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_friction(self, geoms_idx: ti.i32, friction: ti.f32):
self.geoms_info[geoms_idx].friction = friction
def set_geoms_friction(self, friction, geoms_idx=No... | No need to keep track of original envs indices. Quite the opposite. |
def set_geom_friction(self, friction, geoms_idx):
self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_friction(self, geoms_idx: ti.i32, friction: ti.f32):
self.geoms_info[geoms_idx].friction = friction
def set_geoms_friction(self, friction, geoms_idx=No... | @@ -4652,6 +4658,101 @@ def _kernel_set_geoms_friction(
for i_g_ in ti.ndrange(geoms_idx.shape[0]):
self.geoms_info[geoms_idx[i_g_]].friction = friction[i_g_]
+ def add_weld_constraint(self, link1_idx, link2_idx, envs_idx=None, *, unsafe=False):
+ original_envs_idx = envs_idx | genesis/engine/solvers/rigid/rigid_solver_decomp.py | 26 | Python | 0.214 | suggestion | 67 | 51 | 51 | false | [FEATURE] Add suction cup | 961 | Genesis-Embodied-AI/Genesis | 26,702 | Python | duburcqa | YilingQiao | Review this pull request change.
Language: Python
File: genesis/engine/solvers/rigid/rigid_solver_decomp.py
PR Title: [FEATURE] Add suction cup
BEFORE CODE:
def set_geom_friction(self, friction, geoms_idx):
self._kernel_set_geom_friction(geoms_idx, friction)
@ti.kernel
def _kernel_set_geom_fri... | No need to keep track of original envs indices. Quite the opposite. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.