feat: Add custom URL support for the /bug command (#1017)

This commit is contained in:
Allen Hutchison
2025-06-14 00:00:24 -07:00
committed by GitHub
parent d5c6bb9740
commit 643bdf31d5
6 changed files with 79 additions and 7 deletions

View File

@@ -36,6 +36,10 @@ export interface AccessibilitySettings {
disableLoadingPhrases?: boolean;
}
export interface BugCommandSettings {
urlTemplate: string;
}
export class MCPServerConfig {
constructor(
// For stdio transport
@@ -87,6 +91,7 @@ export interface ConfigParameters {
proxy?: string;
cwd: string;
fileDiscoveryService?: FileDiscoveryService;
bugCommand?: BugCommandSettings;
}
export class Config {
@@ -121,6 +126,7 @@ export class Config {
private readonly checkpoint: boolean;
private readonly proxy: string | undefined;
private readonly cwd: string;
private readonly bugCommand: BugCommandSettings | undefined;
constructor(params: ConfigParameters) {
this.sessionId = params.sessionId;
@@ -154,6 +160,7 @@ export class Config {
this.proxy = params.proxy;
this.cwd = params.cwd ?? process.cwd();
this.fileDiscoveryService = params.fileDiscoveryService ?? null;
this.bugCommand = params.bugCommand;
if (params.contextFileName) {
setGeminiMdFilename(params.contextFileName);
@@ -309,6 +316,10 @@ export class Config {
return this.cwd;
}
getBugCommand(): BugCommandSettings | undefined {
return this.bugCommand;
}
async getFileService(): Promise<FileDiscoveryService> {
if (!this.fileDiscoveryService) {
this.fileDiscoveryService = new FileDiscoveryService(this.targetDir);