@codeyam/codeyam-cli 0.1.0-bleeding-edge.8afd3ee → 0.1.0-staging.1
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/log.txt +3 -3
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +107 -51
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +183 -36
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +0 -34
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/index.ts +0 -2
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.js +2 -3
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.js +2 -3
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/frameworks/getNextRoutePath.ts +2 -6
- package/analyzer-template/project/writeUniversalMocks.ts +2 -6
- package/background/src/lib/virtualized/project/writeUniversalMocks.js +2 -3
- package/background/src/lib/virtualized/project/writeUniversalMocks.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +3 -4
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +5 -25
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +5 -75
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +2 -3
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js +0 -13
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +35 -15
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-GqWwt5wG.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-B0oiPem-.js → InteractivePreview-Dh-FldQK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-p0fuyqGQ.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-BKKG1s2B.js → LogViewer-Dp6DC845.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DU_jxCPD.js → SafeScreenshot-xwuhwsZH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-Bl2IRh55.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-DmjXUj6m.js → ScenarioViewer-M2QuSHKC.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/_index-CAVtep9Q.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CLmzsLsT.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/chart-column-B2I7jQx2.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/circle-alert-GwwOAbhw.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{components-Dj-Ggnl2.js → components-CAx5ONX_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CgyOwWip.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-BbR3FwNc.js → dev.empty-DGy3zrli.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-BHiWkb_W.js → entity._sha._-1Z6D0fLM.js} +7 -7
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-L7M9Vr5z.js → entity._sha_.create-scenario-ChAdTrrU.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-C9w-q7P3.js → entity._sha_.edit._scenarioId-D9L7267w.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entityVersioning-Bk_YB1jM.js → entityVersioning-DO2gCvXv.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CdGoUs8A.js → entry.client-C6FRgjPr.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-C3-cQjgv.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/git-Dp4EB9nv.js +12 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-Da3jt49-.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-DN7Vr40D.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/manifest-172a4629.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-COyVTsPq.js +16 -0
- package/codeyam-cli/src/webserver/build/client/assets/search-CvyP_1Lo.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{settings-NU_ZquhK.js → settings-Hbf8b7J_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-MZc4XdmE.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-BMBi0VzO.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-Lumm1t01.js → useLastLogLine-BBlyqxij.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useToast-C_VxoXTh.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/zap-B4gsLUZQ.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/{index-DHr4rT4u.js → index-eAULANMV.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-lutv16q5.js +161 -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 +18 -24
- package/package.json +1 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +107 -51
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +183 -36
- package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +0 -28
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/index.js +0 -2
- package/packages/analyze/src/lib/asts/sourceFiles/index.js.map +1 -1
- package/packages/utils/src/lib/frameworks/getNextRoutePath.js +2 -3
- package/packages/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +0 -238
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.ts +0 -25
- package/codeyam-cli/scripts/apply-setup.js +0 -288
- package/codeyam-cli/scripts/apply-setup.js.map +0 -1
- package/codeyam-cli/scripts/extract-setup.js +0 -130
- package/codeyam-cli/scripts/extract-setup.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/src/webserver/build/client/assets/EntityTypeIcon-rqv54FUY.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-DqXXjAJ7.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-5DY-YIxu.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/_index-DvSrcxsk.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CsaMd9mb.js +0 -10
- package/codeyam-cli/src/webserver/build/client/assets/chart-column-VXBS6qOn.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/circle-alert-n5GUC2AS.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/clock-DKqtX8js.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/file-text-B6Er7j5k.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-KcDVw1FY.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-B9uZ8eSJ.js +0 -12
- package/codeyam-cli/src/webserver/build/client/assets/globals-B0f88RTV.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-v3c6DFp4.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-fca08d7e.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-Cf8VBqIb.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/search-DA14wXpu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-COJUrwGu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CNaMJ-nR.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useToast-BRShB17p.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/zap-BvukH0eN.js +0 -1
- package/codeyam-cli/src/webserver/build/client/favicon.svg +0 -13
- package/codeyam-cli/src/webserver/build/server/assets/server-build-Bi1mj14J.js +0 -166
- package/codeyam-cli/src/webserver/public/favicon.svg +0 -13
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +0 -191
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +0 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.js +0 -16
- package/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.__remixManifest={"entry":{"module":"/assets/entry.client-C6FRgjPr.js","imports":["/assets/components-CAx5ONX_.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/root-COyVTsPq.js","imports":["/assets/components-CAx5ONX_.js","/assets/createLucideIcon-CgyOwWip.js","/assets/settings-MZc4XdmE.js","/assets/useToast-C_VxoXTh.js","/assets/useLastLogLine-BBlyqxij.js","/assets/LogViewer-Dp6DC845.js"],"css":[]},"routes/entity.$sha_.edit.$scenarioId":{"id":"routes/entity.$sha_.edit.$scenarioId","parentId":"root","path":"entity/:sha/edit/:scenarioId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/entity._sha_.edit._scenarioId-D9L7267w.js","imports":["/assets/components-CAx5ONX_.js","/assets/InteractivePreview-Dh-FldQK.js","/assets/useLastLogLine-BBlyqxij.js"],"css":["/assets/InteractivePreview-CMKNK2uU.css"]},"routes/entity.$sha_.create-scenario":{"id":"routes/entity.$sha_.create-scenario","parentId":"root","path":"entity/:sha/create-scenario","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/entity._sha_.create-scenario-ChAdTrrU.js","imports":["/assets/components-CAx5ONX_.js","/assets/InteractivePreview-Dh-FldQK.js","/assets/useLastLogLine-BBlyqxij.js"],"css":["/assets/InteractivePreview-CMKNK2uU.css"]},"routes/api.generate-scenario-data":{"id":"routes/api.generate-scenario-data","parentId":"root","path":"api/generate-scenario-data","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.generate-scenario-data-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.llm-calls.$entitySha":{"id":"routes/api.llm-calls.$entitySha","parentId":"root","path":"api/llm-calls/:entitySha","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.llm-calls._entitySha-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.branch-entity-diff":{"id":"routes/api.branch-entity-diff","parentId":"root","path":"api/branch-entity-diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.branch-entity-diff-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.capture-screenshot":{"id":"routes/api.capture-screenshot","parentId":"root","path":"api/capture-screenshot","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.capture-screenshot-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.recapture-scenario":{"id":"routes/api.recapture-scenario","parentId":"root","path":"api/recapture-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.logs.$projectSlug":{"id":"routes/api.logs.$projectSlug","parentId":"root","path":"api/logs/:projectSlug","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.logs._projectSlug-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.execute-function":{"id":"routes/api.execute-function","parentId":"root","path":"api/execute-function","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.execute-function-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.interactive-mode":{"id":"routes/api.interactive-mode","parentId":"root","path":"api/interactive-mode","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.interactive-mode-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.delete-scenario":{"id":"routes/api.delete-scenario","parentId":"root","path":"api/delete-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.delete-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.process-status":{"id":"routes/api.process-status","parentId":"root","path":"api/process-status","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.process-status-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.save-scenarios":{"id":"routes/api.save-scenarios","parentId":"root","path":"api/save-scenarios","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.save-scenarios-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.kill-process":{"id":"routes/api.kill-process","parentId":"root","path":"api/kill-process","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.kill-process-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.screenshot.$":{"id":"routes/api.screenshot.$","parentId":"root","path":"api/screenshot/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.screenshot._-l0sNRNKZ.js","imports":[],"css":[]},"routes/activity.($tab)":{"id":"routes/activity.($tab)","parentId":"root","path":"activity/:tab?","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/activity.(_tab)-CLmzsLsT.js","imports":["/assets/components-CAx5ONX_.js","/assets/LogViewer-Dp6DC845.js","/assets/useLastLogLine-BBlyqxij.js","/assets/ScenarioPreview-Bl2IRh55.js","/assets/createLucideIcon-CgyOwWip.js","/assets/chart-column-B2I7jQx2.js","/assets/circle-alert-GwwOAbhw.js","/assets/SafeScreenshot-xwuhwsZH.js","/assets/LibraryFunctionPreview-p0fuyqGQ.js"],"css":[]},"routes/api.debug-setup":{"id":"routes/api.debug-setup","parentId":"root","path":"api/debug-setup","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.debug-setup-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.recapture":{"id":"routes/api.recapture","parentId":"root","path":"api/recapture","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-l0sNRNKZ.js","imports":[],"css":[]},"routes/entity.$sha.$":{"id":"routes/entity.$sha.$","parentId":"root","path":"entity/:sha/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/entity._sha._-1Z6D0fLM.js","imports":["/assets/components-CAx5ONX_.js","/assets/useLastLogLine-BBlyqxij.js","/assets/InteractivePreview-Dh-FldQK.js","/assets/entityVersioning-DO2gCvXv.js","/assets/ScenarioPreview-Bl2IRh55.js","/assets/ScenarioViewer-M2QuSHKC.js","/assets/SafeScreenshot-xwuhwsZH.js","/assets/EntityTypeIcon-GqWwt5wG.js","/assets/LogViewer-Dp6DC845.js","/assets/loader-circle-DN7Vr40D.js","/assets/LibraryFunctionPreview-p0fuyqGQ.js","/assets/createLucideIcon-CgyOwWip.js","/assets/circle-alert-GwwOAbhw.js","/assets/chart-column-B2I7jQx2.js"],"css":["/assets/InteractivePreview-CMKNK2uU.css"]},"routes/api.analyze":{"id":"routes/api.analyze","parentId":"root","path":"api/analyze","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.analyze-l0sNRNKZ.js","imports":[],"css":[]},"routes/simulations":{"id":"routes/simulations","parentId":"root","path":"simulations","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/simulations-BMBi0VzO.js","imports":["/assets/components-CAx5ONX_.js","/assets/SafeScreenshot-xwuhwsZH.js","/assets/entityVersioning-DO2gCvXv.js","/assets/EntityTypeIcon-GqWwt5wG.js","/assets/search-CvyP_1Lo.js","/assets/createLucideIcon-CgyOwWip.js","/assets/chart-column-B2I7jQx2.js"],"css":[]},"routes/api.events":{"id":"routes/api.events","parentId":"root","path":"api/events","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.events-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.memory":{"id":"routes/api.memory","parentId":"root","path":"api/memory","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.memory-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.queue":{"id":"routes/api.queue","parentId":"root","path":"api/queue","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api.queue-l0sNRNKZ.js","imports":[],"css":[]},"routes/dev.empty":{"id":"routes/dev.empty","parentId":"root","path":"dev/empty","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/dev.empty-DGy3zrli.js","imports":["/assets/components-CAx5ONX_.js","/assets/ScenarioViewer-M2QuSHKC.js","/assets/InteractivePreview-Dh-FldQK.js","/assets/LogViewer-Dp6DC845.js","/assets/SafeScreenshot-xwuhwsZH.js","/assets/useLastLogLine-BBlyqxij.js"],"css":["/assets/InteractivePreview-CMKNK2uU.css"]},"routes/settings":{"id":"routes/settings","parentId":"root","path":"settings","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/settings-Hbf8b7J_.js","imports":["/assets/components-CAx5ONX_.js"],"css":[]},"routes/static.$":{"id":"routes/static.$","parentId":"root","path":"static/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/static._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_index":{"id":"routes/_index","parentId":"root","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_index-CAVtep9Q.js","imports":["/assets/components-CAx5ONX_.js","/assets/useLastLogLine-BBlyqxij.js","/assets/useToast-C_VxoXTh.js","/assets/LogViewer-Dp6DC845.js","/assets/EntityTypeIcon-GqWwt5wG.js","/assets/SafeScreenshot-xwuhwsZH.js","/assets/createLucideIcon-CgyOwWip.js","/assets/settings-MZc4XdmE.js","/assets/zap-B4gsLUZQ.js","/assets/loader-circle-DN7Vr40D.js","/assets/chart-column-B2I7jQx2.js"],"css":[]},"routes/files":{"id":"routes/files","parentId":"root","path":"files","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/files-C3-cQjgv.js","imports":["/assets/components-CAx5ONX_.js","/assets/EntityTypeIcon-GqWwt5wG.js","/assets/entityVersioning-DO2gCvXv.js","/assets/LibraryFunctionPreview-p0fuyqGQ.js","/assets/SafeScreenshot-xwuhwsZH.js","/assets/loader-circle-DN7Vr40D.js","/assets/createLucideIcon-CgyOwWip.js","/assets/search-CvyP_1Lo.js","/assets/chart-column-B2I7jQx2.js"],"css":[]},"routes/git":{"id":"routes/git","parentId":"root","path":"git","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/git-Dp4EB9nv.js","imports":["/assets/components-CAx5ONX_.js","/assets/useLastLogLine-BBlyqxij.js","/assets/useToast-C_VxoXTh.js","/assets/LogViewer-Dp6DC845.js","/assets/EntityTypeIcon-GqWwt5wG.js","/assets/entityVersioning-DO2gCvXv.js","/assets/createLucideIcon-CgyOwWip.js","/assets/zap-B4gsLUZQ.js","/assets/circle-alert-GwwOAbhw.js","/assets/SafeScreenshot-xwuhwsZH.js","/assets/chart-column-B2I7jQx2.js"],"css":[]}},"url":"/assets/manifest-172a4629.js","version":"172a4629"};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{y as J,z as W,A as K,B as Q,r,_ as X,j as e,a as Z,L,M as U,C as ee,S as te,D as se,u as ne,d as ie,O as ae}from"./components-CAx5ONX_.js";import{c as S}from"./createLucideIcon-CgyOwWip.js";import{S as oe}from"./settings-MZc4XdmE.js";import{C as O,T as re,u as le}from"./useToast-C_VxoXTh.js";import{u as ce}from"./useLastLogLine-BBlyqxij.js";import{L as de}from"./LogViewer-Dp6DC845.js";let V="positions";function me({getKey:t,...o}){let{isSpaMode:l}=J(),m=W(),i=K();Q({getKey:t,storageKey:V});let a=r.useMemo(()=>{if(!t)return null;let s=t(m,i);return s!==m.key?s:null},[]);if(l)return null;let c=((s,f)=>{if(!window.history.state||!window.history.state.key){let x=Math.random().toString(32).slice(2);window.history.replaceState({key:x},"")}try{let h=JSON.parse(sessionStorage.getItem(s)||"{}")[f||window.history.state.key];typeof h=="number"&&window.scrollTo(0,h)}catch(x){console.error(x),sessionStorage.removeItem(s)}}).toString();return r.createElement("script",X({},o,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${JSON.stringify(V)}, ${JSON.stringify(a)})`}}))}function xe({id:t,selected:o,onClick:l,icon:m,name:i}){const[a,c]=r.useState(!1);r.useEffect(()=>{c(!0)},[]);const s=r.useCallback(()=>{l?.(t)},[l,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:s,children:[e.jsx("div",{className:`${o?"bg-primary-100 text-cygray-10":""} w-10 h-10 rounded-lg flex items-center justify-center`,children:a&&m}),e.jsx("span",{className:`${o?"text-primary-100":""} whitespace-nowrap`,children:i})]})}const he="/assets/cy-logo-cli-C1gnJVOL.svg";const ue=[["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"}]],_=S("activity",ue);const pe=[["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"}]],fe=S("component",pe);const ge=[["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"}]],ye=S("file",ge);const je=[["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"}]],F=S("git-commit-horizontal",je);const ve=[["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"}]],be=S("house",ve);const ke=[["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"}]],we=S("panels-top-left",ke);function Ne(){const t=W(),o=Z(),[l,m]=r.useState(),i={width:"24px",height:"24px",strokeWidth:1.5},a=[{id:"dashboard",icon:e.jsx(be,{style:i}),link:"/",name:"Dashboard"},{id:"git",icon:e.jsx(F,{style:i}),link:"/git",name:"Git"},{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:i,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:"files",icon:e.jsx(ye,{style:i}),link:"/files",name:"Files"},{id:"activity",icon:e.jsx(_,{style:i}),link:"/activity",name:"Activity"},{id:"settings",icon:e.jsx(oe,{style:i}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(F,{style:i}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx(we,{style:i}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(fe,{style:i}),link:"/components",name:"Components",hidden:!0}],c=r.useCallback(s=>{const f=a.find(x=>x.id===s);f?.link&&o(f.link),m(x=>x===s?void 0:s)},[a,o]);return r.useEffect(()=>{const s={dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],files:["files"],settings:["settings"],pages:["pages"],components:["components"]};for(const[f,x]of Object.entries(s))if(x.some(h=>h==="/"?t.pathname==="/":t.pathname.includes(h))){m(f);return}m(void 0)},[t]),e.jsx("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 h-full flex flex-col items-center",children:[e.jsx("div",{children:e.jsx(L,{to:"/",className:"flex items-center justify-center h-20",children:e.jsx("img",{src:he,alt:"CodeYam",className:"h-8"})})}),a.filter(s=>!s.hidden).map(s=>e.jsx(xe,{id:s.id,selected:s.id===l,onClick:c,icon:s.icon,name:s.name},`sidebar-button-${s.id}`))]})})}function Ce({toast:t,onClose:o}){r.useEffect(()=>{const i=t.duration||5e3;if(i>0){const a=setTimeout(()=>{o(t.id)},i);return()=>clearTimeout(a)}},[t.id,t.duration,o]);const l={success:"✅",error:"❌",info:"ℹ️",warning:"⚠️"},m={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] ${m[t.type]}`,children:[e.jsx("span",{className:"text-2xl",children:l[t.type]}),e.jsx("p",{className:"flex-1 text-sm font-medium m-0",children:t.message}),e.jsx("button",{onClick:()=>o(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 Ae({toasts:t,onClose:o}){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:`
|
|
6
|
+
@keyframes slideIn {
|
|
7
|
+
from {
|
|
8
|
+
transform: translateX(400px);
|
|
9
|
+
opacity: 0;
|
|
10
|
+
}
|
|
11
|
+
to {
|
|
12
|
+
transform: translateX(0);
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`}),t.map(l=>e.jsx(Ce,{toast:l,onClose:o},l.id))]})}function Le({currentRun:t,projectSlug:o,currentEntities:l=[],isAnalysisStarting:m=!1,queuedJobCount:i=0,queueJobs:a=[],currentlyExecuting:c=null,historicalRuns:s=[]}){const[f,x]=r.useState(!1),[h,j]=r.useState(!1),[w,N]=r.useState(!1),[v,p]=r.useState(null),C=!!c||a.length>0,E=!!c,b=c?.entities||l,T=!!t?.analysisCompletedAt;t?.readyToBeCaptured,t?.capturesCompleted;const M=t?.currentEntityShas&&t.currentEntityShas.length>0,A=C,{lastLine:R,isCompleted:G}=ce(o,A),g=E||A&&!G&&!C,D=(()=>{if(A)return!1;const u=Date.now()-30*1e3;if(t?.createdAt&&M){const d=t.analysisCompletedAt||t.createdAt;if(new Date(d).getTime()>u)return!0}if(s.length>0){const d=s[0],y=d.analysisCompletedAt||d.archivedAt||d.createdAt;if(y&&new Date(y).getTime()>u)return!0}return!1})(),I=(()=>{const u=Date.now()-1440*60*1e3;if(t?.createdAt&&M){const d=t.analysisCompletedAt||t.createdAt;if(new Date(d).getTime()>u)return!0}if(s.length>0){const d=s[0],y=d.analysisCompletedAt||d.archivedAt||d.createdAt;if(y&&new Date(y).getTime()>u)return!0}return!1})(),$=m||g||i>0||D;r.useEffect(()=>{const n=c?.id||null;$?n!==v&&(j(!0),N(!1),v!==null&&p(null)):(v!==null&&p(null),!I&&h&&!w&&j(!1))},[$,I,h,w,v,c?.id]);const Y=()=>c?`Analyzing${a.length>0?` (+${a.length} queued)`:""}`:a.length>0?`${a.length} job${a.length>1?"s":""} queued`:g?T?"Capture in Progress":"Analysis in Progress":D?"Recently completed":"Idle",P=()=>g?"⚙️":i>0?"⏳":D?"✅":"📊",q=g;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded-lg shadow-lg border-2 transition-all duration-200 border-gray-300 ${h?"min-w-[400px] max-w-[600px]":"w-auto"}`,style:$?{borderColor:"#005C75"}:{},children:[!h&&e.jsxs("div",{onClick:()=>{j(!0),N(!0),p(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors rounded-lg",title:"Click to expand",children:[e.jsx("span",{className:`${q?"animate-spin":""}`,children:P()==="📊"?e.jsx(_,{style:{width:"20px",height:"20px",strokeWidth:1.5}}):P()==="✅"?e.jsx(O,{size:20,style:{color:"#10B981",strokeWidth:1.5}}):e.jsx("span",{className:"text-lg",children:P()})}),e.jsxs("span",{className:"text-sm font-medium text-gray-700",children:["Activity: ",Y()]})]}),h&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center p-3 w-full",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>{j(!1),p(c?.id||null)},className:"p-1.5 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors shadow-sm flex items-center justify-center",title:"Collapse","aria-label":"Collapse notification",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),e.jsx("div",{className:`${g?"animate-spin":""}`,children:g?e.jsx("span",{className:"text-2xl",children:"⚙️"}):D?e.jsx(O,{size:24,style:{color:"#10B981",strokeWidth:1.5}}):e.jsx(_,{style:{width:"24px",height:"24px",strokeWidth:1.5}})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("h3",{className:"text-sm font-bold text-gray-900 mb-1",children:g?T?"Capture in Progress":"Analysis in Progress":D?"Analysis Complete":"Activity"})})]}),e.jsx("div",{children:e.jsx("button",{onClick:()=>x(!0),className:"px-3 py-1.5 text-white rounded-md text-xs font-semibold transition-colors whitespace-nowrap",style:{backgroundColor:"#005C75"},onMouseEnter:n=>n.currentTarget.style.backgroundColor="#004560",onMouseLeave:n=>n.currentTarget.style.backgroundColor="#005C75",title:"View full analysis logs",children:"📋 View Logs"})})]}),e.jsxs("div",{className:"px-4 pb-4 border-t border-gray-200 pt-3",children:[!$&&!I&&e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{className:"text-xs text-gray-600 mb-2",children:"No recent analysis activity. Start an analysis to see progress here."}),e.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[e.jsx("div",{children:'• Click "Analyze" on any entity in the Git or Files view'}),e.jsxs("div",{children:["• Or run"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"codeyam analyze"})," ","from the command line"]})]})]}),g&&T&&(t?.readyToBeCaptured??0)>0&&e.jsxs("div",{className:"mb-3 border rounded-md p-2",style:{backgroundColor:"#E8F4F8",borderColor:"#B3D9E8"},children:[e.jsx("p",{className:"text-xs font-semibold mb-1",style:{color:"#003D52"},children:"Capture Progress:"}),e.jsxs("p",{className:"text-xs",style:{color:"#005C75"},children:[t?.capturesCompleted??0," of"," ",t?.readyToBeCaptured??0," entities captured"]})]}),g&&b.length>0&&e.jsxs("div",{className:"mb-3",children:[e.jsxs("p",{className:"text-xs font-semibold text-gray-700 mb-2",children:[c?"Analyzing":T?"Capturing":"Analyzing"," ",b.length===1?"Entity":"Entities",":"]}),e.jsx("div",{className:"space-y-1 max-h-[200px] overflow-y-auto",children:b.map(n=>e.jsxs(L,{to:`/entity/${n.sha}`,className:"block text-xs font-medium truncate hover:underline",style:{color:"#005C75"},title:`${n.name} - ${n.filePath}`,children:["📄 ",n.name,e.jsxs("span",{className:"text-gray-500 ml-1",children:["(",n.filePath,")"]})]},n.sha))})]}),g&&e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{className:"text-xs font-semibold text-gray-700 mb-1",children:"Current Step:"}),e.jsx("p",{className:"text-xs font-mono text-gray-600 break-words",children:R||"Starting analysis..."})]}),a.length>0&&c&&e.jsxs("div",{className:"mb-3",children:[e.jsxs("p",{className:"text-xs font-semibold text-gray-700 mb-2",children:["Queued (",a.length,"):"]}),e.jsx("div",{className:"space-y-2 max-h-[150px] overflow-y-auto",children:a.map(n=>e.jsxs("div",{className:"space-y-1",children:[n.entities.length>0?n.entities.slice(0,2).map(u=>e.jsxs(L,{to:`/entity/${u.sha}`,className:"block text-xs font-medium truncate hover:underline",style:{color:"#005C75"},title:`${u.name} - ${u.filePath}`,children:["⏳ ",u.name,e.jsxs("span",{className:"text-gray-500 ml-1",children:["(",u.filePath,")"]})]},u.sha)):e.jsxs("div",{className:"text-xs text-gray-600 truncate",children:["⏳ ",n.entities.length," ",n.entities.length===1?"entity":"entities"]}),n.entities.length>2&&e.jsxs("div",{className:"text-xs text-gray-500 italic pl-4",children:["+",n.entities.length-2," more"]})]},n.id))})]}),I&&s.length>0&&e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{className:"text-xs font-semibold text-gray-700 mb-2",children:"Recently Completed:"}),e.jsx("div",{className:"space-y-2",children:s.slice(0,3).map((n,u)=>{const d=n.entities||[];d.length||n.currentEntityShas?.length||n.entityCount;const y=n.analysisCompletedAt||n.archivedAt||n.createdAt||"",z=(()=>{if(!y)return"";const k=Date.now()-new Date(y).getTime(),B=Math.floor(k/6e4),H=Math.floor(k/36e5);return H>0?`${H}h ago`:B>0?`${B}m ago`:"just now"})();return e.jsx("div",{className:"text-xs bg-gray-50 rounded-md p-2",children:e.jsxs("div",{className:"flex justify-between items-start mb-1",children:[e.jsx("div",{children:d.length>0&&e.jsxs("div",{className:"text-gray-600 text-[10px] space-y-0.5",children:[d.slice(0,3).map(k=>e.jsxs("div",{className:"truncate",children:[e.jsxs(L,{to:`/entity/${k.sha}`,className:"hover:underline",style:{color:"#005C75"},children:["📄 ",k.name]}),e.jsxs("span",{className:"text-gray-500 ml-1",children:["(",k.filePath,")"]})]},k.sha)),d.length>3&&e.jsxs("div",{className:"text-gray-500",children:["+",d.length-3," more"]})]})}),e.jsx("div",{className:"text-gray-500 text-[10px]",children:z})]})},u)})})]}),e.jsx("div",{className:"mt-3 pt-3 border-t border-gray-200",children:e.jsx(L,{to:"/activity",className:"text-xs font-medium hover:underline",style:{color:"#005C75"},children:"View All Activity →"})})]})]})]}),f&&o&&e.jsx(de,{projectSlug:o,onClose:()=>x(!1)})]})}const Se="/assets/globals-Da3jt49-.css";function Te({text:t,subtext:o,linkText:l,linkTo:m}){const[i,a]=r.useState(!1);return i?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:o})]}),e.jsx(L,{to:m,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:l})]}),e.jsx("button",{type:"button",onClick:()=>a(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors","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 _e=()=>[{rel:"stylesheet",href:Se},{rel:"icon",href:"/cy-logo-cli.svg"}];function Me(){const{currentRun:t,projectSlug:o,currentEntities:l,availableAPIKeys:m,queuedJobCount:i,queueJobs:a,currentlyExecuting:c,historicalRuns:s}=ne(),{toasts:f,closeToast:x}=le(),h=ie(),j=r.useRef(h),w=W();r.useEffect(()=>{j.current=h},[h]);const N=w.pathname.startsWith("/entity/")&&w.pathname.includes("/edit/")||w.pathname.startsWith("/dev/");return r.useEffect(()=>{const v=new EventSource("/api/events");let p=null,C=0;const E=2e3;return v.addEventListener("message",b=>{if(JSON.parse(b.data).type==="db-change"){const M=Date.now(),A=M-C;A<E?(p&&clearTimeout(p),p=setTimeout(()=>{j.current.revalidate(),C=Date.now(),p=null},E-A)):(j.current.revalidate(),C=M)}}),v.addEventListener("error",b=>{console.error("SSE connection error:",b)}),()=>{p&&clearTimeout(p),v.close()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${N?"":"grid"} bg-cygray-10`,style:N?void 0:{gridTemplateColumns:"96px minmax(900px, 1fr)"},children:[!N&&e.jsx(Ne,{}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-white",children:[m.length===0&&e.jsx(Te,{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(ae,{})]})]}),e.jsx(Ae,{toasts:f,onClose:x}),e.jsx(Le,{currentRun:t,projectSlug:o,currentEntities:l,isAnalysisStarting:!1,queuedJobCount:i,queueJobs:a,currentlyExecuting:c,historicalRuns:s})]})}function We(){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(U,{}),e.jsx(ee,{})]}),e.jsxs("body",{children:[e.jsx(re,{children:e.jsx(Me,{})}),e.jsx(me,{}),e.jsx(te,{}),e.jsx(se,{})]})]})}export{We as default,_e as links};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-CgyOwWip.js";const o=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],r=c("chevron-down",o);const e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],s=c("search",e);export{r as C,s as S};
|
package/codeyam-cli/src/webserver/build/client/assets/{settings-NU_ZquhK.js → settings-Hbf8b7J_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as U,c as L,b as $,d as W,r as a,j as e}from"./components-Dj-Ggnl2.js";const X=()=>[{title:"CodeYam - Settings"},{name:"description",content:"Configure project settings"}];function Q(t){if(!t)return"";const i=[t.command];return t.args&&t.args.length>0&&i.push(...t.args),i.join(" ")}function I({mock:t,onSave:i,onCancel:l}){const[c,m]=a.useState(t.entityName),[n,h]=a.useState(t.filePath),[o,x]=a.useState(t.content),g=()=>{if(!c.trim()||!n.trim()||!o.trim()){alert("All fields are required");return}i({entityName:c,filePath:n,content:o})};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Entity Name"}),e.jsx("input",{type:"text",value:c,onChange:d=>m(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., determineDatabaseType"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path"}),e.jsx("input",{type:"text",value:n,onChange:d=>h(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., packages/supabase/src/lib/kysely/db.ts"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),e.jsx("textarea",{value:o,onChange:d=>x(d.target.value),rows:6,className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., function determineDatabaseType() { return 'postgresql' }"})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:l,className:"px-4 py-2 bg-gray-200 text-gray-800 border-none rounded text-sm cursor-pointer hover:bg-gray-300",children:"Cancel"}),e.jsx("button",{type:"button",onClick:g,className:"px-4 py-2 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Save"})]})]})}function B(t){try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return t}}function Z(){const{config:t,secrets:i,versionInfo:l,error:c}=U(),m=L(),n=$(),h=W(),[o,x]=a.useState(t?.universalMocks||[]),[g,d]=a.useState((t?.pathsToIgnore||[]).join(", ")),[v,P]=a.useState((t?.pathsToIgnore||[]).join(", ")),[K,w]=a.useState(i?.GROQ_API_KEY||""),[M,A]=a.useState(i?.ANTHROPIC_API_KEY||""),[T,S]=a.useState(i?.OPENAI_API_KEY||""),[b,_]=a.useState(!1),[y,E]=a.useState(!1),[f,F]=a.useState(!1),[q,p]=a.useState(!1),[D,R]=a.useState(!1),[k,C]=a.useState(!1),[O,j]=a.useState(null),[V,N]=a.useState(!1);a.useEffect(()=>{if(t){x(t.universalMocks||[]);const s=(t.pathsToIgnore||[]).join(", ");d(s),P(s)}i&&(w(i.GROQ_API_KEY||""),A(i.ANTHROPIC_API_KEY||""),S(i.OPENAI_API_KEY||""))},[t,i]),a.useEffect(()=>{if(m?.success){p(!0);const s=setTimeout(()=>p(!1),3e3);return()=>clearTimeout(s)}},[m]),a.useEffect(()=>{if(n.state==="idle"&&n.data&&!k){console.log("[Settings] Fetcher data:",n.data);const s=n.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),p(!0),C(!0),(g!==v||s.requiresRestart)&&R(!0),h.revalidate();const r=setTimeout(()=>{p(!1),C(!1)},3e3);return()=>clearTimeout(r)}}},[n.state,n.data,k,h,g,v]);const z=s=>{s.preventDefault();const r=new FormData(s.currentTarget);r.set("universalMocks",JSON.stringify(o)),console.log("[Settings] Submitting form data:",{universalMocks:r.get("universalMocks"),openAiApiKey:r.get("openAiApiKey")?"***":"(empty)"}),n.submit(r,{method:"post"})},G=s=>{x([...o,s]),N(!1)},Y=(s,r)=>{const u=[...o];u[s]=r,x(u),j(null)},H=s=>{x(o.filter((r,u)=>u!==s))};return c?e.jsxs("div",{className:"max-w-6xl mx-auto p-8 font-sans",children:[e.jsx("header",{className:"mb-6 pb-4 border-b border-gray-200",children:e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Settings"})})}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:e.jsx("p",{className:"text-red-700",children:c})})]}):e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:e.jsxs("div",{className:"px-36 py-12 font-sans",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Settings"}),e.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Project Configuration"})]}),e.jsx("div",{className:"max-w-5xl my-8",children:e.jsxs("form",{onSubmit:z,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl mb-4 text-gray-800 font-semibold",children:"Project Metadata"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block mb-2 font-medium text-gray-700",children:"Web Applications"}),t?.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded",children:e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),s.startCommand&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsxs("span",{className:"text-gray-900 font-mono text-xs",children:[s.startCommand.command," ",s.startCommand.args?.join(" ")]})]})]})},r))}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"}),e.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Web applications are detected during initialization. To modify, edit `.codeyam/config.json` or re-run `codeyam init`."})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider Configuration"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure API keys for AI-powered analysis. Choose the provider that best fits your needs."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Groq"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Lightning-fast inference with industry-leading speed. Groq's LPU architecture delivers exceptional performance for real-time AI applications with competitive pricing."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," $0.10/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-blue-100 text-blue-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 850 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Less reliable, but capable of producing reasonable results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"groqApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:b?"text":"password",id:"groqApiKey",name:"groqApiKey",value:K,onChange:s=>w(s.target.value),placeholder:"gsk_...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>_(!b),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none",children:b?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Anthropic Claude"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Advanced reasoning and coding capabilities with superior context understanding. Claude excels at complex analysis tasks and provides highly accurate results with detailed explanations."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," $3.00/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-blue-100 text-blue-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 120 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"anthropicApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:y?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:M,onChange:s=>A(s.target.value),placeholder:"sk-ant-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>E(!y),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none",children:y?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"OpenAI GPT"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Industry-standard AI with broad capabilities and extensive ecosystem. GPT models offer reliable performance across diverse tasks with good balance of speed and quality."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," $2.50/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-blue-100 text-blue-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 150 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"openAiApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:f?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:T,onChange:s=>S(s.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>F(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none",children:f?"Hide":"Show"})]})]})]})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"pathsToIgnore",className:"block mb-2 font-medium text-gray-700",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:g,onChange:s=>d(s.target.value),placeholder:"e.g., __tests__, \\.test\\.ts$, ^background (no quotes needed)",className:"w-full px-3 py-3 border border-gray-300 rounded text-base font-mono focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/10"}),e.jsxs("p",{className:"mt-2 text-sm text-gray-600",children:["Comma-separated list of regex patterns for paths to ignore during file watching. Examples:"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"__tests__"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"\\.test\\.tsx?$"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"^background"}),e.jsx("br",{}),e.jsx("span",{className:"text-xs text-gray-500 mt-1 inline-block",children:"Note: Files matching patterns in .gitignore are also automatically ignored"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-3",children:[e.jsx("label",{className:"block font-medium text-gray-700",children:"Universal Mocks"}),e.jsx("button",{type:"button",onClick:()=>N(!0),className:"px-4 py-2 bg-green-600 text-white border-none rounded text-sm cursor-pointer hover:bg-green-700",children:"Add Mock"})]}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),o.length===0?e.jsx("div",{className:"p-4 bg-gray-50 rounded text-sm text-gray-500 text-center",children:"No universal mocks configured"}):e.jsx("div",{className:"space-y-3",children:o.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:O===r?e.jsx(I,{mock:s,onSave:u=>Y(r,u),onCancel:()=>j(null)}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-gray-800 mb-1",children:s.entityName}),e.jsx("div",{className:"text-sm text-gray-600 mb-2",children:s.filePath}),e.jsx("pre",{className:"text-xs bg-white p-2 rounded border border-gray-200 overflow-x-auto",children:s.content})]}),e.jsxs("div",{className:"flex gap-2 ml-3",children:[e.jsx("button",{type:"button",onClick:()=>j(r),className:"px-3 py-1 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>H(r),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},r))})]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("button",{type:"submit",disabled:n.state==="submitting",className:"px-8 py-3 bg-blue-600 text-white border-none rounded text-base font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-blue-700 whitespace-nowrap",children:n.state==="submitting"?"Saving...":"Save Settings"}),n.state==="submitting"&&e.jsx("span",{className:"text-gray-600 text-sm font-medium",children:"Saving..."}),q&&e.jsx("span",{className:"text-emerald-600 text-sm font-medium whitespace-nowrap",children:"Settings saved successfully!"}),D&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-3 py-2",children:[e.jsx("div",{children:"⚠️ Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsx("code",{className:"ml-2 bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"})]}),m?.error&&e.jsx("span",{className:"text-red-600 text-sm font-medium",children:m.error}),(()=>{if(n.data&&typeof n.data=="object"&&"error"in n.data){const s=n.data;return typeof s.error=="string"?e.jsx("span",{className:"text-red-600 text-sm font-medium",children:s.error}):null}return null})()]}),t&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Current Configuration"}),e.jsxs("dl",{className:"grid grid-cols-[150px_1fr] gap-2 m-0",children:[t.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Project Slug:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.projectSlug})]}),t.packageManager&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Package Manager:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.packageManager})]}),t.webapps&&t.webapps.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Web Applications:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.webapps.map((s,r)=>e.jsxs("div",{className:"mb-2",children:[e.jsx("div",{className:"font-semibold",children:s.path==="."?"Root":s.path}),e.jsxs("div",{className:"text-sm text-gray-600",children:["Framework: ",s.framework]}),s.startCommand&&e.jsxs("div",{className:"text-sm text-gray-600 font-mono",children:["Command:"," ",Q(s.startCommand)]})]},r))})]})]})]}),l&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Version Information"}),e.jsxs("dl",{className:"grid grid-cols-[180px_1fr] gap-2 m-0",children:[l.webserverVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Webserver:"}),e.jsx("dd",{className:"m-0 text-gray-800 font-mono",children:l.webserverVersion.version||"unknown"})]}),l.templateVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Analyzer Template:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:l.templateVersion.version||l.templateVersion.gitCommit?.slice(0,7)||"unknown"}),l.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",B(l.templateVersion.buildTimestamp),")"]})]})]}),l.cachedAnalyzerVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:l.cachedAnalyzerVersion.version||l.cachedAnalyzerVersion.gitCommit?.slice(0,7)||"unknown"}),l.isCacheStale?e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 rounded text-xs",children:"Stale - will update on next analysis"}):e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:"Up to date"})]})]}),!l.cachedAnalyzerVersion&&t?.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsx("dd",{className:"m-0 text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})]})]})}),V&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-2xl w-full p-6",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900",children:"Add Universal Mock"}),e.jsx(I,{mock:{entityName:"",filePath:"",content:""},onSave:G,onCancel:()=>N(!1)})]})})]})})}export{Z as default,X as meta};
|
|
1
|
+
import{u as U,c as L,b as $,d as W,r as a,j as e}from"./components-CAx5ONX_.js";const X=()=>[{title:"CodeYam - Settings"},{name:"description",content:"Configure project settings"}];function Q(t){if(!t)return"";const i=[t.command];return t.args&&t.args.length>0&&i.push(...t.args),i.join(" ")}function I({mock:t,onSave:i,onCancel:l}){const[c,m]=a.useState(t.entityName),[n,h]=a.useState(t.filePath),[o,x]=a.useState(t.content),g=()=>{if(!c.trim()||!n.trim()||!o.trim()){alert("All fields are required");return}i({entityName:c,filePath:n,content:o})};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Entity Name"}),e.jsx("input",{type:"text",value:c,onChange:d=>m(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., determineDatabaseType"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path"}),e.jsx("input",{type:"text",value:n,onChange:d=>h(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., packages/supabase/src/lib/kysely/db.ts"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),e.jsx("textarea",{value:o,onChange:d=>x(d.target.value),rows:6,className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., function determineDatabaseType() { return 'postgresql' }"})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:l,className:"px-4 py-2 bg-gray-200 text-gray-800 border-none rounded text-sm cursor-pointer hover:bg-gray-300",children:"Cancel"}),e.jsx("button",{type:"button",onClick:g,className:"px-4 py-2 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Save"})]})]})}function B(t){try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return t}}function Z(){const{config:t,secrets:i,versionInfo:l,error:c}=U(),m=L(),n=$(),h=W(),[o,x]=a.useState(t?.universalMocks||[]),[g,d]=a.useState((t?.pathsToIgnore||[]).join(", ")),[v,P]=a.useState((t?.pathsToIgnore||[]).join(", ")),[K,w]=a.useState(i?.GROQ_API_KEY||""),[M,A]=a.useState(i?.ANTHROPIC_API_KEY||""),[T,S]=a.useState(i?.OPENAI_API_KEY||""),[b,_]=a.useState(!1),[y,E]=a.useState(!1),[f,F]=a.useState(!1),[q,p]=a.useState(!1),[D,R]=a.useState(!1),[k,C]=a.useState(!1),[O,j]=a.useState(null),[V,N]=a.useState(!1);a.useEffect(()=>{if(t){x(t.universalMocks||[]);const s=(t.pathsToIgnore||[]).join(", ");d(s),P(s)}i&&(w(i.GROQ_API_KEY||""),A(i.ANTHROPIC_API_KEY||""),S(i.OPENAI_API_KEY||""))},[t,i]),a.useEffect(()=>{if(m?.success){p(!0);const s=setTimeout(()=>p(!1),3e3);return()=>clearTimeout(s)}},[m]),a.useEffect(()=>{if(n.state==="idle"&&n.data&&!k){console.log("[Settings] Fetcher data:",n.data);const s=n.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),p(!0),C(!0),(g!==v||s.requiresRestart)&&R(!0),h.revalidate();const r=setTimeout(()=>{p(!1),C(!1)},3e3);return()=>clearTimeout(r)}}},[n.state,n.data,k,h,g,v]);const z=s=>{s.preventDefault();const r=new FormData(s.currentTarget);r.set("universalMocks",JSON.stringify(o)),console.log("[Settings] Submitting form data:",{universalMocks:r.get("universalMocks"),openAiApiKey:r.get("openAiApiKey")?"***":"(empty)"}),n.submit(r,{method:"post"})},G=s=>{x([...o,s]),N(!1)},Y=(s,r)=>{const u=[...o];u[s]=r,x(u),j(null)},H=s=>{x(o.filter((r,u)=>u!==s))};return c?e.jsxs("div",{className:"max-w-6xl mx-auto p-8 font-sans",children:[e.jsx("header",{className:"mb-6 pb-4 border-b border-gray-200",children:e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Settings"})})}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:e.jsx("p",{className:"text-red-700",children:c})})]}):e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:e.jsxs("div",{className:"px-36 py-12 font-sans",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Settings"}),e.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Project Configuration"})]}),e.jsx("div",{className:"max-w-5xl my-8",children:e.jsxs("form",{onSubmit:z,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl mb-4 text-gray-800 font-semibold",children:"Project Metadata"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block mb-2 font-medium text-gray-700",children:"Web Applications"}),t?.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded",children:e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),s.startCommand&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsxs("span",{className:"text-gray-900 font-mono text-xs",children:[s.startCommand.command," ",s.startCommand.args?.join(" ")]})]})]})},r))}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"}),e.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Web applications are detected during initialization. To modify, edit `.codeyam/config.json` or re-run `codeyam init`."})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider Configuration"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure API keys for AI-powered analysis. Choose the provider that best fits your needs."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Groq"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Lightning-fast inference with industry-leading speed. Groq's LPU architecture delivers exceptional performance for real-time AI applications with competitive pricing."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," $0.10/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-blue-100 text-blue-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 850 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Less reliable, but capable of producing reasonable results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"groqApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:b?"text":"password",id:"groqApiKey",name:"groqApiKey",value:K,onChange:s=>w(s.target.value),placeholder:"gsk_...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>_(!b),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none",children:b?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Anthropic Claude"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Advanced reasoning and coding capabilities with superior context understanding. Claude excels at complex analysis tasks and provides highly accurate results with detailed explanations."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," $3.00/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-blue-100 text-blue-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 120 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"anthropicApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:y?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:M,onChange:s=>A(s.target.value),placeholder:"sk-ant-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>E(!y),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none",children:y?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"OpenAI GPT"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Industry-standard AI with broad capabilities and extensive ecosystem. GPT models offer reliable performance across diverse tasks with good balance of speed and quality."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," $2.50/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-blue-100 text-blue-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 150 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"openAiApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:f?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:T,onChange:s=>S(s.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>F(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none",children:f?"Hide":"Show"})]})]})]})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"pathsToIgnore",className:"block mb-2 font-medium text-gray-700",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:g,onChange:s=>d(s.target.value),placeholder:"e.g., __tests__, \\.test\\.ts$, ^background (no quotes needed)",className:"w-full px-3 py-3 border border-gray-300 rounded text-base font-mono focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/10"}),e.jsxs("p",{className:"mt-2 text-sm text-gray-600",children:["Comma-separated list of regex patterns for paths to ignore during file watching. Examples:"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"__tests__"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"\\.test\\.tsx?$"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"^background"}),e.jsx("br",{}),e.jsx("span",{className:"text-xs text-gray-500 mt-1 inline-block",children:"Note: Files matching patterns in .gitignore are also automatically ignored"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-3",children:[e.jsx("label",{className:"block font-medium text-gray-700",children:"Universal Mocks"}),e.jsx("button",{type:"button",onClick:()=>N(!0),className:"px-4 py-2 bg-green-600 text-white border-none rounded text-sm cursor-pointer hover:bg-green-700",children:"Add Mock"})]}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),o.length===0?e.jsx("div",{className:"p-4 bg-gray-50 rounded text-sm text-gray-500 text-center",children:"No universal mocks configured"}):e.jsx("div",{className:"space-y-3",children:o.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:O===r?e.jsx(I,{mock:s,onSave:u=>Y(r,u),onCancel:()=>j(null)}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-gray-800 mb-1",children:s.entityName}),e.jsx("div",{className:"text-sm text-gray-600 mb-2",children:s.filePath}),e.jsx("pre",{className:"text-xs bg-white p-2 rounded border border-gray-200 overflow-x-auto",children:s.content})]}),e.jsxs("div",{className:"flex gap-2 ml-3",children:[e.jsx("button",{type:"button",onClick:()=>j(r),className:"px-3 py-1 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>H(r),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},r))})]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("button",{type:"submit",disabled:n.state==="submitting",className:"px-8 py-3 bg-blue-600 text-white border-none rounded text-base font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-blue-700 whitespace-nowrap",children:n.state==="submitting"?"Saving...":"Save Settings"}),n.state==="submitting"&&e.jsx("span",{className:"text-gray-600 text-sm font-medium",children:"Saving..."}),q&&e.jsx("span",{className:"text-emerald-600 text-sm font-medium whitespace-nowrap",children:"Settings saved successfully!"}),D&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-3 py-2",children:[e.jsx("div",{children:"⚠️ Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsx("code",{className:"ml-2 bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"})]}),m?.error&&e.jsx("span",{className:"text-red-600 text-sm font-medium",children:m.error}),(()=>{if(n.data&&typeof n.data=="object"&&"error"in n.data){const s=n.data;return typeof s.error=="string"?e.jsx("span",{className:"text-red-600 text-sm font-medium",children:s.error}):null}return null})()]}),t&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Current Configuration"}),e.jsxs("dl",{className:"grid grid-cols-[150px_1fr] gap-2 m-0",children:[t.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Project Slug:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.projectSlug})]}),t.packageManager&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Package Manager:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.packageManager})]}),t.webapps&&t.webapps.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Web Applications:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.webapps.map((s,r)=>e.jsxs("div",{className:"mb-2",children:[e.jsx("div",{className:"font-semibold",children:s.path==="."?"Root":s.path}),e.jsxs("div",{className:"text-sm text-gray-600",children:["Framework: ",s.framework]}),s.startCommand&&e.jsxs("div",{className:"text-sm text-gray-600 font-mono",children:["Command:"," ",Q(s.startCommand)]})]},r))})]})]})]}),l&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Version Information"}),e.jsxs("dl",{className:"grid grid-cols-[180px_1fr] gap-2 m-0",children:[l.webserverVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Webserver:"}),e.jsx("dd",{className:"m-0 text-gray-800 font-mono",children:l.webserverVersion.version||"unknown"})]}),l.templateVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Analyzer Template:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:l.templateVersion.version||l.templateVersion.gitCommit?.slice(0,7)||"unknown"}),l.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",B(l.templateVersion.buildTimestamp),")"]})]})]}),l.cachedAnalyzerVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:l.cachedAnalyzerVersion.version||l.cachedAnalyzerVersion.gitCommit?.slice(0,7)||"unknown"}),l.isCacheStale?e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 rounded text-xs",children:"Stale - will update on next analysis"}):e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:"Up to date"})]})]}),!l.cachedAnalyzerVersion&&t?.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsx("dd",{className:"m-0 text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})]})]})}),V&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-2xl w-full p-6",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900",children:"Add Universal Mock"}),e.jsx(I,{mock:{entityName:"",filePath:"",content:""},onSave:G,onCancel:()=>N(!1)})]})})]})})}export{Z as default,X as meta};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-CgyOwWip.js";const e=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o=c("settings",e);export{o as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,u as P,r as n,L as w,a as E,b as $}from"./components-CAx5ONX_.js";import{S as A}from"./SafeScreenshot-xwuhwsZH.js";import{g as M}from"./entityVersioning-DO2gCvXv.js";import{I as F,E as D}from"./EntityTypeIcon-GqWwt5wG.js";import{C as U,S as _}from"./search-CvyP_1Lo.js";import{c as C}from"./createLucideIcon-CgyOwWip.js";import"./chart-column-B2I7jQx2.js";const R=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],O=C("chevron-left",R);const V=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],k=C("chevron-right",V);const B=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K=C("x",B);function Q({entity:t,variant:o="default"}){const l=M(t),{badge:h,hasOutdatedSimulations:r}=l;return o==="compact"?r?e.jsx("div",{className:"bg-yellow-50 px-2 py-1 rounded text-[10px] font-medium text-yellow-700",children:"Out of date"}):e.jsxs("div",{className:"flex items-center gap-1.5 bg-green-50 px-2 py-1 rounded text-[10px] font-medium text-green-700",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),"Up to date"]}):e.jsxs("div",{className:`flex items-center gap-2 px-[15px] py-0 h-[26px] ${h.bgColor} rounded`,children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-amber-500":"bg-green-500"}`}),e.jsx("span",{className:`text-xs font-semibold ${h.color}`,children:r?"Out of date":"Up to date"})]})}const se=()=>[{title:"Simulations - CodeYam"},{name:"description",content:"A visual gallery of your recently captured component screenshots"}];function ae(){const o=P().entities,[l,h]=n.useState(""),[r,p]=n.useState("visual"),[i,c]=n.useState(null),m=n.useMemo(()=>{const s=[];return o.forEach(a=>{const d=a.analyses?.[0];if(d?.scenarios){const x=d.scenarios.filter(g=>g.metadata?.screenshotPaths?.[0]).map(g=>({scenarioName:g.name,scenarioDescription:g.description||"",screenshotPath:g.metadata?.screenshotPaths?.[0]||"",scenarioId:g.id}));x.length>0&&s.push({entity:a,screenshots:x,createdAt:d.createdAt||""})}}),s.sort((a,d)=>new Date(d.createdAt).getTime()-new Date(a.createdAt).getTime()),s},[o]),y=n.useMemo(()=>o.filter(s=>!s.analyses?.[0]?.scenarios?.some(x=>x.metadata?.screenshotPaths?.[0])),[o]),f=n.useMemo(()=>m.filter(({entity:s})=>{const a=!l||s.name.toLowerCase().includes(l.toLowerCase()),d=r==="all"||s.entityType===r;return a&&d}),[m,l,r]),S=n.useMemo(()=>y.filter(s=>{const a=!l||s.name.toLowerCase().includes(l.toLowerCase()),d=r==="all"||s.entityType===r;return a&&d}),[y,l,r]),u=n.useMemo(()=>{const s=[];return f.forEach(({entity:a,screenshots:d})=>{d.forEach(x=>{s.push({entitySha:a.sha,entityName:a.name,scenarioId:x.scenarioId||"",scenarioName:x.scenarioName,scenarioDescription:x.scenarioDescription,screenshotPath:x.screenshotPath})})}),s},[f]),I=n.useCallback(s=>{h(s.target.value)},[]),L=n.useCallback(s=>{p(s.target.value)},[]),z=n.useCallback((s,a)=>{const d=u.findIndex(x=>x.entitySha===s&&x.scenarioId===a);d!==-1&&c(d)},[u]),b=n.useCallback(()=>{c(null)},[]),v=n.useCallback(()=>{c(s=>s===null||s===0?u.length-1:s-1)},[u.length]),j=n.useCallback(()=>{c(s=>s===null?0:(s+1)%u.length)},[u.length]);n.useEffect(()=>{if(i===null)return;const s=a=>{a.key==="Escape"?b():a.key==="ArrowLeft"?v():a.key==="ArrowRight"&&j()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[i,b,v,j]);const N=m.length>0,T=i!==null?u[i]:null;return e.jsxs("div",{className:"bg-[#f9f9f9] min-h-screen overflow-y-auto",children:[e.jsxs("div",{className:"px-36 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 m-0",children:"Simulations"}),e.jsx("p",{className:"text-sm text-gray-600 mt-2",children:"All recently captured simulations."})]}),!N&&e.jsxs("div",{className:"rounded-lg px-5 py-6 mb-6 flex items-center gap-4",style:{backgroundColor:"#F0F5F8"},children:[e.jsx("div",{className:"w-9 h-9 rounded flex items-center justify-center shrink-0",style:{backgroundColor:"#005C75"},children:e.jsx(F,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm m-0 mb-1",style:{color:"#005C75"},children:"This page will display a visual gallery of your recently captured component screenshots."}),e.jsx("p",{className:"text-sm font-semibold m-0",style:{color:"#005C75"},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-6",children:[e.jsx("div",{className:"text-[10px] 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 py-2 pr-8 text-sm cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",value:r,onChange:L,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(U,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(_,{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 py-2 text-sm placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors",value:l,onChange:I})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[N&&(f.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-b-lg p-8 text-center text-gray-500",children:"No simulations match your filters."}):e.jsxs(e.Fragment,{children:[f.map(({entity:s,screenshots:a})=>e.jsx(q,{entity:s,screenshots:a,onScreenshotClick:z},s.sha)),e.jsx("div",{className:"bg-white border-x border-b border-gray-200 rounded-b-lg px-5 py-4 text-center",children:e.jsx(w,{to:"/files?entityType=visual",className:"text-sm text-[#005c75] hover:text-[#004a5e] hover:underline",children:"Find more entities to simulate →"})})]})),!N&&(S.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."}):S.map(s=>e.jsx(X,{entity:s},s.sha)))]})]}),T&&e.jsx(W,{screenshot:T,currentIndex:i,totalCount:u.length,onClose:b,onPrevious:v,onNext:j})]})}function W({screenshot:t,currentIndex:o,totalCount:l,onClose:h,onPrevious:r,onNext:p}){const i=E(),[c,m]=n.useState(!1),y=()=>{i(`/entity/${t.entitySha}/scenarios/${t.scenarioId}?from=simulations`)};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:h,children:e.jsxs("div",{className:"relative flex flex-col w-[90vw] h-[90vh] max-w-[1400px] bg-white rounded-lg overflow-hidden",onClick:f=>f.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 bg-gray-50 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm text-gray-500",children:[o+1," of ",l]}),e.jsx("span",{className:"text-gray-300",children:"|"}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:t.entityName})]}),e.jsx("button",{onClick:h,className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded-full transition-colors cursor-pointer",children:e.jsx(K,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"relative flex-1 flex items-center justify-center p-6 bg-gray-100 overflow-hidden",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[e.jsx("button",{onClick:r,className:`absolute left-4 z-10 p-3 bg-white/90 hover:bg-white rounded-full shadow-lg transition-all cursor-pointer ${c?"opacity-100":"opacity-0"}`,children:e.jsx(O,{className:"w-6 h-6 text-gray-700"})}),e.jsx("div",{className:"flex items-center justify-center w-full h-full cursor-pointer",onClick:y,children:e.jsx(A,{screenshotPath:t.screenshotPath,alt:t.scenarioName,className:"max-w-full max-h-full object-contain rounded-lg shadow-lg"})}),e.jsx("button",{onClick:p,className:`absolute right-4 z-10 p-3 bg-white/90 hover:bg-white rounded-full shadow-lg transition-all cursor-pointer ${c?"opacity-100":"opacity-0"}`,children:e.jsx(k,{className:"w-6 h-6 text-gray-700"})})]}),e.jsxs("div",{className:"px-6 py-4 border-t border-gray-200 bg-white cursor-pointer hover:bg-gray-50 transition-colors shrink-0",onClick:y,children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-lg font-semibold text-[#005c75] hover:text-[#004a5e] m-0 mb-1",children:t.scenarioName}),e.jsx("p",{className:"text-sm text-gray-600 m-0 line-clamp-2 min-h-10",children:t.scenarioDescription||" "})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-1 text-sm text-[#005c75]",children:[e.jsx("span",{children:"View details"}),e.jsx(k,{className:"w-4 h-4"})]})]}),e.jsx("p",{className:"text-xs text-gray-400 mt-2 m-0",children:"Click to view this scenario in the entity page"})]})]})})}function q({entity:t,screenshots:o,onScreenshotClick:l}){const h=E();t.entityType;const r=o.length||(t.analyses?.[0]?.scenarios?.length??0),p=i=>{h(`/entity/${t.sha}/scenarios/${i}?from=simulations`)};return e.jsx("div",{className:"bg-white border-x border-b border-gray-200 first:border-t last:rounded-b-lg hover:bg-gray-100 transition-colors",children:e.jsxs("div",{className:"px-5 py-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(w,{to:`/entity/${t.sha}`,className:"flex items-center gap-2 no-underline",children:[e.jsx(D,{type:t.entityType}),e.jsxs("span",{className:"text-xs font-medium text-gray-800",children:[t.name," (",r,")"]})]}),e.jsx(Q,{entity:t,variant:"compact"})]}),e.jsx("div",{className:"flex gap-2.5 mt-3 overflow-x-auto pb-1",children:o.length>0?o.map(i=>e.jsx("button",{onClick:()=>p(i.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 border-gray-200 overflow-hidden bg-gray-100 flex items-center justify-center transition-all",style:{"--hover-border":"#005C75"},onMouseEnter:c=>{c.currentTarget.style.borderColor="#005C75",c.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.15)"},onMouseLeave:c=>{c.currentTarget.style.borderColor="#d1d5db",c.currentTarget.style.boxShadow="none"},children:e.jsx(A,{screenshotPath:i.screenshotPath,alt:i.scenarioName,className:"max-w-full max-h-full object-contain"})})},i.scenarioId)):e.jsx("div",{className:"text-xs text-gray-400 py-4",children:"No screenshots available"})})]})})}function X({entity:t}){const o=$(),[l,h]=n.useState(!1);t.entityType;const r=()=>{h(!0),o.submit({entitySha:t.sha,filePath:t.filePath||""},{method:"post",action:"/api/analyze"})};n.useEffect(()=>{o.state==="idle"&&l&&h(!1)},[o.state,l]);const p=i=>{if(!i)return"";const c=new Date(i),m=new Date;return c.toDateString()===m.toDateString()?`Today, ${c.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toLowerCase()}`:c.toLocaleDateString("en-US",{month:"short",day:"numeric"})};return e.jsx("div",{className:"bg-white border-x border-b border-gray-200 first:border-t last:rounded-b-lg hover:bg-gray-100 transition-colors cursor-pointer",onClick:r,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(D,{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(w,{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:p(t.createdAt)}),e.jsx("div",{className:"w-24 flex justify-end",children:e.jsx("button",{onClick:r,disabled:l||o.state!=="idle",className:"bg-[#e0e9ec] text-[#005c75] px-4 py-1.5 rounded text-[10px] font-medium hover:bg-[#d0dde1] transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",children:l?"Analyzing...":"Analyze"})})]})})}export{ae as default,se as meta};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t}from"./components-
|
|
1
|
+
import{r as t}from"./components-CAx5ONX_.js";function I(c,s){const[E,l]=t.useState(""),[d,n]=t.useState(!1),[g,a]=t.useState(null),[$,r]=t.useState(!1);t.useEffect(()=>{s&&(r(!1),n(!1),a(null))},[s]),t.useEffect(()=>{if(!c||!s){s||l("");return}const u=async()=>{try{const i=await fetch(`/api/logs/${c}`);if(i.ok){const o=(await i.text()).trim().split(`
|
|
2
2
|
`).filter(e=>e.length>0);if(o.length<3){n(!1),r(!1),a(null),l("");return}const f=o.filter(e=>e.includes("CodeYam Log Level 1"));if(f.length>0){const e=f[f.length-1];l(e.replace(/.*CodeYam Log Level 1: /,""))}const L=o.find(e=>e.includes("$$INTERACTIVE_SERVER_URL$$:"));if(L){const e=L.split("$$INTERACTIVE_SERVER_URL$$:")[1].trim();a(e),r(!0)}o.some(e=>e.includes("CodeYam: Exiting start.js"))&&n(!0)}}catch{}};u().catch(()=>{});const m=setInterval(()=>{u().catch(()=>{})},2e3);return()=>clearInterval(m)},[c,s]);const h=t.useCallback(()=>{l(""),n(!1),a(null),r(!1)},[]);return{lastLine:E,interactiveUrl:g,isCompleted:d,resetLogs:h}}export{I as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m}from"./createLucideIcon-CgyOwWip.js";import{r as t,j as x}from"./components-CAx5ONX_.js";const T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],k=m("circle-check",T),r=t.createContext(void 0);function p({children:o}){const[n,c]=t.useState([]),i=t.useCallback((s,e="info",a=5e3)=>{const d={id:`toast-${Date.now()}-${Math.random()}`,message:s,type:e,duration:a};c(l=>[...l,d])},[]),u=t.useCallback(s=>{c(e=>e.filter(a=>a.id!==s))},[]);return x.jsx(r.Provider,{value:{toasts:n,showToast:i,closeToast:u},children:o})}function v(){const o=t.useContext(r);if(!o)throw new Error("useToast must be used within a ToastProvider");return o}export{k as C,p as T,v as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-CgyOwWip.js";const o=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e=a("zap",o);export{e as Z};
|
package/codeyam-cli/src/webserver/build/server/assets/{index-DHr4rT4u.js → index-eAULANMV.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"fetch-retry";import{G as Q,H as R,I as V,J as W,K as X,L as Y,P as Z,S as _,d as $,a as aa,b as sa,c as ta,e as oa,f as ia,g as ra,h as ma,i as ea,j as pa,k as la,C as na,F as da,E as ba,D as ua,l as ca,m as Ta,n as Ca,o as ha,p as ya,q as Ba,r as Sa,s as Aa,t as ga,u as Ea,v as Fa,w as Pa,x as ja,y as Da,z as Ma,A as fa,B as qa}from"./server-build-
|
|
1
|
+
import"fetch-retry";import{G as Q,H as R,I as V,J as W,K as X,L as Y,P as Z,S as _,d as $,a as aa,b as sa,c as ta,e as oa,f as ia,g as ra,h as ma,i as ea,j as pa,k as la,C as na,F as da,E as ba,D as ua,l as ca,m as Ta,n as Ca,o as ha,p as ya,q as Ba,r as Sa,s as Aa,t as ga,u as Ea,v as Fa,w as Pa,x as ja,y as Da,z as Ma,A as fa,B as qa}from"./server-build-lutv16q5.js";import"typescript";import"kysely";import"react/jsx-runtime";import"node:stream";import"@remix-run/node";import"@remix-run/react";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"react-resizable";import"openai";import"p-queue";import"p-retry";import"child_process";import"util";import"@aws-sdk/client-dynamodb";import"json5";import"lru-cache";import"pluralize";import"piscina";import"@aws-sdk/util-dynamodb";import"dotenv";import"events";import"uuid";import"url";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"v8";import"react-diff-viewer-continued";export{Q as AnalysisBranchesTableColumns,R as BranchesTableColumns,V as CommitsTableColumns,W as EntitiesTableColumns,X as EntityBranchesTableColumns,Y as FilesTableColumns,Z as ProjectsTableColumns,_ as ScenariosTableColumns,$ as dbToAnalysis,aa as dbToAnalysisBranch,sa as dbToBranch,ta as dbToCommit,oa as dbToEntity,ia as dbToFile,ra as dbToProject,ma as dbToScenario,ea as dbToUserScenario,pa as deleteScenarios,la as generateSha,na as getDatabase,da as getJsonHelper,ba as getPostgreDatabase,ua as getSqliteDatabase,ca as loadAnalyses,Ta as loadAnalysis,Ca as loadBranches,ha as loadCommitBranches,ya as loadCommits,Ba as loadEntities,Sa as loadEntity,Aa as loadFiles,ga as loadProject,Ea as updateCommitMetadata,Fa as updateFreshAnalysisMetadata,Pa as updateFreshAnalysisStatus,ja as updateProjectMetadata,Da as upsertCommitBranches,Ma as upsertCommits,fa as upsertGithubUser,qa as upsertScenarios};
|