Skip to content

perf: replace lodash imports with native implementations#470

Open
hiSandog wants to merge 3 commits intoCodebuffAI:mainfrom
hiSandog:perf/native-implementations
Open

perf: replace lodash imports with native implementations#470
hiSandog wants to merge 3 commits intoCodebuffAI:mainfrom
hiSandog:perf/native-implementations

Conversation

@hiSandog
Copy link
Contributor

Summary

This PR replaces unnecessary lodash imports with native JavaScript implementations to reduce bundle size.

Changes:

  1. common/src/util/string.ts: Replace from lodash with a native for-loop
  2. common/src/util/object.ts: Replace with native Set, replace with
  3. common/src/util/array.ts: Replace + with native and

Benefits:

  • Reduces bundle size by removing unnecessary lodash dependencies
  • Uses native JavaScript which is more performant for simple operations
  • Maintains the same functionality while being lighter weight

Testing:

  • All existing tests should pass as the functionality remains the same

陈家名 and others added 3 commits March 9, 2026 16:59
- Add custom agent workflows section
- Add multi-model support examples
- Add multi-agent orchestration examples
- Add CI/CD integration examples
- Add environment variables documentation
- Add keyboard shortcuts reference
- Add console.error output before throwing validation errors
- Include specific error details in the thrown error message
- Makes debugging environment configuration issues easier
- Replace lodash sumBy in string.ts with native for-loop
- Replace lodash union in object.ts with native Set
- Replace lodash mapValues in object.ts with Object.fromEntries
- Replace lodash compact + flattenDeep in array.ts with native flatMap

This reduces bundle size by removing unnecessary lodash dependencies
for simple operations that can be handled by native JavaScript.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant