Replace getExtensionPromptMaxDepth with a constant

0895bc6c1da516805651d8a0fe5367779ce0b31c

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -0Showing whitespace changes
public/script.js+3 -0
@@ -3051,10 +3051,13 @@ export async function getExtensionPromptByName(moduleName) {
30513051 * @returns {number} Maximum depth of extension prompts
30523052 */
30533053export function getExtensionPromptMaxDepth() {
3054+ return MAX_INJECTION_DEPTH;
3055+ /*
30543056 const prompts = Object.values(extension_prompts);
30553057 const maxDepth = Math.max(...prompts.map(x => x.depth ?? 0));
30563058 // Clamp to 1 <= depth <= MAX_INJECTION_DEPTH
30573059 return Math.max(Math.min(maxDepth, MAX_INJECTION_DEPTH), 1);
3060+ */
30583061}
30593062
30603063/**