feat: expose image generation to page agents

This commit is contained in:
john
2026-07-19 18:39:46 +08:00
parent 5b88f8ece5
commit 9cf12e3786
10 changed files with 220 additions and 10 deletions
+2
View File
@@ -2084,6 +2084,7 @@ api.use(async (req, res, next) => {
if (req.path === '/agent/mindspace_page_patch') return next();
if (req.path === '/agent/mindspace_asset_delete') return next();
if (req.path === '/agent/mindspace_asset_download') return next();
if (req.path === '/agent/mindspace_image_generate') return next();
if (req.path === '/config/blocked-words') return next();
if (req.method === 'GET' && /^\/mindspace\/v1\/assets\/[^/]+\/download$/.test(req.path)) {
return next();
@@ -2127,6 +2128,7 @@ api.use(async (req, res, next) => {
attachAsrRoutes(api, { sendError, sendData });
attachMindSpaceImageGenerationRoutes(api, {
getService: () => mindSpaceImageGeneration,
requireInternal: requireInternalAgentSecret,
});
attachPageDataRoutes(api, {
sendError,