Add comprehensive developer experience improvements to Langbase SDK #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces comprehensive developer experience enhancements to the Langbase SDK while maintaining 100% backward compatibility. The improvements focus on making the SDK more intuitive, easier to debug, and faster to develop with.
🚀 New Developer-Friendly Features
Convenience Methods for Common Tasks
Added three convenience methods:
langbase.run(pipeName, prompt)- Quick pipe executionlangbase.stream(pipeName, prompt)- Quick streaminglangbase.chat(pipeName, history, message)- Conversational interface with historyFluent Message Builder Pattern
The message builder supports method chaining, direct pipe execution, and utilities like
count(),lastMessage(),clear(), andpop().Enhanced Error Handling with Actionable Guidance
The new
LangbaseErrorclass provides:Comprehensive Runtime Validation
Enhanced validation with detailed error messages for:
Developer Utilities and Helpers
Enhanced TypeScript Experience
🛡️ Backward Compatibility
All changes are completely non-breaking:
📚 Documentation and Testing
DX_FEATURES.md)🎯 Impact
These improvements significantly enhance the developer experience by:
The SDK now provides a world-class developer experience while maintaining its existing reliability and performance characteristics.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.langbase.comnode examples/test-existing-pattern.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.