Community cards and prebuilt cards (#258)

* Add community sharing feature and merge with pre-built templates

* Add warning before publishing

* [Untested] Add delete flow for community cards

* Fix bug with sorting by likes count and update design of cards

* Fix community assistant parsing errors

* Remove all as a type filter

* Remove default assistant name for publishing to community

* Update DB calls to be standardized paginated
This commit is contained in:
Akhilesh Sudhakar 2025-09-15 19:53:35 +04:00 committed by GitHub
parent 62c1230cff
commit be4e17b5a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 2144 additions and 264 deletions

View file

@ -95,6 +95,29 @@ export class CreateProjectUseCase implements ICreateProjectUseCase {
}
}
// Ensure the Gemini Image tool is always available by default
const hasImageTool = (workflow.tools || []).some(t => t.isGeminiImage || t.name === 'Generate Image');
if (!hasImageTool) {
const imageTool = {
name: 'Generate Image',
description: 'Generate an image using Google Gemini given a text prompt. Returns base64-encoded image data and any text parts.',
isGeminiImage: true,
parameters: {
type: 'object' as const,
properties: {
prompt: { type: 'string', description: 'Text prompt describing the image to generate' },
modelName: { type: 'string', description: 'Optional Gemini model override' },
},
required: ['prompt'],
additionalProperties: true,
},
};
workflow = {
...workflow,
tools: [...(workflow.tools || []), imageTool] as any,
};
}
// create project secret
const secret = crypto.randomBytes(32).toString('hex');