DEV Community

Amir Mullagaliev
Amir Mullagaliev

Posted on • Edited on

Merge TIME!

Introduction

This week we were tasked with addition of 2 new features following by first git merge to our projects, in my case it's PolyglotCode. Looking ahead, it was enjoyable process as I haven't faced a merge conflicts.

New features

Feature 1

This feature adds support for streaming responses with --stream/-s options.

First of all, I have created an Issue#7. There I have provided a full description of my feature that was implemented.

It was hard to implement this issue, for the reason that I had to make a huge research to understand how to handle streaming. You understood me correctly, it wasn't hard to invoke the streaming, but processing the data and displaying it to the screen. Here's the result of all manipulations:

Image description

Merged using git merge with this commit.

Feature 2

Second feature is addition of helpful error messages. So, in case if it has error now it exits with code 1, instead of 0 following by appropriate descriptive error message.

It wasn't hard to implement as I just went through the Cohere API documentation and found the list of error codes to add the description to each using switch-case logic. Obviously, opened an Issue#8.

Example:

Image description

Merged with commit

Conclusion

As it mentioned earlier, I haven't faced any problems completing this week's lab. Haven't faced a merge conflicts, so everything went smoothly. I really enjoyed the process of working with parallel branches; for the reason, once I would get stack in the first branch, I would immediately switch the branch and work on the other feature.

API Trace View

Struggling with slow API calls? 👀

Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs