| import 'package:frontend/features/agent/models/agent_tool_event.dart'; |
| import 'package:frontend/features/agent/models/agent_tool_id.dart'; |
| |
| /// Builds consistent synthetic tool events for tests without duplicating metadata boilerplate. |
| AgentToolEvent buildTestToolEvent({ |
| required AgentToolId toolId, |
| required ToolStatus status, |
| required String summary, |
| bool skipped = false, |
| String? subAction, |
| String? targetPath, |
| int? startLine, |
| int? endLine, |
| WriteFileChangeKind? writeFileChangeKind, |
| bool requiresPreviewRebuild = false, |
| int? patchReplacementCount, |
| String? errorMessage, |
| }) { |
| return AgentToolEvent( |
| toolId: toolId, |
| status: status, |
| summary: summary, |
| skipped: skipped, |
| subAction: subAction, |
| targetPath: targetPath, |
| startLine: startLine, |
| endLine: endLine, |
| writeFileChangeKind: writeFileChangeKind, |
| requiresPreviewRebuild: requiresPreviewRebuild, |
| patchReplacementCount: patchReplacementCount, |
| errorMessage: errorMessage, |
| ); |
| } |