Replace getExtensionPromptMaxDepth with a constant
| @@ -3051,10 +3051,13 @@ export async function getExtensionPromptByName(moduleName) { | ||
| 3051 | 3051 | * @returns {number} Maximum depth of extension prompts |
| 3052 | 3052 | */ |
| 3053 | 3053 | export function getExtensionPromptMaxDepth() { |
| 3054 | + return MAX_INJECTION_DEPTH; | |
| 3055 | + /* | |
| 3054 | 3056 | const prompts = Object.values(extension_prompts); |
| 3055 | 3057 | const maxDepth = Math.max(...prompts.map(x => x.depth ?? 0)); |
| 3056 | 3058 | // Clamp to 1 <= depth <= MAX_INJECTION_DEPTH |
| 3057 | 3059 | return Math.max(Math.min(maxDepth, MAX_INJECTION_DEPTH), 1); |
| 3060 | + */ | |
| 3058 | 3061 | } |
| 3059 | 3062 | |
| 3060 | 3063 | /** |