Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Copilot prompt error parsing #694

Description

@peppescg

Describe the issue

Copilot parsing issues for chat

Prompt
Image
Question
Image
Answer
Image

Steps to Reproduce

Ask a review of any file

Operating System

MacOS (Arm)

IDE and Version

vscode 1.96.4

Extension and Version

1.257.0

Provider

GitHub Copilot

Model

copilot

Codegate version

0.1.7

Logs

No response

Additional Context

 {
"question_answers": [
{
"question": {
"message": "<file>\n```tsx\n// filepath: /Users/giuseppe/workspace/codegate-ui/src/App.tsx\nimport { Header } from \"./components/Header\";\nimport { PromptList } from \"./components/PromptList\";\nimport { usePromptsData } from \"./hooks/usePromptsData\";\nimport { Sidebar } from \"./components/Sidebar\";\nimport { useSse } from \"./hooks/useSse\";\nimport Page from \"./Page\";\nimport { useHref, useNavigate } from \"react-router-dom\";\nimport { RouterProvider } from \"@stacklok/ui-kit\";\n\nfunction App() {\n const { data: prompts, isLoading } = usePromptsData();\n const navigate = useNavigate();\n useSse();\n\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <div className=\"flex w-screen h-screen\">\n <Sidebar loading={isLoading}>\n <PromptList prompts={prompts ?? []} />\n </Sidebar>\n <div className=\"flex-1 flex flex-col overflow-hidden\">\n <Header />\n\n <div className=\"flex-1 overflow-y-auto p-6 flex flex-col gap-3\">\n <Page />\n </div>\n </div>\n </div>\n </RouterProvider>\n );\n}\n\nexport default App;\n```\n</file>\n\n<reminder>\nAvoid repeating existing code, instead use `// ...existing code...` comments to represent regions of unchanged code.\nEach file's code block must start with a comment containing the filepath. This includes Markdown files.\n</reminder>\n<prompt>\nCould you review it?\n</prompt>",
"timestamp": "2025-01-21T14:44:05.438860Z",
"message_id": "f6575ec2-4429-4b34-98bd-161946eea10d"
},
"answer": {
"message": "### /Users/giuseppe/workspace/codegate-ui/src/App.tsx\n\nThe code looks well-structured and organized. However, I can suggest a minor improvement for better readability and maintainability. You can destructure the `prompts` and `isLoading` directly from the `usePromptsData` hook call. Here is the revised code:\n\n<file>\n```tsx\n// filepath: /Users/giuseppe/workspace/codegate-ui/src/App.tsx\n// ...existing code...\nfunction App() {\n const { data: prompts, isLoading } = usePromptsData();\n const navigate = useNavigate();\n useSse();\n\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <div className=\"flex w-screen h-screen\">\n <Sidebar loading={isLoading}>\n <PromptList prompts={prompts ?? []} />\n </Sidebar>\n <div className=\"flex-1 flex flex-col overflow-hidden\">\n <Header />\n <div className=\"flex-1 overflow-y-auto p-6 flex flex-col gap-3\">\n <Page />\n </div>\n </div>\n </div>\n </RouterProvider>\n );\n}\n\nexport default App;\n```\n</file>\n\nThis change ensures that the code is concise and easy to read.",
"timestamp": "2025-01-21T14:44:06.034635Z",
"message_id": "f5751a0e-1fd1-428d-941f-42e91e41c2ca"
}
}
],
"provider": "copilot",
"type": "chat",
"chat_id": "f6575ec2-4429-4b34-98bd-161946eea10d",
"conversation_timestamp": "2025-01-21T14:44:05.438860Z"
}

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions