-
Notifications
You must be signed in to change notification settings - Fork 50
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: upgraded the methods for Copilot using pieces-copilot-sdk #138
feat: upgraded the methods for Copilot using pieces-copilot-sdk #138
Conversation
GlobalConversationID = output.iterable.at(0).id; | ||
const getInitialChat = async () => { | ||
try { | ||
const allConversations = await piecesClient.getConversations(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @VishalPawar1010 great work with this implementation. I was just wondering if you would like to also implement an additional functionality actually to list all of the conversations using the getConversations endpoint. on the UI. right now the back and forward buttons are not functionality. We can have a conversations list. and let the user select which conversation they wish to view. And you can use the piecesClient to then return that conversation ID and display the existing conversation in the Copilot chat window
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we can remove the back and forward buttons and have a UI button for: choose copilot conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are your thoughts @Arindam-at-Pieces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will implement this functinality to list conversations and give option to select then display selected conversation.
Do we have any plan to use TailwindCss in future for UI feature additions (like dropdown etc) like this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think we can definitely introduce Tailwind @VishalPawar1010
I think that is a larger discussion as part to restructure the UI / Revamp the entire project, so that can definitely be explored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok then, until it is finalised I will implement UI in Vanilla Js + Css.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shivay-at-pieces Added the mentioned functionality
Test video in Mac:
https://www.awesomescreenshot.com/video/29867394?key=d7c0a15d362babff9b160ae2e06c66ac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @VishalPawar1010 what I will recommend is if you can also display the messages of the specific chat that you have selected in the chat window
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay sure. Will try to display message as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3e19de1
to
c130f4a
Compare
Hey @VishalPawar1010 I dont see a change in the chat box when changing the conversation, did you test it? |
Yes, @shivay-at-pieces , in previous chat I added the video link of test - https://www.awesomescreenshot.com/video/29878767?key=e661acd7694e4055f75144ae76d61c5d Somehow in video it does not show the dropdown, but it is there and we can see recent response when conversation is selected. |
WHat I meant was when I select a previous chat, it doesn't show the actual chat content in the chat window |
What it shows? Some message or nothing? |
The chat window content doesn't change. I agree we can show the last response / message in the conversation |
src/platform.config.ts
Outdated
|
||
} | ||
const PORT = 5323 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part should be Dynamic. You can probably use the os package to check the os and change the port dynamically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will try to test with "os" package and its implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested 3 approaches (libraries) for the dynamic os detection
- https://www.npmjs.com/package/os
- https://www.npmjs.com/package/react-device-detect
- https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
Option 3 which uses JavaScript’s navigator object
suites best for the case, for os
observed issues in imports, for react-device-detect
observed limited os types detection.
Could you please review and let me know for any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR fixes #123