Skip to content

Chat with tools and cards #113

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Chat with tools and cards #113

wants to merge 1 commit into from

Conversation

danstarns
Copy link
Member

@danstarns danstarns commented Jun 30, 2025

This PR refactors the return type of CreateConversation to return an object of different types of responses, such as, text, cards and tool calls.

Supporting this work is chatkit pr and release:

Screenshot 2025-06-29 at 21 00 54 Screenshot 2025-06-29 at 21 01 06

@danstarns danstarns requested review from rderbier and Copilot June 30, 2025 03:54
@danstarns danstarns requested a review from a team as a code owner June 30, 2025 03:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the chat response handling to support multiple response types (text, cards, tool calls) while updating dependency versions and removing a custom network adapter in favor of ApolloAdapter. Key changes include refactoring the ChatAgent API with new response item structures, updating adapter usage in the UI, and adding Docker configuration for chat-agent services.

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
hypermode-chat/src/app/page.tsx Updated network adapter usage and added card action handling in the UI
hypermode-chat/src/app/chat-agent-adapter.tsx Removed the custom network adapter code
hypermode-chat/package.json Upgraded ChatKit dependencies from alpha.4 to alpha.6
chat-agent/docker-dgraph.md Added Docker setup instructions for Dgraph
chat-agent/docker-compose.yml Introduced Docker Compose configuration for chat-agent and Dgraph services
chat-agent/api-go/myChat.go Modified fact saving mutation query and updated query composition
chat-agent/api-go/main.go Adjusted conversation creation and chat response parsing to support the new design
chat-agent/api-go/chatAgent.go Overhauled ChatAgent to support multiple response types and tool call integration
Files not reviewed (1)
  • hypermode-chat/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

chat-agent/api-go/chatAgent.go:252

  • [nitpick] Consider renaming 'loops' to 'attemptCount' for improved clarity on its purpose in the tool response generation loop.
	loops := 0

Comment on lines +104 to +109
fmt.Printf("Error marshaling state: %v\n", err)
return nil
}

stateStr := string(data)
return &stateStr
Copy link
Preview

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

Consider using a structured logging mechanism or propagating the error instead of printing directly to stdout for more robust error handling in GetState.

Suggested change
fmt.Printf("Error marshaling state: %v\n", err)
return nil
}
stateStr := string(data)
return &stateStr
log.Printf("Error marshaling state: %v", err)
return nil, err
}
stateStr := string(data)
return &stateStr, nil

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant