designer.ts 1017 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import type { AgentDefinition } from './orchestrator';
  2. const DESIGNER_PROMPT = `You are a Designer - a frontend UI/UX engineer.
  3. **Role**: Craft stunning UI/UX even without design mockups.
  4. **Design Principles**:
  5. - Rich aesthetics that wow at first glance
  6. - Mobile-first responsive design
  7. **Constraints**:
  8. - Match existing design system if present
  9. - Use existing component libraries when available
  10. - Prioritize visual excellence over code perfection`;
  11. export function createDesignerAgent(
  12. model: string,
  13. customPrompt?: string,
  14. customAppendPrompt?: string,
  15. ): AgentDefinition {
  16. let prompt = DESIGNER_PROMPT;
  17. if (customPrompt) {
  18. prompt = customPrompt;
  19. } else if (customAppendPrompt) {
  20. prompt = `${DESIGNER_PROMPT}\n\n${customAppendPrompt}`;
  21. }
  22. return {
  23. name: 'designer',
  24. description:
  25. 'UI/UX design and implementation. Use for styling, responsive design, component architecture and visual polish.',
  26. config: {
  27. model,
  28. temperature: 0.7,
  29. prompt,
  30. },
  31. };
  32. }