@codeyam/codeyam-cli 0.1.7 → 0.1.8
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/package.json +6 -6
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +34 -3
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +14 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +27 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +78 -2
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +6 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +0 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +65 -28
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +83 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +23 -4
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/database/index.ts +1 -0
- package/analyzer-template/packages/database/package.json +3 -3
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +8 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +62 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +31 -20
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +0 -5
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +151 -135
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
- package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/index.js +1 -0
- package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +20 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +45 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +23 -13
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +100 -89
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/playwright/captureFromUrl.ts +89 -82
- package/analyzer-template/project/constructMockCode.ts +136 -43
- package/analyzer-template/project/reconcileMockDataKeys.ts +19 -14
- package/analyzer-template/project/start.ts +3 -0
- package/analyzer-template/project/startScenarioCapture.ts +9 -0
- package/analyzer-template/project/writeClientLogRoute.ts +125 -0
- package/analyzer-template/project/writeMockDataTsx.ts +17 -0
- package/analyzer-template/project/writeScenarioComponents.ts +36 -7
- package/analyzer-template/tsconfig.json +13 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +115 -34
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +17 -11
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +2 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
- package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +12 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +29 -7
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +208 -11
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/cli.js +2 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +17 -7
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +58 -3
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +1839 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +40 -11
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +246 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +126 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +295 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +100 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +147 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +76 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +26 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +19 -3
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/buildFlags.js +4 -0
- package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
- package/codeyam-cli/src/utils/devModeEvents.js +40 -0
- package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
- package/codeyam-cli/src/utils/editorAudit.js +82 -0
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +98 -0
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
- package/codeyam-cli/src/utils/editorJournal.js +137 -0
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
- package/codeyam-cli/src/utils/editorMockState.js +248 -0
- package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js +64 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +66 -0
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +56 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
- package/codeyam-cli/src/utils/fileMetadata.js +5 -0
- package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +25 -9
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +103 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +55 -13
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
- package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
- package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
- package/codeyam-cli/src/utils/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
- package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +70 -1
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +7 -6
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js +27 -2
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +45 -4
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +158 -0
- package/codeyam-cli/src/utils/testRunner.js.map +1 -0
- package/codeyam-cli/src/utils/webappDetection.js +14 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js +41 -27
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +108 -18
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-CtmbP4Gl.js → CopyButton-DmJveP3T.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-DlMph_Hm.js → EntityItem-C76mRRiF.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-B-0PjGOU.js → EntityTypeBadge-g3saevPb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-DN9eiJAO.js → EntityTypeIcon-CobE682z.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-rE_fI2h2.js → InteractivePreview-DYFW3lDD.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CnatsCw2.js → LibraryFunctionPreview-DLeucoVX.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-CSP6DZrh.js → LoadingDots-BU_OAEMP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-CMK8Q7yk.js → LogViewer-ceAyBX-H.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-TCV_HBjy.js → ReportIssueModal-djPLI-WV.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CG2uh31y.js → SafeScreenshot-BED4B6sP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-CU_TDYd8.js → ScenarioViewer-B76aig_2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/Terminal-Dnj5CY9R.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-D7IoaWUW.js → TruncatedFilePath-C8OKAR5x.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{_index-B8z7mjR-.js → _index-C96V0n15.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-DZu78RI1.js → activity.(_tab)-BpKzcsJz.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-CUXOrorO.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-Duc5hnl7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-Dm5RS9il.js → agent-transcripts-D9hemwl6.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/api.dev-mode-events-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-audit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-Bp5FLkd4.js → book-open-D_nMCFmP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-DQJA9f4o.js → chevron-down-BH2h1Ea2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-7VptmeIr.js → chunk-JZWAC4HX-C4pqxYJB.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-B6C4LY9o.js → circle-check-DyIKORY6.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{copy-6nzYCu0G.js → copy-NDbZjXao.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-D-QUFOwe.js → createLucideIcon-CMT1jU2q.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BiM6z3Do.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-D1DAKXtT.js +8 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-C6PQhwY5.js → entity._sha._-CrjR3zZW.js} +8 -8
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-DkzqFzFj.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-C7ysA4Jq.js → entity._sha_.edit._scenarioId-BMvVHNXU.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CU6EUArK.js → entry.client-DTvKq3TY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-EWpfFU4X.js → fileTableUtils-cPo8LiG3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-CrxAoWIL.js → files-DO4CZ16O.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{git-BldHtKeW.js → git-CFCTYk9I.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-B17TBSS6.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-7-1FmlHo.js → index-10oVnAAH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-DuYcwYp_.js → index-BcvgDzbZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{labs-CPPVOSWB.js → labs-Zk7ryIM1.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BnDcD54R.js → loader-circle-BAXYRVEO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-a632de18.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{memory-0wMU4KXe.js → memory-Dg0mvYrI.js} +5 -2
- package/codeyam-cli/src/webserver/build/client/assets/{pause-DhQX2g22.js → pause-DTAcYxBt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-DUKqhFlb.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DborVoKD.js → search-fKo7v0Zo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{settings-BWunYSXt.js → settings-DfuTtcJP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-BtrtCYJg.js → simulations-B3aOzpCZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-Bs4NC-VZ.js → terminal-BG4heKCG.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DTf3Jojp.js → triangle-alert-DtSmdtM4.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-D_bDZyDU.js → useCustomSizes-ByhSyh0W.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C14nCb1q.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-BsQb6rFd.js → useReportContext-O-jkvSPx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-BOur3mUv.js → useToast-9FIWuYfK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-HfLydfDq.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CUu_F-oo.js +366 -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/src/webserver/devServer.js +39 -5
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/editorProxy.js +440 -0
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +175 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +140 -0
- package/codeyam-cli/src/webserver/server.js +226 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +698 -0
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +68 -0
- package/codeyam-cli/templates/editor-step-hook.py +147 -0
- package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
- package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
- package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
- package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
- package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
- package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/PRISMA_SETUP.md +84 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +19 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +43 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +35 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +69 -0
- package/codeyam-cli/templates/{codeyam-memory.md → skills/codeyam-memory/SKILL.md} +215 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.sh +108 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.sh +69 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.sh +12 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter.jq +45 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.sh +139 -0
- package/package.json +4 -2
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +22 -4
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +10 -2
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +21 -0
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
- package/packages/ai/src/lib/generateEntityScenarioData.js +57 -2
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +3 -0
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +8 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +0 -5
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +54 -27
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +65 -0
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +18 -4
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/index.js +1 -0
- package/packages/database/index.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +5 -0
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +45 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/packages/database/src/lib/loadCommits.js +23 -13
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +100 -89
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-C1rIyZdV.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DmzSmblj.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DVTcUnur.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-BVgNO76F.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/globals-CLmFdUae.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-717e346a.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-DqfSDjyQ.js +0 -62
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-DZp6rrQD.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/index-B8jmgmn2.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-9OU4lmvL.js +0 -285
- package/scripts/finalize-analyzer.cjs +0 -13
- /package/codeyam-cli/templates/{codeyam-diagnose.md → commands/codeyam-diagnose.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-debug.md → skills/codeyam-debug/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-new-rule.md → skills/codeyam-new-rule/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-setup.md → skills/codeyam-setup/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-sim.md → skills/codeyam-sim/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-test.md → skills/codeyam-test/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-verify.md → skills/codeyam-verify/SKILL.md} +0 -0
package/codeyam-cli/src/webserver/build/client/assets/{index-DuYcwYp_.js → index-BcvgDzbZ.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as L,g as xe}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{r as Se}from"./index-10oVnAAH.js";function je(s,v){for(var c=0;c<v.length;c++){const u=v[c];if(typeof u!="string"&&!Array.isArray(u)){for(const b in u)if(b!=="default"&&!(b in s)){const f=Object.getOwnPropertyDescriptor(u,b);f&&Object.defineProperty(s,b,f.get?f:{enumerable:!0,get:()=>u[b]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var X={exports:{}},Y={},F={exports:{}},Q={},Z={exports:{}},ee,ne;function Te(){if(ne)return ee;ne=1;var s="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ee=s,ee}var te,oe;function Ce(){if(oe)return te;oe=1;var s=Te();function v(){}function c(){}return c.resetWarningCache=v,te=function(){function u(w,O,y,g,R,m){if(m!==s){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}u.isRequired=u;function b(){return u}var f={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:b,element:u,elementType:u,instanceOf:b,node:u,objectOf:b,oneOf:b,oneOfType:b,shape:b,exact:b,checkPropTypes:c,resetWarningCache:v};return f.PropTypes=f,f},te}var ie;function K(){return ie||(ie=1,Z.exports=Ce()()),Z.exports}var I={exports:{}},se;function Me(){if(se)return I.exports;se=1;function s(c){var u,b,f="";if(typeof c=="string"||typeof c=="number")f+=c;else if(typeof c=="object")if(Array.isArray(c)){var w=c.length;for(u=0;u<w;u++)c[u]&&(b=s(c[u]))&&(f&&(f+=" "),f+=b)}else for(b in c)c[b]&&(f&&(f+=" "),f+=b);return f}function v(){for(var c,u,b=0,f="",w=arguments.length;b<w;b++)(c=arguments[b])&&(u=s(c))&&(f&&(f+=" "),f+=u);return f}return I.exports=v,I.exports.clsx=v,I.exports}var T={},W={},ae;function J(){if(ae)return W;ae=1,Object.defineProperty(W,"__esModule",{value:!0}),W.dontSetMe=b,W.findInArray=s,W.int=u,W.isFunction=v,W.isNum=c;function s(f,w){for(let O=0,y=f.length;O<y;O++)if(w.apply(w,[f[O],O,f]))return f[O]}function v(f){return typeof f=="function"||Object.prototype.toString.call(f)==="[object Function]"}function c(f){return typeof f=="number"&&!isNaN(f)}function u(f){return parseInt(f,10)}function b(f,w,O){if(f[w])return new Error(`Invalid prop ${w} passed to ${O} - do not set this, set it on the child.`)}return W}var H={},le;function ze(){if(le)return H;le=1,Object.defineProperty(H,"__esModule",{value:!0}),H.browserPrefixToKey=c,H.browserPrefixToStyle=u,H.default=void 0,H.getPrefix=v;const s=["Moz","Webkit","O","ms"];function v(){var O,y;let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const w=(y=(O=window.document)==null?void 0:O.documentElement)==null?void 0:y.style;if(!w||f in w)return"";for(let g=0;g<s.length;g++)if(c(f,s[g])in w)return s[g];return""}function c(f,w){return w?`${w}${b(f)}`:f}function u(f,w){return w?`-${w.toLowerCase()}-${f}`:f}function b(f){let w="",O=!0;for(let y=0;y<f.length;y++)O?(w+=f[y].toUpperCase(),O=!1):f[y]==="-"?O=!0:w+=f[y];return w}return H.default=v(),H}var ue;function re(){if(ue)return T;ue=1,Object.defineProperty(T,"__esModule",{value:!0}),T.addClassName=d,T.addEvent=w,T.addUserSelectStyles=r,T.createCSSTransform=D,T.createSVGTransform=P,T.getTouch=e,T.getTouchIdentifier=t,T.getTranslation=a,T.innerHeight=R,T.innerWidth=m,T.matchesSelector=b,T.matchesSelectorAndParentsTo=f,T.offsetXYFromParent=S,T.outerHeight=y,T.outerWidth=g,T.removeClassName=p,T.removeEvent=O,T.scheduleRemoveUserSelectStyles=o;var s=J(),v=c(ze());function c(n,i){if(typeof WeakMap=="function")var h=new WeakMap,x=new WeakMap;return(c=function(_,C){if(!C&&_&&_.__esModule)return _;var j,M,E={__proto__:null,default:_};if(_===null||typeof _!="object"&&typeof _!="function")return E;if(j=C?x:h){if(j.has(_))return j.get(_);j.set(_,E)}for(const N in _)N!=="default"&&{}.hasOwnProperty.call(_,N)&&((M=(j=Object.defineProperty)&&Object.getOwnPropertyDescriptor(_,N))&&(M.get||M.set)?j(E,N,M):E[N]=_[N]);return E})(n,i)}let u="";function b(n,i){return u||(u=(0,s.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(h){return(0,s.isFunction)(n[h])})),(0,s.isFunction)(n[u])?n[u](i):!1}function f(n,i,h){let x=n;do{if(b(x,i))return!0;if(x===h)return!1;x=x.parentNode}while(x);return!1}function w(n,i,h,x){if(!n)return;const _={capture:!0,...x};n.addEventListener?n.addEventListener(i,h,_):n.attachEvent?n.attachEvent("on"+i,h):n["on"+i]=h}function O(n,i,h,x){if(!n)return;const _={capture:!0,...x};n.removeEventListener?n.removeEventListener(i,h,_):n.detachEvent?n.detachEvent("on"+i,h):n["on"+i]=null}function y(n){let i=n.clientHeight;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i+=(0,s.int)(h.borderTopWidth),i+=(0,s.int)(h.borderBottomWidth),i}function g(n){let i=n.clientWidth;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i+=(0,s.int)(h.borderLeftWidth),i+=(0,s.int)(h.borderRightWidth),i}function R(n){let i=n.clientHeight;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i-=(0,s.int)(h.paddingTop),i-=(0,s.int)(h.paddingBottom),i}function m(n){let i=n.clientWidth;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i-=(0,s.int)(h.paddingLeft),i-=(0,s.int)(h.paddingRight),i}function S(n,i,h){const _=i===i.ownerDocument.body?{left:0,top:0}:i.getBoundingClientRect(),C=(n.clientX+i.scrollLeft-_.left)/h,j=(n.clientY+i.scrollTop-_.top)/h;return{x:C,y:j}}function D(n,i){const h=a(n,i,"px");return{[(0,v.browserPrefixToKey)("transform",v.default)]:h}}function P(n,i){return a(n,i,"")}function a(n,i,h){let{x,y:_}=n,C=`translate(${x}${h},${_}${h})`;if(i){const j=`${typeof i.x=="string"?i.x:i.x+h}`,M=`${typeof i.y=="string"?i.y:i.y+h}`;C=`translate(${j}, ${M})`+C}return C}function e(n,i){return n.targetTouches&&(0,s.findInArray)(n.targetTouches,h=>i===h.identifier)||n.changedTouches&&(0,s.findInArray)(n.changedTouches,h=>i===h.identifier)}function t(n){if(n.targetTouches&&n.targetTouches[0])return n.targetTouches[0].identifier;if(n.changedTouches&&n.changedTouches[0])return n.changedTouches[0].identifier}function r(n){if(!n)return;let i=n.getElementById("react-draggable-style-el");i||(i=n.createElement("style"),i.type="text/css",i.id="react-draggable-style-el",i.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
2
2
|
`,i.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
3
3
|
`,n.getElementsByTagName("head")[0].appendChild(i)),n.body&&d(n.body,"react-draggable-transparent-selection")}function o(n){window.requestAnimationFrame?window.requestAnimationFrame(()=>{l(n)}):l(n)}function l(n){if(n)try{if(n.body&&p(n.body,"react-draggable-transparent-selection"),n.selection)n.selection.empty();else{const i=(n.defaultView||window).getSelection();i&&i.type!=="Caret"&&i.removeAllRanges()}}catch{}}function d(n,i){n.classList?n.classList.add(i):n.className.match(new RegExp(`(?:^|\\s)${i}(?!\\S)`))||(n.className+=` ${i}`)}function p(n,i){n.classList?n.classList.remove(i):n.className=n.className.replace(new RegExp(`(?:^|\\s)${i}(?!\\S)`,"g"),"")}return T}var k={},ce;function we(){if(ce)return k;ce=1,Object.defineProperty(k,"__esModule",{value:!0}),k.canDragX=b,k.canDragY=f,k.createCoreData=O,k.createDraggableData=y,k.getBoundPosition=c,k.getControlPosition=w,k.snapToGrid=u;var s=J(),v=re();function c(m,S,D){if(!m.props.bounds)return[S,D];let{bounds:P}=m.props;P=typeof P=="string"?P:g(P);const a=R(m);if(typeof P=="string"){const{ownerDocument:e}=a,t=e.defaultView;let r;if(P==="parent"?r=a.parentNode:r=a.getRootNode().querySelector(P),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+P+'" could not find an element.');const o=r,l=t.getComputedStyle(a),d=t.getComputedStyle(o);P={left:-a.offsetLeft+(0,s.int)(d.paddingLeft)+(0,s.int)(l.marginLeft),top:-a.offsetTop+(0,s.int)(d.paddingTop)+(0,s.int)(l.marginTop),right:(0,v.innerWidth)(o)-(0,v.outerWidth)(a)-a.offsetLeft+(0,s.int)(d.paddingRight)-(0,s.int)(l.marginRight),bottom:(0,v.innerHeight)(o)-(0,v.outerHeight)(a)-a.offsetTop+(0,s.int)(d.paddingBottom)-(0,s.int)(l.marginBottom)}}return(0,s.isNum)(P.right)&&(S=Math.min(S,P.right)),(0,s.isNum)(P.bottom)&&(D=Math.min(D,P.bottom)),(0,s.isNum)(P.left)&&(S=Math.max(S,P.left)),(0,s.isNum)(P.top)&&(D=Math.max(D,P.top)),[S,D]}function u(m,S,D){const P=Math.round(S/m[0])*m[0],a=Math.round(D/m[1])*m[1];return[P,a]}function b(m){return m.props.axis==="both"||m.props.axis==="x"}function f(m){return m.props.axis==="both"||m.props.axis==="y"}function w(m,S,D){const P=typeof S=="number"?(0,v.getTouch)(m,S):null;if(typeof S=="number"&&!P)return null;const a=R(D),e=D.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,v.offsetXYFromParent)(P||m,e,D.props.scale)}function O(m,S,D){const P=!(0,s.isNum)(m.lastX),a=R(m);return P?{node:a,deltaX:0,deltaY:0,lastX:S,lastY:D,x:S,y:D}:{node:a,deltaX:S-m.lastX,deltaY:D-m.lastY,lastX:m.lastX,lastY:m.lastY,x:S,y:D}}function y(m,S){const D=m.props.scale;return{node:S.node,x:m.state.x+S.deltaX/D,y:m.state.y+S.deltaY/D,deltaX:S.deltaX/D,deltaY:S.deltaY/D,lastX:m.state.x,lastY:m.state.y}}function g(m){return{left:m.left,top:m.top,right:m.right,bottom:m.bottom}}function R(m){const S=m.findDOMNode();if(!S)throw new Error("<DraggableCore>: Unmounted during event!");return S}return k}var U={},V={},fe;function De(){if(fe)return V;fe=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default=s;function s(){}return V}var de;function Ee(){if(de)return U;de=1,Object.defineProperty(U,"__esModule",{value:!0}),U.default=void 0;var s=y(L()),v=O(K()),c=O(Se()),u=re(),b=we(),f=J(),w=O(De());function O(a){return a&&a.__esModule?a:{default:a}}function y(a,e){if(typeof WeakMap=="function")var t=new WeakMap,r=new WeakMap;return(y=function(o,l){if(!l&&o&&o.__esModule)return o;var d,p,n={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return n;if(d=l?r:t){if(d.has(o))return d.get(o);d.set(o,n)}for(const i in o)i!=="default"&&{}.hasOwnProperty.call(o,i)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,i))&&(p.get||p.set)?d(n,i,p):n[i]=o[i]);return n})(a,e)}function g(a,e,t){return(e=R(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function R(a){var e=m(a,"string");return typeof e=="symbol"?e:e+""}function m(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}const S={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let D=S.mouse,P=class extends s.Component{constructor(){super(...arguments),g(this,"dragging",!1),g(this,"lastX",NaN),g(this,"lastY",NaN),g(this,"touchIdentifier",null),g(this,"mounted",!1),g(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button=="number"&&e.button!==0)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,u.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,u.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;e.type==="touchstart"&&!this.props.allowMobileScroll&&e.preventDefault();const o=(0,u.getTouchIdentifier)(e);this.touchIdentifier=o;const l=(0,b.getControlPosition)(e,o,this);if(l==null)return;const{x:d,y:p}=l,n=(0,b.createCoreData)(this,d,p);(0,w.default)("DraggableCore: handleDragStart: %j",n),(0,w.default)("calling",this.props.onStart),!(this.props.onStart(e,n)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,u.addUserSelectStyles)(r),this.dragging=!0,this.lastX=d,this.lastY=p,(0,u.addEvent)(r,D.move,this.handleDrag),(0,u.addEvent)(r,D.stop,this.handleDragStop))}),g(this,"handleDrag",e=>{const t=(0,b.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:o}=t;if(Array.isArray(this.props.grid)){let p=r-this.lastX,n=o-this.lastY;if([p,n]=(0,b.snapToGrid)(this.props.grid,p,n),!p&&!n)return;r=this.lastX+p,o=this.lastY+n}const l=(0,b.createCoreData)(this,r,o);if((0,w.default)("DraggableCore: handleDrag: %j",l),this.props.onDrag(e,l)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(n)}return}this.lastX=r,this.lastY=o}),g(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,b.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:o}=t;if(Array.isArray(this.props.grid)){let n=r-this.lastX||0,i=o-this.lastY||0;[n,i]=(0,b.snapToGrid)(this.props.grid,n,i),r=this.lastX+n,o=this.lastY+i}const l=(0,b.createCoreData)(this,r,o);if(this.props.onStop(e,l)===!1||this.mounted===!1)return!1;const p=this.findDOMNode();p&&this.props.enableUserSelectHack&&(0,u.scheduleRemoveUserSelectStyles)(p.ownerDocument),(0,w.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,p&&((0,w.default)("DraggableCore: Removing handlers"),(0,u.removeEvent)(p.ownerDocument,D.move,this.handleDrag),(0,u.removeEvent)(p.ownerDocument,D.stop,this.handleDragStop))}),g(this,"onMouseDown",e=>(D=S.mouse,this.handleDragStart(e))),g(this,"onMouseUp",e=>(D=S.mouse,this.handleDragStop(e))),g(this,"onTouchStart",e=>(D=S.touch,this.handleDragStart(e))),g(this,"onTouchEnd",e=>(D=S.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,u.addEvent)(e,S.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,u.removeEvent)(t,S.mouse.move,this.handleDrag),(0,u.removeEvent)(t,S.touch.move,this.handleDrag),(0,u.removeEvent)(t,S.mouse.stop,this.handleDragStop),(0,u.removeEvent)(t,S.touch.stop,this.handleDragStop),(0,u.removeEvent)(e,S.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,u.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){var e,t,r;return(e=this.props)!=null&&e.nodeRef?(r=(t=this.props)==null?void 0:t.nodeRef)==null?void 0:r.current:c.default.findDOMNode(this)}render(){return s.cloneElement(s.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return U.default=P,g(P,"displayName","DraggableCore"),g(P,"propTypes",{allowAnyClick:v.default.bool,allowMobileScroll:v.default.bool,children:v.default.node.isRequired,disabled:v.default.bool,enableUserSelectHack:v.default.bool,offsetParent:function(a,e){if(a[e]&&a[e].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:v.default.arrayOf(v.default.number),handle:v.default.string,cancel:v.default.string,nodeRef:v.default.object,onStart:v.default.func,onDrag:v.default.func,onStop:v.default.func,onMouseDown:v.default.func,scale:v.default.number,className:f.dontSetMe,style:f.dontSetMe,transform:f.dontSetMe}),g(P,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),U}var pe;function Ne(){return pe||(pe=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"DraggableCore",{enumerable:!0,get:function(){return y.default}}),s.default=void 0;var v=m(L()),c=R(K()),u=R(Se()),b=Me(),f=re(),w=we(),O=J(),y=R(Ee()),g=R(De());function R(t){return t&&t.__esModule?t:{default:t}}function m(t,r){if(typeof WeakMap=="function")var o=new WeakMap,l=new WeakMap;return(m=function(d,p){if(!p&&d&&d.__esModule)return d;var n,i,h={__proto__:null,default:d};if(d===null||typeof d!="object"&&typeof d!="function")return h;if(n=p?l:o){if(n.has(d))return n.get(d);n.set(d,h)}for(const x in d)x!=="default"&&{}.hasOwnProperty.call(d,x)&&((i=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(d,x))&&(i.get||i.set)?n(h,x,i):h[x]=d[x]);return h})(t,r)}function S(){return S=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var l in o)({}).hasOwnProperty.call(o,l)&&(t[l]=o[l])}return t},S.apply(null,arguments)}function D(t,r,o){return(r=P(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function P(t){var r=a(t,"string");return typeof r=="symbol"?r:r+""}function a(t,r){if(typeof t!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var l=o.call(t,r);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class e extends v.Component{static getDerivedStateFromProps(r,o){let{position:l}=r,{prevPropsPosition:d}=o;return l&&(!d||l.x!==d.x||l.y!==d.y)?((0,g.default)("Draggable: getDerivedStateFromProps %j",{position:l,prevPropsPosition:d}),{x:l.x,y:l.y,prevPropsPosition:{...l}}):null}constructor(r){super(r),D(this,"onDragStart",(o,l)=>{if((0,g.default)("Draggable: onDragStart: %j",l),this.props.onStart(o,(0,w.createDraggableData)(this,l))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),D(this,"onDrag",(o,l)=>{if(!this.state.dragging)return!1;(0,g.default)("Draggable: onDrag: %j",l);const d=(0,w.createDraggableData)(this,l),p={x:d.x,y:d.y,slackX:0,slackY:0};if(this.props.bounds){const{x:i,y:h}=p;p.x+=this.state.slackX,p.y+=this.state.slackY;const[x,_]=(0,w.getBoundPosition)(this,p.x,p.y);p.x=x,p.y=_,p.slackX=this.state.slackX+(i-p.x),p.slackY=this.state.slackY+(h-p.y),d.x=p.x,d.y=p.y,d.deltaX=p.x-this.state.x,d.deltaY=p.y-this.state.y}if(this.props.onDrag(o,d)===!1)return!1;this.setState(p)}),D(this,"onDragStop",(o,l)=>{if(!this.state.dragging||this.props.onStop(o,(0,w.createDraggableData)(this,l))===!1)return!1;(0,g.default)("Draggable: onDragStop: %j",l);const p={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:i,y:h}=this.props.position;p.x=i,p.y=h}this.setState(p)}),this.state={dragging:!1,dragged:!1,x:r.position?r.position.x:r.defaultPosition.x,y:r.position?r.position.y:r.defaultPosition.y,prevPropsPosition:{...r.position},slackX:0,slackY:0,isElementSVG:!1},r.position&&!(r.onDrag||r.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var r,o;return((o=(r=this.props)==null?void 0:r.nodeRef)==null?void 0:o.current)??u.default.findDOMNode(this)}render(){const{axis:r,bounds:o,children:l,defaultPosition:d,defaultClassName:p,defaultClassNameDragging:n,defaultClassNameDragged:i,position:h,positionOffset:x,scale:_,...C}=this.props;let j={},M=null;const N=!!!h||this.state.dragging,q=h||d,z={x:(0,w.canDragX)(this)&&N?this.state.x:q.x,y:(0,w.canDragY)(this)&&N?this.state.y:q.y};this.state.isElementSVG?M=(0,f.createSVGTransform)(z,x):j=(0,f.createCSSTransform)(z,x);const B=(0,b.clsx)(l.props.className||"",p,{[n]:this.state.dragging,[i]:this.state.dragged});return v.createElement(y.default,S({},C,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),v.cloneElement(v.Children.only(l),{className:B,style:{...l.props.style,...j},transform:M}))}}s.default=e,D(e,"displayName","Draggable"),D(e,"propTypes",{...y.default.propTypes,axis:c.default.oneOf(["both","x","y","none"]),bounds:c.default.oneOfType([c.default.shape({left:c.default.number,right:c.default.number,top:c.default.number,bottom:c.default.number}),c.default.string,c.default.oneOf([!1])]),defaultClassName:c.default.string,defaultClassNameDragging:c.default.string,defaultClassNameDragged:c.default.string,defaultPosition:c.default.shape({x:c.default.number,y:c.default.number}),positionOffset:c.default.shape({x:c.default.oneOfType([c.default.number,c.default.string]),y:c.default.oneOfType([c.default.number,c.default.string])}),position:c.default.shape({x:c.default.number,y:c.default.number}),className:O.dontSetMe,style:O.dontSetMe,transform:O.dontSetMe}),D(e,"defaultProps",{...y.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(Q)),Q}var he;function Pe(){if(he)return F.exports;he=1;const{default:s,DraggableCore:v}=Ne();return F.exports=s,F.exports.default=s,F.exports.DraggableCore=v,F.exports}var G={},ge;function ke(){if(ge)return G;ge=1,G.__esModule=!0,G.cloneElement=O;var s=v(L());function v(y){return y&&y.__esModule?y:{default:y}}function c(y,g){var R=Object.keys(y);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(y);g&&(m=m.filter(function(S){return Object.getOwnPropertyDescriptor(y,S).enumerable})),R.push.apply(R,m)}return R}function u(y){for(var g=1;g<arguments.length;g++){var R=arguments[g]!=null?arguments[g]:{};g%2?c(Object(R),!0).forEach(function(m){b(y,m,R[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(R)):c(Object(R)).forEach(function(m){Object.defineProperty(y,m,Object.getOwnPropertyDescriptor(R,m))})}return y}function b(y,g,R){return(g=f(g))in y?Object.defineProperty(y,g,{value:R,enumerable:!0,configurable:!0,writable:!0}):y[g]=R,y}function f(y){var g=w(y,"string");return typeof g=="symbol"?g:g+""}function w(y,g){if(typeof y!="object"||!y)return y;var R=y[Symbol.toPrimitive];if(R!==void 0){var m=R.call(y,g);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(y)}function O(y,g){return g.style&&y.props.style&&(g.style=u(u({},y.props.style),g.style)),g.className&&y.props.className&&(g.className=`${y.props.className} ${g.className}`),s.default.cloneElement(y,g)}return G}var $={},me;function Oe(){if(me)return $;me=1,$.__esModule=!0,$.resizableProps=void 0;var s=v(K());Pe();function v(c){return c&&c.__esModule?c:{default:c}}return $.resizableProps={axis:s.default.oneOf(["both","x","y","none"]),className:s.default.string,children:s.default.element.isRequired,draggableOpts:s.default.shape({allowAnyClick:s.default.bool,cancel:s.default.string,children:s.default.node,disabled:s.default.bool,enableUserSelectHack:s.default.bool,offsetParent:typeof Element<"u"?s.default.instanceOf(Element):s.default.any,grid:s.default.arrayOf(s.default.number),handle:s.default.string,nodeRef:s.default.object,onStart:s.default.func,onDrag:s.default.func,onStop:s.default.func,onMouseDown:s.default.func,scale:s.default.number}),height:function(){for(var c=arguments.length,u=new Array(c),b=0;b<c;b++)u[b]=arguments[b];const[f]=u;return f.axis==="both"||f.axis==="y"?s.default.number.isRequired(...u):s.default.number(...u)},handle:s.default.oneOfType([s.default.node,s.default.func]),handleSize:s.default.arrayOf(s.default.number),lockAspectRatio:s.default.bool,maxConstraints:s.default.arrayOf(s.default.number),minConstraints:s.default.arrayOf(s.default.number),onResizeStop:s.default.func,onResizeStart:s.default.func,onResize:s.default.func,resizeHandles:s.default.arrayOf(s.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:s.default.number,width:function(){for(var c=arguments.length,u=new Array(c),b=0;b<c;b++)u[b]=arguments[b];const[f]=u;return f.axis==="both"||f.axis==="x"?s.default.number.isRequired(...u):s.default.number(...u)}},$}var ye;function Re(){if(ye)return Y;ye=1,Y.__esModule=!0,Y.default=void 0;var s=f(L()),v=Pe(),c=ke(),u=Oe();const b=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function f(a,e){if(typeof WeakMap=="function")var t=new WeakMap,r=new WeakMap;return(f=function(o,l){if(!l&&o&&o.__esModule)return o;var d,p,n={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return n;if(d=l?r:t){if(d.has(o))return d.get(o);d.set(o,n)}for(const i in o)i!=="default"&&{}.hasOwnProperty.call(o,i)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,i))&&(p.get||p.set)?d(n,i,p):n[i]=o[i]);return n})(a,e)}function w(){return w=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},w.apply(null,arguments)}function O(a,e){if(a==null)return{};var t,r,o=y(a,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(r=0;r<l.length;r++)t=l[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(a,t)&&(o[t]=a[t])}return o}function y(a,e){if(a==null)return{};var t={};for(var r in a)if({}.hasOwnProperty.call(a,r)){if(e.indexOf(r)!==-1)continue;t[r]=a[r]}return t}function g(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),t.push.apply(t,r)}return t}function R(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?g(Object(t),!0).forEach(function(r){m(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function m(a,e,t){return(e=S(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function S(a){var e=D(a,"string");return typeof e=="symbol"?e:e+""}function D(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}let P=class extends s.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(e,t){const{minConstraints:r,maxConstraints:o,lockAspectRatio:l}=this.props;if(!r&&!o&&!l)return[e,t];if(l){const h=this.props.width/this.props.height,x=e-this.props.width,_=t-this.props.height;Math.abs(x)>Math.abs(_*h)?t=e/h:e=t*h}const[d,p]=[e,t];let[n,i]=this.slack||[0,0];return e+=n,t+=i,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[n+(d-e),i+(p-t)],[e,t]}resizeHandler(e,t){return(r,o)=>{var q;let{node:l,deltaX:d,deltaY:p}=o;e==="onResizeStart"&&this.resetData();const n=(this.props.axis==="both"||this.props.axis==="x")&&t!=="n"&&t!=="s",i=(this.props.axis==="both"||this.props.axis==="y")&&t!=="e"&&t!=="w";if(!n&&!i)return;const h=t[0],x=t[t.length-1],_=l.getBoundingClientRect();if(this.lastHandleRect!=null){if(x==="w"){const z=_.left-this.lastHandleRect.left;d+=z}if(h==="n"){const z=_.top-this.lastHandleRect.top;p+=z}}this.lastHandleRect=_,x==="w"&&(d=-d),h==="n"&&(p=-p);let C=this.props.width+(n?d/this.props.transformScale:0),j=this.props.height+(i?p/this.props.transformScale:0);[C,j]=this.runConstraints(C,j),e==="onResizeStop"&&this.lastSize&&({width:C,height:j}=this.lastSize);const M=C!==this.props.width||j!==this.props.height;e!=="onResizeStop"&&(this.lastSize={width:C,height:j});const E=typeof this.props[e]=="function"?this.props[e]:null;E&&!(e==="onResize"&&!M)&&((q=r.persist)==null||q.call(r),E(r,{node:l,size:{width:C,height:j},handle:t})),e==="onResizeStop"&&this.resetData()}}renderResizeHandle(e,t){const{handle:r}=this.props;if(!r)return s.createElement("span",{className:`react-resizable-handle react-resizable-handle-${e}`,ref:t});if(typeof r=="function")return r(e,t);const o=typeof r.type=="string",l=R({ref:t},o?{}:{handleAxis:e});return s.cloneElement(r,l)}render(){const e=this.props,{children:t,className:r,draggableOpts:o,width:l,height:d,handle:p,handleSize:n,lockAspectRatio:i,axis:h,minConstraints:x,maxConstraints:_,onResize:C,onResizeStop:j,onResizeStart:M,resizeHandles:E,transformScale:N}=e,q=O(e,b);return(0,c.cloneElement)(t,R(R({},q),{},{className:`${r?`${r} `:""}react-resizable`,children:[...s.Children.toArray(t.props.children),...E.map(z=>{const B=this.handleRefs[z]??(this.handleRefs[z]=s.createRef());return s.createElement(v.DraggableCore,w({},o,{nodeRef:B,key:`resizableHandle-${z}`,onStop:this.resizeHandler("onResizeStop",z),onStart:this.resizeHandler("onResizeStart",z),onDrag:this.resizeHandler("onResize",z)}),this.renderResizeHandle(z,B))})]}))}};return Y.default=P,P.propTypes=u.resizableProps,P.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},Y}var A={},be;function qe(){if(be)return A;be=1,A.__esModule=!0,A.default=void 0;var s=w(L()),v=f(K()),c=f(Re()),u=Oe();const b=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function f(e){return e&&e.__esModule?e:{default:e}}function w(e,t){if(typeof WeakMap=="function")var r=new WeakMap,o=new WeakMap;return(w=function(l,d){if(!d&&l&&l.__esModule)return l;var p,n,i={__proto__:null,default:l};if(l===null||typeof l!="object"&&typeof l!="function")return i;if(p=d?o:r){if(p.has(l))return p.get(l);p.set(l,i)}for(const h in l)h!=="default"&&{}.hasOwnProperty.call(l,h)&&((n=(p=Object.defineProperty)&&Object.getOwnPropertyDescriptor(l,h))&&(n.get||n.set)?p(i,h,n):i[h]=l[h]);return i})(e,t)}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},O.apply(null,arguments)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,o)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(o){R(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function R(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=S(e,"string");return typeof t=="symbol"?t:t+""}function S(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D(e,t){if(e==null)return{};var r,o,l=P(e,t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(o=0;o<d.length;o++)r=d[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function P(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}let a=class extends s.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(t,r)=>{var l;const{size:o}=r;this.props.onResize?((l=t.persist)==null||l.call(t),this.setState(o,()=>this.props.onResize&&this.props.onResize(t,r))):this.setState(o)}}static getDerivedStateFromProps(t,r){return r.propsWidth!==t.width||r.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null}render(){const t=this.props,{handle:r,handleSize:o,onResize:l,onResizeStart:d,onResizeStop:p,draggableOpts:n,minConstraints:i,maxConstraints:h,lockAspectRatio:x,axis:_,width:C,height:j,resizeHandles:M,style:E,transformScale:N}=t,q=D(t,b);return s.createElement(c.default,{axis:_,draggableOpts:n,handle:r,handleSize:o,height:this.state.height,lockAspectRatio:x,maxConstraints:h,minConstraints:i,onResizeStart:d,onResize:this.onResize,onResizeStop:p,resizeHandles:M,transformScale:N,width:this.state.width},s.createElement("div",O({},q,{style:g(g({},E),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return A.default=a,a.propTypes=g(g({},u.resizableProps),{},{children:v.default.element}),A}var ve;function We(){return ve||(ve=1,X.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},X.exports.Resizable=Re().default,X.exports.ResizableBox=qe().default),X.exports}var _e=We();const He=xe(_e),Ae=je({__proto__:null,default:He},[_e]);export{Ae as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w,u as N,c as g,r as x,j as e}from"./chunk-JZWAC4HX-7VptmeIr.js";import{u as k}from"./useReportContext-BsQb6rFd.js";const T=()=>[{title:"Labs - CodeYam"},{name:"description",content:"Experimental features"}],C=[{id:"simulations",name:"Simulations",description:"Enable entity analysis, visual simulations, git impact analysis, file browsing, and activity monitoring. When disabled, only Memory, Labs, and Settings are accessible.",defaultEnabled:!0},{id:"enhancedClaudeTesting",name:"Enhanced Claude Testing",description:"Automatically generated mock data that covers the scenarios you actually care about: empty states, error states, auth flows, broken images, missing permissions.",defaultEnabled:!0},{id:"gitIntegration",name:"Git Integration Showing Impacted Files",description:"Lorem Ipsum Automatically generated mock data that covers the scenarios you actually care about: empty states, error states, auth flows, broken images, missing permissions.",defaultEnabled:!1}],y="https://docs.google.com/forms/d/e/1FAIpQLSfopqQOQsjY9S4Ns0l3xDLzGl7iYNpKa2Wn2Xzmtxj8CR1sMA/viewform",S=[{title:"CodeYam Simulations",status:"apply for early access",desc:"CodeYam Simulations are the core of the CodeYam development experience. They leverage static code analysis and AI to generate robust data scenarios that are used to hydrate code. This creates a whole new dimension to the software development experience"},{title:"The Full CodeYam Experience",status:"more to come",desc:"CodeYam is completely rethinking the software development experience in the AI era. Focused on navigating the challenges of iteration speed, complexity, and communication, CodeYam will provide a powerful software development experience."}];function E({onClose:c}){const s=x.useRef(null),l=x.useRef(0);return x.useEffect(()=>{const t=s.current;if(!t)return;const d=100,i=2e3,o=500;let a=null,n=!1;const u=()=>{l.current=Date.now(),!a&&!n&&(a=setInterval(()=>{const m=Date.now()-l.current,h=t.scrollTop>d,b=m>i;h&&b&&(t.scrollTo({top:0,behavior:"smooth"}),n=!0,a&&(clearInterval(a),a=null))},o))};return t.addEventListener("scroll",u,{passive:!0}),()=>{t.removeEventListener("scroll",u),a&&clearInterval(a)}},[]),e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:t=>{t.target===t.currentTarget&&c()},children:[e.jsx("div",{className:"absolute inset-0 bg-black/50"}),e.jsxs("div",{className:"relative bg-white rounded-xl max-w-3xl w-full mx-4 max-h-[90vh] overflow-hidden",children:[e.jsx("button",{onClick:c,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 text-2xl leading-none cursor-pointer bg-transparent border-none z-10",children:"×"}),e.jsxs("div",{ref:s,className:"overflow-y-auto max-h-[90vh] p-4 md:p-6",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"font-serif italic text-2xl text-primary-200 mb-2",children:"Request Early Access"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Complete the form below to join the waitlist for CodeYam Labs."})]}),e.jsx("div",{className:"bg-white rounded-lg overflow-hidden",children:e.jsx("iframe",{src:`${y}?embedded=true`,width:"100%",height:"1400",style:{border:0,minHeight:"1400px"},title:"Labs Waitlist Form",loading:"eager",children:e.jsx("div",{className:"flex items-center justify-center p-8 text-gray-600",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-4",children:"Loading form..."}),e.jsxs("div",{className:"text-sm",children:["If this takes too long,"," ",e.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"open the form directly"})]})]})})})})]})]})]})}function L({onClose:c,unlockCodeInput:s,setUnlockCodeInput:l,unlockFetcher:t}){var o,a;const d=(o=t.data)==null?void 0:o.error,i=(a=t.data)==null?void 0:a.success;return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:n=>{n.target===n.currentTarget&&c()},children:[e.jsx("div",{className:"absolute inset-0 bg-black/50"}),e.jsxs("div",{className:"relative bg-white rounded-xl p-8 max-w-md w-full mx-4",children:[e.jsx("button",{onClick:c,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 text-2xl leading-none cursor-pointer bg-transparent border-none",children:"×"}),e.jsx("h3",{className:"font-serif italic text-2xl text-primary-200 mb-2",children:"Have an unlock code?"}),e.jsx("p",{className:"text-sm text-cygray-50 mb-6",children:"If you've received an unlock code, paste it below to enable Simulations immediately."}),e.jsxs(t.Form,{method:"post",action:"/api/labs-unlock",className:"space-y-4",children:[e.jsx("input",{type:"text",name:"unlockCode",value:s,onChange:n=>l(n.target.value),placeholder:"CY-...",className:"w-full px-4 py-2.5 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary-100 focus:border-transparent"}),e.jsx("button",{type:"submit",disabled:!s.trim()||t.state==="submitting",className:"w-full py-3 text-white border-none rounded-lg text-sm font-mono font-semibold uppercase tracking-wider cursor-pointer transition-all bg-primary-200 hover:bg-primary-100 disabled:bg-gray-400 disabled:cursor-not-allowed",children:t.state==="submitting"?"Validating...":"Unlock"}),d&&e.jsx("p",{className:"text-red-600 text-sm mt-2",children:d}),i&&e.jsx("p",{className:"text-emerald-600 text-sm mt-2",children:"Simulations enabled! Refresh the page to see all tabs."})]})]})]})}const R=w(function(){const{labs:s,unlockCode:l,error:t}=N(),d=g(),i=g(),o=g(),[a,n]=x.useState(""),[u,m]=x.useState(!1),[h,b]=x.useState(!1);k({source:"labs-page"});const j=(s==null?void 0:s.accessGranted)===!0||(s==null?void 0:s.simulations)===!0;return t?e.jsx("div",{className:"bg-cygray-10 min-h-screen",children:e.jsxs("div",{className:"px-20 pt-8 pb-12 font-sans",children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Labs"}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mt-4",children:e.jsx("p",{className:"text-red-700",children:t})})]})}):j?e.jsxs("div",{className:"bg-cygray-10 min-h-screen font-sans flex flex-col",children:[e.jsx("div",{className:"px-6 sm:px-12 pt-8 pb-4",children:e.jsx("h1",{className:"font-mono text-lg font-semibold tracking-widest text-cyblack-100 m-0",children:"LABS"})}),e.jsxs("div",{className:"px-6 sm:px-12 pt-8 pb-10",children:[e.jsx("h2",{className:"font-serif italic text-[32px] sm:text-[48px] text-primary-100 mb-3 font-normal leading-tight",children:"Congrats!"}),e.jsx("p",{className:"font-serif text-[18px] sm:text-[24px] text-cyblack-100 font-normal leading-snug max-w-2xl",children:"You were granted early access to software simulation and other experimental features."})]}),e.jsx("div",{className:"px-6 sm:px-12 space-y-6 flex-1",children:C.map(r=>{var f;const p=(s==null?void 0:s[r.id])??r.defaultEnabled,v=i.state==="submitting"&&((f=i.formData)==null?void 0:f.get("feature"))===r.id;return e.jsx("div",{className:"border border-cygray-30 rounded-xl p-5 sm:p-8 bg-white",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("h3",{className:"text-lg font-semibold text-cyblack-100 m-0",children:r.name}),e.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${p?"bg-primary-100/15 text-primary-100":"bg-cygray-20 text-cygray-50"}`,children:p?"Enabled":"Disabled"})]}),e.jsx("p",{className:"text-sm text-cygray-50 leading-relaxed m-0",children:r.description})]}),e.jsxs(i.Form,{method:"post",children:[e.jsx("input",{type:"hidden",name:"feature",value:r.id}),e.jsx("input",{type:"hidden",name:"enabled",value:String(!p)}),e.jsx("button",{type:"submit",disabled:v,className:`relative inline-flex h-8 w-14 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none disabled:opacity-60 disabled:cursor-not-allowed ${p?"bg-primary-100":"bg-gray-300"}`,children:e.jsx("span",{className:`pointer-events-none inline-block h-7 w-7 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${p?"translate-x-6":"translate-x-0"}`})})]})]})},r.id)})}),l&&e.jsx("div",{className:"px-6 sm:px-12 pt-12",children:e.jsxs("div",{className:"border border-cygray-30 rounded-xl p-5 sm:p-8 bg-white",children:[e.jsx("h3",{className:"text-base font-semibold text-cyblack-100 mb-1",children:"Unlock Code"}),e.jsx("p",{className:"text-sm text-cygray-50 mb-3",children:"This code was used to enable Labs access. Clear it to revoke access and return to the landing page."}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsx("code",{className:"sm:flex-1 px-4 py-2.5 bg-cygray-10 border border-cygray-30 rounded-lg text-sm font-mono text-cyblack-100 overflow-x-auto",children:l}),e.jsxs(o.Form,{method:"post",children:[e.jsx("input",{type:"hidden",name:"feature",value:"clearAccess"}),e.jsx("input",{type:"hidden",name:"enabled",value:"false"}),e.jsx("button",{type:"submit",disabled:o.state==="submitting",className:"px-4 py-2.5 bg-red-50 border border-red-200 rounded-lg text-sm font-medium text-red-700 cursor-pointer transition-colors hover:bg-red-100 disabled:opacity-60 disabled:cursor-not-allowed",children:o.state==="submitting"?"Clearing...":"Clear"})]})]})]})})]}):e.jsxs("div",{className:"bg-cygray-10 min-h-screen font-sans",children:[u&&e.jsx(E,{onClose:()=>m(!1)}),h&&e.jsx(L,{onClose:()=>b(!1),unlockCodeInput:a,setUnlockCodeInput:n,unlockFetcher:d}),e.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-3 px-6 sm:px-12 pt-8 pb-4",children:[e.jsx("h1",{className:"font-mono text-lg font-semibold tracking-widest text-cyblack-100 m-0",children:"LABS"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("button",{onClick:()=>b(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-4 sm:px-5 py-2.5 rounded border border-cygray-30 bg-transparent text-cygray-50 cursor-pointer transition-colors hover:border-cyblack-100 hover:text-cyblack-100",children:"Have a Code?"}),e.jsx("button",{onClick:()=>m(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-4 sm:px-5 py-2.5 rounded border border-cyblack-100 bg-transparent text-cyblack-100 cursor-pointer transition-colors hover:bg-cyblack-100 hover:text-white",children:"Apply for Early Access"})]})]}),e.jsxs("div",{className:"px-6 sm:px-12 pt-12 pb-8",children:[e.jsx("h2",{className:"font-serif text-[24px] sm:text-[32px] leading-snug text-cyblack-100 max-w-xl mb-4 font-normal",children:"Powerful tools for the AI coding era."}),e.jsxs("p",{className:"text-base sm:text-lg text-cygray-50 leading-relaxed max-w-xl mb-8",children:["We're opening early access to"," ",e.jsx("strong",{className:"text-cyblack-100",children:"experimental features"})," to a small group of developers and teams."]}),e.jsx("button",{onClick:()=>m(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-6 py-3 rounded bg-primary-200 text-white border-none cursor-pointer transition-colors hover:bg-primary-100",children:"Apply for Early Access"})]}),e.jsx("div",{className:"px-6 sm:px-12 py-8",children:e.jsx("hr",{className:"border-t border-cygray-30 m-0"})}),e.jsxs("div",{className:"px-6 sm:px-12 pt-8 pb-4",children:[e.jsx("h3",{className:"font-serif text-[22px] sm:text-[28px] text-cyblack-100 mb-10 font-normal text-center",children:"In The Works"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5 max-w-4xl mx-auto",children:S.map(r=>e.jsxs("div",{className:"border border-cygray-30 bg-white p-5 sm:p-8 rounded-lg",children:[e.jsxs("h4",{className:"text-base font-semibold text-cyblack-100 mb-1",children:[r.title," ",e.jsxs("span",{className:"font-normal text-primary-100 font-serif italic",children:["(",r.status,")"]})]}),e.jsx("p",{className:"text-sm text-cygray-50 leading-relaxed mt-3 mb-0",children:r.desc})]},r.title))})]}),e.jsx("div",{className:"px-6 sm:px-12 py-16",children:e.jsxs("div",{className:"rounded-lg p-6 sm:p-12 bg-primary-200",children:[e.jsx("h3",{className:"font-serif text-[20px] sm:text-[24px] text-white mb-4 font-semibold",children:"Request Early Access"}),e.jsx("p",{className:"text-sm text-white/80 leading-relaxed max-w-lg mb-10 font-mono",children:"We're onboarding a limited number of developers and teams. Tell us about how you build and we'll let you know when you can try simulations and other Labs features."}),e.jsx("button",{onClick:()=>m(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-6 py-3 rounded border border-white bg-white text-cyblack-100 cursor-pointer transition-colors hover:bg-white/90 mb-4",children:"Apply for Early Access"}),e.jsx("p",{className:"text-xs text-white/60 m-0",children:"Takes about 2 minutes. Your answers help us determine eligibility and prioritize access."})]})})]})});export{R as default,T as meta};
|
|
1
|
+
import{w,u as N,d as g,r as x,j as e}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{u as k}from"./useReportContext-O-jkvSPx.js";const T=()=>[{title:"Labs - CodeYam"},{name:"description",content:"Experimental features"}],C=[{id:"simulations",name:"Simulations",description:"Enable entity analysis, visual simulations, git impact analysis, file browsing, and activity monitoring. When disabled, only Memory, Labs, and Settings are accessible.",defaultEnabled:!0},{id:"enhancedClaudeTesting",name:"Enhanced Claude Testing",description:"Automatically generated mock data that covers the scenarios you actually care about: empty states, error states, auth flows, broken images, missing permissions.",defaultEnabled:!0},{id:"gitIntegration",name:"Git Integration Showing Impacted Files",description:"Lorem Ipsum Automatically generated mock data that covers the scenarios you actually care about: empty states, error states, auth flows, broken images, missing permissions.",defaultEnabled:!1}],y="https://docs.google.com/forms/d/e/1FAIpQLSfopqQOQsjY9S4Ns0l3xDLzGl7iYNpKa2Wn2Xzmtxj8CR1sMA/viewform",S=[{title:"CodeYam Simulations",status:"apply for early access",desc:"CodeYam Simulations are the core of the CodeYam development experience. They leverage static code analysis and AI to generate robust data scenarios that are used to hydrate code. This creates a whole new dimension to the software development experience"},{title:"The Full CodeYam Experience",status:"more to come",desc:"CodeYam is completely rethinking the software development experience in the AI era. Focused on navigating the challenges of iteration speed, complexity, and communication, CodeYam will provide a powerful software development experience."}];function E({onClose:c}){const s=x.useRef(null),l=x.useRef(0);return x.useEffect(()=>{const t=s.current;if(!t)return;const d=100,i=2e3,o=500;let a=null,n=!1;const u=()=>{l.current=Date.now(),!a&&!n&&(a=setInterval(()=>{const m=Date.now()-l.current,h=t.scrollTop>d,b=m>i;h&&b&&(t.scrollTo({top:0,behavior:"smooth"}),n=!0,a&&(clearInterval(a),a=null))},o))};return t.addEventListener("scroll",u,{passive:!0}),()=>{t.removeEventListener("scroll",u),a&&clearInterval(a)}},[]),e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:t=>{t.target===t.currentTarget&&c()},children:[e.jsx("div",{className:"absolute inset-0 bg-black/50"}),e.jsxs("div",{className:"relative bg-white rounded-xl max-w-3xl w-full mx-4 max-h-[90vh] overflow-hidden",children:[e.jsx("button",{onClick:c,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 text-2xl leading-none cursor-pointer bg-transparent border-none z-10",children:"×"}),e.jsxs("div",{ref:s,className:"overflow-y-auto max-h-[90vh] p-4 md:p-6",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"font-serif italic text-2xl text-primary-200 mb-2",children:"Request Early Access"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Complete the form below to join the waitlist for CodeYam Labs."})]}),e.jsx("div",{className:"bg-white rounded-lg overflow-hidden",children:e.jsx("iframe",{src:`${y}?embedded=true`,width:"100%",height:"1400",style:{border:0,minHeight:"1400px"},title:"Labs Waitlist Form",loading:"eager",children:e.jsx("div",{className:"flex items-center justify-center p-8 text-gray-600",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-4",children:"Loading form..."}),e.jsxs("div",{className:"text-sm",children:["If this takes too long,"," ",e.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"open the form directly"})]})]})})})})]})]})]})}function L({onClose:c,unlockCodeInput:s,setUnlockCodeInput:l,unlockFetcher:t}){var o,a;const d=(o=t.data)==null?void 0:o.error,i=(a=t.data)==null?void 0:a.success;return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:n=>{n.target===n.currentTarget&&c()},children:[e.jsx("div",{className:"absolute inset-0 bg-black/50"}),e.jsxs("div",{className:"relative bg-white rounded-xl p-8 max-w-md w-full mx-4",children:[e.jsx("button",{onClick:c,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 text-2xl leading-none cursor-pointer bg-transparent border-none",children:"×"}),e.jsx("h3",{className:"font-serif italic text-2xl text-primary-200 mb-2",children:"Have an unlock code?"}),e.jsx("p",{className:"text-sm text-cygray-50 mb-6",children:"If you've received an unlock code, paste it below to enable Simulations immediately."}),e.jsxs(t.Form,{method:"post",action:"/api/labs-unlock",className:"space-y-4",children:[e.jsx("input",{type:"text",name:"unlockCode",value:s,onChange:n=>l(n.target.value),placeholder:"CY-...",className:"w-full px-4 py-2.5 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary-100 focus:border-transparent"}),e.jsx("button",{type:"submit",disabled:!s.trim()||t.state==="submitting",className:"w-full py-3 text-white border-none rounded-lg text-sm font-mono font-semibold uppercase tracking-wider cursor-pointer transition-all bg-primary-200 hover:bg-primary-100 disabled:bg-gray-400 disabled:cursor-not-allowed",children:t.state==="submitting"?"Validating...":"Unlock"}),d&&e.jsx("p",{className:"text-red-600 text-sm mt-2",children:d}),i&&e.jsx("p",{className:"text-emerald-600 text-sm mt-2",children:"Simulations enabled! Refresh the page to see all tabs."})]})]})]})}const R=w(function(){const{labs:s,unlockCode:l,error:t}=N(),d=g(),i=g(),o=g(),[a,n]=x.useState(""),[u,m]=x.useState(!1),[h,b]=x.useState(!1);k({source:"labs-page"});const j=(s==null?void 0:s.accessGranted)===!0||(s==null?void 0:s.simulations)===!0;return t?e.jsx("div",{className:"bg-cygray-10 min-h-screen",children:e.jsxs("div",{className:"px-20 pt-8 pb-12 font-sans",children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Labs"}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mt-4",children:e.jsx("p",{className:"text-red-700",children:t})})]})}):j?e.jsxs("div",{className:"bg-cygray-10 min-h-screen font-sans flex flex-col",children:[e.jsx("div",{className:"px-6 sm:px-12 pt-8 pb-4",children:e.jsx("h1",{className:"font-mono text-lg font-semibold tracking-widest text-cyblack-100 m-0",children:"LABS"})}),e.jsxs("div",{className:"px-6 sm:px-12 pt-8 pb-10",children:[e.jsx("h2",{className:"font-serif italic text-[32px] sm:text-[48px] text-primary-100 mb-3 font-normal leading-tight",children:"Congrats!"}),e.jsx("p",{className:"font-serif text-[18px] sm:text-[24px] text-cyblack-100 font-normal leading-snug max-w-2xl",children:"You were granted early access to software simulation and other experimental features."})]}),e.jsx("div",{className:"px-6 sm:px-12 space-y-6 flex-1",children:C.map(r=>{var f;const p=(s==null?void 0:s[r.id])??r.defaultEnabled,v=i.state==="submitting"&&((f=i.formData)==null?void 0:f.get("feature"))===r.id;return e.jsx("div",{className:"border border-cygray-30 rounded-xl p-5 sm:p-8 bg-white",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("h3",{className:"text-lg font-semibold text-cyblack-100 m-0",children:r.name}),e.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${p?"bg-primary-100/15 text-primary-100":"bg-cygray-20 text-cygray-50"}`,children:p?"Enabled":"Disabled"})]}),e.jsx("p",{className:"text-sm text-cygray-50 leading-relaxed m-0",children:r.description})]}),e.jsxs(i.Form,{method:"post",children:[e.jsx("input",{type:"hidden",name:"feature",value:r.id}),e.jsx("input",{type:"hidden",name:"enabled",value:String(!p)}),e.jsx("button",{type:"submit",disabled:v,className:`relative inline-flex h-8 w-14 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none disabled:opacity-60 disabled:cursor-not-allowed ${p?"bg-primary-100":"bg-gray-300"}`,children:e.jsx("span",{className:`pointer-events-none inline-block h-7 w-7 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${p?"translate-x-6":"translate-x-0"}`})})]})]})},r.id)})}),l&&e.jsx("div",{className:"px-6 sm:px-12 pt-12",children:e.jsxs("div",{className:"border border-cygray-30 rounded-xl p-5 sm:p-8 bg-white",children:[e.jsx("h3",{className:"text-base font-semibold text-cyblack-100 mb-1",children:"Unlock Code"}),e.jsx("p",{className:"text-sm text-cygray-50 mb-3",children:"This code was used to enable Labs access. Clear it to revoke access and return to the landing page."}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsx("code",{className:"sm:flex-1 px-4 py-2.5 bg-cygray-10 border border-cygray-30 rounded-lg text-sm font-mono text-cyblack-100 overflow-x-auto",children:l}),e.jsxs(o.Form,{method:"post",children:[e.jsx("input",{type:"hidden",name:"feature",value:"clearAccess"}),e.jsx("input",{type:"hidden",name:"enabled",value:"false"}),e.jsx("button",{type:"submit",disabled:o.state==="submitting",className:"px-4 py-2.5 bg-red-50 border border-red-200 rounded-lg text-sm font-medium text-red-700 cursor-pointer transition-colors hover:bg-red-100 disabled:opacity-60 disabled:cursor-not-allowed",children:o.state==="submitting"?"Clearing...":"Clear"})]})]})]})})]}):e.jsxs("div",{className:"bg-cygray-10 min-h-screen font-sans",children:[u&&e.jsx(E,{onClose:()=>m(!1)}),h&&e.jsx(L,{onClose:()=>b(!1),unlockCodeInput:a,setUnlockCodeInput:n,unlockFetcher:d}),e.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-3 px-6 sm:px-12 pt-8 pb-4",children:[e.jsx("h1",{className:"font-mono text-lg font-semibold tracking-widest text-cyblack-100 m-0",children:"LABS"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("button",{onClick:()=>b(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-4 sm:px-5 py-2.5 rounded border border-cygray-30 bg-transparent text-cygray-50 cursor-pointer transition-colors hover:border-cyblack-100 hover:text-cyblack-100",children:"Have a Code?"}),e.jsx("button",{onClick:()=>m(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-4 sm:px-5 py-2.5 rounded border border-cyblack-100 bg-transparent text-cyblack-100 cursor-pointer transition-colors hover:bg-cyblack-100 hover:text-white",children:"Apply for Early Access"})]})]}),e.jsxs("div",{className:"px-6 sm:px-12 pt-12 pb-8",children:[e.jsx("h2",{className:"font-serif text-[24px] sm:text-[32px] leading-snug text-cyblack-100 max-w-xl mb-4 font-normal",children:"Powerful tools for the AI coding era."}),e.jsxs("p",{className:"text-base sm:text-lg text-cygray-50 leading-relaxed max-w-xl mb-8",children:["We're opening early access to"," ",e.jsx("strong",{className:"text-cyblack-100",children:"experimental features"})," to a small group of developers and teams."]}),e.jsx("button",{onClick:()=>m(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-6 py-3 rounded bg-primary-200 text-white border-none cursor-pointer transition-colors hover:bg-primary-100",children:"Apply for Early Access"})]}),e.jsx("div",{className:"px-6 sm:px-12 py-8",children:e.jsx("hr",{className:"border-t border-cygray-30 m-0"})}),e.jsxs("div",{className:"px-6 sm:px-12 pt-8 pb-4",children:[e.jsx("h3",{className:"font-serif text-[22px] sm:text-[28px] text-cyblack-100 mb-10 font-normal text-center",children:"In The Works"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5 max-w-4xl mx-auto",children:S.map(r=>e.jsxs("div",{className:"border border-cygray-30 bg-white p-5 sm:p-8 rounded-lg",children:[e.jsxs("h4",{className:"text-base font-semibold text-cyblack-100 mb-1",children:[r.title," ",e.jsxs("span",{className:"font-normal text-primary-100 font-serif italic",children:["(",r.status,")"]})]}),e.jsx("p",{className:"text-sm text-cygray-50 leading-relaxed mt-3 mb-0",children:r.desc})]},r.title))})]}),e.jsx("div",{className:"px-6 sm:px-12 py-16",children:e.jsxs("div",{className:"rounded-lg p-6 sm:p-12 bg-primary-200",children:[e.jsx("h3",{className:"font-serif text-[20px] sm:text-[24px] text-white mb-4 font-semibold",children:"Request Early Access"}),e.jsx("p",{className:"text-sm text-white/80 leading-relaxed max-w-lg mb-10 font-mono",children:"We're onboarding a limited number of developers and teams. Tell us about how you build and we'll let you know when you can try simulations and other Labs features."}),e.jsx("button",{onClick:()=>m(!0),className:"font-mono text-xs font-semibold uppercase tracking-widest px-6 py-3 rounded border border-white bg-white text-cyblack-100 cursor-pointer transition-colors hover:bg-white/90 mb-4",children:"Apply for Early Access"}),e.jsx("p",{className:"text-xs text-white/60 m-0",children:"Takes about 2 minutes. Your answers help us determine eligibility and prioritize access."})]})})]})});export{R as default,T as meta};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DTvKq3TY.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/index-10oVnAAH.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/root-DUKqhFlb.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/index-10oVnAAH.js","/assets/preload-helper-ckwbz45p.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/ReportIssueModal-djPLI-WV.js","/assets/useReportContext-O-jkvSPx.js","/assets/loader-circle-BAXYRVEO.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/book-open-D_nMCFmP.js","/assets/useToast-9FIWuYfK.js","/assets/useLastLogLine-C14nCb1q.js","/assets/LogViewer-ceAyBX-H.js","/assets/EntityTypeIcon-CobE682z.js","/assets/TruncatedFilePath-C8OKAR5x.js","/assets/chevron-down-BH2h1Ea2.js","/assets/circle-check-DyIKORY6.js","/assets/CopyButton-DmJveP3T.js","/assets/triangle-alert-DtSmdtM4.js","/assets/copy-NDbZjXao.js"],"css":[]},"routes/entity.$sha.scenarios.$scenarioId.fullscreen":{"id":"routes/entity.$sha.scenarios.$scenarioId.fullscreen","parentId":"root","path":"entity/:sha/scenarios/:scenarioId/fullscreen","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/Spinner-Bb5uFQ5V.js","/assets/useLastLogLine-C14nCb1q.js","/assets/useCustomSizes-ByhSyh0W.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/InlineSpinner-Bu6c6aDe.js"],"css":[]},"routes/entity.$sha.scenarios.$scenarioId.dev":{"id":"routes/entity.$sha.scenarios.$scenarioId.dev","parentId":"root","path":"entity/:sha/scenarios/:scenarioId/dev","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha.scenarios._scenarioId.dev-DkzqFzFj.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/Spinner-Bb5uFQ5V.js","/assets/useLastLogLine-C14nCb1q.js","/assets/useCustomSizes-ByhSyh0W.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/InlineSpinner-Bu6c6aDe.js","/assets/Terminal-Dnj5CY9R.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/preload-helper-ckwbz45p.js"],"css":[]},"routes/api.editor-journal-screenshot":{"id":"routes/api.editor-journal-screenshot","parentId":"root","path":"api/editor-journal-screenshot","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-screenshot-l0sNRNKZ.js","imports":[],"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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha_.edit._scenarioId-BMvVHNXU.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/InteractivePreview-DYFW3lDD.js","/assets/Spinner-Bb5uFQ5V.js","/assets/preload-helper-ckwbz45p.js","/assets/useLastLogLine-C14nCb1q.js","/assets/InlineSpinner-Bu6c6aDe.js"],"css":[]},"routes/api.editor-register-scenario":{"id":"routes/api.editor-register-scenario","parentId":"root","path":"api/editor-register-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-register-scenario-l0sNRNKZ.js","imports":[],"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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha_.create-scenario-p9hhkjJM.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/InteractivePreview-DYFW3lDD.js","/assets/Spinner-Bb5uFQ5V.js","/assets/executionFlowCoverage-BWhdfn70.js","/assets/preload-helper-ckwbz45p.js","/assets/useLastLogLine-C14nCb1q.js","/assets/InlineSpinner-Bu6c6aDe.js"],"css":[]},"routes/api.editor-capture-scenario":{"id":"routes/api.editor-capture-scenario","parentId":"root","path":"api/editor-capture-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-capture-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenario-image.$":{"id":"routes/api.editor-scenario-image.$","parentId":"root","path":"api/editor-scenario-image/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-scenario-image._-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal-image.$":{"id":"routes/api.editor-journal-image.$","parentId":"root","path":"api/editor-journal-image/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-image._-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-switch-scenario":{"id":"routes/api.editor-switch-scenario","parentId":"root","path":"api/editor-switch-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-switch-scenario-l0sNRNKZ.js","imports":[],"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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.generate-scenario-data-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal-update":{"id":"routes/api.editor-journal-update","parentId":"root","path":"api/editor-journal-update","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-update-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-client-errors":{"id":"routes/api.editor-client-errors","parentId":"root","path":"api/editor-client-errors","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-client-errors-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-entity-status":{"id":"routes/api.editor-entity-status","parentId":"root","path":"api/editor-entity-status","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-entity-status-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal-entry":{"id":"routes/api.editor-journal-entry","parentId":"root","path":"api/editor-journal-entry","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-entry-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenario-data":{"id":"routes/api.editor-scenario-data","parentId":"root","path":"api/editor-scenario-data","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.llm-calls._entitySha-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-test-results":{"id":"routes/api.editor-test-results","parentId":"root","path":"api/editor-test-results","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-test-results-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,"hasClientMiddleware":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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.capture-screenshot-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-load-commit":{"id":"routes/api.editor-load-commit","parentId":"root","path":"api/editor-load-commit","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-load-commit-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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.agent-transcripts":{"id":"routes/api.agent-transcripts","parentId":"root","path":"api/agent-transcripts","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.agent-transcripts-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-dev-server":{"id":"routes/api.editor-dev-server","parentId":"root","path":"api/editor-dev-server","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-dev-server-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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.logs._projectSlug-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenarios":{"id":"routes/api.editor-scenarios","parentId":"root","path":"api/editor-scenarios","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-scenarios-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,"hasClientMiddleware":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,"hasClientMiddleware":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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.delete-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.dev-mode-events":{"id":"routes/api.dev-mode-events","parentId":"root","path":"api/dev-mode-events","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.dev-mode-events-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.generate-report":{"id":"routes/api.generate-report","parentId":"root","path":"api/generate-report","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.generate-report-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal":{"id":"routes/api.editor-journal","parentId":"root","path":"api/editor-journal","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-refresh":{"id":"routes/api.editor-refresh","parentId":"root","path":"api/editor-refresh","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-refresh-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.memory-profile":{"id":"routes/api.memory-profile","parentId":"root","path":"api/memory-profile","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.memory-profile-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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.process-status-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.restart-server":{"id":"routes/api.restart-server","parentId":"root","path":"api/restart-server","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.restart-server-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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.save-scenarios-l0sNRNKZ.js","imports":[],"css":[]},"routes/agent-transcripts":{"id":"routes/agent-transcripts","parentId":"root","path":"agent-transcripts","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/agent-transcripts-D9hemwl6.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useReportContext-O-jkvSPx.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/terminal-BG4heKCG.js","/assets/search-fKo7v0Zo.js","/assets/chevron-down-BH2h1Ea2.js","/assets/book-open-D_nMCFmP.js","/assets/triangle-alert-DtSmdtM4.js","/assets/copy-NDbZjXao.js"],"css":[]},"routes/api.editor-commit":{"id":"routes/api.editor-commit","parentId":"root","path":"api/editor-commit","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-commit-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-audit":{"id":"routes/api.editor-audit","parentId":"root","path":"api/editor-audit","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.editor-audit-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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.kill-process-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.save-fixture":{"id":"routes/api.save-fixture","parentId":"root","path":"api/save-fixture","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.save-fixture-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.screenshot.$":{"id":"routes/api.screenshot.$","parentId":"root","path":"api/screenshot/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/activity.(_tab)-BpKzcsJz.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/LogViewer-ceAyBX-H.js","/assets/useLastLogLine-C14nCb1q.js","/assets/useReportContext-O-jkvSPx.js","/assets/EntityTypeIcon-CobE682z.js","/assets/EntityTypeBadge-g3saevPb.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/LoadingDots-BU_OAEMP.js","/assets/loader-circle-BAXYRVEO.js","/assets/pause-DTAcYxBt.js","/assets/createLucideIcon-CMT1jU2q.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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.debug-setup-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.labs-unlock":{"id":"routes/api.labs-unlock","parentId":"root","path":"api/labs-unlock","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.labs-unlock-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.recapture":{"id":"routes/api.recapture","parentId":"root","path":"api/recapture","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.rule-path":{"id":"routes/api.rule-path","parentId":"root","path":"api/rule-path","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.rule-path-l0sNRNKZ.js","imports":[],"css":[]},"routes/entity.$sha.$":{"id":"routes/entity.$sha.$","parentId":"root","path":"entity/:sha/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha._-CrjR3zZW.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useLastLogLine-C14nCb1q.js","/assets/Spinner-Bb5uFQ5V.js","/assets/InteractivePreview-DYFW3lDD.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/LibraryFunctionPreview-DLeucoVX.js","/assets/LoadingDots-BU_OAEMP.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/ScenarioViewer-B76aig_2.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/executionFlowCoverage-BWhdfn70.js","/assets/EntityTypeIcon-CobE682z.js","/assets/CopyButton-DmJveP3T.js","/assets/LogViewer-ceAyBX-H.js","/assets/useReportContext-O-jkvSPx.js","/assets/preload-helper-ckwbz45p.js","/assets/InlineSpinner-Bu6c6aDe.js","/assets/useCustomSizes-ByhSyh0W.js","/assets/ReportIssueModal-djPLI-WV.js","/assets/circle-check-DyIKORY6.js","/assets/triangle-alert-DtSmdtM4.js","/assets/copy-NDbZjXao.js"],"css":[]},"routes/api.analyze":{"id":"routes/api.analyze","parentId":"root","path":"api/analyze","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/simulations-B3aOzpCZ.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useReportContext-O-jkvSPx.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/LoadingDots-BU_OAEMP.js","/assets/EntityTypeIcon-CobE682z.js","/assets/fileTableUtils-cPo8LiG3.js","/assets/chevron-down-BH2h1Ea2.js","/assets/search-fKo7v0Zo.js","/assets/loader-circle-BAXYRVEO.js","/assets/createLucideIcon-CMT1jU2q.js"],"css":[]},"routes/api.events":{"id":"routes/api.events","parentId":"root","path":"api/events","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.events-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.health":{"id":"routes/api.health","parentId":"root","path":"api/health","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.health-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.memory":{"id":"routes/api.memory","parentId":"root","path":"api/memory","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":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,"hasClientMiddleware":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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dev.empty-BiM6z3Do.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/ScenarioViewer-B76aig_2.js","/assets/InteractivePreview-DYFW3lDD.js","/assets/useCustomSizes-ByhSyh0W.js","/assets/LogViewer-ceAyBX-H.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/useLastLogLine-C14nCb1q.js","/assets/Spinner-Bb5uFQ5V.js","/assets/preload-helper-ckwbz45p.js","/assets/ReportIssueModal-djPLI-WV.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/circle-check-DyIKORY6.js","/assets/triangle-alert-DtSmdtM4.js","/assets/copy-NDbZjXao.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/InlineSpinner-Bu6c6aDe.js"],"css":[]},"routes/settings":{"id":"routes/settings","parentId":"root","path":"settings","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/settings-DfuTtcJP.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useReportContext-O-jkvSPx.js","/assets/CopyButton-DmJveP3T.js","/assets/copy-NDbZjXao.js","/assets/createLucideIcon-CMT1jU2q.js"],"css":[]},"routes/static.$":{"id":"routes/static.$","parentId":"root","path":"static/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":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,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_index-C96V0n15.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useLastLogLine-C14nCb1q.js","/assets/useToast-9FIWuYfK.js","/assets/useReportContext-O-jkvSPx.js","/assets/LogViewer-ceAyBX-H.js","/assets/EntityTypeIcon-CobE682z.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/circle-check-DyIKORY6.js","/assets/loader-circle-BAXYRVEO.js"],"css":[]},"routes/editor":{"id":"routes/editor","parentId":"root","path":"editor","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/editor-D1DAKXtT.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useCustomSizes-ByhSyh0W.js","/assets/Terminal-Dnj5CY9R.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/Spinner-Bb5uFQ5V.js","/assets/preload-helper-ckwbz45p.js","/assets/useLastLogLine-C14nCb1q.js"],"css":[]},"routes/memory":{"id":"routes/memory","parentId":"root","path":"memory","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/memory-Dg0mvYrI.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useReportContext-O-jkvSPx.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/terminal-BG4heKCG.js","/assets/copy-NDbZjXao.js","/assets/CopyButton-DmJveP3T.js","/assets/chevron-down-BH2h1Ea2.js","/assets/search-fKo7v0Zo.js","/assets/pause-DTAcYxBt.js","/assets/book-open-D_nMCFmP.js"],"css":[]},"routes/files":{"id":"routes/files","parentId":"root","path":"files","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/files-DO4CZ16O.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useReportContext-O-jkvSPx.js","/assets/EntityItem-C76mRRiF.js","/assets/fileTableUtils-cPo8LiG3.js","/assets/chevron-down-BH2h1Ea2.js","/assets/search-fKo7v0Zo.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/useToast-9FIWuYfK.js","/assets/TruncatedFilePath-C8OKAR5x.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/LibraryFunctionPreview-DLeucoVX.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/triangle-alert-DtSmdtM4.js","/assets/EntityTypeIcon-CobE682z.js","/assets/EntityTypeBadge-g3saevPb.js"],"css":[]},"routes/labs":{"id":"routes/labs","parentId":"root","path":"labs","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/labs-Zk7ryIM1.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useReportContext-O-jkvSPx.js"],"css":[]},"routes/git":{"id":"routes/git","parentId":"root","path":"git","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/git-CFCTYk9I.js","imports":["/assets/chunk-JZWAC4HX-C4pqxYJB.js","/assets/useReportContext-O-jkvSPx.js","/assets/EntityItem-C76mRRiF.js","/assets/LogViewer-ceAyBX-H.js","/assets/fileTableUtils-cPo8LiG3.js","/assets/createLucideIcon-CMT1jU2q.js","/assets/useToast-9FIWuYfK.js","/assets/TruncatedFilePath-C8OKAR5x.js","/assets/SafeScreenshot-BED4B6sP.js","/assets/LibraryFunctionPreview-DLeucoVX.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/triangle-alert-DtSmdtM4.js","/assets/EntityTypeIcon-CobE682z.js","/assets/EntityTypeBadge-g3saevPb.js"],"css":[]}},"url":"/assets/manifest-a632de18.js","version":"a632de18"};
|
package/codeyam-cli/src/webserver/build/client/assets/{memory-0wMU4KXe.js → memory-Dg0mvYrI.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as xr,j as s,r as I,w as _i,u as Oi,d as Bi,f as $i,L as Hi}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{u as Vi}from"./useReportContext-O-jkvSPx.js";import{c as Ne}from"./createLucideIcon-CMT1jU2q.js";import{T as yr,C as Jt}from"./terminal-BG4heKCG.js";import{C as Oe,a as Qe}from"./copy-NDbZjXao.js";import{C as br}from"./CopyButton-DmJveP3T.js";import{C as _t}from"./chevron-down-BH2h1Ea2.js";import{S as kr}from"./search-fKo7v0Zo.js";import{F as Ot,P as Ui}from"./pause-DTAcYxBt.js";import{B as qi}from"./book-open-D_nMCFmP.js";/**
|
|
2
2
|
* @license lucide-react v0.556.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -83,11 +83,14 @@ ${n}
|
|
|
83
83
|
Please review these rules in conjunction with one another as they all apply to this file.
|
|
84
84
|
|
|
85
85
|
Review each rule with the other rules in mind:
|
|
86
|
+
- Necessary: Is this rule really necessary to avoid confusion in future work sessions?
|
|
86
87
|
- Efficiency: Are the rules concise and well-structured?
|
|
87
88
|
- Effectiveness: Does the rules provide clear, actionable guidance?
|
|
88
89
|
- Context window impact: Can the rules be shortened without losing important information?
|
|
89
90
|
- Overlap: Is there any redundant information across the rules that can be consolidated?
|
|
90
91
|
- Duplication: Are there any rules that are nearly identical that can be merged or removed?
|
|
91
92
|
|
|
93
|
+
Remember that documenting past confusion isn't helpul unless that confusion will likely happen again.
|
|
94
|
+
|
|
92
95
|
Note: Each rule may apply to multiple files, not just the file listed above. Consider this when suggesting changes — modifications should not negatively impact the rule's usefulness for other files it covers.`}function Mh({filePath:e,rulePaths:t,onClose:n}){const[r,i]=I.useState(!1),o=Lh(e,t),l=()=>{navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),2e3)};return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:n,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:a=>a.stopPropagation(),children:[s.jsx("button",{onClick:n,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-1",children:"Audit Rules For File"}),s.jsx("p",{className:"font-mono text-sm text-gray-500 mb-4 truncate",title:e,children:e}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can audit these rules to try and make them as efficient and effective as possible, reducing the impact on the context window."}),s.jsx("textarea",{readOnly:!0,value:o,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-4",children:s.jsx("button",{onClick:l,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:r?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(Qe,{className:"w-4 h-4"}),"Copy Prompt"]})})})]})})}function zh({refreshKey:e,reviewedStatus:t,memories:n,onViewRule:r}){const[i,o]=I.useState("unreviewed"),[l,a]=I.useState(null),[c,u]=I.useState(""),[f,h]=I.useState(0),[d,p]=I.useState(!1),[m,k]=I.useState(null),[C,y]=I.useState(null),j=I.useRef(null),N=I.useRef(null),[A,P]=I.useState({topPaths:[],totalFilesWithCoverage:0,allSourceFiles:[]}),[b,R]=I.useState(!0);I.useEffect(()=>{(async()=>{R(!0);try{const B=await(await fetch("/api/memory?action=audit")).json();P({topPaths:B.topPaths||[],totalFilesWithCoverage:B.totalFilesWithCoverage||0,allSourceFiles:B.allSourceFiles||[]})}catch(M){console.error("Failed to load audit data:",M)}finally{R(!1)}})()},[e]);const _=I.useMemo(()=>i==="all"?A.topPaths:A.topPaths.filter(v=>v.matchingRules.some(M=>!t[M.filePath])),[A.topPaths,i,t]);I.useMemo(()=>A.topPaths.filter(v=>v.matchingRules.some(M=>!t[M.filePath])).length,[A.topPaths,t]);const q=v=>v.split("/").pop()||v,w=I.useMemo(()=>{const v=new Map;for(const M of A.topPaths)v.set(M.filePath,M);return v},[A.topPaths]),F=I.useMemo(()=>{if(!c.trim())return[];const v=c.toLowerCase(),M=[],B=[];for(const K of A.allSourceFiles){const X=K.toLowerCase();if(!X.includes(v))continue;const g=w.get(K)||{filePath:K,matchingRules:[],totalTextLength:0};X.startsWith(v)?M.push(g):B.push(g)}return M.sort((K,X)=>K.filePath.localeCompare(X.filePath)),B.sort((K,X)=>K.filePath.localeCompare(X.filePath)),[...M,...B].slice(0,8)},[c,A.allSourceFiles,w]),D=I.useCallback(v=>{var M;k(v),a(v.filePath),u(v.filePath),p(!1),(M=j.current)==null||M.blur()},[]),Y=I.useCallback(()=>{var v;u(""),k(null),a(null),(v=j.current)==null||v.focus()},[]),L=I.useCallback(v=>{var M;!d||F.length===0||(v.key==="ArrowDown"?(v.preventDefault(),h(B=>Math.min(B+1,F.length-1))):v.key==="ArrowUp"?(v.preventDefault(),h(B=>Math.max(B-1,0))):v.key==="Enter"?(v.preventDefault(),D(F[f])):v.key==="Escape"&&(p(!1),(M=j.current)==null||M.blur()))},[d,F,f,D]);return I.useEffect(()=>{h(0)},[F]),s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[s.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:s.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Rule Audit"})}),s.jsxs("div",{className:"relative flex-1 max-w-[300px]",children:[s.jsx(kr,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),s.jsx("input",{ref:j,type:"text",value:c,onChange:v=>{u(v.target.value),p(!0)},onFocus:()=>{c.trim()&&p(!0)},onBlur:()=>{setTimeout(()=>p(!1),200)},onKeyDown:L,placeholder:"Search files...",className:`w-full pl-8 ${c?"pr-7":"pr-3"} py-1 text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-1 focus:ring-[#005C75] focus:border-[#005C75] bg-gray-50`}),c&&s.jsx("button",{type:"button",onMouseDown:v=>{v.preventDefault(),Y()},className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 flex items-center justify-center text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3",children:s.jsx("path",{d:"M1 1l12 12M13 1L1 13"})})}),d&&F.length>0&&s.jsx("div",{ref:N,className:"absolute left-0 top-full mt-0.5 bg-white border border-gray-200 rounded-md shadow-lg z-10 max-h-75 overflow-y-auto min-w-75 max-w-120",children:F.map((v,M)=>s.jsxs("div",{onMouseDown:B=>{B.preventDefault(),D(v)},onMouseEnter:()=>h(M),className:`flex items-center gap-2 px-3 py-2 cursor-pointer text-sm ${M===f?"bg-[#f0f9ff]":"hover:bg-gray-50"}`,children:[s.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700 truncate",title:v.filePath,children:(()=>{const B=v.filePath.toLowerCase().indexOf(c.toLowerCase());if(B===-1)return v.filePath;const K=v.filePath.slice(0,B),X=v.filePath.slice(B,B+c.length),g=v.filePath.slice(B+c.length);return s.jsxs(s.Fragment,{children:[K,s.jsx("span",{className:"font-semibold text-[#005C75]",children:X}),g]})})()}),s.jsxs("span",{className:"text-xs text-gray-400 ml-auto flex-shrink-0",children:[v.matchingRules.length," rule",v.matchingRules.length!==1?"s":""]})]},v.filePath))})]}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:"Unreviewed Rules"})]}),s.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:"All"})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_140px_150px] px-5 py-2 border-b border-gray-100",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Source file"}),s.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Rules",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.jsx("span",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-48 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Number of rules not yet reviewed for this file / Total number of rules that apply to this file"})]})]}),s.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Tokens",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.jsx("span",{className:"absolute top-full right-0 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-52 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Estimated tokens from unreviewed rules / Total number of tokens from all rules that apply to this file"})]})]})]}),b&&s.jsx("div",{className:"px-5 py-6",children:s.jsxs("div",{className:"animate-pulse space-y-3",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/2"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3 mt-4"})]})}),!b&&(_.length>0||m)&&s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:(m?[m,..._.filter(M=>M.filePath!==m.filePath)].slice(0,8):_.slice(0,8)).map((v,M)=>{const B=v.matchingRules.length,K=v.matchingRules.filter(G=>!t[G.filePath]),X=K.length,g=K.reduce((G,re)=>G+re.bodyLength,0),le=X>0,se=l===v.filePath,x=(m==null?void 0:m.filePath)===v.filePath;return s.jsxs("div",{children:[s.jsxs("div",{onClick:()=>a(se?null:v.filePath),className:`grid grid-cols-[1fr_140px_150px] px-5 py-2.5 items-center border-b border-gray-50 cursor-pointer ${x?"bg-[#f0f9ff] hover:bg-[#e0f2fe]":"hover:bg-gray-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[se?s.jsx(_t,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}):s.jsx(Jt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-900 truncate",title:v.filePath,children:x?v.filePath:q(v.filePath)})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:X}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:B})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:Je(g).toLocaleString()}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:Je(v.totalTextLength).toLocaleString()})]})]}),se&&s.jsxs("div",{className:"bg-gray-50 border-b border-gray-100",children:[v.matchingRules.map(G=>{const re=n.find(z=>z.filePath===G.filePath),ne=t[G.filePath]??!1;return s.jsxs("div",{onClick:z=>{z.stopPropagation(),re&&r(re)},className:"flex items-center gap-2 px-5 pl-12 py-2 hover:bg-gray-100 cursor-pointer",children:[s.jsx(qi,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-700 truncate flex-1",children:re?kt(re.body,re.filePath):G.filePath}),s.jsxs("span",{className:"text-xs text-gray-400 flex-shrink-0",children:[Je(G.bodyLength).toLocaleString()," ","tokens"]}),s.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${ne?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:ne&&s.jsx("svg",{width:"8",height:"6",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},G.filePath)}),s.jsxs("div",{className:"flex items-center justify-center gap-3 px-5 py-2 border-t border-gray-200",children:[s.jsx("span",{className:"text-xs text-gray-400",children:"Have Claude audit these rules"}),s.jsx("button",{onClick:G=>{G.stopPropagation(),y({filePath:v.filePath,rulePaths:v.matchingRules.map(re=>re.filePath)})},className:"px-3 py-1 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer",children:"Prompt"})]})]})]},v.filePath)})}),!b&&_.length===0&&s.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:i==="unreviewed"?"No files have unreviewed rules":"No files have rule coverage yet"}),C&&s.jsx(Mh,{filePath:C.filePath,rulePaths:C.rulePaths,onClose:()=>y(null)})]})}function _h({rule:e,changeInfo:t,isReviewed:n,onApprove:r,onEdit:i,onDelete:o,onClose:l}){const a=kt(e.body,e.filePath),c=Je(e.body.length),u=e.frontmatter.category,f=`.claude/rules/${e.filePath}`,[h,d]=I.useState(null),p=(t==null?void 0:t.changeType)==="added"||h!=null&&h.commitCount!=null&&h.commitCount<=1&&!(h.commitCount===1&&h.isUncommitted);return I.useEffect(()=>{d(null),fetch(`/api/memory?action=rule-diff&filePath=${encodeURIComponent(e.filePath)}`).then(m=>m.json()).then(m=>{m.diff&&d(m.diff)}).catch(()=>{})},[e.filePath]),I.useEffect(()=>{const m=k=>{k.key==="Escape"&&l()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]),s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:l,children:s.jsxs("div",{className:"rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",style:{backgroundColor:"#F8F7F6"},onClick:m=>m.stopPropagation(),children:[s.jsx("div",{className:"px-6 pt-5 pb-4",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[s.jsx("h2",{className:"text-[16px] font-bold text-gray-900",children:a}),t&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:Me(t.date)}),s.jsx("span",{className:`flex-shrink-0 text-[11px] uppercase font-semibold tracking-wider ${t.changeType==="added"?"text-green-600":t.changeType==="modified"?"text-orange-600":"text-red-600"}`,children:t.changeType})]})]}),u&&s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"TYPE:"}),s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] uppercase font-semibold tracking-wider bg-[#E0F2F1] text-[#00796B]",children:u})]}),s.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"FILE:"}),s.jsx("code",{className:"text-[11px] text-gray-600 font-mono",children:f}),s.jsx(br,{content:f,icon:!0,iconSize:12,className:"p-0.5 rounded text-gray-400 hover:text-gray-600 transition-colors",ariaLabel:"Copy file path"})]}),s.jsxs("div",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:["TOKENS: ~",c.toLocaleString()]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-4",children:[s.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer transition-colors ${n?"bg-green-600 text-white":"border border-green-600 text-green-700 hover:bg-green-50"}`,children:[s.jsx(Oe,{className:"w-3.5 h-3.5"}),n?"Approved":"Approve"]}),s.jsx("button",{onClick:i,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-gray-300 text-gray-600 hover:bg-gray-50 transition-colors",children:"Edit"}),s.jsx("button",{onClick:o,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-red-300 text-red-600 hover:bg-red-50 transition-colors",children:"Delete"}),s.jsx("button",{onClick:l,className:"p-1.5 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-200 cursor-pointer transition-colors ml-1",children:s.jsx(tt,{className:"w-5 h-5"})})]})]})}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs("div",{className:"px-6 pb-4",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Applies to paths:"}),s.jsx("div",{className:"bg-white rounded-lg p-4 space-y-2.5",style:{border:"1px solid #E6E6E6"},children:e.frontmatter.paths.map((m,k)=>{const C=m.split("/"),y=C.pop()||m,j=C.length>0?C.join("/")+"/":"";return s.jsxs("div",{className:"flex items-center gap-2 text-[13px] font-mono",children:[s.jsx(Ot,{className:"w-4 h-4 text-[#005C75] flex-shrink-0"}),s.jsxs("span",{children:[j&&s.jsx("span",{className:"text-gray-500",children:j}),s.jsx("span",{className:"font-bold text-gray-900",children:y})]})]},k)})})]}),p?s.jsx("div",{className:"px-6 pb-4",children:s.jsxs("div",{className:"text-[13px] text-gray-500",children:["Created"," ",t!=null&&t.date?Me(t.date):h!=null&&h.date?Me(h.date):"recently"]})}):h&&s.jsx("div",{className:"px-6 pb-4",children:s.jsxs("details",{children:[s.jsxs("summary",{className:"text-[13px] text-gray-700 font-semibold cursor-pointer",children:["Recent change: ",h.commitMessage," —"," ",Me(h.date)]}),s.jsx("pre",{className:"mt-2 p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto rounded-md",children:h.diff.split(`
|
|
93
|
-
`).map((m,k)=>{let C="";return m.startsWith("+")&&!m.startsWith("+++")?C="text-green-400":m.startsWith("-")&&!m.startsWith("---")?C="text-red-400":m.startsWith("@@")&&(C="text-cyan-400"),s.jsx("div",{className:C,children:m},k)})})]})}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Rule Text:"}),s.jsx("div",{className:"bg-white rounded-lg p-6",style:{border:"1px solid #E6E6E6"},children:s.jsx(Ni,{content:e.body})})]})]})})}function Oh(){return s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#232323"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#232323"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#232323"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#232323"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#232323"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#232323"})]})}function Bh(){return s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#005C75"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#005C75"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#005C75"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#005C75"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#005C75"})]})}function $h(){return s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans max-w-3xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h1",{className:"text-[22px] font-semibold mb-4",style:{fontFamily:"Sora",color:"#232323"},children:"Get Started with CodeYam Memory"}),s.jsx("p",{className:"text-[15px] text-gray-500 leading-relaxed max-w-2xl mx-auto",children:"CodeYam Memory generates path-scoped Claude Rules that load automatically when Claude works on matching files. These rules capture any confusion, architectural decisions, and tribal knowledge from your as you work with Claude, ensuring sessions become more efficient and aligned with your codebase over time."})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"Setup Steps"}),s.jsxs("ol",{className:"space-y-5",children:[s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"1"}),s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Open Claude Code in your project terminal"})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"2"}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"in the Claude Code session"})]}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"This kicks off analysis of your git history to find confusion patterns."})]})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"3"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Return to this dashboard page to review the new rules"}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"You can review, edit, and approve the rules Claude creates."})]})]})]})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"What Gets Created"}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-[15px] top-8 bottom-4",style:{borderLeft:"2px dotted #B0BEC5"}}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-[14px] font-medium text-gray-900",children:[s.jsx("code",{className:"bg-gray-200/60 px-1.5 py-0.5 rounded text-[13px]",children:".claude/rules/*.md"}),s.jsx("span",{className:"text-gray-400 mx-1.5",children:"—"}),"path-scoped guidance files"]}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"Markdown files with frontmatter specifying which file paths they apply to."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Rules load automatically when Claude works on matching files"}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"No manual steps needed — Claude picks up relevant rules based on the files it touches."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Pre-commit hook to keep rules fresh and capture new patterns"}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"A git hook runs automatically to update rules when related code changes and looks for any new patterns of confusion in work sessions."})]})]})]})]})]}),s.jsxs("div",{className:"rounded-lg px-8 py-5 flex items-center justify-center gap-3",style:{backgroundColor:"#1A2332"},children:[s.jsx("span",{className:"text-white text-[15px] font-medium",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-white text-[15px] font-medium",children:"in Claude Code to get started"})]})]})})}function pr({value:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return s.jsxs("button",{onClick:r,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-[13px] font-mono cursor-pointer border-0",style:{backgroundColor:"#2C3E50",color:"#E0E0E0"},title:"Copy to clipboard",children:[e,t?s.jsx(Oe,{className:"w-3.5 h-3.5 text-green-400"}):s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400",children:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]})}function ut({label:e,count:t,icon:n,bgColor:r,iconBgColor:i,textColor:o}){return s.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:r,border:"1px solid #EFEFEF"},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:i},children:n}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:o},children:t}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:o},children:e})]})]})})}function Hh({searchFilter:e,onSearchChange:t,onCreateNew:n,onLearnMore:r,reviewCounts:i}){return s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(Oh,{}),s.jsx("h1",{className:"text-[24px] font-semibold mb-0",style:{fontFamily:"Sora",color:"#232323"},children:"Memory"})]}),s.jsxs("p",{className:"text-[15px] text-gray-500",children:["Rules help Claude understand your codebase patterns and conventions."," ",s.jsx("button",{onClick:r,className:"text-[#005C75] underline cursor-pointer",children:"Learn more about rules."})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx("input",{type:"text",value:e,onChange:o=>t(o.target.value),placeholder:"Search rules...",className:"w-64 pl-10 pr-4 py-2 border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent text-sm"})]}),s.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(ut,{label:"Total Rules",count:i.total,icon:s.jsx(Bh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),s.jsx(ut,{label:"Unreviewed",count:i.unreviewed,icon:s.jsx(Yi,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),s.jsx(ut,{label:"Reviewed",count:i.reviewed,icon:s.jsx(Oe,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),s.jsx(ut,{label:"Stale",count:i.stale,icon:s.jsx(Ui,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function Vh({onClose:e,onCreateNew:t}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:n=>n.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-4",children:"What are Claude Rules?"}),s.jsx("h3",{className:"mb-4 font-semibold",children:"And how does CodeYam Memory work with Claude Rules?"}),s.jsxs("div",{className:"text-gray-600 text-[15px] space-y-3 mb-6",children:[s.jsxs("p",{children:["Claude Rules are a component of"," ",s.jsx("a",{href:"https://code.claude.com/docs/en/memory#modular-rules-with-claude%2Frules%2F",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Memory Management in Claude Code"}),'. The text of each rule is passed into the context window when working on the specific files described in the "paths" frontmatter field of the rule.']}),s.jsx("p",{children:"This allows you to provide context that is surgically specific to certain files in your codebase. They are a powerful tool but are harder to write and maintain than CLAUDE.md files."}),s.jsx("p",{children:"CodeYam Memory helps write and maintain Claude Rules. Hooks ensure that rules are reviewed and added during Claude Code working sessions. The CodeYam CLI Dashboard provides a page dedicated to Memory where you can view, edit, create, delete, and review Claude Rules."})]}),s.jsx("div",{className:"flex justify-center",children:s.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-5 py-2.5 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function Uh({rule:e,onConfirm:t,onCancel:n}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Memory?"}),s.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",s.jsx("span",{className:"font-mono text-sm",children:e.filePath}),"? This cannot be undone."]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:n,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),s.jsx("button",{onClick:()=>t(e),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 cursor-pointer",children:"Delete"})]})]})})}const dr="Can you help me perform an interactive rules audit? Please look at all of the rules in `.claude/rules`. Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts `folder1/folder2/file1` and `folder1/folder2/folder3/file2` then the rule should be in `.claude/rules/folder1/folder2`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rules is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. If you have any questions please ask!",mr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function gr({text:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return s.jsx("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:t?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(Qe,{className:"w-4 h-4"}),"Copy Prompt"]})})}function qh({onClose:e}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:t=>t.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit All Rules"}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can review all rules to look for information that is inconsistent, inappropriate, duplicative, inefficient, etc."}),s.jsx("textarea",{readOnly:!0,value:dr,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:dr})}),s.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[s.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),s.jsx("textarea",{readOnly:!0,value:mr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:mr})})]})]})})}function Wh(){const[e,t]=I.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 mb-8 flex items-center gap-3",children:[s.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit All Rules"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Ask Claude to review, audit, and improve all rules."}),s.jsx("button",{onClick:()=>t(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),e&&s.jsx(qh,{onClose:()=>t(!1)})]})}const rf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],lf=_i(function(){const{memories:t,reviewedStatus:n,memoryInitialized:r,error:i}=Oi(),o=Bi(),l=$i(),[a,c]=I.useState(""),[u,f]=I.useState(null),[h,d]=I.useState(new Set(["root"])),[p,m]=I.useState(null),[k,C]=I.useState(!1),[y,j]=I.useState(null),[N,A]=I.useState(0),[P,b]=I.useState(!1),[R,_]=I.useState(null),[q,w]=I.useState(null),[F,D]=I.useState({}),Y=z=>{d(H=>{const ee=new Set(H);return ee.has(z)?ee.delete(z):ee.add(z),ee})};Vi({source:"memory-page"});const L=I.useMemo(()=>({...n,...F}),[n,F]),v=I.useRef(o.state);I.useEffect(()=>{const z=v.current==="loading"||v.current==="submitting",H=o.state==="idle";z&&H&&o.data&&(l.revalidate(),m(null),C(!1),A(ee=>ee+1)),v.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{D(z=>{const H={};for(const[ee,ue]of Object.entries(z))n[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(z).length?z:H})},[n]);const M=(z,H)=>{D(ee=>({...ee,[z]:!0})),o.submit({action:"mark-reviewed",filePath:z,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=z=>{D(H=>({...H,[z]:!1})),o.submit({action:"mark-unreviewed",filePath:z},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(z,H)=>{_(z),w(H??null)},X=I.useMemo(()=>{let z=t;if(a.trim()){const H=a.toLowerCase();z=z.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return z},[t,a]),g=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(z,H)=>{const ee=p?"update":"create";o.submit({action:ee,filePath:z,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=z=>{o.submit({action:"delete",filePath:z.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},x=I.useMemo(()=>{const z=t.filter(H=>L[H.filePath]).length;return{total:t.length,reviewed:z,unreviewed:t.length-z,stale:0}},[t,L]),G=I.useMemo(()=>{const z=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,z.add(ue)}return z},[X]),re=G.size===h.size&&[...G].every(z=>h.has(z)),ne=()=>{d(re?new Set(["root"]):new Set(G))};return i?s.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:s.jsxs("div",{className:"px-12 py-6 font-sans",children:[s.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),s.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[s.jsx(Hh,{searchFilter:a,onSearchChange:c,onCreateNew:()=>C(!0),onLearnMore:()=>b(!0),reviewCounts:x}),(k||p)&&s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{C(!1),m(null)},children:s.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:z=>z.stopPropagation(),children:s.jsx(Ih,{rule:p,onSave:le,onCancel:()=>{C(!1),m(null)}})})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[s.jsx(Dh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:N}),s.jsx(zh,{onEditRule:m,onDeleteRule:j,refreshKey:N,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,memories:t,onViewRule:K})]}),s.jsx(Wh,{}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),s.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&s.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),s.jsxs("div",{className:"flex gap-6",children:[s.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:s.jsx(Fh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),s.jsx("div",{className:"flex-1 min-w-0",children:t.length===0?s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[s.jsx(Xi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),s.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",s.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),s.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[s.jsx(Zt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):s.jsxs("div",{children:[u&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",s.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),s.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),s.jsx(Rh,{memories:g,onEdit:m,onDelete:j,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,onViewRule:K})]})})]}),s.jsx("div",{className:"mt-8 mb-8",children:s.jsx(Hi,{to:"/agent-transcripts",className:"block bg-white border border-gray-200 rounded-lg p-5 hover:border-[#005C75] hover:shadow-sm transition-all group",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"4 17 10 11 4 5"}),s.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),s.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),R&&!p&&(()=>{const z=t.find(H=>H.filePath===R.filePath)??R;return s.jsx(_h,{rule:z,changeInfo:q??void 0,isReviewed:L[z.filePath]??!1,onApprove:()=>{L[z.filePath]??!1?B(z.filePath):M(z.filePath,z.lastModified),_(null)},onEdit:()=>{m(z)},onDelete:()=>{j(z),_(null)},onClose:()=>_(null)})})(),P&&s.jsx(Vh,{onClose:()=>b(!1),onCreateNew:()=>{b(!1),C(!0)}}),y&&s.jsx(Uh,{rule:y,onConfirm:se,onCancel:()=>j(null)})]})}):s.jsx($h,{})});export{lf as default,rf as meta};
|
|
96
|
+
`).map((m,k)=>{let C="";return m.startsWith("+")&&!m.startsWith("+++")?C="text-green-400":m.startsWith("-")&&!m.startsWith("---")?C="text-red-400":m.startsWith("@@")&&(C="text-cyan-400"),s.jsx("div",{className:C,children:m},k)})})]})}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Rule Text:"}),s.jsx("div",{className:"bg-white rounded-lg p-6",style:{border:"1px solid #E6E6E6"},children:s.jsx(Ni,{content:e.body})})]})]})})}function Oh(){return s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#232323"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#232323"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#232323"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#232323"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#232323"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#232323"})]})}function Bh(){return s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#005C75"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#005C75"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#005C75"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#005C75"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#005C75"})]})}function $h(){return s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans max-w-3xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h1",{className:"text-[22px] font-semibold mb-4",style:{fontFamily:"Sora",color:"#232323"},children:"Get Started with CodeYam Memory"}),s.jsx("p",{className:"text-[15px] text-gray-500 leading-relaxed max-w-2xl mx-auto",children:"CodeYam Memory generates path-scoped Claude Rules that load automatically when Claude works on matching files. These rules capture any confusion, architectural decisions, and tribal knowledge from your as you work with Claude, ensuring sessions become more efficient and aligned with your codebase over time."})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"Setup Steps"}),s.jsxs("ol",{className:"space-y-5",children:[s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"1"}),s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Open Claude Code in your project terminal"})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"2"}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"in the Claude Code session"})]}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"This kicks off analysis of your git history to find confusion patterns."})]})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"3"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Return to this dashboard page to review the new rules"}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"You can review, edit, and approve the rules Claude creates."})]})]})]})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"What Gets Created"}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-[15px] top-8 bottom-4",style:{borderLeft:"2px dotted #B0BEC5"}}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-[14px] font-medium text-gray-900",children:[s.jsx("code",{className:"bg-gray-200/60 px-1.5 py-0.5 rounded text-[13px]",children:".claude/rules/*.md"}),s.jsx("span",{className:"text-gray-400 mx-1.5",children:"—"}),"path-scoped guidance files"]}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"Markdown files with frontmatter specifying which file paths they apply to."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Rules load automatically when Claude works on matching files"}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"No manual steps needed — Claude picks up relevant rules based on the files it touches."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Pre-commit hook to keep rules fresh and capture new patterns"}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"A git hook runs automatically to update rules when related code changes and looks for any new patterns of confusion in work sessions."})]})]})]})]})]}),s.jsxs("div",{className:"rounded-lg px-8 py-5 flex items-center justify-center gap-3",style:{backgroundColor:"#1A2332"},children:[s.jsx("span",{className:"text-white text-[15px] font-medium",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-white text-[15px] font-medium",children:"in Claude Code to get started"})]})]})})}function pr({value:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return s.jsxs("button",{onClick:r,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-[13px] font-mono cursor-pointer border-0",style:{backgroundColor:"#2C3E50",color:"#E0E0E0"},title:"Copy to clipboard",children:[e,t?s.jsx(Oe,{className:"w-3.5 h-3.5 text-green-400"}):s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400",children:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]})}function ut({label:e,count:t,icon:n,bgColor:r,iconBgColor:i,textColor:o}){return s.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:r,border:"1px solid #EFEFEF"},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:i},children:n}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:o},children:t}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:o},children:e})]})]})})}function Hh({searchFilter:e,onSearchChange:t,onCreateNew:n,onLearnMore:r,reviewCounts:i}){return s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(Oh,{}),s.jsx("h1",{className:"text-[24px] font-semibold mb-0",style:{fontFamily:"Sora",color:"#232323"},children:"Memory"})]}),s.jsxs("p",{className:"text-[15px] text-gray-500",children:["Rules help Claude understand your codebase patterns and conventions."," ",s.jsx("button",{onClick:r,className:"text-[#005C75] underline cursor-pointer",children:"Learn more about rules."})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx("input",{type:"text",value:e,onChange:o=>t(o.target.value),placeholder:"Search rules...",className:"w-64 pl-10 pr-4 py-2 border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent text-sm"})]}),s.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(ut,{label:"Total Rules",count:i.total,icon:s.jsx(Bh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),s.jsx(ut,{label:"Unreviewed",count:i.unreviewed,icon:s.jsx(Yi,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),s.jsx(ut,{label:"Reviewed",count:i.reviewed,icon:s.jsx(Oe,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),s.jsx(ut,{label:"Stale",count:i.stale,icon:s.jsx(Ui,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function Vh({onClose:e,onCreateNew:t}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:n=>n.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-4",children:"What are Claude Rules?"}),s.jsx("h3",{className:"mb-4 font-semibold",children:"And how does CodeYam Memory work with Claude Rules?"}),s.jsxs("div",{className:"text-gray-600 text-[15px] space-y-3 mb-6",children:[s.jsxs("p",{children:["Claude Rules are a component of"," ",s.jsx("a",{href:"https://code.claude.com/docs/en/memory#modular-rules-with-claude%2Frules%2F",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Memory Management in Claude Code"}),'. The text of each rule is passed into the context window when working on the specific files described in the "paths" frontmatter field of the rule.']}),s.jsx("p",{children:"This allows you to provide context that is surgically specific to certain files in your codebase. They are a powerful tool but are harder to write and maintain than CLAUDE.md files."}),s.jsx("p",{children:"CodeYam Memory helps write and maintain Claude Rules. Hooks ensure that rules are reviewed and added during Claude Code working sessions. The CodeYam CLI Dashboard provides a page dedicated to Memory where you can view, edit, create, delete, and review Claude Rules."})]}),s.jsx("div",{className:"flex justify-center",children:s.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-5 py-2.5 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function Uh({rule:e,onConfirm:t,onCancel:n}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Memory?"}),s.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",s.jsx("span",{className:"font-mono text-sm",children:e.filePath}),"? This cannot be undone."]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:n,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),s.jsx("button",{onClick:()=>t(e),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 cursor-pointer",children:"Delete"})]})]})})}const dr="Can you help me perform an interactive rules audit? Please look at all of the rules in `.claude/rules`. Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts `folder1/folder2/file1` and `folder1/folder2/folder3/file2` then the rule should be in `.claude/rules/folder1/folder2`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rule is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. Too often rules reflect past confusion that has been resolved and is unlikely to happen again. Content and rules like this should be removed. If you have any questions please ask!",mr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function gr({text:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return s.jsx("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:t?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(Qe,{className:"w-4 h-4"}),"Copy Prompt"]})})}function qh({onClose:e}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:t=>t.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit All Rules"}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can review all rules to look for information that is inconsistent, inappropriate, duplicative, inefficient, etc."}),s.jsx("textarea",{readOnly:!0,value:dr,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:dr})}),s.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[s.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),s.jsx("textarea",{readOnly:!0,value:mr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:mr})})]})]})})}function Wh(){const[e,t]=I.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 mb-8 flex items-center gap-3",children:[s.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit All Rules"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Ask Claude to review, audit, and improve all rules."}),s.jsx("button",{onClick:()=>t(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),e&&s.jsx(qh,{onClose:()=>t(!1)})]})}const rf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],lf=_i(function(){const{memories:t,reviewedStatus:n,memoryInitialized:r,error:i}=Oi(),o=Bi(),l=$i(),[a,c]=I.useState(""),[u,f]=I.useState(null),[h,d]=I.useState(new Set(["root"])),[p,m]=I.useState(null),[k,C]=I.useState(!1),[y,j]=I.useState(null),[N,A]=I.useState(0),[P,b]=I.useState(!1),[R,_]=I.useState(null),[q,w]=I.useState(null),[F,D]=I.useState({}),Y=z=>{d(H=>{const ee=new Set(H);return ee.has(z)?ee.delete(z):ee.add(z),ee})};Vi({source:"memory-page"});const L=I.useMemo(()=>({...n,...F}),[n,F]),v=I.useRef(o.state);I.useEffect(()=>{const z=v.current==="loading"||v.current==="submitting",H=o.state==="idle";z&&H&&o.data&&(l.revalidate(),m(null),C(!1),A(ee=>ee+1)),v.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{D(z=>{const H={};for(const[ee,ue]of Object.entries(z))n[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(z).length?z:H})},[n]);const M=(z,H)=>{D(ee=>({...ee,[z]:!0})),o.submit({action:"mark-reviewed",filePath:z,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=z=>{D(H=>({...H,[z]:!1})),o.submit({action:"mark-unreviewed",filePath:z},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(z,H)=>{_(z),w(H??null)},X=I.useMemo(()=>{let z=t;if(a.trim()){const H=a.toLowerCase();z=z.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return z},[t,a]),g=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(z,H)=>{const ee=p?"update":"create";o.submit({action:ee,filePath:z,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=z=>{o.submit({action:"delete",filePath:z.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},x=I.useMemo(()=>{const z=t.filter(H=>L[H.filePath]).length;return{total:t.length,reviewed:z,unreviewed:t.length-z,stale:0}},[t,L]),G=I.useMemo(()=>{const z=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,z.add(ue)}return z},[X]),re=G.size===h.size&&[...G].every(z=>h.has(z)),ne=()=>{d(re?new Set(["root"]):new Set(G))};return i?s.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:s.jsxs("div",{className:"px-12 py-6 font-sans",children:[s.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),s.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[s.jsx(Hh,{searchFilter:a,onSearchChange:c,onCreateNew:()=>C(!0),onLearnMore:()=>b(!0),reviewCounts:x}),(k||p)&&s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{C(!1),m(null)},children:s.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:z=>z.stopPropagation(),children:s.jsx(Ih,{rule:p,onSave:le,onCancel:()=>{C(!1),m(null)}})})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[s.jsx(Dh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:N}),s.jsx(zh,{onEditRule:m,onDeleteRule:j,refreshKey:N,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,memories:t,onViewRule:K})]}),s.jsx(Wh,{}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),s.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&s.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),s.jsxs("div",{className:"flex gap-6",children:[s.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:s.jsx(Fh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),s.jsx("div",{className:"flex-1 min-w-0",children:t.length===0?s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[s.jsx(Xi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),s.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",s.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),s.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[s.jsx(Zt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):s.jsxs("div",{children:[u&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",s.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),s.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),s.jsx(Rh,{memories:g,onEdit:m,onDelete:j,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,onViewRule:K})]})})]}),s.jsx("div",{className:"mt-8 mb-8",children:s.jsx(Hi,{to:"/agent-transcripts",className:"block bg-white border border-gray-200 rounded-lg p-5 hover:border-[#005C75] hover:shadow-sm transition-all group",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"4 17 10 11 4 5"}),s.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),s.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),R&&!p&&(()=>{const z=t.find(H=>H.filePath===R.filePath)??R;return s.jsx(_h,{rule:z,changeInfo:q??void 0,isReviewed:L[z.filePath]??!1,onApprove:()=>{L[z.filePath]??!1?B(z.filePath):M(z.filePath,z.lastModified),_(null)},onEdit:()=>{m(z)},onDelete:()=>{j(z),_(null)},onClose:()=>_(null)})})(),P&&s.jsx(Vh,{onClose:()=>b(!1),onCreateNew:()=>{b(!1),C(!0)}}),y&&s.jsx(Uh,{rule:y,onConfirm:se,onCancel:()=>j(null)})]})}):s.jsx($h,{})});export{lf as default,rf as meta};
|