Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

4.4 KB
Raw Blame
'use client';

import { defineFixtures, single, variants } from './_helpers';

export default defineFixtures({
  identifier: 'lobe-agent',
  fixtures: {
    analyzeMedia: single({
      args: {
        question: 'Describe the primary controls and layout in this interface.',
        refs: ['msg_devtools.image_1'],
      },
      pluginState: {
        files: [
          {
            id: 'image_devtools_interface',
            name: 'interface-preview.png',
            ref: 'msg_devtools.image_1',
            type: 'image',
          },
        ],
        model: 'gpt-5.4',
        provider: 'openai',
      },
    }),
    askUserQuestion: single({
      args: {
        questions: [
          {
            header: 'Audit level',
            options: [
              {
                description: 'Read the code and inspect the rendered surface.',
                label: 'Code + visual',
              },
              {
                description: 'Limit this pass to implementation details.',
                label: 'Code only',
              },
            ],
            question: 'How deep should this audit go?',
          },
          {
            header: 'Scope',
            multiSelect: true,
            options: [
              { description: 'Conversation messages and tool cards.', label: 'Chat' },
              { description: 'Agent configuration and settings.', label: 'Settings' },
            ],
            question: 'Which surfaces should it cover?',
          },
        ],
      },
      pluginState: {
        askUserAnswers: {
          'How deep should this audit go?': 'Code + visual',
          'Which surfaces should it cover?': ['Chat', 'Settings'],
        },
      },
    }),
    callSubAgent: single({
      pluginState: {
        task: {
          description: 'Smoke test the desktop router config',
          instruction:
            'Run the desktop router sync test and confirm /devtools only appears in development.',
        },
      },
    }),
    clearTodos: single({
      pluginState: {
        todos: {
          items: [
            { status: 'completed', text: 'Capture real stream data' },
            { status: 'processing', text: 'Build /devtools route' },
          ],
        },
      },
    }),
    createPlan: single({
      pluginState: {
        plan: {
          context:
            'We want a reusable development-only page that renders every registered builtin tool card with a stable sample fixture.',
          description: 'Create a maintainable preview harness for builtin tool renders.',
          goal: 'Build /devtools render preview',
          id: 'plan_devtools_preview',
        },
      },
    }),
    createTodos: variants([
      {
        label: 'Mixed',
        pluginState: {
          todos: {
            items: [
              { status: 'completed', text: 'Enumerate all render entries' },
              { status: 'processing', text: 'Create preview fixtures' },
              { status: 'todo', text: 'Smoke test the route locally' },
            ],
          },
        },
      },
      {
        label: 'Many todos',
        pluginState: {
          todos: {
            items: Array.from({ length: 10 }, (_, i) => ({
              status: i < 3 ? 'completed' : i < 5 ? 'processing' : 'todo',
              text: `Subtask ${i + 1}: prepare fixtures for batch ${i + 1}`,
            })),
          },
        },
      },
      {
        label: 'All done',
        pluginState: {
          todos: {
            items: [
              { status: 'completed', text: 'Enumerate render entries' },
              { status: 'completed', text: 'Author preview fixtures' },
              { status: 'completed', text: 'Smoke-test the gallery' },
            ],
          },
        },
      },
    ]),
    updatePlan: single({
      pluginState: {
        plan: {
          context:
            'The route is now in place; expand the preview harness by keeping fixture data next to the page.',
          description: 'Track the follow-up work for richer render fixtures.',
          goal: 'Expand /devtools coverage',
          id: 'plan_devtools_preview',
        },
      },
    }),
    updateTodos: single({
      pluginState: {
        todos: {
          items: [
            { status: 'completed', text: 'Export render registry entries' },
            { status: 'processing', text: 'Hydrate grouped task fixtures' },
            { status: 'todo', text: 'Add richer missing-state cases' },
          ],
        },
      },
    }),
  },
});