DEV Community

aldrin312
aldrin312

Posted on

2nd Sprint

For this sprint I was trying to work on several issues for chatcraft.org. One was fixing a UI bug, where the window for the model selection would change sizes depending on the longest model name shown. Since putting an input in the search bar would filter the closest models to the input and reduce the number of models on the list, the window would shrink.

Before:
Image description

After:

Image description

I quickly fix this by just stopping the window from dynamically changing. By stopping the height and width from changing based one the model list.

Result:

Image description

Another quick issue I worked on is adding a back to top at the end of long chat messages. This wasn't too hard to implement since theirs functions already exists that would smoothly scroll to the parts I needed. Simply just added a button and link the function.

Image description

On the third one, I wanted to work on making the auto scrolling. Making it smoother and maybe add some features, but I found out that theirs a bug in it. That would make it jump back up to top and then to a random spot. I tried to fix the issue but could not find the cause of it. When I disable all auto scroll events, the bug still happens. My assumption is that it is an underlying issue else where. So for now I stop working on this and work on something else.

That ended up being adding feature where it would let the ai models do a web search by simply appending ":online" at the end of the models. Thinking that all I need to do was create a command that would let user do a web search with ai, it would be easy. Turns out it was more involved. Creating a new command wasn't too hard to do but creating a new chat completion with an appended model was. I went through this having an assumption that I can simply call something and insert prompts into it while also appending ":online" on the model but that wasn't the case. Their wasn't any callable function that I can use to create a new streaming response from the ai. I have to create it. What's needed to be done is function, create hooks and implement them. Considering this, this part would need to bleed to the next sprint. Since theirs a lot work that needs to be done. As how hard they are to implement, I have not a clue. But it should be a good learning process for me.

Top comments (0)