refactor(core): rename Insight class to Service #1386
+175
−178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR performs a comprehensive refactoring that renames the
Insightclass and all related types toServicefor better semantic clarity and consistency across the codebase.Changes Overview
Directory and File Structure
packages/core/src/insight/→packages/core/src/service/packages/core/tests/ai/insight/→packages/core/tests/ai/service/insight.test.ts→service.test.tsCore Code Updates
Insight→ServiceInsightOptions→ServiceOptionscreateInsightDump()→createServiceDump()'ai:insight'→'ai:service'Type System Refactoring
All type definitions in
types.tshave been updated:InsightAction→ServiceActionInsightExtractParam→ServiceExtractParamInsightExtractOption→ServiceExtractOptionInsightTaskInfo→ServiceTaskInfoInsightDump→ServiceDumpInsightError→ServiceErrorInsightAssertionResponse→ServiceAssertionResponseExecutionTaskInsight*types →ExecutionTaskService*'Insight'→'Service'in ExecutionTaskTypeFiles Modified (20 files)
Core Package:
src/index.ts- Updated exportssrc/types.ts- 50+ type definitionssrc/yaml.ts- Interface updatessrc/task-runner.ts- Type referencessrc/ai-model/inspect.ts- Parameter typessrc/agent/agent.ts- Class usage and typessrc/agent/tasks.ts- Service instance and typessrc/agent/task-builder.ts- Service instance and typessrc/agent/ui-utils.ts- Type referencesTest Files:
tests/utils.ts- Helper functionstests/ai/service/service.test.ts- Test suitetests/unit-test/*.test.ts- Unit testsExternal Packages:
apps/chrome-extension/src/utils/eventOptimizer.tspackages/evaluation/tests/llm-locator.test.tspackages/evaluation/tests/screenspot-v2-evaluation.test.tsapps/report/src/components/store/index.tsxImpact Analysis
Breaking Changes
InsightclassInsight*typesInsightErrorMigration Guide
Testing & Verification
Build System
✅ TypeScript Compilation: 0 errors
✅ Lint Check: 530 files passed
✅ Build Output: 341.1 kB (successful)
Type Safety
Insightreferences remainingFile Integrity
Checklist
🤖 Generated with Claude Code