chore: open github issue with details

This commit is contained in:
uinstinct 2025-12-03 19:09:35 +05:30
parent cfa5911416
commit 64f1ee7d4e

View file

@ -5,7 +5,7 @@ import {
Cog6ToothIcon,
KeyIcon,
} from "@heroicons/react/24/outline";
import { DISCORD_LINK, GITHUB_LINK } from "core/util/constants";
import { DISCORD_LINK } from "core/util/constants";
import { useContext, useMemo } from "react";
import { GhostButton, SecondaryButton } from "../../components";
import { useEditModel } from "../../components/mainInput/Lump/useEditBlock";
@ -290,11 +290,27 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
<GhostButton
className="flex flex-row items-center gap-2 rounded px-3 py-1.5"
onClick={() => {
ideMessenger.post("openUrl", GITHUB_LINK);
const issueTitle = `Error: ${selectedModel?.title || "Model"} - ${statusCode || "Unknown error"}`;
const issueBody = `**Error Details**
Model: ${selectedModel?.title || "Unknown"}
Provider: ${selectedModel?.provider || "Unknown"}
Status Code: ${statusCode || "N/A"}
**Error Output**
\`\`\`
${parsedError}
\`\`\`
**Additional Context**
Please add any additional context about the error here
`;
const url = `https://github.com/continuedev/continue/issues/new?title=${encodeURIComponent(issueTitle)}&body=${encodeURIComponent(issueBody)}`;
ideMessenger.post("openUrl", url);
}}
>
<GithubIcon className="h-5 w-5" />
<span className="xs:flex hidden">Github</span>
<span className="xs:flex hidden">Open GitHub issue</span>
</GhostButton>
<GhostButton
className="flex flex-row items-center gap-2 rounded px-3 py-1.5"