File size: 9,453 Bytes
1f21206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/**
 * Mock data for all pages β€” matches the UI prototypes exactly.
 * Replace with real API calls once server integration is done.
 */

// ─── Sessions ─────────────────────────────────────────────────────
export const mockSessions = {
  today: [
    { id: 's1', title: 'Refactor login flow', modifiedAt: new Date().toISOString() },
    { id: 's2', title: 'Fix CSS responsive layout', modifiedAt: new Date().toISOString() },
  ],
  previous7Days: [
    { id: 's3', title: 'Add user authentication', modifiedAt: new Date(Date.now() - 3 * 86400000).toISOString() },
    { id: 's4', title: 'Database migration script', modifiedAt: new Date(Date.now() - 5 * 86400000).toISOString() },
  ],
  older: [
    { id: 's5', title: 'Initial project setup', modifiedAt: new Date(Date.now() - 30 * 86400000).toISOString() },
  ],
}

// ─── Active Session Messages ──────────────────────────────────────
export const mockActiveMessages = [
  {
    id: 'm1',
    role: 'user' as const,
    content: "I want to refactor the login flow in `auth.ts`. Let's move the JWT signing logic to a separate helper and add validation for the user payload.",
  },
  {
    id: 'm2',
    role: 'assistant' as const,
    content: "Understood. I will begin by analyzing the current implementation of `auth.ts`. I'll extract the JWT logic into a new utility function and implement the validation layer as requested.",
    thinking: "Looking at the auth.ts file, the JWT signing is currently inline in the login handler. I need to:\n1. Extract signToken() helper\n2. Add Zod validation for LoginPayload\n3. Update the handler to use both",
  },
  {
    id: 'm3',
    role: 'tool' as const,
    toolName: 'edit_file',
    toolStatus: 'success',
    filePath: 'src/lib/auth.ts',
    content: `export const validatePayload = (user) => { ... }
export const signToken = (payload) => jwt.sign(payload, SECRET);
// 8 OLD LINES REMOVED`,
  },
]

// ─── Agent Teams ──────────────────────────────────────────────────
export const mockTeam = {
  name: 'session-dev',
  memberCount: 4,
  members: [
    { id: 'a1', role: 'Architect', status: 'completed' as const, color: '#16a34a' },
    { id: 'a2', role: 'Frontend Dev', status: 'running' as const, color: '#dc2626' },
    { id: 'a3', role: 'Backend Dev', status: 'running' as const, color: '#2563eb' },
    { id: 'a4', role: 'Tester', status: 'idle' as const, color: '#9333ea' },
  ],
}

export const mockTeamMessages = {
  userMessage: "Refactor the authentication middleware to support JWT and OAuth2 simultaneously. Ensure we have proper test coverage for the edge cases.",
  assistantMessage: "I've initiated the agent team for this task. The architect is designing the interface, while the developers are preparing the boilerplate for the new strategies.",
  systemInfo: `Info: spawning child_processes for parallel development
active: session-dev cluster initiated
ready: 4 agents assigned`,
}

// ─── Agent Transcript ─────────────────────────────────────────────
export const mockTranscript = {
  agentName: 'Frontend Dev',
  messages: [
    {
      id: 't1',
      role: 'agent' as const,
      timestamp: 'P1:42:11',
      content: "I've analyzed the component structure. I need to update the `Navigation.tsx` to include the new responsive breakpoints. Initiating local file system audit.",
    },
    {
      id: 't2',
      role: 'tool' as const,
      toolName: 'BASH',
      status: 'SUCCESS' as const,
      command: '$ grep -r "breakpoint" .\n./Navigation.tsx: const [isMobile, setIsMobile] = useState(false);\n./Navigation.tsx: // TODO: Add mobile breakpoint check\n./Header.tsx: @media (max-width: 768px) {',
    },
    {
      id: 't3',
      role: 'progress' as const,
      label: 'Patching Navigation.tsx',
      progress: 67,
    },
    {
      id: 't4',
      role: 'agent' as const,
      timestamp: 'P1:44:35',
      content: "Breakpoint logic implemented. I'm now verifying the CSS-in-JS injection to ensure no style collisions with the existing theme.",
      images: ['/placeholder-code-1.jpg', '/placeholder-code-2.jpg'],
    },
  ],
  teamBar: [
    { id: 'lead', role: 'Lead Claude', active: false, color: '#87736D' },
    { id: 'a2', role: 'Frontend Dev', active: true, color: '#dc2626' },
    { id: 'a3', role: 'Backend Architect', active: false, color: '#2563eb' },
  ],
}

// ─── Scheduled Tasks ──────────────────────────────────────────────
export const mockScheduledTasks = {
  stats: {
    totalTasks: 12,
    activeHealthy: 9,
    nextRun: { name: 'Nightly linting', time: 'Today, 11:30 PM' },
    systemHealth: 99.8,
    healthPeriod: 'Last 30 days execution rate',
  },
  tasks: [
    {
      id: 'task1',
      name: 'Nightly linting',
      frequency: 'Daily',
      lastResult: 'Success' as const,
      nextExecution: 'Today, 11:30 PM',
    },
    {
      id: 'task2',
      name: 'Clean up temp files',
      description: 'Clean TempOutput/**',
      frequency: 'Weekly',
      lastResult: 'Success' as const,
      nextExecution: 'Sun, 2:00 AM',
    },
    {
      id: 'task3',
      name: 'Database Vacuum',
      description: 'Postgres maintenance',
      frequency: 'Monthly',
      lastResult: 'Failed (Disk Full)' as const,
      nextExecution: 'Dec 01, 9:01 AM',
    },
  ],
}

// ─── Session Controls ─────────────────────────────────────────────
export const mockPermissionModes = [
  { id: 'ask', label: 'Ask permissions', description: 'Confirm every file edit or terminal command.', icon: 'lock' },
  { id: 'auto', label: 'Auto accept edits', description: 'Claude writes to disk without asking.', icon: 'edit_note' },
  { id: 'plan', label: 'Plan mode', description: 'Architecture & reasoning only. No writes.', icon: 'architecture' },
  { id: 'bypass', label: 'Bypass permissions', description: 'Full root access for shell and file system.', icon: 'warning' },
]

export const mockModels = [
  { id: 'opus', name: 'Opus 4.7', active: false },
  { id: 'sonnet', name: 'Sonnet 4.6', active: true },
  { id: 'haiku', name: 'Haiku 4.5', active: false },
]

export const mockEffortLevels = ['Low', 'Medium', 'High', 'Max']

// ─── Tool Inspection (edit_file diff) ─────────────────────────────
export const mockToolInspection = {
  toolType: 'TOOL CALL',
  toolName: 'edit_file',
  description: 'Updating login logic to use new SDK',
  filePath: 'src/lib/auth.ts',
  dryRunStatus: 'Dry-run Success',
  linesChanged: { added: 12, removed: 8 },
  diffLines: [
    { type: 'context' as const, lineNo: 1, content: 'export async function loginCredentials: LoginCredentials): Promise<LoginResponse> {' },
    { type: 'context' as const, lineNo: 2, content: '  try {' },
    { type: 'removed' as const, lineNo: 3, content: '    const response = await legacyHttpClient.authenticate()' },
    { type: 'added' as const, lineNo: 3, content: '    const response = await httpClient.authenticate({' },
    { type: 'added' as const, lineNo: 4, content: '      user: credentials.username,' },
    { type: 'added' as const, lineNo: 5, content: '      pass: credentials.password,' },
    { type: 'context' as const, lineNo: 6, content: '    })' },
    { type: 'context' as const, lineNo: 7, content: '' },
    { type: 'removed' as const, lineNo: 8, content: '    const client = await createClient();' },
    { type: 'added' as const, lineNo: 8, content: '    const client = await newSdkClient.create({' },
    { type: 'added' as const, lineNo: 9, content: '      identifier: credentials.username,' },
    { type: 'added' as const, lineNo: 10, content: '      secret: credentials.password,' },
    { type: 'context' as const, lineNo: 11, content: '' },
    { type: 'added' as const, lineNo: 12, content: '      options: { persistent: true }' },
    { type: 'context' as const, lineNo: 13, content: '    })' },
    { type: 'context' as const, lineNo: 14, content: '' },
    { type: 'context' as const, lineNo: 15, content: '    if (response.status === 200) {' },
    { type: 'context' as const, lineNo: 16, content: '      return response.data;' },
  ],
}

// ─── New Task Modal ───────────────────────────────────────────────
export const mockNewTaskDefaults = {
  permissionModes: ['Restricted', 'Standard', 'Full Access'],
  models: ['Claude 3.5 Sonnet', 'Claude 3.5 Haiku', 'Claude 3.5 Opus'],
  frequencies: ['Hourly', 'Daily at 9:00 AM', 'Weekly', 'Monthly', 'Custom cron'],
}

// ─── Footer / Status Bar ──────────────────────────────────────────
export const mockStatusBar = {
  user: 'User Avatar',
  username: 'username',
  plan: 'Pro Plan',
  branch: 'main-branch',
  worktreeToggle: 'worktree-toggle',
  localSwitch: 'local-switch',
  status: 'Ready',
}