mirror of
https://github.com/cline/cline.git
synced 2026-09-01 23:19:18 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a232def05f |
@@ -627,7 +627,6 @@ function translateAskMessage(
|
||||
case "new_task":
|
||||
case "condense":
|
||||
case "summarize_task":
|
||||
case "report_bug":
|
||||
case "api_req_failed":
|
||||
case "mistake_limit_reached":
|
||||
case "command_output":
|
||||
|
||||
@@ -767,22 +767,6 @@ export const ChatMessage: React.FC<ChatMessageProps> = ({ message, mode, isStrea
|
||||
)
|
||||
}
|
||||
|
||||
// Report bug request
|
||||
if (type === "ask" && ask === "report_bug" && text) {
|
||||
return (
|
||||
<Box flexDirection="column" marginBottom={1} width="100%">
|
||||
<DotRow color={COLORS.primaryBlue} flashing={partial === true && isStreaming}>
|
||||
<Text bold color={COLORS.primaryBlue}>
|
||||
Cline wants to create a Github issue:
|
||||
</Text>
|
||||
</DotRow>
|
||||
<Box flexDirection="column" paddingLeft={2}>
|
||||
<Text color="gray">{text}</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
// Skip other message types
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -171,7 +171,6 @@
|
||||
"features/slash-commands/new-rule",
|
||||
"features/slash-commands/explain-changes",
|
||||
"features/slash-commands/smol",
|
||||
"features/slash-commands/report-bug",
|
||||
"features/slash-commands/deep-planning"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -278,7 +278,7 @@ Having issues? Try these quick fixes:
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
Still stuck? Use the [/reportbug](/features/slash-commands/report-bug) command in Cline to get help.
|
||||
Still stuck? Report the issue at [github.com/cline/cline/issues](https://github.com/cline/cline/issues).
|
||||
|
||||
## Technical Details (for the curious)
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: "Report Bug Command"
|
||||
sidebarTitle: "/reportbug"
|
||||
---
|
||||
|
||||
`/reportbug` is an absolute lifesaver when you hit a weird issue with Cline. Instead of having to remember all the details GitHub wants for a bug report, this command turns Cline into your personal bug reporting assistant.
|
||||
|
||||
It walks you through collecting all the info needed for a proper bug report and then shoots it straight to our GitHub issues page with all the right formatting and system details included.
|
||||
|
||||
#### Using the `/reportbug` Slash Command
|
||||
|
||||
When you run into something funky that doesn't seem right:
|
||||
|
||||
- Just type `/reportbug` in the chat
|
||||
- Cline will guide you through all the details we need:
|
||||
- A quick title describing the issue
|
||||
- What actually happened vs. what you expected
|
||||
- Steps to reproduce the bug
|
||||
- Any relevant output or errors you saw
|
||||
- Additional context that might help us fix it
|
||||
- You'll get to review everything before it's submitted
|
||||
- Once you approve, it opens a perfectly formatted GitHub issue with all your info plus automatic system details
|
||||
|
||||
#### Example
|
||||
|
||||
Last week I hit a weird bug where Cline kept timing out when reading large files. Instead of trying to remember all the GitHub template fields, I just typed `/reportbug` and Cline guided me through the whole process.
|
||||
|
||||
It asked me about what I was trying to do, what happened instead, and the exact steps that led to the issue. The best part was that it automatically included my OS version, Cline version, and all the technical details our devs would need.
|
||||
|
||||
A few seconds later, I had a properly formatted GitHub issue created without having to hunt down any of that info myself.
|
||||
@@ -111,5 +111,5 @@ Learn to write prompts that get the best results
|
||||
## Need Help?
|
||||
|
||||
- **Stuck?** Try starting fresh with `/new` in the chat
|
||||
- **Found a bug?** Use `/reportbug` to help us improve
|
||||
- **Found a bug?** Report at [github.com/cline/cline/issues](https://github.com/cline/cline/issues)
|
||||
- **Have questions?** Join our [Discord community](https://discord.gg/cline)
|
||||
|
||||
@@ -441,7 +441,7 @@ If you've tried everything:
|
||||
```
|
||||
|
||||
2. **Report the Issue**:
|
||||
- Use `/reportbug` in Cline github issues
|
||||
- Report at [github.com/cline/cline/issues](https://github.com/cline/cline/issues)
|
||||
- Include your debug info
|
||||
- Mention which solutions you tried
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ export const toolUseNames = [
|
||||
"attempt_completion",
|
||||
"new_task",
|
||||
"condense",
|
||||
"report_bug",
|
||||
"new_rule",
|
||||
"web_fetch",
|
||||
] as const
|
||||
|
||||
@@ -561,8 +561,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are \`getting-started\` (Intro for new coders, installing Cline and dev essentials), \`model-selection\` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), \`features\` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), \`task-management\` (Task and Context Management in Cline), \`prompt-engineering\` (Improving your prompting skills, Prompt Engineering Guide), \`cline-tools\` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), \`mcp\` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), \`enterprise\` (Cloud provider integration, Security concerns, Custom instructions), \`more-info\` (Telemetry and other reference content)
|
||||
|
||||
@@ -10,8 +10,6 @@ option java_package = "bot.cline.proto";
|
||||
|
||||
// SlashService provides methods for managing slash commands
|
||||
service SlashService {
|
||||
// Sends button click message
|
||||
rpc reportBug(StringRequest) returns (Empty);
|
||||
rpc condense(StringRequest) returns (Empty);
|
||||
|
||||
// Get available slash commands for autocomplete (used by CLI)
|
||||
|
||||
@@ -30,7 +30,6 @@ enum ClineAsk {
|
||||
USE_MCP_SERVER = 11;
|
||||
NEW_TASK = 12;
|
||||
CONDENSE = 13;
|
||||
REPORT_BUG = 14;
|
||||
SUMMARIZE_TASK = 15;
|
||||
ACT_MODE_RESPOND = 16;
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Empty, StringRequest } from "@shared/proto/cline/common"
|
||||
import { Controller } from ".."
|
||||
|
||||
/**
|
||||
* Report bug slash command logic
|
||||
*/
|
||||
export async function reportBug(controller: Controller, _request: StringRequest): Promise<Empty> {
|
||||
await controller.task?.handleWebviewAskResponse("yesButtonClicked")
|
||||
return Empty.create()
|
||||
}
|
||||
@@ -195,37 +195,6 @@ Below is the user's input when they indicated that they wanted to create a new C
|
||||
</explicit_instructions>\n
|
||||
`
|
||||
|
||||
export const reportBugToolResponse = () =>
|
||||
`<explicit_instructions type="report_bug">
|
||||
The user has explicitly asked you to help them submit a bug to the Cline github page (you MUST now help them with this irrespective of what your conversation up to this point in time was). To do so you will use the report_bug tool which is defined below. However, you must first ensure that you have collected all required information to fill in all the parameters for the tool call. If any of the the required information is apparent through your previous conversation with the user, you can suggest how to fill in those entries. However you should NOT assume you know what the issue about unless it's clear.
|
||||
Otherwise, you should converse with the user until you are able to gather all the required details. When conversing with the user, make sure you ask for/reference all required information/fields. When referencing the required fields, use human friendly versions like "Steps to reproduce" rather than "steps_to_reproduce". Only then should you use the report_bug tool call.
|
||||
The report_bug tool can be used in either of the PLAN or ACT modes.
|
||||
|
||||
The report_bug tool call is defined below:
|
||||
|
||||
Description:
|
||||
Your task is to fill in all of the required fields for a issue/bug report on github. You should attempt to get the user to be as verbose as possible with their description of the bug/issue they encountered. Still, it's okay, when the user is unaware of some of the details, to set those fields as "N/A".
|
||||
|
||||
Parameters:
|
||||
- title: (required) Concise description of the issue.
|
||||
- what_happened: (required) What happened and also what the user expected to happen instead.
|
||||
- steps_to_reproduce: (required) What steps are required to reproduce the bug.
|
||||
- api_request_output: (optional) Relevant API request output.
|
||||
- additional_context: (optional) Any other context about this bug not already mentioned.
|
||||
|
||||
Usage:
|
||||
<report_bug>
|
||||
<title>Title of the issue</title>
|
||||
<what_happened>Description of the issue</what_happened>
|
||||
<steps_to_reproduce>Steps to reproduce the issue</steps_to_reproduce>
|
||||
<api_request_output>Output from the LLM API related to the bug</api_request_output>
|
||||
<additional_context>Other issue details not already covered</additional_context>
|
||||
</report_bug>
|
||||
|
||||
Below is the user's input when they indicated that they wanted to submit a Github issue.
|
||||
</explicit_instructions>\n
|
||||
`
|
||||
|
||||
export const subagentToolResponse = () =>
|
||||
`<explicit_instructions type="subagent">
|
||||
The user has requested to invoke a Cline CLI subagent with the context below. You should execute a subagent command to handle this request using the CLI subagents feature.
|
||||
|
||||
@@ -114,5 +114,5 @@ This session is being continued from a previous conversation that ran out of con
|
||||
${summaryText}.
|
||||
|
||||
Please continue the conversation from where we left it off without asking the user any further questions. Continue with the last task that you were asked to work on. Pay special attention to the most recent user message when responding rather than the initial task message, if applicable.
|
||||
If the most recent user's message starts with "/newtask", "/smol", "/compact", "/newrule", or "/reportbug", you should indicate to the user that they will need to run this command again.
|
||||
If the most recent user's message starts with "/newtask", "/smol", "/compact", or "/newrule", you should indicate to the user that they will need to run this command again.
|
||||
`
|
||||
|
||||
@@ -772,8 +772,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are \`getting-started\` (Intro for new coders, installing Cline and dev essentials), \`model-selection\` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), \`features\` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), \`task-management\` (Task and Context Management in Cline), \`prompt-engineering\` (Improving your prompting skills, Prompt Engineering Guide), \`cline-tools\` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), \`mcp\` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), \`enterprise\` (Cloud provider integration, Security concerns, Custom instructions), \`more-info\` (Telemetry and other reference content)
|
||||
|
||||
+2
-2
@@ -593,8 +593,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
+2
-2
@@ -557,8 +557,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
+2
-2
@@ -571,8 +571,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
@@ -650,8 +650,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
+2
-2
@@ -570,8 +570,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
@@ -593,8 +593,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
@@ -557,8 +557,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
@@ -571,8 +571,8 @@ CAPABILITIES
|
||||
|
||||
====
|
||||
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
|
||||
|
||||
@@ -79,7 +79,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ CAPABILITIES
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ You can track and communicate your progress on the overall task using the task_p
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -205,7 +205,7 @@ You can track and communicate your progress on the overall task using the task_p
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ You can track and communicate your progress on the overall task using the task_p
|
||||
|
||||
FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.
|
||||
|
||||
====
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { TemplateEngine } from "../templates/TemplateEngine"
|
||||
import type { PromptVariant, SystemPromptContext } from "../types"
|
||||
|
||||
const FEEDBACK_TEMPLATE_TEXT = `
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
|
||||
If the user asks for help or wants to give feedback inform them of the following:
|
||||
- To give feedback, users should report the issue at https://github.com/cline/cline/issues
|
||||
|
||||
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
|
||||
- The available sub-pages are \`getting-started\` (Intro for new coders, installing Cline and dev essentials), \`model-selection\` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), \`features\` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), \`task-management\` (Task and Context Management in Cline), \`prompt-engineering\` (Improving your prompting skills, Prompt Engineering Guide), \`cline-tools\` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), \`mcp\` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), \`enterprise\` (Cloud provider integration, Security concerns, Custom instructions), \`more-info\` (Telemetry and other reference content)
|
||||
|
||||
@@ -139,7 +139,7 @@ const GEMINI_3_RULES_TEMPLATE = (_context: SystemPromptContext) => `RULES
|
||||
|
||||
const GEMINI_3_FEEDBACK_TEMPLATE = (_context: SystemPromptContext) => `FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.`
|
||||
|
||||
const GEMINI_3_ACT_VS_PLAN_TEMPLATE = (context: SystemPromptContext) => `ACT MODE V.S. PLAN MODE
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ This ensures your work aligns with the existing codebase structure and avoids un
|
||||
|
||||
const GPT5_1_FEEDBACK = (_context: SystemPromptContext) => `FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.`
|
||||
|
||||
export const gpt51ComponentOverrides: PromptVariant["componentOverrides"] = {
|
||||
[SystemPromptSection.AGENT_ROLE]: {
|
||||
|
||||
@@ -87,7 +87,7 @@ You accomplish a given task iteratively, breaking it down into clear steps and w
|
||||
|
||||
const FEEDBACK = (_context: SystemPromptContext) => `FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.`
|
||||
|
||||
export const GPT_5_TEMPLATE_OVERRIDES = {
|
||||
BASE,
|
||||
|
||||
@@ -100,7 +100,7 @@ You accomplish a given task iteratively, breaking it down into clear steps and w
|
||||
|
||||
const FEEDBACK = (_context: SystemPromptContext) => `FEEDBACK
|
||||
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
|
||||
When user is providing you with feedback on how you could improve, you can let the user know to report new issues at https://github.com/cline/cline/issues.`
|
||||
|
||||
export const TEMPLATE_OVERRIDES = {
|
||||
BASE,
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
explainChangesToolResponse,
|
||||
newRuleToolResponse,
|
||||
newTaskToolResponse,
|
||||
reportBugToolResponse,
|
||||
subagentToolResponse,
|
||||
} from "../prompts/commands"
|
||||
import { StateManager } from "../storage/StateManager"
|
||||
@@ -55,7 +54,6 @@ export async function parseSlashCommands(
|
||||
"smol",
|
||||
"compact",
|
||||
"newrule",
|
||||
"reportbug",
|
||||
"deep-planning",
|
||||
"subagent",
|
||||
"explain-changes",
|
||||
@@ -69,7 +67,6 @@ export async function parseSlashCommands(
|
||||
smol: condenseToolResponse(focusChainSettings),
|
||||
compact: condenseToolResponse(focusChainSettings),
|
||||
newrule: newRuleToolResponse(),
|
||||
reportbug: reportBugToolResponse(),
|
||||
"deep-planning": deepPlanningToolResponse(focusChainSettings, providerInfo, willUseNativeTools),
|
||||
subagent: subagentToolResponse(),
|
||||
"explain-changes": explainChangesToolResponse(),
|
||||
|
||||
@@ -37,7 +37,6 @@ import { LoadMcpDocumentationHandler } from "./tools/handlers/LoadMcpDocumentati
|
||||
import { NewTaskHandler } from "./tools/handlers/NewTaskHandler"
|
||||
import { PlanModeRespondHandler } from "./tools/handlers/PlanModeRespondHandler"
|
||||
import { ReadFileToolHandler } from "./tools/handlers/ReadFileToolHandler"
|
||||
import { ReportBugHandler } from "./tools/handlers/ReportBugHandler"
|
||||
import { SearchFilesToolHandler } from "./tools/handlers/SearchFilesToolHandler"
|
||||
import { SummarizeTaskHandler } from "./tools/handlers/SummarizeTaskHandler"
|
||||
import { UseMcpToolHandler } from "./tools/handlers/UseMcpToolHandler"
|
||||
@@ -234,7 +233,6 @@ export class ToolExecutor {
|
||||
this.coordinator.register(new AttemptCompletionHandler())
|
||||
this.coordinator.register(new CondenseHandler())
|
||||
this.coordinator.register(new SummarizeTaskHandler(validator))
|
||||
this.coordinator.register(new ReportBugHandler())
|
||||
this.coordinator.register(new ApplyPatchHandler(validator))
|
||||
this.coordinator.register(new GenerateExplanationToolHandler())
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export class AccessMcpResourceHandler implements IFullyManagedTool {
|
||||
const server_name: string | undefined = block.params.server_name
|
||||
const uri: string | undefined = block.params.uri
|
||||
|
||||
// Extract provider using the proven pattern from ReportBugHandler
|
||||
// Extract provider from API configuration
|
||||
const apiConfig = config.services.stateManager.getApiConfiguration()
|
||||
const currentMode = config.services.stateManager.getGlobalSettingsKey("mode")
|
||||
const provider = (currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider) as string
|
||||
|
||||
@@ -692,7 +692,7 @@ export class ApplyPatchHandler implements IFullyManagedTool {
|
||||
const completeMessage = JSON.stringify(patch)
|
||||
const shouldAutoApprove = await config.callbacks.shouldAutoApproveToolWithPath(block.name, message.path)
|
||||
|
||||
// Extract provider using the proven pattern from ReportBugHandler
|
||||
// Extract provider from API configuration
|
||||
const apiConfig = config.services.stateManager.getApiConfiguration()
|
||||
const currentMode = config.services.stateManager.getGlobalSettingsKey("mode")
|
||||
const providerId = (currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider) as string
|
||||
|
||||
@@ -53,7 +53,7 @@ export class ExecuteCommandToolHandler implements IFullyManagedTool {
|
||||
const timeoutParam: string | undefined = block.params.timeout
|
||||
let timeoutSeconds: number | undefined
|
||||
|
||||
// Extract provider using the proven pattern from ReportBugHandler
|
||||
// Extract provider from API configuration
|
||||
const apiConfig = config.services.stateManager.getApiConfiguration()
|
||||
const currentMode = config.services.stateManager.getGlobalSettingsKey("mode")
|
||||
const provider = (currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider) as string
|
||||
|
||||
@@ -50,7 +50,7 @@ export class ListCodeDefinitionNamesToolHandler implements IFullyManagedTool {
|
||||
async execute(config: TaskConfig, block: ToolUse): Promise<ToolResponse> {
|
||||
const relDirPath: string | undefined = block.params.path
|
||||
|
||||
// Extract provider using the proven pattern from ReportBugHandler
|
||||
// Extract provider from API configuration
|
||||
const apiConfig = config.services.stateManager.getApiConfiguration()
|
||||
const currentMode = config.services.stateManager.getGlobalSettingsKey("mode")
|
||||
const provider = (currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider) as string
|
||||
|
||||
@@ -56,7 +56,7 @@ export class ListFilesToolHandler implements IFullyManagedTool {
|
||||
const recursiveRaw: string | undefined = block.params.recursive
|
||||
const recursive = recursiveRaw?.toLowerCase() === "true"
|
||||
|
||||
// Extract provider using the proven pattern from ReportBugHandler
|
||||
// Extract provider from API configuration
|
||||
const apiConfig = config.services.stateManager.getApiConfiguration()
|
||||
const currentMode = config.services.stateManager.getGlobalSettingsKey("mode")
|
||||
const provider = (currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider) as string
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
import type { ToolUse } from "@core/assistant-message"
|
||||
import { formatResponse } from "@core/prompts/responses"
|
||||
import { processFilesIntoText } from "@integrations/misc/extract-text"
|
||||
import { showSystemNotification } from "@integrations/notifications"
|
||||
import { createAndOpenGitHubIssue } from "@utils/github-url-utils"
|
||||
import * as os from "os"
|
||||
import { HostProvider } from "@/hosts/host-provider"
|
||||
import { ExtensionRegistryInfo } from "@/registry"
|
||||
import { Logger } from "@/shared/services/Logger"
|
||||
import { ClineDefaultTool } from "@/shared/tools"
|
||||
import type { ToolResponse } from "../../index"
|
||||
import type { IPartialBlockHandler, IToolHandler } from "../ToolExecutorCoordinator"
|
||||
import type { TaskConfig } from "../types/TaskConfig"
|
||||
import type { StronglyTypedUIHelpers } from "../types/UIHelpers"
|
||||
|
||||
export class ReportBugHandler implements IToolHandler, IPartialBlockHandler {
|
||||
readonly name = ClineDefaultTool.REPORT_BUG
|
||||
|
||||
constructor() {}
|
||||
|
||||
getDescription(block: ToolUse): string {
|
||||
return `[${block.name}]`
|
||||
}
|
||||
|
||||
async handlePartialBlock(block: ToolUse, uiHelpers: StronglyTypedUIHelpers): Promise<void> {
|
||||
const partialMessage = JSON.stringify({
|
||||
title: uiHelpers.removeClosingTag(block, "title", block.params.title),
|
||||
what_happened: uiHelpers.removeClosingTag(block, "what_happened", block.params.what_happened),
|
||||
steps_to_reproduce: uiHelpers.removeClosingTag(block, "steps_to_reproduce", block.params.steps_to_reproduce),
|
||||
api_request_output: uiHelpers.removeClosingTag(block, "api_request_output", block.params.api_request_output),
|
||||
additional_context: uiHelpers.removeClosingTag(block, "additional_context", block.params.additional_context),
|
||||
})
|
||||
|
||||
await uiHelpers.ask(this.name, partialMessage, block.partial).catch(() => {})
|
||||
}
|
||||
|
||||
async execute(config: TaskConfig, block: ToolUse): Promise<ToolResponse> {
|
||||
const title = block.params.title
|
||||
const what_happened = block.params.what_happened
|
||||
const steps_to_reproduce = block.params.steps_to_reproduce
|
||||
const api_request_output = block.params.api_request_output
|
||||
const additional_context = block.params.additional_context
|
||||
|
||||
// Validate required parameters
|
||||
if (!title) {
|
||||
config.taskState.consecutiveMistakeCount++
|
||||
return await config.callbacks.sayAndCreateMissingParamError(block.name, "title")
|
||||
}
|
||||
if (!what_happened) {
|
||||
config.taskState.consecutiveMistakeCount++
|
||||
return await config.callbacks.sayAndCreateMissingParamError(block.name, "what_happened")
|
||||
}
|
||||
if (!steps_to_reproduce) {
|
||||
config.taskState.consecutiveMistakeCount++
|
||||
return await config.callbacks.sayAndCreateMissingParamError(block.name, "steps_to_reproduce")
|
||||
}
|
||||
if (!api_request_output) {
|
||||
config.taskState.consecutiveMistakeCount++
|
||||
return await config.callbacks.sayAndCreateMissingParamError(block.name, "api_request_output")
|
||||
}
|
||||
if (!additional_context) {
|
||||
config.taskState.consecutiveMistakeCount++
|
||||
return await config.callbacks.sayAndCreateMissingParamError(block.name, "additional_context")
|
||||
}
|
||||
|
||||
config.taskState.consecutiveMistakeCount = 0
|
||||
|
||||
// Show notification if enabled
|
||||
if (config.autoApprovalSettings.enableNotifications) {
|
||||
showSystemNotification({
|
||||
subtitle: "Cline wants to create a github issue...",
|
||||
message: `Cline is suggesting to create a github issue with the title: ${title}`,
|
||||
})
|
||||
}
|
||||
|
||||
// Derive system information values algorithmically
|
||||
const operatingSystem = os.platform() + " " + os.release()
|
||||
const currentMode = config.mode
|
||||
const clineVersion = ExtensionRegistryInfo.version
|
||||
const host = await HostProvider.env.getHostVersion({})
|
||||
const systemInfo = `${host.platform}: ${host.version}, Node.js: ${process.version}, Architecture: ${os.arch()}`
|
||||
const apiConfig = config.services.stateManager.getApiConfiguration()
|
||||
const apiProvider = currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider
|
||||
const providerAndModel = `${apiProvider} / ${config.api.getModel().id}`
|
||||
|
||||
// Ask user for confirmation
|
||||
const bugReportData = JSON.stringify({
|
||||
title,
|
||||
what_happened,
|
||||
steps_to_reproduce,
|
||||
api_request_output,
|
||||
additional_context,
|
||||
// Include derived values in the JSON for display purposes
|
||||
provider_and_model: providerAndModel,
|
||||
operating_system: operatingSystem,
|
||||
system_info: systemInfo,
|
||||
cline_version: clineVersion,
|
||||
})
|
||||
|
||||
const { text, images, files: reportBugFiles } = await config.callbacks.ask(this.name, bugReportData, false)
|
||||
|
||||
// If the user provided a response, treat it as feedback
|
||||
if (text || (images && images.length > 0) || (reportBugFiles && reportBugFiles.length > 0)) {
|
||||
let fileContentString = ""
|
||||
if (reportBugFiles && reportBugFiles.length > 0) {
|
||||
fileContentString = await processFilesIntoText(reportBugFiles)
|
||||
}
|
||||
|
||||
await config.callbacks.say("user_feedback", text ?? "", images, reportBugFiles)
|
||||
return formatResponse.toolResult(
|
||||
`The user did not submit the bug, and provided feedback on the Github issue generated instead:\n<feedback>\n${text}\n</feedback>`,
|
||||
images,
|
||||
fileContentString,
|
||||
)
|
||||
} else {
|
||||
// If no response, the user accepted the bug report
|
||||
try {
|
||||
// Create a Map of parameters for the GitHub issue
|
||||
const params = new Map<string, string>()
|
||||
params.set("title", title)
|
||||
params.set("operating-system", operatingSystem)
|
||||
params.set("cline-version", clineVersion)
|
||||
params.set("system-info", systemInfo)
|
||||
params.set("additional-context", additional_context)
|
||||
params.set("what-happened", what_happened)
|
||||
params.set("steps", steps_to_reproduce)
|
||||
params.set("provider-model", providerAndModel)
|
||||
params.set("logs", api_request_output)
|
||||
|
||||
// Use our utility function to create and open the GitHub issue URL
|
||||
// This bypasses VS Code's URI handling issues with special characters
|
||||
await createAndOpenGitHubIssue("cline", "cline", "bug_report.yml", params)
|
||||
} catch (error) {
|
||||
Logger.error(`An error occurred while attempting to report the bug: ${error}`)
|
||||
}
|
||||
|
||||
return formatResponse.toolResult(`The user accepted the creation of the Github issue.`)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1546,7 +1546,7 @@ export class TelemetryService {
|
||||
/**
|
||||
* Records when slash commands or workflows are activated
|
||||
* @param ulid Unique identifier for the task
|
||||
* @param commandName The name of the command (e.g., "newtask", "reportbug", or custom workflow name)
|
||||
* @param commandName The name of the command (e.g., "newtask", "smol", or custom workflow name)
|
||||
* @param commandType Whether it's a built-in command, custom workflow, or MCP prompt
|
||||
*/
|
||||
public captureSlashCommandUsed(ulid: string, commandName: string, commandType: "builtin" | "workflow" | "mcp_prompt") {
|
||||
|
||||
@@ -153,7 +153,6 @@ export type ClineAsk =
|
||||
| "new_task"
|
||||
| "condense"
|
||||
| "summarize_task"
|
||||
| "report_bug"
|
||||
|
||||
export type ClineSay =
|
||||
| "task"
|
||||
|
||||
@@ -24,7 +24,6 @@ function convertClineAskToProtoEnum(ask: AppClineAsk | undefined): ClineAsk | un
|
||||
new_task: ClineAsk.NEW_TASK,
|
||||
condense: ClineAsk.CONDENSE,
|
||||
summarize_task: ClineAsk.SUMMARIZE_TASK,
|
||||
report_bug: ClineAsk.REPORT_BUG,
|
||||
}
|
||||
|
||||
const result = mapping[ask]
|
||||
@@ -56,7 +55,6 @@ function convertProtoEnumToClineAsk(ask: ClineAsk): AppClineAsk | undefined {
|
||||
[ClineAsk.NEW_TASK]: "new_task",
|
||||
[ClineAsk.CONDENSE]: "condense",
|
||||
[ClineAsk.SUMMARIZE_TASK]: "summarize_task",
|
||||
[ClineAsk.REPORT_BUG]: "report_bug",
|
||||
}
|
||||
|
||||
return mapping[ask]
|
||||
|
||||
@@ -36,12 +36,6 @@ export const BASE_SLASH_COMMANDS: SlashCommand[] = [
|
||||
section: "default",
|
||||
cliCompatible: true,
|
||||
},
|
||||
{
|
||||
name: "reportbug",
|
||||
description: "Create a Github issue with Cline",
|
||||
section: "default",
|
||||
cliCompatible: true,
|
||||
},
|
||||
]
|
||||
|
||||
// VS Code-only slash commands
|
||||
|
||||
@@ -27,7 +27,6 @@ export enum ClineDefaultTool {
|
||||
WEB_SEARCH = "web_search",
|
||||
CONDENSE = "condense",
|
||||
SUMMARIZE_TASK = "summarize_task",
|
||||
REPORT_BUG = "report_bug",
|
||||
NEW_RULE = "new_rule",
|
||||
APPLY_PATCH = "apply_patch",
|
||||
GENERATE_EXPLANATION = "generate_explanation",
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
/**
|
||||
* github-url-utils.ts
|
||||
*
|
||||
* Portable utility functions for creating and opening GitHub issue URLs
|
||||
* with proper URL encoding that bypasses VS Code's URI handling issues.
|
||||
* Portable utility functions for opening URLs with proper encoding that bypasses
|
||||
* VS Code's URI handling issues.
|
||||
*
|
||||
* This utility addresses a longstanding issue in VS Code's URI handling:
|
||||
* https://github.com/microsoft/vscode/issues/85930
|
||||
*
|
||||
* The issue causes URLs with special characters in query parameters to be incorrectly
|
||||
* encoded when opened through VS Code's standard APIs (vscode.Uri.parse followed by
|
||||
* vscode.env.openExternal). This particularly affects GitHub issue URLs with pre-filled
|
||||
* fields containing special characters.
|
||||
* vscode.env.openExternal).
|
||||
*/
|
||||
|
||||
import { HostProvider } from "@hosts/host-provider"
|
||||
@@ -21,42 +20,6 @@ import * as util from "util"
|
||||
import { Logger } from "@/shared/services/Logger"
|
||||
import { openExternal, writeTextToClipboard } from "@/utils/env"
|
||||
|
||||
/**
|
||||
* Creates a properly encoded GitHub issue URL.
|
||||
*
|
||||
* This function manually encodes each parameter value using encodeURIComponent()
|
||||
* to ensure consistent and correct encoding of all special characters. This is
|
||||
* necessary because VS Code's URI handling (vscode.Uri.parse) has issues with
|
||||
* encoding/decoding URL parameters, as documented in:
|
||||
* https://github.com/microsoft/vscode/issues/85930
|
||||
*
|
||||
* Specifically, VS Code's URI handling:
|
||||
* - Double-encodes some characters like # (hash) becoming %2523 instead of %23
|
||||
* - Inconsistently handles other characters like & (ampersand) and + (plus)
|
||||
* - Can corrupt query parameters containing special characters
|
||||
*
|
||||
* @param baseUrl The base GitHub repository URL (e.g., 'https://github.com/owner/repo/issues/new')
|
||||
* @param params Map of parameter names to values for the issue form
|
||||
* @returns The properly encoded full URL
|
||||
*/
|
||||
export function createGitHubIssueUrl(baseUrl: string, params: Map<string, string>): string {
|
||||
// Build query string manually with proper encoding
|
||||
const queryParts: string[] = []
|
||||
|
||||
for (const [key, value] of params.entries()) {
|
||||
const encodedKey = encodeURIComponent(key)
|
||||
const encodedValue = encodeURIComponent(value)
|
||||
queryParts.push(`${encodedKey}=${encodedValue}`)
|
||||
}
|
||||
|
||||
// Determine the proper separator (? or &) based on whether baseUrl already has parameters
|
||||
const separator = baseUrl.includes("?") ? "&" : "?"
|
||||
|
||||
// Join all parts to create the final URL
|
||||
const queryString = queryParts.join("&")
|
||||
return `${baseUrl}${separator}${queryString}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a URL using platform-specific commands to bypass VS Code's URI handling issues.
|
||||
*
|
||||
@@ -170,44 +133,3 @@ export async function openUrlInBrowser(url: string): Promise<void> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function to create and open a GitHub issue with the specified parameters.
|
||||
*
|
||||
* This is a high-level function that combines URL creation and opening while
|
||||
* working around VS Code's URI handling limitations (issue #85930). It provides
|
||||
* a simple API for the common use case of opening GitHub issue templates with
|
||||
* pre-filled fields.
|
||||
*
|
||||
* The function:
|
||||
* 1. Constructs a correctly formatted GitHub issue URL
|
||||
* 2. Properly encodes all special characters in parameters
|
||||
* 3. Opens the URL directly using OS commands to avoid VS Code's problematic URI handling
|
||||
* 4. Provides fallback options if opening fails
|
||||
*
|
||||
* Reference for the VS Code URI handling issue:
|
||||
* https://github.com/microsoft/vscode/issues/85930
|
||||
*
|
||||
* @param repoOwner GitHub repository owner/organization
|
||||
* @param repoName GitHub repository name
|
||||
* @param issueTemplate Template name to use (e.g., 'bug_report.yml')
|
||||
* @param params Map of parameter names to values for the issue form
|
||||
*/
|
||||
export async function createAndOpenGitHubIssue(
|
||||
repoOwner: string,
|
||||
repoName: string,
|
||||
issueTemplate: string | null,
|
||||
params: Map<string, string>,
|
||||
): Promise<void> {
|
||||
// Construct the base URL
|
||||
const baseUrl = `https://github.com/${repoOwner}/${repoName}/issues/new`
|
||||
|
||||
// Add template parameter if provided
|
||||
if (issueTemplate) {
|
||||
params.set("template", issueTemplate)
|
||||
}
|
||||
|
||||
// Create the URL and open it
|
||||
const issueUrl = createGitHubIssueUrl(baseUrl, params)
|
||||
await openUrlInBrowser(issueUrl)
|
||||
}
|
||||
|
||||
@@ -783,15 +783,6 @@ export const CondenseConversation = quickStory(
|
||||
"Would you like me to condense the conversation to improve performance?",
|
||||
"Shows utility action to condense conversation for better performance.",
|
||||
)
|
||||
export const ReportBug = quickStory(
|
||||
"Report Bug",
|
||||
"report_bug",
|
||||
JSON.stringify({
|
||||
steps_to_reproduce: "1. Open Cline\n2. Start a new task\n3. Observe the error",
|
||||
what_happened: "Cline crashes unexpectedly",
|
||||
}),
|
||||
"Shows utility action to report bugs to the GitHub repository.",
|
||||
)
|
||||
export const ResumeCompletedTask = quickStory(
|
||||
"Resume Completed Task type",
|
||||
"resume_completed_task",
|
||||
|
||||
@@ -58,7 +58,6 @@ import { MarkdownRow } from "./MarkdownRow"
|
||||
import NewTaskPreview from "./NewTaskPreview"
|
||||
import PlanCompletionOutputRow from "./PlanCompletionOutputRow"
|
||||
import QuoteButton from "./QuoteButton"
|
||||
import ReportBugPreview from "./ReportBugPreview"
|
||||
import { RequestStartRow } from "./RequestStartRow"
|
||||
import SearchResultsDisplay from "./SearchResultsDisplay"
|
||||
import { ThinkingRow } from "./ThinkingRow"
|
||||
@@ -1232,16 +1231,6 @@ export const ChatRowContent = memo(
|
||||
<NewTaskPreview context={message.text || ""} />
|
||||
</div>
|
||||
)
|
||||
case "report_bug":
|
||||
return (
|
||||
<div>
|
||||
<div className={HEADER_CLASSNAMES}>
|
||||
<FilePlus2Icon className="size-2" />
|
||||
<span className="text-foreground font-bold">Cline wants to create a Github issue:</span>
|
||||
</div>
|
||||
<ReportBugPreview data={message.text || ""} />
|
||||
</div>
|
||||
)
|
||||
case "plan_mode_respond": {
|
||||
let response: string | undefined
|
||||
let options: string[] | undefined
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
import React from "react"
|
||||
import MarkdownBlock from "../common/MarkdownBlock"
|
||||
|
||||
interface ReportBugPreviewProps {
|
||||
data: string
|
||||
}
|
||||
|
||||
const ReportBugPreview: React.FC<ReportBugPreviewProps> = ({ data }) => {
|
||||
// Parse the JSON data from the context string
|
||||
const bugData = React.useMemo(() => {
|
||||
try {
|
||||
return JSON.parse(data || "{}")
|
||||
} catch (e) {
|
||||
console.error("Failed to parse bug report data", e)
|
||||
return {}
|
||||
}
|
||||
}, [data])
|
||||
|
||||
return (
|
||||
<div className="bg-badge-background/50 text-badge-foreground rounded-xs p-3">
|
||||
<h2 className="font-bold mb-3">{bugData.title || "Bug Report"}</h2>
|
||||
|
||||
<div className="space-y-3 text-sm">
|
||||
{bugData.what_happened && (
|
||||
<div>
|
||||
<div className="font-semibold">What Happened?</div>
|
||||
<MarkdownBlock markdown={bugData.what_happened} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{bugData.steps_to_reproduce && (
|
||||
<div>
|
||||
<div className="font-semibold">Steps to Reproduce</div>
|
||||
<MarkdownBlock markdown={bugData.steps_to_reproduce} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{bugData.api_request_output && (
|
||||
<div>
|
||||
<div className="font-semibold">Relevant API Request Output</div>
|
||||
<MarkdownBlock markdown={bugData.api_request_output} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{bugData.provider_and_model && (
|
||||
<div>
|
||||
<div className="font-semibold">Provider/Model</div>
|
||||
<MarkdownBlock markdown={bugData.provider_and_model} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{bugData.operating_system && (
|
||||
<div>
|
||||
<div className="font-semibold">Operating System</div>
|
||||
<MarkdownBlock markdown={bugData.operating_system} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{bugData.system_info && (
|
||||
<div>
|
||||
<div className="font-semibold">System Info</div>
|
||||
<MarkdownBlock markdown={bugData.system_info} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{bugData.cline_version && (
|
||||
<div>
|
||||
<div className="font-semibold">Cline Version</div>
|
||||
<MarkdownBlock markdown={bugData.cline_version} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{bugData.additional_context && (
|
||||
<div>
|
||||
<div className="font-semibold">Additional Context</div>
|
||||
<MarkdownBlock markdown={bugData.additional_context} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ReportBugPreview
|
||||
@@ -80,7 +80,6 @@ export function useMessageHandlers(messages: ClineMessage[], chatState: ChatStat
|
||||
case "api_req_failed":
|
||||
case "new_task":
|
||||
case "condense":
|
||||
case "report_bug":
|
||||
await TaskServiceClient.askResponse(
|
||||
AskResponseRequest.create({
|
||||
responseType: "messageResponse",
|
||||
@@ -266,11 +265,6 @@ export function useMessageHandlers(messages: ClineMessage[], chatState: ChatStat
|
||||
console.error(err),
|
||||
)
|
||||
break
|
||||
case "report_bug":
|
||||
await SlashServiceClient.reportBug(StringRequest.create({ value: lastMessage?.text })).catch((err) =>
|
||||
console.error(err),
|
||||
)
|
||||
break
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
@@ -105,7 +105,6 @@ describe("getButtonConfig", () => {
|
||||
{ ask: "resume_completed_task", expectedConfig: "resume_completed_task" },
|
||||
{ ask: "new_task", expectedConfig: "new_task" },
|
||||
{ ask: "condense", expectedConfig: "condense" },
|
||||
{ ask: "report_bug", expectedConfig: "report_bug" },
|
||||
]
|
||||
|
||||
stateConfigs.forEach(({ ask, expectedConfig }) => {
|
||||
|
||||
@@ -10,7 +10,7 @@ export type ButtonActionType =
|
||||
| "proceed" // Send messageResponse or yesButtonClicked
|
||||
| "new_task" // Start a new task
|
||||
| "cancel" // Cancel streaming
|
||||
| "utility" // Execute utility function (condense, report_bug)
|
||||
| "utility" // Execute utility function (condense)
|
||||
| "retry" // Retry the last action
|
||||
|
||||
/**
|
||||
@@ -161,14 +161,6 @@ export const BUTTON_CONFIGS: Record<string, ButtonConfig> = {
|
||||
primaryAction: "utility",
|
||||
secondaryAction: undefined,
|
||||
},
|
||||
report_bug: {
|
||||
sendingDisabled: false,
|
||||
enableButtons: true,
|
||||
primaryText: "Report GitHub issue",
|
||||
secondaryText: undefined,
|
||||
primaryAction: "utility",
|
||||
secondaryAction: undefined,
|
||||
},
|
||||
|
||||
// Streaming/partial states - disable interaction during streaming
|
||||
partial: {
|
||||
@@ -277,8 +269,6 @@ export function getButtonConfig(message: ClineMessage | undefined, _mode: Mode =
|
||||
// Utility
|
||||
case "condense":
|
||||
return BUTTON_CONFIGS.condense
|
||||
case "report_bug":
|
||||
return BUTTON_CONFIGS.report_bug
|
||||
|
||||
default:
|
||||
return BUTTON_CONFIGS.tool_approve
|
||||
|
||||
Reference in New Issue
Block a user