summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.ts
diff options
context:
space:
mode:
authorAllen Hutchison <[email protected]>2025-06-14 00:00:24 -0700
committerGitHub <[email protected]>2025-06-14 07:00:24 +0000
commit643bdf31d50868e5644a1257afabed612ba317c7 (patch)
tree987d7e3600987c32c21a017d1ee1b3b7f14dae6c /packages/cli/src/ui/hooks/slashCommandProcessor.ts
parentd5c6bb9740a52d87b71d812e698d0e88abf10caa (diff)
feat: Add custom URL support for the /bug command (#1017)
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index 97374e4f..9a9b7596 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -512,13 +512,14 @@ Add any other context about the problem here.
`;
let bugReportUrl =
- 'https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.md';
- if (bugDescription) {
- const encodedArgs = encodeURIComponent(bugDescription);
- bugReportUrl += `&title=${encodedArgs}`;
+ 'https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.md&title={title}&body={body}';
+ const bugCommand = config?.getBugCommand();
+ if (bugCommand?.urlTemplate) {
+ bugReportUrl = bugCommand.urlTemplate;
}
- const encodedBody = encodeURIComponent(diagnosticInfo);
- bugReportUrl += `&body=${encodedBody}`;
+ bugReportUrl = bugReportUrl
+ .replace('{title}', encodeURIComponent(bugDescription))
+ .replace('{body}', encodeURIComponent(diagnosticInfo));
addMessage({
type: MessageType.INFO,