Open Sophyia7 opened 6 months ago
Do you mind adding a screenshot here as well @Sophyia7 for context
Added! Thanks.
Hey @Sophyia7 Let me take a look?
@RohanMishra315 if you are currently not in process of working on an issue, would love to have you explore this issue a bit more. let me know what your availability is
Hey @jordan-pieces It's fine , I'll work on it ? I don't think it is major issue .
should be good to take a look and let us know how it goes! 👍
// You can use this here to set and send a conversation message. function sendConversationMessage(prompt: string, conversationID: string = GlobalConversationID) { // 1. Seed a message // 2. Get the conversation ID from somewhere - likely the createNewConversation above ^^ // 3. Send the new message over // 4. Use the message contents in the (not yet created) message stream/list
askQuestion({query: prompt, relevant: ''}).then((r) => { return r.result; }).then((value) => { // Format the response for better readability const formattedResponse = formatResponse(value); // Display the formatted response console.log(formattedResponse); }); }
// Function to format Copilot's response for better readability function formatResponse(response: string): string { // Split the response into sentences const sentences = response.split('. '); // Join the sentences with a newline character for better formatting const formattedResponse = sentences.join('.\n'); return formattedResponse; } @jordan-pieces can you review the code for better formatting of the Copilot response
Hello @jwafu @Sophyia7 @shivay-at-pieces , I have resolved the response fomatting issue using marked library,
Here is proof recording of formatted response : https://github.com/pieces-app/example-typescript/assets/118156462/ff60057e-4ff1-4118-8386-ea734eca7089 OR link : https://www.awesomescreenshot.com/video/27551169?key=d8748427e4823d2e17ad03261d5a6499
If above formatting resolution is acceptable , please allow me to raise the PR. Please let me know for any changes or suggestions.
Thanks
Hey @VishalPawar1010 feel free to make a PR, thanks for the contribution!
Hey @VishalPawar1010 feel free to make a PR, thanks for the contribution!
Hey @shivay-at-pieces , I have raised a PR with required changes, could you please review it.
Thanks
Problem statement
Copilot's responses are not properly displayed, and there is a lack of formatting in the responses. When you ask a question, the response is displayed as one paragraph, which makes it difficult to read.
Expected Behavior: Copilot responses should be displayed with proper formatting, making them easily readable and understandable.
Here is a visual of the problem statement![image](https://github.com/pieces-app/example-ts/assets/66218403/72b39cbf-7966-454f-aa8b-50011eef4e57)