Skip to content

Commit cf80727

Browse files
authored
Merge pull request #8991 from uinstinct/github-issue-link
chore: open github issue with details
2 parents 38c948f + 64f1ee7 commit cf80727

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

gui/src/pages/gui/StreamError.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Cog6ToothIcon,
66
KeyIcon,
77
} from "@heroicons/react/24/outline";
8-
import { DISCORD_LINK, GITHUB_LINK } from "core/util/constants";
8+
import { DISCORD_LINK } from "core/util/constants";
99
import { useContext, useMemo } from "react";
1010
import { GhostButton, SecondaryButton } from "../../components";
1111
import { useEditModel } from "../../components/mainInput/Lump/useEditBlock";
@@ -290,11 +290,27 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
290290
<GhostButton
291291
className="flex flex-row items-center gap-2 rounded px-3 py-1.5"
292292
onClick={() => {
293-
ideMessenger.post("openUrl", GITHUB_LINK);
293+
const issueTitle = `Error: ${selectedModel?.title || "Model"} - ${statusCode || "Unknown error"}`;
294+
const issueBody = `**Error Details**
295+
296+
Model: ${selectedModel?.title || "Unknown"}
297+
Provider: ${selectedModel?.provider || "Unknown"}
298+
Status Code: ${statusCode || "N/A"}
299+
300+
**Error Output**
301+
\`\`\`
302+
${parsedError}
303+
\`\`\`
304+
305+
**Additional Context**
306+
Please add any additional context about the error here
307+
`;
308+
const url = `https://github.com/continuedev/continue/issues/new?title=${encodeURIComponent(issueTitle)}&body=${encodeURIComponent(issueBody)}`;
309+
ideMessenger.post("openUrl", url);
294310
}}
295311
>
296312
<GithubIcon className="h-5 w-5" />
297-
<span className="xs:flex hidden">Github</span>
313+
<span className="xs:flex hidden">Open GitHub issue</span>
298314
</GhostButton>
299315
<GhostButton
300316
className="flex flex-row items-center gap-2 rounded px-3 py-1.5"

0 commit comments

Comments
 (0)