diff --git a/src/handlers/ask-llm.ts b/src/handlers/ask-llm.ts index 4e400d4..bf92801 100644 --- a/src/handlers/ask-llm.ts +++ b/src/handlers/ask-llm.ts @@ -9,13 +9,16 @@ import { findGroundTruths } from "./ground-truths/find-ground-truths"; import { bubbleUpErrorComment, logger } from "../helpers/errors"; export async function askQuestion(context: Context, question: string) { + const { + config: { maxDepth }, + } = context; if (!question) { throw logger.error("No question provided"); } // using any links in comments or issue/pr bodies to fetch more context const { specAndBodies, streamlinedComments } = await recursivelyFetchLinkedIssues({ context, - maxDepth: 2, + maxDepth, owner: context.payload.repository.owner.login, repo: context.payload.repository.name, issueNum: context.payload.issue.number, diff --git a/src/types/plugin-input.ts b/src/types/plugin-input.ts index f344b3b..f6ccd73 100644 --- a/src/types/plugin-input.ts +++ b/src/types/plugin-input.ts @@ -12,6 +12,7 @@ export const pluginSettingsSchema = T.Object({ model: T.String({ default: "o1-mini" }), openAiBaseUrl: T.Optional(T.String()), similarityThreshold: T.Number({ default: 0.9 }), + maxDepth: T.Number({ default: 3 }), maxTokens: T.Number({ default: 10000 }), });