diff --git a/core/commands/slash/built-in-legacy/draftIssue.ts b/core/commands/slash/built-in-legacy/draftIssue.ts deleted file mode 100644 index 9a1c5bdf9..000000000 --- a/core/commands/slash/built-in-legacy/draftIssue.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { ChatMessage, SlashCommand } from "../../../index.js"; -import { removeQuotesAndEscapes } from "../../../util/index.js"; -import { renderChatMessage } from "../../../util/messageContent.js"; - -const PROMPT = ( - input: string, - title: string, -) => `You will be asked to generate the body of a GitHub issue given a user request. You should follow these rules: -- Be descriptive but do not make up details -- If the the user request includes any code snippets that are relevant, reference them in code blocks -- Describe step by step how to reproduce the problem -- Describe the ideal solution to the problem -- Describe the expected behavior after the issue has been resolved -- This issue will be read by a team member -- Use markdown formatting, but you do not need to surround the entire body with triple backticks -{additional_instructions} - -Here is the user request: '${input}' - -Title: ${title} - -Body:\n\n`; - -const DraftIssueCommand: SlashCommand = { - name: "issue", - description: "Draft a GitHub issue", - run: async function* ({ input, llm, history, params, abortController }) { - if (params?.repositoryUrl === undefined) { - yield "This command requires a repository URL to be set in the config file."; - return; - } - let title = await llm.complete( - `Generate a title for the GitHub issue requested in this user input: '${input}'. Use no more than 20 words and output nothing other than the title. Do not surround it with quotes. The title is: `, - new AbortController().signal, - { maxTokens: 30 }, - ); - - title = `${removeQuotesAndEscapes(title.trim())}\n\n`; - yield title; - - let body = ""; - const messages: ChatMessage[] = [ - ...history.filter((msg) => msg.role !== "system"), - { role: "user", content: PROMPT(input, title) }, - ]; - - for await (const chunk of llm.streamChat( - messages, - abortController.signal, - )) { - body += chunk.content; - yield renderChatMessage(chunk); - } - - const url = `${params.repositoryUrl}/issues/new?title=${encodeURIComponent( - title, - )}&body=${encodeURIComponent(body)}`; - yield `\n\n[Link to draft of issue](${url})`; - }, -}; - -export default DraftIssueCommand; diff --git a/core/commands/slash/built-in-legacy/index.ts b/core/commands/slash/built-in-legacy/index.ts index 3e57f67a6..fcefc66dc 100644 --- a/core/commands/slash/built-in-legacy/index.ts +++ b/core/commands/slash/built-in-legacy/index.ts @@ -5,14 +5,12 @@ import { } from "../../.."; import GenerateTerminalCommand from "./cmd"; import CommitMessageCommand from "./commit"; -import DraftIssueCommand from "./draftIssue"; import HttpSlashCommand from "./http"; import OnboardSlashCommand from "./onboard"; import ReviewMessageCommand from "./review"; import ShareSlashCommand from "./share"; const LegacyBuiltInSlashCommands: SlashCommand[] = [ - DraftIssueCommand, ShareSlashCommand, GenerateTerminalCommand, HttpSlashCommand, diff --git a/gui/src/pages/gui/StreamError.tsx b/gui/src/pages/gui/StreamError.tsx index 266515ffc..a4c9ef8e7 100644 --- a/gui/src/pages/gui/StreamError.tsx +++ b/gui/src/pages/gui/StreamError.tsx @@ -7,15 +7,6 @@ import { } from "@heroicons/react/24/outline"; import { useContext, useMemo } from "react"; -const DISCUSSIONS_LINK = "https://github.com/continuedev/continue/discussions"; - -function GithubIcon({ className }: { className?: string }) { - return ( - - - - ); -} import { GhostButton } from "../../components"; import { useEditModel } from "../../components/mainInput/Lump/useEditBlock"; import { useMainEditor } from "../../components/mainInput/TipTapEditor"; @@ -302,46 +293,6 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => { )} - -
- Report this error -
- { - const issueTitle = `Error: ${selectedModel?.title || "Model"} - ${statusCode || "Unknown error"}`; - const issueBody = `**Error Details** - -Model: ${selectedModel?.title || "Unknown"} -Provider: ${selectedModel?.underlyingProviderName || "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); - }} - > - - Open GitHub issue - - { - ideMessenger.post("openUrl", DISCUSSIONS_LINK); - }} - > - - Discussions - -
-
); };