feat: dashboard

This commit is contained in:
eric
2026-02-26 14:45:57 +01:00
parent 94ad2896cc
commit 3756830ec2
43 changed files with 7043 additions and 2060 deletions

View File

@@ -304,12 +304,16 @@ const toolHandlers: Record<string, ToolHandler> = {
const nsfwKeywords = /\b(naked|nude|nsfw|porn|xxx|hentai|sex|fuck|cock|pussy|tits)\b/i;
const isNsfwRequest = nsfwKeywords.test(prompt) || style === "hentai";
if (isNsfwRequest && !context.nsfwImageEnabled) {
return "NSFW image generation is disabled for this server. Ask an admin to enable it first.";
}
const result = await imageGen.generate({
prompt,
model: modelChoice,
aspectRatio,
numImages: 1,
nsfw: isNsfwRequest,
nsfw: isNsfwRequest && Boolean(context.nsfwImageEnabled),
style,
});

View File

@@ -34,6 +34,8 @@ export interface ToolContext {
gifSearchEnabled?: boolean;
/** Optional: enable image generation for this context */
imageGenEnabled?: boolean;
/** Optional: allow NSFW image generation in this context */
nsfwImageEnabled?: boolean;
}
/**