@codeyam/codeyam-cli 0.1.0-staging.b8a55ba → 0.1.0-staging.d0ad4ae
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analyzer-template/.build-info.json +7 -7
- package/analyzer-template/common/execAsync.ts +1 -1
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +7 -4
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +14 -1
- package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +120 -19
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +2 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +91 -35
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +110 -74
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +11 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
- package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
- package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +24 -17
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +214 -39
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +54 -1
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +72 -6
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +12 -5
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +39 -23
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -0
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +14 -0
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/isAsyncFunction.ts +67 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +73 -69
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +6 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +3 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +22 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +9 -5
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +49 -11
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +399 -52
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +128 -2
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +114 -70
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +34 -129
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +155 -79
- package/analyzer-template/packages/aws/codebuild/index.ts +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts +11 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js +29 -18
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts +8 -18
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js +8 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js.map +1 -1
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/aws/src/lib/codebuild/waitForBuild.ts +43 -19
- package/analyzer-template/packages/aws/src/lib/ecs/ecsDefineContainer.ts +3 -3
- package/analyzer-template/packages/aws/src/lib/ecs/ecsTaskFactory.ts +17 -69
- package/analyzer-template/packages/aws/src/lib/s3/uploadFileToS3.ts +8 -1
- package/analyzer-template/packages/generate/index.ts +3 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.ts +17 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +193 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.ts +73 -0
- package/analyzer-template/packages/generate/src/lib/scenarioComponentForServer.ts +114 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.d.ts +3 -0
- package/analyzer-template/packages/github/dist/generate/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.js +3 -0
- package/analyzer-template/packages/github/dist/generate/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts +9 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts +20 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts +8 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js +10 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js +3 -0
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +6 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/src/lib/loadOrCreateCommit.ts +14 -0
- package/analyzer-template/packages/github/src/lib/syncPrimaryBranch.ts +2 -0
- package/analyzer-template/packages/process/index.ts +2 -0
- package/analyzer-template/packages/process/package.json +12 -0
- package/analyzer-template/packages/process/tsconfig.json +8 -0
- package/analyzer-template/packages/types/src/types/Entity.ts +2 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +6 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +6 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/playwright/capture.ts +37 -18
- package/analyzer-template/playwright/waitForServer.ts +21 -6
- package/analyzer-template/project/constructMockCode.ts +781 -140
- package/analyzer-template/project/orchestrateCapture/KyselyAnalysisLoader.ts +3 -6
- package/analyzer-template/project/orchestrateCapture.ts +10 -3
- package/analyzer-template/project/reconcileMockDataKeys.ts +28 -100
- package/analyzer-template/project/runAnalysis.ts +5 -0
- package/analyzer-template/project/serverOnlyModules.ts +127 -2
- package/analyzer-template/project/start.ts +5 -3
- package/analyzer-template/project/startScenarioCapture.ts +6 -0
- package/analyzer-template/project/writeMockDataTsx.ts +50 -22
- package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
- package/analyzer-template/project/writeScenarioComponents.ts +162 -100
- package/analyzer-template/project/writeScenarioFiles.ts +26 -0
- package/analyzer-template/project/writeSimpleRoot.ts +11 -35
- package/analyzer-template/scripts/comboWorkerLoop.cjs +1 -0
- package/analyzer-template/scripts/defaultCmd.sh +9 -0
- package/background/src/lib/local/createLocalAnalyzer.js +1 -29
- package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
- package/background/src/lib/local/execAsync.js +1 -1
- package/background/src/lib/local/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/common/execAsync.js +1 -1
- package/background/src/lib/virtualized/common/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +718 -127
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js +3 -2
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +7 -4
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +25 -61
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/runAnalysis.js +4 -0
- package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
- package/background/src/lib/virtualized/project/serverOnlyModules.js +106 -3
- package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +5 -3
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +7 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +52 -23
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js +15 -0
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js.map +1 -0
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +136 -83
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioFiles.js +19 -0
- package/background/src/lib/virtualized/project/writeScenarioFiles.js.map +1 -1
- package/background/src/lib/virtualized/project/writeSimpleRoot.js +11 -34
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/src/cli.js +5 -1
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +1 -1
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/baseline.js +177 -0
- package/codeyam-cli/src/commands/baseline.js.map +1 -0
- package/codeyam-cli/src/commands/status.js +23 -1
- package/codeyam-cli/src/commands/status.js.map +1 -1
- package/codeyam-cli/src/commands/test-startup.js +1 -1
- package/codeyam-cli/src/commands/test-startup.js.map +1 -1
- package/codeyam-cli/src/commands/wipe.js +108 -0
- package/codeyam-cli/src/commands/wipe.js.map +1 -0
- package/codeyam-cli/src/utils/database.js +91 -5
- package/codeyam-cli/src/utils/database.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +79 -0
- package/codeyam-cli/src/utils/git.js.map +1 -0
- package/codeyam-cli/src/utils/queue/job.js +104 -0
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/persistence.js.map +1 -1
- package/codeyam-cli/src/utils/wipe.js +128 -0
- package/codeyam-cli/src/utils/wipe.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +66 -17
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-wXL1Z2Aq.js → EntityItem-Cmysw5OP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CzGX-miz.js → EntityTypeBadge-DLqD3qNt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CXFKsCOD.js → EntityTypeIcon-CAneekK2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-D-9pXIaY.js → InteractivePreview-Cu16OUmx.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CBQPrpT0.js → LibraryFunctionPreview-CVtiBnY5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-D1CdlbrV.js → LoadingDots-B0GLXMsr.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-wDPcZNKx.js → LogViewer-xgeCVgSM.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-4lcOlid-.js → ReportIssueModal-DcAUIpD_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-BfmDgXxG.js → SafeScreenshot-DuDvi0jm.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-BMKg0SAF.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-6J7zDUD5.js → TruncatedFilePath-DyFZkK0l.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/_index-DSmTpjmK.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-BF_aK4y6.js +32 -0
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BYimnrHg.js → chevron-down-Cx24_aWc.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-EPOLDU6W-CXRTFQ3F.js +51 -0
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-CaVsIRxt.js → circle-check-BOARzkeR.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-CgUsG7ib.js → createLucideIcon-BdhJEx6B.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-DW_hdGUc.js → dev.empty-RJCf3Tvw.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-zUEpfPsu.js → entity._sha._-D0-YwkBh.js} +12 -12
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-EylcgScH.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-D_3ero5o.js → entity._sha_.create-scenario-DMe7kvgo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CfLCUi9S.js → entity._sha_.edit._scenarioId-C1H_a_Y3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DKJyZfAY.js → entry.client-CS2cb_eZ.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-DAtOlaWE.js → fileTableUtils-DMJ7zii9.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-ClR0d32A.js → files-BW7Cyeyi.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{git-D62Lxxmv.js → git-CZu4fif0.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/globals-wHVy_II5.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-CzNNiTkw.js → index-B1h680n5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-BosqDOlH.js → index-lzqtyFU8.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-CNp9QFCX.js → loader-circle-B7B9V-bu.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{manifest-09d684be.js → manifest-2d191949.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-FHgpM6gc.js +56 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DDGjYAMJ.js → search-CxXUmBSd.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{settings-DgTyB-Wg.js → settings-6D8k8Jp5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CDJZnWhN.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CBc5dE1s.js → triangle-alert-B6LgvRJg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-BMIGFP-m.js → useCustomSizes-Dv18q8LD.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useInteractiveMode-Dk_FQqWJ.js → useInteractiveMode-0ToGk4K3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-BqPPNjAl.js → useLastLogLine-aSv48UbS.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DsJbgMY9.js → useReportContext-1BX144Eg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-DWHcCcl1.js → useToast-mBRpZPiu.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/{index-CV6i1S1A.js → index-pU0o5t1o.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-YzfkRwdn.js +178 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/templates/codeyam-setup-skill.md +138 -3
- package/codeyam-cli/templates/debug-codeyam.md +7 -2
- package/package.json +5 -5
- package/packages/ai/src/lib/astScopes/processExpression.js +13 -1
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/checkAllAttributes.js +24 -9
- package/packages/ai/src/lib/checkAllAttributes.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +94 -18
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +2 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +51 -23
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +70 -54
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +11 -0
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js +86 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js.map +1 -0
- package/packages/ai/src/lib/deepEqual.js +32 -0
- package/packages/ai/src/lib/deepEqual.js.map +1 -0
- package/packages/ai/src/lib/findMatchingAttribute.js +20 -16
- package/packages/ai/src/lib/findMatchingAttribute.js.map +1 -1
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +168 -41
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +42 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js +59 -3
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarios.js +6 -6
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +32 -23
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +20 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +15 -0
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/index.js +1 -0
- package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js +52 -0
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js.map +1 -0
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +59 -50
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +6 -0
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +2 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeChange.js +14 -4
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeEntity.js +7 -6
- package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +44 -10
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js +85 -0
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +314 -52
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +97 -2
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +88 -52
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +26 -98
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +141 -75
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/packages/generate/index.js +3 -0
- package/packages/generate/index.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- package/packages/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/packages/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/packages/github/src/lib/loadOrCreateCommit.js +10 -0
- package/packages/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/packages/github/src/lib/syncPrimaryBranch.js +3 -0
- package/packages/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/packages/process/index.js +3 -0
- package/packages/process/index.js.map +1 -0
- package/packages/process/src/GlobalProcessManager.js.map +1 -0
- package/{background/src/lib/process → packages/process/src}/ProcessManager.js +1 -1
- package/packages/process/src/ProcessManager.js.map +1 -0
- package/packages/process/src/index.js.map +1 -0
- package/packages/process/src/managedExecAsync.js.map +1 -0
- package/analyzer-template/process/INTEGRATION_COMPLETE.md +0 -333
- package/analyzer-template/process/INTEGRATION_EXAMPLE.md +0 -525
- package/analyzer-template/process/README.md +0 -507
- package/background/src/lib/process/GlobalProcessManager.js.map +0 -1
- package/background/src/lib/process/ProcessManager.js.map +0 -1
- package/background/src/lib/process/index.js.map +0 -1
- package/background/src/lib/process/managedExecAsync.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +0 -238
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js +0 -7
- package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-CUxUNEEC.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/_index-DHImXdXq.js +0 -11
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-2mG6mjVb.js +0 -32
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JMJ3UQ3L-BambyYE_.js +0 -51
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DyB90fWk.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-C6vQASxy.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-BxJUvKau.js +0 -56
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CoNWGt0K.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BDlyhfrv.js +0 -175
- /package/analyzer-template/{process → packages/process/src}/GlobalProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/ProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/index.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/managedExecAsync.ts +0 -0
- /package/{background/src/lib/process → packages/process/src}/GlobalProcessManager.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/index.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/managedExecAsync.js +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import{r as a,j as e,d as R,a as G,c as X,L as W,w as K,M as Z,C as ee,S as te,D as se,u as ie,f as oe,O as ne}from"./chunk-JMJ3UQ3L-BambyYE_.js";import{_ as ae}from"./preload-helper-ckwbz45p.js";import{c as le}from"./cy-logo-cli-CKnwPCDr.js";import{B as re,R as ce,S as de}from"./ReportIssueModal-4lcOlid-.js";import{a as he,R as me}from"./useReportContext-DsJbgMY9.js";import{L as B}from"./loader-circle-CNp9QFCX.js";import{c as z}from"./createLucideIcon-CgUsG7ib.js";import{T as pe,u as xe}from"./useToast-DWHcCcl1.js";import{u as fe}from"./useLastLogLine-BqPPNjAl.js";import{L as ue}from"./LogViewer-wDPcZNKx.js";import{E as ye}from"./EntityTypeIcon-CXFKsCOD.js";import{T as ge}from"./TruncatedFilePath-6J7zDUD5.js";import{C as ve}from"./chevron-down-BYimnrHg.js";import{C as je}from"./circle-check-CaVsIRxt.js";import"./triangle-alert-CBc5dE1s.js";function Ce({id:t,selected:n,onClick:r,icon:h,name:f}){const[c,i]=a.useState(!1);a.useEffect(()=>{i(!0)},[]);const g=a.useCallback(()=>{r==null||r(t)},[r,t]);return e.jsxs("button",{className:`
|
|
2
|
-
w-full aspect-square p-3 cursor-pointer focus:outline-none
|
|
3
|
-
flex flex-col items-center justify-center gap-1 text-[#626262]
|
|
4
|
-
hover:bg-[#d8d8d8] text-xs font-ibmPlexSans uppercase
|
|
5
|
-
`,onClick:g,children:[e.jsx("div",{className:`${n?"bg-primary-100 text-cygray-10":""} w-10 h-10 rounded-lg flex items-center justify-center`,children:c&&h}),e.jsx("span",{className:`${n?"text-primary-100":""} whitespace-nowrap`,children:f})]})}/**
|
|
6
|
-
* @license lucide-react v0.556.0 - ISC
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the ISC license.
|
|
9
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/const we=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],V=z("activity",we);/**
|
|
11
|
-
* @license lucide-react v0.556.0 - ISC
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the ISC license.
|
|
14
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/const ke=[["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ne=z("circle-equal",ke);/**
|
|
16
|
-
* @license lucide-react v0.556.0 - ISC
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the ISC license.
|
|
19
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const be=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]],Se=z("component",be);/**
|
|
21
|
-
* @license lucide-react v0.556.0 - ISC
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the ISC license.
|
|
24
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/const Le=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Ae=z("file",Le);/**
|
|
26
|
-
* @license lucide-react v0.556.0 - ISC
|
|
27
|
-
*
|
|
28
|
-
* This source code is licensed under the ISC license.
|
|
29
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/const ze=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],O=z("git-commit-horizontal",ze);/**
|
|
31
|
-
* @license lucide-react v0.556.0 - ISC
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the ISC license.
|
|
34
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/const Te=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Ee=z("house",Te);/**
|
|
36
|
-
* @license lucide-react v0.556.0 - ISC
|
|
37
|
-
*
|
|
38
|
-
* This source code is licensed under the ISC license.
|
|
39
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/const Me=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],_e=z("panels-top-left",Me);/**
|
|
41
|
-
* @license lucide-react v0.556.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const De=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ie=z("refresh-cw",De);function $e(){var k;const t=R(),n=G(),[r,h]=a.useState(),[f,c]=a.useState(!1),[i,g]=a.useState(!1),[D,L]=a.useState(null),d=X();a.useEffect(()=>{d.state==="idle"&&!d.data&&d.load("/api/generate-report")},[d]);const C=((k=d.data)==null?void 0:k.defaultEmail)||"",l={width:"24px",height:"24px",strokeWidth:1.5},v=[{id:"dashboard",icon:e.jsx(Ee,{style:l}),link:"/",name:"Dashboard"},{id:"simulations",icon:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:l,children:[e.jsx("path",{d:"M9 12.75V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 15.75H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6.75 12.7498L11.325 8.17483C11.6067 7.89873 11.9858 7.7447 12.3803 7.7461C12.7747 7.74751 13.1528 7.90423 13.4325 8.18233L16.5 11.2498",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 8.25C6.82843 8.25 7.5 7.57843 7.5 6.75C7.5 5.92157 6.82843 5.25 6 5.25C5.17157 5.25 4.5 5.92157 4.5 6.75C4.5 7.57843 5.17157 8.25 6 8.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 2.25H3C2.17157 2.25 1.5 2.92157 1.5 3.75V11.25C1.5 12.0784 2.17157 12.75 3 12.75H15C15.8284 12.75 16.5 12.0784 16.5 11.25V3.75C16.5 2.92157 15.8284 2.25 15 2.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),link:"/simulations",name:"Simulations"},{id:"git",icon:e.jsx(O,{style:l}),link:"/git",name:"Git"},{id:"files",icon:e.jsx(Ae,{style:l}),link:"/files",name:"Files"},{id:"activity",icon:e.jsx(Ie,{style:l}),link:"/activity",name:"Activity"},{id:"settings",icon:e.jsx(de,{style:l}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(O,{style:l}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx(_e,{style:l}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(Se,{style:l}),link:"/components",name:"Components",hidden:!0}],I=a.useCallback(o=>{const m=v.find(u=>u.id===o);m!=null&&m.link&&n(m.link),h(u=>u===o?void 0:o)},[v,n]);a.useEffect(()=>{const o={dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],files:["files"],settings:["settings"],pages:["pages"],components:["components"]};for(const[m,u]of Object.entries(o))if(u.some(b=>b==="/"?t.pathname==="/":t.pathname.includes(b))){h(m);return}h(void 0)},[t]);const T=async()=>{g(!0);try{const{default:o}=await ae(async()=>{const{default:b}=await import("./html2canvas-pro.esm-fmIEn3Bc.js");return{default:b}},[]),u=(await o(document.body)).toDataURL("image/jpeg",.8);L(u),c(!0)}catch(o){console.error("Screenshot capture failed:",o),c(!0)}finally{g(!1)}},w=()=>{c(!1),L(null)},A=he();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"sidebar",className:"relative w-full h-screen bg-cygray-30 flex flex-col justify-between py-3",children:[e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("div",{children:e.jsx(W,{to:"/",className:"flex items-center justify-center h-20 cursor-pointer",children:e.jsx("img",{src:le,alt:"CodeYam",className:"h-8"})})}),v.filter(o=>!o.hidden).map(o=>e.jsx(Ce,{id:o.id,selected:o.id===r,onClick:I,icon:o.icon,name:o.name},`sidebar-button-${o.id}`))]}),e.jsx("div",{className:"w-full flex flex-col items-center pb-2",children:e.jsxs("button",{onClick:()=>void T(),disabled:i,className:"flex flex-col items-center gap-1 p-2 rounded-lg text-gray-600 hover:bg-gray-100 hover:text-gray-900 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"Report an issue",children:[i?e.jsx(B,{style:l,className:"animate-spin"}):e.jsx(re,{style:l}),e.jsx("span",{className:"text-[10px] font-medium",children:i?"Capturing...":"Report Issue"})]})})]}),f&&e.jsx(ce,{isOpen:!0,onClose:w,context:A,defaultEmail:C,screenshotDataUrl:D??void 0})]})}function Pe({toast:t,onClose:n}){a.useEffect(()=>{const f=t.duration||5e3;if(f>0){const c=setTimeout(()=>{n(t.id)},f);return()=>clearTimeout(c)}},[t.id,t.duration,n]);const r={success:"✅",error:"❌",info:"ℹ️",warning:"⚠️"},h={success:"bg-emerald-50 border-emerald-200 text-emerald-900",error:"bg-red-50 border-red-200 text-red-900",info:"bg-blue-50 border-blue-200 text-blue-900",warning:"bg-amber-50 border-amber-200 text-amber-900"};return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg border-2 shadow-lg min-w-[320px] max-w-[500px] animate-[slideIn_0.3s_ease-out] ${h[t.type]}`,children:[e.jsx("span",{className:"text-2xl",children:r[t.type]}),e.jsx("p",{className:"flex-1 text-sm font-medium m-0",children:t.message}),e.jsx("button",{onClick:()=>n(t.id),className:"text-gray-500 hover:text-gray-700 text-xl leading-none bg-transparent border-none cursor-pointer p-0 w-6 h-6 flex items-center justify-center rounded transition-colors hover:bg-black/10",children:"×"})]})}function We({toasts:t,onClose:n}){return t.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-10000 flex flex-col gap-2",children:[e.jsx("style",{children:`
|
|
46
|
-
@keyframes slideIn {
|
|
47
|
-
from {
|
|
48
|
-
transform: translateX(400px);
|
|
49
|
-
opacity: 0;
|
|
50
|
-
}
|
|
51
|
-
to {
|
|
52
|
-
transform: translateX(0);
|
|
53
|
-
opacity: 1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`}),t.map(r=>e.jsx(Pe,{toast:r,onClose:n},r.id))]})}function q({entity:t,nameSize:n="11px",pathSize:r="10px",pathMaxLength:h=50,showScenarioCount:f=!1,scenarioCount:c=0,additionalContent:i}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ye,{type:t.entityType||"other"}),e.jsxs(W,{to:`/entity/${t.sha}`,className:"hover:underline shrink-0 cursor-pointer",style:{fontSize:n,fontWeight:500,color:"#000",whiteSpace:"nowrap"},children:[t.name,f&&c>0&&` (${c})`]}),e.jsx(ge,{filePath:t.filePath,maxLength:h,style:{fontSize:r,color:"#8E8E8E"}})]}),i]})}const U={fontSize:"9px",color:"#005C75",fontStyle:"italic"};function Ve({currentRun:t,projectSlug:n,currentEntities:r=[],isAnalysisStarting:h=!1,queuedJobCount:f=0,queueJobs:c=[],currentlyExecuting:i=null,historicalRuns:g=[]}){var H,F;const[D,L]=a.useState(!1),[d,C]=a.useState(!1),[l,v]=a.useState(null),[I,T]=a.useState(new Set),[w,A]=a.useState(new Set),k=!!i||c.length>0,o=!!i,m=(i==null?void 0:i.entities)||r;t!=null&&t.analysisCompletedAt,t==null||t.readyToBeCaptured,t==null||t.capturesCompleted;const u=(t==null?void 0:t.currentEntityShas)&&t.currentEntityShas.length>0,b=k,{lastLine:P}=fe(n,b),M=o,Q=(()=>{const p=Date.now()-1440*60*1e3;if(t!=null&&t.createdAt&&u){const x=t.analysisCompletedAt||t.createdAt;if(new Date(x).getTime()>p)return!0}if(g.length>0){const x=g[0],S=x.analysisCompletedAt||x.archivedAt||x.createdAt;if(S&&new Date(S).getTime()>p)return!0}return!1})();return a.useEffect(()=>{const s=(i==null?void 0:i.id)||null;k&&!d&&s!==l&&C(!0),!k&&l!==null&&v(null)},[k,i==null?void 0:i.id,d,l]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded shadow-lg border-2 border-primary-100 transition-all duration-200 ${d?"min-w-[350px] max-w-[500px]":"w-auto"}`,children:[!d&&e.jsxs("div",{onClick:()=>{C(!0),v(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors",title:"Click to expand",children:[M?e.jsx(B,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(V,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity: No Activity Yet"}),M&&e.jsx("button",{onClick:s=>{s.stopPropagation(),L(!0)},className:"ml-auto px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"})]}),d&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[M?e.jsx(B,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(V,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>L(!0),className:"px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"}),e.jsx("button",{onClick:()=>{C(!1),v((i==null?void 0:i.id)||null)},className:"p-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC"},title:"Collapse","aria-label":"Collapse",children:e.jsx(ve,{size:16,style:{color:"#646464"}})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsxs("div",{className:"px-3 pt-2 pb-3 space-y-3",children:[M&&i&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(V,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Current Activity"})]}),e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:m.length>0?e.jsxs("div",{className:"space-y-1.5",children:[m.map(s=>e.jsx(q,{entity:s,nameSize:"11px",pathSize:"10px",pathMaxLength:150},s.sha)),P&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:P})]}):e.jsxs("div",{children:[i.entityNames&&i.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[i.entityNames.slice(0,5).map((s,p)=>e.jsx("div",{style:{fontSize:"11px",color:"#343434"},children:s},p)),i.entityNames.length>5&&e.jsxs("div",{className:"italic",style:{fontSize:"10px",color:"#666"},children:["+",i.entityNames.length-5," ","more"]})]}):e.jsxs("div",{style:{fontSize:"11px",color:"#343434"},children:["Analyzing"," ",((H=i.entityShas)==null?void 0:H.length)||0," ",((F=i.entityShas)==null?void 0:F.length)===1?"entity":"entities","..."]}),P&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:P})]})})]}),c.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Ne,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Queued Activity"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:c.map(s=>{var S,_;const p=I.has(s.id),x=p?s.entities:s.entities.slice(0,3);return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:s.entities.length>0?e.jsxs("div",{className:"space-y-1.5",children:[x.map(N=>e.jsx(q,{entity:N,nameSize:"10px",pathSize:"9px",pathMaxLength:120},N.sha)),s.entities.length>3&&e.jsx("button",{onClick:()=>{T(N=>{const E=new Set(N);return E.has(s.id)?E.delete(s.id):E.add(s.id),E})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:U,"aria-label":p?"Show fewer entities":`Show ${s.entities.length-3} more entities`,children:p?"Show less":`+${s.entities.length-3} more`})]}):e.jsxs("div",{style:{fontSize:"10px",color:"#343434"},children:[s.type==="analysis"&&e.jsx(e.Fragment,{children:s.entityNames&&s.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[s.entityNames.slice(0,5).map((N,E)=>e.jsx("div",{children:N},E)),s.entityNames.length>5&&e.jsxs("div",{className:"italic",children:["+",s.entityNames.length-5," more"]})]}):`Analyzing ${((S=s.entityShas)==null?void 0:S.length)||0} ${((_=s.entityShas)==null?void 0:_.length)===1?"entity":"entities"}`}),s.type==="recapture"&&"Recapturing scenario",s.type==="debug-setup"&&"Setting up debug environment"]})},s.id)})})]}),Q&&g.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(je,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Recently Completed"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:g.slice(0,3).map((s,p)=>{const x=s.entities||[],S=s.analysisCompletedAt||s.archivedAt||s.createdAt||"",_=(()=>{if(!S)return"";const j=Date.now()-new Date(S).getTime(),y=Math.floor(j/6e4),$=Math.floor(j/36e5);return $>0?`${$}h ago`:y>0?`${y}m ago`:"just now"})(),N=w.has(p),Y=(N?x:x.slice(0,3)).map(j=>{var y,$,J;return{...j,scenarioCount:((J=($=(y=j.analyses)==null?void 0:y[0])==null?void 0:$.scenarios)==null?void 0:J.length)||0}});return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:x.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[Y.map((j,y)=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(q,{entity:j,nameSize:"10px",pathSize:"9px",pathMaxLength:100,showScenarioCount:!0,scenarioCount:j.scenarioCount})}),y===0&&_&&e.jsx("div",{style:{fontSize:"9px",color:"#8E8E8E",whiteSpace:"nowrap",paddingTop:"2px"},children:_})]},j.sha)),x.length>3&&e.jsx("button",{onClick:()=>{A(j=>{const y=new Set(j);return y.has(p)?y.delete(p):y.add(p),y})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:U,"aria-label":N?"Show fewer entities":`Show ${x.length-3} more entities`,children:N?"Show less":`+${x.length-3} more`})]})},p)})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsx("div",{className:"px-3 pb-2",children:e.jsx(W,{to:"/activity",className:"text-xs font-medium hover:underline cursor-pointer",style:{color:"#005C75"},children:"View All Activity →"})})]})]}),D&&n&&e.jsx(ue,{projectSlug:n,onClose:()=>L(!1)})]})}const qe="/assets/globals-C6vQASxy.css";function Be({text:t,subtext:n,linkText:r,linkTo:h}){const[f,c]=a.useState(!1);return f?null:e.jsx("div",{className:"bg-blue-100 border rounded border-blue-800 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-blue-900",children:t}),e.jsx("p",{className:"text-xs text-blue-700 mt-0.5",children:n})]}),e.jsx(W,{to:h,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:r})]}),e.jsx("button",{type:"button",onClick:()=>c(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}const ot=()=>[{rel:"stylesheet",href:qe},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}];function He(){const{currentRun:t,projectSlug:n,currentEntities:r,availableAPIKeys:h,queuedJobCount:f,queueJobs:c,currentlyExecuting:i,historicalRuns:g}=ie(),{toasts:D,closeToast:L}=xe(),d=oe(),C=a.useRef(d),l=R();a.useEffect(()=>{C.current=d},[d]);const v=l.pathname.startsWith("/entity/")&&l.pathname.includes("/edit/")||l.pathname.startsWith("/dev/"),I=l.pathname.includes("/fullscreen");return a.useEffect(()=>{const T=new EventSource("/api/events");let w=null,A=0;const k=2e3;return T.addEventListener("message",o=>{const m=JSON.parse(o.data);if(m.type==="queue")C.current.revalidate(),A=Date.now();else if(m.type==="db-change"||m.type==="unknown"){const u=Date.now(),b=u-A;b<k?(w&&clearTimeout(w),w=setTimeout(()=>{C.current.revalidate(),A=Date.now(),w=null},k-b)):(C.current.revalidate(),A=u)}}),T.addEventListener("error",o=>{console.error("SSE connection error:",o)}),()=>{w&&clearTimeout(w),T.close()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${v?"":"grid"} bg-cygray-10`,style:v?void 0:{gridTemplateColumns:"96px minmax(900px, 1fr)"},children:[!v&&e.jsx($e,{}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-white",children:[h.length===0&&e.jsx(Be,{text:"No AI API keys configured. Please provide an AI API key at your earliest convenience.",subtext:"An API key is required for stable, frequent use of CodeYam",linkText:"Configure API Keys",linkTo:"/settings"}),e.jsx(ne,{})]})]}),e.jsx(We,{toasts:D,onClose:L}),!I&&e.jsx(Ve,{currentRun:t,projectSlug:n,currentEntities:r,isAnalysisStarting:!1,queuedJobCount:f,queueJobs:c,currentlyExecuting:i,historicalRuns:g})]})}const nt=K(function(){return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsx(Z,{}),e.jsx(ee,{})]}),e.jsxs("body",{children:[e.jsx(pe,{children:e.jsx(me,{children:e.jsx(He,{})})}),e.jsx(te,{}),e.jsx(se,{})]})]})});export{nt as default,ot as links};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as B,u as $,r as d,j as e,a as R,L as E,c as U}from"./chunk-JMJ3UQ3L-BambyYE_.js";import{u as _}from"./useReportContext-DsJbgMY9.js";import{S as V}from"./SafeScreenshot-BfmDgXxG.js";import{L as W}from"./LoadingDots-D1CdlbrV.js";import{E as P}from"./EntityTypeIcon-CXFKsCOD.js";import{g as H,a as Q,f as Y}from"./fileTableUtils-DAtOlaWE.js";import{C as q}from"./chevron-down-BYimnrHg.js";import{S as J}from"./search-DDGjYAMJ.js";import{L as K}from"./loader-circle-CNp9QFCX.js";import"./createLucideIcon-CgUsG7ib.js";const ie=()=>[{title:"Simulations - CodeYam"},{name:"description",content:"A visual gallery of your recently captured component screenshots"}],ce=B(function(){const l=$(),c=l.entities,p=l.queueState;_({source:"simulations-page"});const[o,S]=d.useState(""),[x,u]=d.useState("visual"),h=d.useMemo(()=>{const s=[];return c.forEach(r=>{var y;const n=(y=r.analyses)==null?void 0:y[0];if(n!=null&&n.scenarios){const b=n.scenarios.map(i=>{var C,k,A,z,L;const j=(k=(C=i.metadata)==null?void 0:C.screenshotPaths)==null?void 0:k[0],N=(A=i.metadata)==null?void 0:A.noScreenshotSaved,F=j&&!N,T=(L=(z=n.status)==null?void 0:z.scenarios)==null?void 0:L.find(I=>I.name===i.name),M=T&&T.screenshotStartedAt&&!T.screenshotFinishedAt;let w;return F?w="completed":M?w="capturing":w="error",{scenarioName:i.name,scenarioDescription:i.description||"",screenshotPath:j||"",scenarioId:i.id,state:w}}).filter(i=>i.state==="completed"||i.state==="capturing");b.length>0&&s.push({entity:r,screenshots:b,createdAt:n.createdAt||""})}}),s.sort((r,n)=>new Date(n.createdAt).getTime()-new Date(r.createdAt).getTime()),s},[c]),g=d.useMemo(()=>c.filter(s=>{var y,b;const r=(y=s.analyses)==null?void 0:y[0];return!((b=r==null?void 0:r.scenarios)==null?void 0:b.some(i=>{var j,N;return(N=(j=i.metadata)==null?void 0:j.screenshotPaths)==null?void 0:N[0]}))}),[c]),f=d.useMemo(()=>h.filter(({entity:s})=>{const r=!o||s.name.toLowerCase().includes(o.toLowerCase()),n=x==="all"||s.entityType===x;return r&&n}),[h,o,x]),a=d.useMemo(()=>g.filter(s=>{const r=!o||s.name.toLowerCase().includes(o.toLowerCase()),n=x==="all"||s.entityType===x;return r&&n}),[g,o,x]),m=d.useCallback(s=>{S(s.target.value)},[]),D=d.useCallback(s=>{u(s.target.value)},[]),v=h.length>0;return e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen overflow-y-auto",children:e.jsxs("div",{className:"px-20 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-semibold text-gray-900 mb-2",children:"Simulations"}),e.jsx("p",{className:"text-gray-600",children:"A visual gallery of your recently captured simulations."})]}),!v&&e.jsx("div",{className:"bg-[#D1F3F9] border border-[#A5E8F0] rounded-lg p-4 mb-6",children:e.jsxs("p",{className:"text-sm text-gray-700 m-0",children:["This page will display a visual gallery of your recently captured component simulations."," ",e.jsx("strong",{children:"Start by analyzing your first component below."})]})}),e.jsxs("div",{className:"bg-white border-b border-gray-200 rounded-t-lg px-5 py-4 mb-3",children:[e.jsx("div",{className:"text-[11px] text-gray-500 mb-2 uppercase",children:"Filters"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"appearance-none bg-gray-50 border border-gray-200 rounded px-3 pr-8 text-[13px] h-[39px] cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",value:x,onChange:D,children:[e.jsx("option",{value:"all",children:"All Types"}),e.jsx("option",{value:"visual",children:"Visual"}),e.jsx("option",{value:"library",children:"Library"})]}),e.jsx(q,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-3 h-3 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(J,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search component",className:"w-full bg-gray-50 border border-gray-200 rounded pl-9 pr-3 text-[13px] h-[39px] placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors",value:o,onChange:m})]})]})]}),v&&f.length>0&&e.jsx("div",{className:"bg-[#efefef] rounded-lg mb-2 text-[11px] font-normal leading-[16px] text-[#3e3e3e] uppercase",children:e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-2",children:[e.jsx("span",{children:"ENTITY"}),e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-[#3e3e3e]",children:e.jsx("path",{d:"M3 5L6 8L9 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),e.jsxs("div",{className:"flex flex-col gap-[3px]",children:[v&&(f.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-8 text-center text-gray-500",children:"No simulations match your filters."}):e.jsx(e.Fragment,{children:f.map(({entity:s,screenshots:r})=>e.jsx(O,{entity:s,screenshots:r,queueJobs:(p==null?void 0:p.jobs)||[]},s.sha))})),!v&&(a.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-b-lg p-8 text-center text-gray-500",children:"No components found matching your filters."}):a.map(s=>e.jsx(G,{entity:s},s.sha)))]})]})})});function O({entity:t,screenshots:l,queueJobs:c}){var h,g,f;const p=R(),o=l.length||(((f=(g=(h=t.analyses)==null?void 0:h[0])==null?void 0:g.scenarios)==null?void 0:f.length)??0),S=a=>{p(`/entity/${t.sha}/scenarios/${a}?from=simulations`)},x=H(t,c),u=Q(x);return e.jsx("div",{className:"bg-white rounded hover:bg-gray-50 transition-colors border-b border-[#e1e1e1]",children:e.jsxs("div",{className:"px-5 pb-[15px]",children:[e.jsxs("div",{className:"flex items-center justify-between py-[10px]",children:[e.jsxs(E,{to:`/entity/${t.sha}`,className:"flex items-center gap-2 no-underline",children:[e.jsx(P,{type:t.entityType}),e.jsxs("span",{className:"font-['IBM_Plex_Sans'] font-medium text-[12px] leading-[15px] text-[#343434]",children:[t.name," (",o,")"]})]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsxs("span",{className:"px-2 rounded inline-flex items-center gap-1.5 max-w-full whitespace-nowrap overflow-hidden",style:{backgroundColor:u.bgColor,color:u.textColor,height:"23px",fontSize:"10px",lineHeight:"15px"},children:[u.icon,u.text]}),e.jsx("button",{onClick:()=>void p(`/entity/${t.sha}/logs`),className:"bg-[#e0e9ec] text-[#005c75] rounded font-['IBM_Plex_Sans'] font-semibold hover:bg-[#d0dfe5] transition-colors px-[10px] py-0 cursor-pointer border-none",style:{fontSize:"10px",lineHeight:"22px"},children:"View Logs"})]})]}),e.jsx("div",{className:"flex gap-2.5 overflow-x-auto pb-1",children:l.length>0?l.map(a=>e.jsx("button",{onClick:()=>S(a.scenarioId||""),className:"shrink-0 block cursor-pointer bg-transparent border-none p-0",children:e.jsx("div",{className:"w-36 h-24 rounded-md border overflow-hidden flex items-center justify-center transition-all",style:{"--hover-border":"#005C75",backgroundColor:a.state==="capturing"?"#f9f9f9":"#f3f4f6",borderColor:a.state==="capturing"?"#efefef":"#d1d5db"},onMouseEnter:m=>{a.state==="completed"&&(m.currentTarget.style.borderColor="#005C75",m.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.15)")},onMouseLeave:m=>{m.currentTarget.style.borderColor=a.state==="capturing"?"#efefef":"#d1d5db",m.currentTarget.style.boxShadow="none"},children:a.state==="completed"?e.jsx(V,{screenshotPath:a.screenshotPath,alt:a.scenarioName,className:"max-w-full max-h-full object-contain"}):a.state==="capturing"?e.jsx(W,{size:"medium"}):null})},a.scenarioId)):e.jsx("div",{className:"text-xs text-gray-400 py-4",children:"No screenshots available"})})]})})}function G({entity:t}){const l=U(),[c,p]=d.useState(!1),o=()=>{p(!0),l.submit({entitySha:t.sha,filePath:t.filePath||""},{method:"post",action:"/api/analyze"})};return d.useEffect(()=>{l.state==="idle"&&c&&p(!1)},[l.state,c]),e.jsx("div",{className:"bg-white rounded hover:bg-gray-100 transition-colors cursor-pointer border-b border-[#e1e1e1]",onClick:o,children:e.jsxs("div",{className:"px-5 py-4 flex items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(P,{type:t.entityType}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-0.5",children:[e.jsx(E,{to:`/entity/${t.sha}`,className:"text-sm font-medium text-gray-900 no-underline",children:t.name}),e.jsx("span",{className:"text-[10px] font-semibold px-1 py-0.5 rounded",style:{color:t.entityType==="visual"?"#7c3aed":t.entityType==="library"?"#0DBFE9":t.entityType==="type"?"#dc2626":t.entityType==="data"?"#2563eb":t.entityType==="index"?"#ea580c":t.entityType==="functionCall"?"#7c3aed":t.entityType==="class"?"#059669":t.entityType==="method"?"#0891b2":"#6b7280",backgroundColor:t.entityType==="visual"?"#f3e8ff":t.entityType==="library"?"#cffafe":t.entityType==="type"?"#fee2e2":t.entityType==="data"?"#dbeafe":t.entityType==="index"?"#ffedd5":t.entityType==="functionCall"?"#f3e8ff":t.entityType==="class"?"#d1fae5":t.entityType==="method"?"#cffafe":"#f3f4f6"},children:t.entityType?t.entityType.toUpperCase():"UNKNOWN"})]}),e.jsx("div",{className:"text-xs text-gray-400 truncate",children:t.filePath})]})]}),e.jsx("div",{className:"w-32 flex justify-center",children:e.jsx("span",{className:"text-[10px] text-gray-500 bg-gray-100 px-2 py-1 rounded",children:"Not analyzed"})}),e.jsx("div",{className:"w-32 text-center text-[10px] text-gray-500",children:Y(t.createdAt||null)}),e.jsx("div",{className:"w-24 flex justify-end",children:c||l.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded text-xs text-pink-700 font-semibold flex items-center gap-1.5",children:[e.jsx(K,{size:14,className:"animate-spin"}),"Analyzing..."]}):e.jsx("button",{onClick:o,className:"bg-[#e0e9ec] text-[#005c75] px-4 py-1.5 rounded text-xs font-medium hover:bg-[#d0dde1] transition-colors cursor-pointer",children:"Analyze"})})]})})}export{ce as default,ie as meta};
|