Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enhance chat functionality with new ChatHelpers component and optional tool deletion #857

Merged

Conversation

ryanhopperlowe
Copy link
Contributor

@ryanhopperlowe ryanhopperlowe commented Dec 13, 2024

  • Added ChatHelpers component to provide tools and knowledge information in the chat interface.
  • Updated ToolEntry component to make the onDelete prop optional, allowing for conditional rendering of the delete button.
  • Overhauls the Textarea component to be composable by construct
  • Improves chat bar component to have updated styles and encapsulate the chat helper actions.
  • Adds ability to update user tools from chatbar

https://www.loom.com/share/26ec74e5ac4547d0b40917a02076c8bb?sid=3ab13512-7c34-4ae4-81b3-dc455094c0f8

This update improves the user experience by providing additional context and functionality within the chat interface.

@ryanhopperlowe ryanhopperlowe force-pushed the feat/admin/chat-helpers branch from 2b3c3f5 to 512896a Compare December 16, 2024 14:59
@ryanhopperlowe ryanhopperlowe marked this pull request as draft December 16, 2024 15:57
@ryanhopperlowe ryanhopperlowe marked this pull request as ready for review December 16, 2024 19:32
@ryanhopperlowe ryanhopperlowe force-pushed the feat/admin/chat-helpers branch 5 times, most recently from d416f06 to 1cd0ca8 Compare December 16, 2024 23:28
Comment on lines 233 to 235
possibleTools := slices.Concat(agent.Spec.Manifest.AvailableThreadTools, agent.Spec.Manifest.DefaultThreadTools)

if !slices.Contains(possibleTools, newTool) {
Copy link
Contributor Author

@ryanhopperlowe ryanhopperlowe Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ backend guys, I wrote some Go code here

@ryanhopperlowe ryanhopperlowe force-pushed the feat/admin/chat-helpers branch from 09be930 to 439b8b4 Compare December 17, 2024 14:54
…ptional tool deletion

- Added ChatHelpers component to provide tools and knowledge information in the chat interface.
- Updated ToolEntry component to make the onDelete prop optional, allowing for conditional rendering of the delete button.
- Adjusted Chat component layout to include padding and integrate ChatHelpers.
- Minor style adjustments in Chatbar component to remove unnecessary padding.

This update improves the user experience by providing additional context and functionality within the chat interface.
@ryanhopperlowe ryanhopperlowe force-pushed the feat/admin/chat-helpers branch from bfebd0e to 94b2b96 Compare December 17, 2024 18:27
Copy link
Contributor

@thedadams thedadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only reviewed the Go code change.

Comment on lines 233 to 235
possibleTools := slices.Concat(agent.Spec.Manifest.AvailableThreadTools, agent.Spec.Manifest.DefaultThreadTools)

if !slices.Contains(possibleTools, newTool) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. A small change would save allocating a whole new slice here.

Suggested change
possibleTools := slices.Concat(agent.Spec.Manifest.AvailableThreadTools, agent.Spec.Manifest.DefaultThreadTools)
if !slices.Contains(possibleTools, newTool) {
possibleTools := slices.Concat(agent.Spec.Manifest.AvailableThreadTools, agent.Spec.Manifest.DefaultThreadTools)
if !slices.Contains(agent.Spec.Manifest.AvailableThreadTools, newTool) && !slices.Contains(agent.Spec.Manifest.DefaultThreadTools, newTool) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ryanhopperlowe ryanhopperlowe merged commit 1aac75c into obot-platform:main Dec 17, 2024
2 checks passed
@ryanhopperlowe ryanhopperlowe deleted the feat/admin/chat-helpers branch December 17, 2024 19:35
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.

3 participants