contentrain 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{activity-DP5wjWLV.mjs → activity-3JA0eECa.mjs} +2 -2
- package/dist/{branches-D_LPptfM.mjs → branches-g2vq3Ka-.mjs} +2 -2
- package/dist/{cdn-build-BuacuDbL.mjs → cdn-build-BT87QXnP.mjs} +2 -2
- package/dist/{cdn-init-CGl8-QCR.mjs → cdn-init-DU_kUt56.mjs} +2 -2
- package/dist/{connect-CKx-SfQ7.mjs → connect-BgrS9le_.mjs} +2 -2
- package/dist/index.mjs +10 -9
- package/dist/{login-yLBoeLVM.mjs → login-BBrpSIn2.mjs} +2 -2
- package/dist/{logout-DBm34b7e.mjs → logout-6UriBhYh.mjs} +1 -1
- package/dist/{merge-pPg9upjo.mjs → merge-CfnE33IP.mjs} +7 -1
- package/dist/reconcile-B69abfnm.mjs +154 -0
- package/dist/{resolve-context-DPdtEC0i.mjs → resolve-context-CczlaT6o.mjs} +1 -1
- package/dist/{serve-BbJlmK0r.mjs → serve-KyrZZLh4.mjs} +2 -2
- package/dist/serve-ui/assets/{AgentPromptGroup.vue_vue_type_script_setup_true_lang-DGijfAoG.js → AgentPromptGroup.vue_vue_type_script_setup_true_lang-aUmPXZcx.js} +1 -1
- package/dist/serve-ui/assets/{AppLayout-Cu18nQFJ.js → AppLayout-DDDJN8hd.js} +1 -1
- package/dist/serve-ui/assets/BranchDetailPage-DSCFVd50.js +17 -0
- package/dist/serve-ui/assets/{BranchesPage-hxZVqEWG.js → BranchesPage-BVmuLtHJ.js} +1 -1
- package/dist/serve-ui/assets/{CardContent.vue_vue_type_script_setup_true_lang-Wep4RMkj.js → CardContent.vue_vue_type_script_setup_true_lang-wzodQHah.js} +1 -1
- package/dist/serve-ui/assets/{CollapsibleTrigger.vue_vue_type_script_setup_true_lang-ClPT-9J4.js → CollapsibleTrigger.vue_vue_type_script_setup_true_lang-C1wEA-d3.js} +1 -1
- package/dist/serve-ui/assets/{Collection-CvRfhUB7.js → Collection-Dyohp6vl.js} +1 -1
- package/dist/serve-ui/assets/ConfigProvider-Drzuc2zO.js +1 -0
- package/dist/serve-ui/assets/{ContentListPage-KrCopmD6.js → ContentListPage-DLul5bLF.js} +1 -1
- package/dist/serve-ui/assets/{ContentPage-RYWcjK9c.js → ContentPage-C88ixXsn.js} +1 -1
- package/dist/serve-ui/assets/{DashboardPage-B_M6WKld.js → DashboardPage-912g0zec.js} +1 -1
- package/dist/serve-ui/assets/{DialogTitle.vue_vue_type_script_setup_true_lang-VT8-tcWV.js → DialogTitle.vue_vue_type_script_setup_true_lang-De8dcLW1.js} +1 -1
- package/dist/serve-ui/assets/{DoctorPage-DMnd50Qe.js → DoctorPage-8KnO4Jfu.js} +1 -1
- package/dist/serve-ui/assets/{FormatReferencePage-8Y_dGr6K.js → FormatReferencePage-Br_KVDzu.js} +1 -1
- package/dist/serve-ui/assets/{Input.vue_vue_type_script_setup_true_lang-DTg5x_1H.js → Input.vue_vue_type_script_setup_true_lang-BKEszmi1.js} +1 -1
- package/dist/serve-ui/assets/{ModelDetailPage-3-G2J9oZ.js → ModelDetailPage-Dv1zkw9M.js} +1 -1
- package/dist/serve-ui/assets/{ModelsPage-7bZuwfxB.js → ModelsPage-oF-MdIjs.js} +1 -1
- package/dist/serve-ui/assets/NormalizePage-Dd5GQiVd.js +11 -0
- package/dist/serve-ui/assets/{PageHeader.vue_vue_type_script_setup_true_lang-f_qa-M1s.js → PageHeader.vue_vue_type_script_setup_true_lang-B4RP_f6D.js} +1 -1
- package/dist/serve-ui/assets/{Presence-CfATKqRO.js → Presence-CwTW6JV8.js} +1 -1
- package/dist/serve-ui/assets/{Separator.vue_vue_type_script_setup_true_lang-D-ZdYJPm.js → Separator.vue_vue_type_script_setup_true_lang-Cfw9azsF.js} +1 -1
- package/dist/serve-ui/assets/{StudioHint.vue_vue_type_script_setup_true_lang-C_9M35tB.js → StudioHint.vue_vue_type_script_setup_true_lang-njj2MiMe.js} +1 -1
- package/dist/serve-ui/assets/{TrustBadge.vue_vue_type_script_setup_true_lang-CNzxpJIB.js → TrustBadge.vue_vue_type_script_setup_true_lang-CKSr5l6Z.js} +1 -1
- package/dist/serve-ui/assets/{ValidatePage-Ci8Njrjy.js → ValidatePage-CfGlf3r6.js} +1 -1
- package/dist/serve-ui/assets/{arrow-down-DuuSrZrX.js → arrow-down-k7y8IG0A.js} +1 -1
- package/dist/serve-ui/assets/{arrow-left-Dxkqq18_.js → arrow-left-Db-cyAsD.js} +1 -1
- package/dist/serve-ui/assets/{book-marked-BJCFfYPg.js → book-marked-Do-N1OrO.js} +1 -1
- package/dist/serve-ui/assets/{book-open-BrhESfqB.js → book-open-C5gyxyGy.js} +1 -1
- package/dist/serve-ui/assets/{box-DnDvmOFz.js → box-BP-1CTkM.js} +1 -1
- package/dist/serve-ui/assets/{chevron-down-DxPRdtQ2.js → chevron-down-DYr0P7tu.js} +1 -1
- package/dist/serve-ui/assets/{chevron-right-4fFpOcQY.js → chevron-right-DyOhl-vS.js} +1 -1
- package/dist/serve-ui/assets/{circle-alert-DHoba5Yl.js → circle-alert-CK5y4MwL.js} +1 -1
- package/dist/serve-ui/assets/{content-CUJS4qD7.js → content-CpU25d4T.js} +1 -1
- package/dist/serve-ui/assets/{database-DXeLd4fP.js → database-Yx3eEqcB.js} +1 -1
- package/dist/serve-ui/assets/{file-code-DAeYB6-U.js → file-code-BUzIo-9Q.js} +1 -1
- package/dist/serve-ui/assets/{file-text-CNkcFAch.js → file-text-Cb1CMf3W.js} +1 -1
- package/dist/serve-ui/assets/{git-branch-C8WJyunb.js → git-branch-BIn35AbU.js} +1 -1
- package/dist/serve-ui/assets/{git-merge-zRH3kO3U.js → git-merge-Kep8fChm.js} +1 -1
- package/dist/serve-ui/assets/{hash-CXM2KyoG.js → hash-CgFntI-_.js} +1 -1
- package/dist/serve-ui/assets/{index-ChZMsiq8.js → index-DRccbFO1.js} +2 -2
- package/dist/serve-ui/assets/{languages-DJeX1WoO.js → languages-CZzFhI1_.js} +1 -1
- package/dist/serve-ui/assets/{plus-BKiDA6K4.js → plus-DZbd3Qbv.js} +1 -1
- package/dist/serve-ui/assets/{project-CoRDn0ek.js → project-Qe0nJIFZ.js} +1 -1
- package/dist/serve-ui/assets/{scan-search-D5bwEyY7.js → scan-search-DgPppelD.js} +1 -1
- package/dist/serve-ui/assets/{settings-BmVCntIC.js → settings-BzrU1Pv6.js} +1 -1
- package/dist/serve-ui/assets/{shield-check-CiRjJIVW.js → shield-check-COBaQC43.js} +1 -1
- package/dist/serve-ui/assets/{stethoscope-B8Z0pam_.js → stethoscope-CF0BFg7y.js} +1 -1
- package/dist/serve-ui/assets/{trash-2-B_0ZPRjy.js → trash-2-CO6c5OwW.js} +1 -1
- package/dist/serve-ui/assets/useDirection-CfSipebM.js +1 -0
- package/dist/serve-ui/assets/{useId-D0eDf3m4.js → useId-D77Djrst.js} +1 -1
- package/dist/serve-ui/assets/{useNonce-CiRlnwG8.js → useNonce-B9x5H0aQ.js} +1 -1
- package/dist/serve-ui/assets/{useWatch-BEMqYN2q.js → useWatch-jK8PaHZV.js} +1 -1
- package/dist/serve-ui/index.html +1 -1
- package/dist/{server-Dsv_Afjl.mjs → server-BD2qBZB1.mjs} +15 -6
- package/dist/{status-BAQ8GFyN.mjs → status-BRo3eFxi.mjs} +2 -2
- package/dist/{status-DhhEDuTh.mjs → status-RzPLgczw.mjs} +14 -15
- package/dist/studio-CbILv2hl.mjs +24 -0
- package/dist/{submissions-JTtZXvcf.mjs → submissions-BDEURUE9.mjs} +2 -2
- package/dist/{usage-CC7Chuf6.mjs → usage-0MVnFzfq.mjs} +2 -2
- package/dist/{webhooks-C-D4zHq8.mjs → webhooks-CjQ03K_4.mjs} +2 -2
- package/dist/{whoami-D0ZYvnWU.mjs → whoami-JXOEA4vl.mjs} +1 -1
- package/package.json +4 -4
- package/dist/serve-ui/assets/BranchDetailPage-B5Zb4CWG.js +0 -17
- package/dist/serve-ui/assets/ConfigProvider-DPWUDqGh.js +0 -1
- package/dist/serve-ui/assets/NormalizePage-D1ACHOOk.js +0 -11
- package/dist/serve-ui/assets/useDirection-BO2bsovR.js +0 -1
- package/dist/studio-aKJw68fB.mjs +0 -24
- /package/dist/{client-CJsHr9Db.mjs → client-CaL6uO8q.mjs} +0 -0
- /package/dist/{demo-DP9ceYhe.mjs → demo-C8bRXPnQ.mjs} +0 -0
- /package/dist/{oauth-server-BSgPLV_2.mjs → oauth-server--RbeH3Ex.mjs} +0 -0
- /package/dist/{scaffold-irxW-vdX.mjs → scaffold-DfAeDGjo.mjs} +0 -0
- /package/dist/{setup-seyBYKIP.mjs → setup-B0fn4CI0.mjs} +0 -0
- /package/dist/{skills-X_wFbJXX.mjs → skills-DKI702Oz.mjs} +0 -0
- /package/dist/{validate-CBPJDGH4.mjs → validate-D3IhiwXy.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as b,a2 as N,u as p,h as $,ac as L,af as P,ae as W,r as z,i as E,M as U,w as M,U as _,W as G,_ as K,a4 as Y,a5 as H,t as j,H as J,aj as Q,F as X,a as S,ak as Z,m as D,al as ee,$ as v,b as te,z as ae,e as ne,o as re,f as oe,l as ie}from"./index-ChZMsiq8.js";const se={"branch-detail.and-delete-the-source":"and delete the source branch.","branch-detail.approve-merge":"Approve & Merge","branch-detail.ask-your-agent":"Ask your agent","branch-detail.back":"Back","branch-detail.branch-merged-successfully":"Branch merged successfully.","branch-detail.branch-rejected-and-deleted":"Branch rejected and deleted.","branch-detail.branch-review-and-diff":"Branch review and diff","branch-detail.cancel":"Cancel","branch-detail.check-the-content-quality":"Check the content quality of the pending changes","branch-detail.confirm-merge":"Confirm merge","branch-detail.confirm-rejection":"Confirm rejection","branch-detail.continue-with-phase-2":"Continue with Phase 2 — patch source files with content references","branch-detail.delete-branch":"Delete Branch","branch-detail.failed-to-delete-branch":"Failed to delete branch. Please try again.","branch-detail.failed-to-merge-branch":"Failed to merge branch. Please try again.","branch-detail.file":"file","branch-detail.into":"into","branch-detail.merge":"Merge","branch-detail.no-diff-available-for":"No diff available for this branch.","branch-detail.preview-already-merged":"This branch is already merged into the content-tracking branch.","branch-detail.preview-check-unavailable":"Preview check could not run against this branch.","branch-detail.preview-conflicts-heading":"Files that would conflict","branch-detail.preview-ff-clean":"Fast-forward merge — no conflicts detected.","branch-detail.preview-files-changed-suffix":"files changed","branch-detail.preview-requires-3way":"Will require a three-way merge. Review the changes carefully before approving.","branch-detail.preview-title":"Merge preview","branch-detail.reject":"Reject","branch-detail.review-the-changes-on":"Review the changes on this branch and recommend approval or rejection","branch-detail.this-will-merge":"This will merge","branch-detail.this-will-permanently-delete":"This will permanently delete the branch","branches.add-sample-content-to":"Add sample content to my models","branches.aigenerated-changes-from-your":"AI-generated changes from your IDE will appear here for review.","branches.branch":"Branch","branches.branches-history":"Branches & History","branches.content":"Content","branches.content-saved":"Content Saved","branches.contentrain-operations-will-appear":"Contentrain operations will appear here as a timeline.","branches.create-a-new-content":"Create a new content model for my project","branches.deleted":"Deleted","branches.get-started":"Get started","branches.initialize-my-contentrain-project":"Initialize my contentrain project","branches.merged":"Merged","branches.model":"Model","branches.model-created":"Model Created","branches.model-updated":"Model Updated","branches.no-history-yet":"No history yet","branches.no-pending-branches":"No pending branches","branches.normalize":"Normalize","branches.normalize-my-project-extract":"Normalize my project — extract hardcoded strings","branches.operation":"Operation","branches.refresh":"Refresh","branches.review-pending-changes-and":"Review pending changes and track operations","branches.share-branch-reviews-with":"Share branch reviews with your team in Contentrain Studio.","branches.try-asking-your-ai":"Try asking your AI agent","branches.validate":"Validate","breadcrumb-ellipsis.more":"More","button.button":"button","common.off":"Off","common.on":"On","content-list.add-a-new-entry":"Add a new entry to ${modelId}","content-list.all-locales":"All locales","content-list.ask-your-agent":"Ask your agent","content-list.columns":"Columns","content-list.content-mutations-are-agent":"Content mutations are agent actions — copy a prompt above and paste it in your AI agent.","content-list.create-content-using-ai":"Create content using AI in your IDE.","content-list.create-sample-content-for":"Create sample content for ${modelId}","content-list.delete-draft-entries-from":"Delete draft entries from ${modelId}","content-list.generate-5-entries-for":"Generate 5 entries for ${modelId}","content-list.missing":"missing","content-list.no-entries-matching":'No entries matching "',"content-list.no-entries-yet":"No entries yet","content-list.page":"Page","content-list.refresh":"Refresh","content-list.required":"required","content-list.reset":"Reset","content-list.search-entries":"Search entries...","content-list.show":"Show","content-list.show-all":"Show all","content-list.toggle-columns":"Toggle columns","content-list.translate-modelid-content-to":"Translate ${modelId} content to Turkish","content-list.update-the-content-of":"Update the content of ${modelId}","content.browse-and-inspect-content":"Browse and inspect content by collection","content.collection":"Collection","content.content":"Content","content.create-models-using-your":"Create models using your IDE with AI assistance. Once models are defined, their content will appear here.","content.dictionary":"Dictionary","content.document":"Document","content.fields":"fields","content.filter-models":"Filter models...","content.i18n":"i18n","content.no-models-matching":'No models matching "',"content.no-models-yet":"No models yet","content.singleton":"Singleton","dashboard.branches":"Branches","dashboard.content-models":"Content Models","dashboard.content-saved":"Content Saved","dashboard.contentrain-init":"contentrain init","dashboard.context-updated":"Context Updated","dashboard.create-a-blog-model":"Create a blog model with title, content, and author fields","dashboard.create-models-using-ai":"Create models using AI in your IDE to get started.","dashboard.dashboard":"Dashboard","dashboard.deleted":"Deleted","dashboard.entries":"Entries","dashboard.fields":"fields","dashboard.fix-issues":"Fix issues","dashboard.fix-validation-errors-in":"Fix validation errors in my content","dashboard.full-report":"Full report","dashboard.generate-sample-content-for":"Generate sample content for my models","dashboard.get-started":"Get started","dashboard.i18n":"i18n","dashboard.issues":"Issues","dashboard.locales":"Locales","dashboard.manage-content-with-ai":"Manage content with AI chat and team review in Contentrain Studio.","dashboard.merged":"Merged","dashboard.model-created":"Model Created","dashboard.model-updated":"Model Updated","dashboard.models":"Models","dashboard.no-content-models-yet":"No content models yet","dashboard.no-operations-yet-start":"No operations yet. Start by creating models or content.","dashboard.normalize-my-project-extract":"Normalize my project — extract hardcoded strings","dashboard.not-a-contentrain-project":"Not a Contentrain project","dashboard.operation":"Operation","dashboard.populate":"Populate","dashboard.recent-operations":"Recent Operations","dashboard.review-pending-content-changes":"Review pending content changes","dashboard.run":"Run","dashboard.terms":"terms","dashboard.to-initialize":"to initialize.","dashboard.total":"total","dashboard.try-with-your-ai":"Try with your AI agent","dashboard.validation-summary":"Validation Summary","dashboard.view-all":"View all","dashboard.your-project-at-a":"Your project at a glance","dialog-content.close":"Close","dialog-footer.close":"Close","dialog-scroll-content.close":"Close","doctor.and-more":"and more.","doctor.checks-title":"Checks","doctor.duplicate-values-title":"Duplicate dictionary values","doctor.empty-cta":"Click Run to execute the health checks.","doctor.empty-title":"No report yet.","doctor.error-label":"error","doctor.missing-in":"missing in","doctor.missing-locale-title":"Missing locale keys","doctor.run-button":"Run","doctor.subtitle":"Project health report — git, Node, .contentrain/ structure, models, orphan content, branch pressure, SDK freshness.","doctor.summary-all-passed":"All checks passed","doctor.summary-failed-suffix":"failed","doctor.summary-passed-detail":"checks passed.","doctor.summary-review-below":"Review the failing rows below.","doctor.summary-title":"Summary","doctor.summary-warnings-suffix":"warnings","doctor.title":"Doctor","doctor.unused-keys-title":"Unused keys","doctor.usage-toggle-description":"Scan source files for unused keys, duplicate dictionary values, and locale gaps. Slower but surfaces content drift.","doctor.usage-toggle-label":"Usage analysis","doctor.warning-label":"warning","extraction-review-panel.strings":"strings","format.empty":"No format reference available yet.","format.loading":"Loading format reference…","format.subtitle":"Contentrain's content-format specification — how models, content, meta, and vocabulary are stored on disk.","format.title":"Format Reference","header.open-in-studio":"Open in Studio","index.ts.bgdestructive-textwhite-hoverbgdestructive90-focusvisibleringdestructive20":"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60","index.ts.border-bgbackground-shadowxs-hoverbgaccent":"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50","index.ts.bordertransparent-bgdestructive-textwhite-ahoverbgdestructive90":"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60","index.ts.bordertransparent-bgprimary-textprimaryforeground-ahoverbgprimary90":"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90","index.ts.bordertransparent-bgsecondary-textsecondaryforeground-ahoverbgsecondary90":"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90","index.ts.h10-roundedmd-px6-hassvgpx4":"h-10 rounded-md px-6 has-[>svg]:px-4","index.ts.h8-roundedmd-gap15-px3":"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5","index.ts.h9-px4-py2-hassvgpx3":"h-9 px-4 py-2 has-[>svg]:px-3","index.ts.icon":"icon","index.ts.textdestructive-bgcard-svgtextcurrent-dataslotalertdescriptiontextdestructive90":"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90","index.ts.textforeground-ahoverbgaccent-ahovertextaccentforeground":"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground","index.ts.textprimary-underlineoffset4-hoverunderline":"text-primary underline-offset-4 hover:underline","layout.dismiss":"Dismiss","layout.meta-changed-title":"SEO metadata updated","layout.watcher-paused-label":"Live updates paused:","layout.watcher-restart-hint":"Restart contentrain serve to reattach the watcher.","mobile-nav.branch":"Branch","mobile-nav.content":"Content","mobile-nav.dash":"Dash","mobile-nav.models":"Models","mobile-nav.valid":"Valid.","model-detail.add-a-category-field":"Add a 'category' field to ${modelId}","model-detail.ask-your-agent":"Ask your agent","model-detail.delete-the-modelid-model":"Delete the ${modelId} model","model-detail.fields":"Fields","model-detail.generate-5-sample-entries":"Generate 5 sample entries for ${modelId}","model-detail.i18n":"i18n","model-detail.import-snippet":"Import Snippet","model-detail.models":"Models","model-detail.req":"req","model-detail.sample-data":"Sample Data","model-detail.system-fields":"System Fields","model-detail.update-modelid-to-support":"Update ${modelId} to support i18n","model-detail.view-content":"View Content","models.add-a-testimonials-collection":"Add a testimonials collection model","models.ask-your-agent":"Ask your agent","models.clear-search":"Clear search","models.close":"Close","models.content-model-definitions":"Content model definitions","models.create-a-blog-model":"Create a blog model with title, content, slug, and author fields","models.create-a-faq-model":"Create a FAQ model with question and answer fields","models.create-a-new-content":"Create a new content model","models.create-and-manage-models":"Create and manage models with AI chat in Contentrain Studio.","models.create-content-models-using":"Create content models using AI in your IDE, then come back to inspect them here.","models.fields":"fields","models.filtered-from":"filtered from","models.i18n":"i18n","models.model":"model","models.models":"Models","models.no-models-found":"No models found","models.no-models-match":'No models match "',"models.no-models-yet":"No models yet","models.scaffold-my-project-with":"Scaffold my project with a landing page template","models.search":"Search","models.search-models-by-name":"Search models by name, domain, or kind...","models.total":"total","models.try-a-different-search":'". Try a different search term.',"normalize.adjust-the-normalize-plan":"Adjust the normalize plan — also include strings from the footer component","normalize.approve-or-request-changes":"Approve or request changes","normalize.approve-to-write-extractions":"Approve to write extractions to content models on a review branch. Reject to discard, or ask the agent to adjust the plan.","normalize.ask-your-ai-agent":"Ask your AI agent to get started","normalize.candidates":"candidates","normalize.click-an-extraction-to":"Click an extraction to see its source trace","normalize.content-extraction-and-i18n":"Content extraction and i18n readiness","normalize.continue-to-phase-2":"Continue to Phase 2 — patch source files with content references","normalize.copy-a-prompt-above":"Copy a prompt above or describe what you want extracted. The agent scans your source files, classifies strings, and builds an extraction plan.","normalize.delete":"Delete","normalize.extract-hardcoded-strings":"Extract hardcoded strings","normalize.extract-hero-section-text":"Extract hero section text into a content model","normalize.extracted":"extracted","normalize.extractions":"Extractions","normalize.extractions-across":"extractions across","normalize.files-scanned":"files scanned","normalize.how-it-works":"How it works","normalize.make-my-landing-page":"Make my landing page i18n-ready","normalize.merge":"Merge","normalize.merge-and-continue":"Merge and continue","normalize.merge-review-branches-into":"Merge review branches into main, then ask the agent to start Phase 2 — patching source files with content references.","normalize.models":"models","normalize.normalize":"Normalize","normalize.normalize-my-vue-project":"Normalize my Vue project — extract hardcoded strings","normalize.normalize-plan":"Normalize Plan","normalize.normalize-scans-your-source":"Normalize scans your source files for hardcoded strings and extracts them into content models, making your project i18n-ready.","normalize.patches":"patches","normalize.pending-normalize-branches":"Pending normalize branches","normalize.prompt-your-ai-agent":"Prompt your AI agent","normalize.remove-navigation-labels-from":"Remove navigation labels from the extraction plan","normalize.request-changes-from-your":"Request changes from your agent","normalize.review-and-merge-normalize":"Review and merge normalize branches into your main branch.","normalize.review-the-plan-here":"Review the plan here","normalize.scan-srcpages-for-content":"Scan src/pages for content strings and create extraction plan","normalize.skipped":"skipped","normalize.source-patches":"Source Patches","normalize.source-trace":"Source Trace","normalize.start-reuse-for-the":"Start reuse for the extracted content models","normalize.strings-found":"strings found","normalize.the-agent-sends-the":"The agent sends the plan to this dashboard. You review every extraction, source trace, and patch before anything is applied.","normalize.track-normalize-history-and":"Track normalize history and manage extractions in Contentrain Studio.","normalize.whats-next-ask-your":"What's next — ask your agent","primary-sidebar.branches":"Branches","primary-sidebar.content":"Content","primary-sidebar.contentrain":"Contentrain","primary-sidebar.dashboard":"Dashboard","primary-sidebar.doctor":"Doctor","primary-sidebar.format":"Format","primary-sidebar.models":"Models","primary-sidebar.normalize":"Normalize","primary-sidebar.validate":"Validate","router.ts.branches":"branches","router.ts.content":"content","router.ts.dashboard":"dashboard","router.ts.models":"models","router.ts.normalize":"normalize","router.ts.validate":"validate","scroll-bar.vertical":"vertical","select-content.popper":"popper","separator.horizontal":"horizontal","source-trace-panel.content-entry":"Content Entry","source-trace-panel.reuse-patch":"Reuse Patch","source-trace-panel.source-file":"Source File","source-trace-panel.source-trace":"Source Trace","status-bar.locales":"locales","status-bar.models":"models","studio-hint.open-studio":"Open Studio","sub-sidebar-layout.no-models-found":"No models found","sub-sidebar-layout.search":"Search...","tree-select.no-scannable-files-found":"No scannable files found","trust-badge.blocked":"Blocked","trust-badge.partial":"Partial","trust-badge.pending-review":"Pending review","trust-badge.validated":"Validated","trust-badge.warnings":"warnings","use-api.ts.contenttype":"Content-Type","use-api.ts.delete":"DELETE","use-api.ts.post":"POST","use-formatters.ts.2digit":"2-digit","use-formatters.ts.short":"short","validate.all-checks-passed":"All checks passed","validate.all-issue-types-are":"All issue types are hidden. Adjust filters above to see issues.","validate.ask-your-agent":"Ask your agent","validate.by-model":"By Model","validate.by-severity":"By Severity","validate.check-content-quality-and":"Check content quality and i18n completeness","validate.content-quality-report":"Content quality report","validate.entries":"Entries","validate.errors":"Errors","validate.errors-2":"Errors (","validate.fix-all-validation-errors":"Fix all validation errors in my content","validate.fix-warnings":"fix warnings","validate.models":"Models","validate.notice":"notice","validate.notices":"Notices","validate.notices-2":"Notices (","validate.quality-check":"quality check","validate.refreshing-validation":"Refreshing validation...","validate.review-and-fix-validation":"Review and fix validation warnings","validate.updated":"Updated","validate.validate-my-content-models":"Validate my content models","validate.validation":"Validation","validate.validation-results-update-automatically":"Validation results update automatically when your agent runs validation tools.","validate.warnings":"Warnings","validate.warnings-2":"Warnings (","validate.your-content-and-models":"Your content and models are in great shape. No errors, warnings, or notices found."},de="en";class le{constructor(t,n){this._data=t,this._locale=null,this._defaultLocale=n||null}locale(t){return this._locale=t,this}get(t,n){let a;if(this._locale)a=this._data.get(this._locale)??{};else if(this._defaultLocale&&this._data.has(this._defaultLocale))a=this._data.get(this._defaultLocale);else{const o=this._data.keys().next().value;a=this._data.get(o)??{}}if(t===void 0)return a;const r=a[t];if(r!==void 0)return n?r.replace(/\{(\w+)\}/g,(o,l)=>{const s=n[l];return s!==void 0?String(s):o}):r}}const ce={"serve-ui-texts":new Map([["en",se]])};function Ie(e){const t=ce[e];if(!t)throw new Error(`Unknown dictionary model: "${e}"`);return new le(t,de)}function Oe(e){return Y()?(H(e),!0):!1}const y=new WeakMap,Pe=(...e)=>{var t;const n=e[0],a=(t=_())==null?void 0:t.proxy;if(a==null&&!G())throw new Error("injectLocal must be called in setup");return a&&y.has(a)&&n in y.get(a)?y.get(a)[n]:K(...e)};function ue(e){if(!b(e))return N(e);const t=new Proxy({},{get(n,a,r){return p(Reflect.get(e.value,a,r))},set(n,a,r){return b(e.value[a])&&!b(r)?e.value[a].value=r:e.value[a]=r,!0},deleteProperty(n,a){return Reflect.deleteProperty(e.value,a)},has(n,a){return Reflect.has(e.value,a)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return N(t)}function me(e){return ue($(e))}function he(e,...t){const n=t.flat(),a=n[0];return me(()=>Object.fromEntries(typeof a=="function"?Object.entries(j(e)).filter(([r,o])=>!a(J(o),r)):Object.entries(j(e)).filter(r=>!n.includes(r[0]))))}const Ee=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=e=>typeof e<"u",pe=Object.prototype.toString,_e=e=>pe.call(e)==="[object Object]",ge=()=>{};function fe(e,t){function n(...a){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,a),{fn:t,thisArg:this,args:a})).then(r).catch(o)})}return n}const T=e=>e();function be(e=T,t={}){const{initialState:n="active"}=t,a=ye(n==="active");function r(){a.value=!1}function o(){a.value=!0}const l=(...s)=>{a.value&&e(...s)};return{isActive:P(a),pause:r,resume:o,eventFilter:l}}function De(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ve(e){return _()}function Te(e){return Array.isArray(e)?e:[e]}function ye(...e){if(e.length!==1)return L(...e);const t=e[0];return typeof t=="function"?P(W(()=>({get:t,set:ge}))):z(t)}function we(e,t,n={}){const{eventFilter:a=T,...r}=n;return M(e,fe(a,t),r)}function Fe(e,t,n={}){const{eventFilter:a,initialState:r="active",...o}=n,{eventFilter:l,pause:s,resume:u,isActive:i}=be(a,{initialState:r});return{stop:we(e,t,{...o,eventFilter:l}),pause:s,resume:u,isActive:i}}function Re(e,t=!0,n){ve()?E(e,n):t?e():U(e)}function Ve(e,t,n){return M(e,t,{...n,immediate:!0})}const xe="/api";async function w(e,t){const n=await fetch(`${xe}${e}`,{headers:{"Content-Type":"application/json"},...t});if(!n.ok){const a=await n.text();let r=`API ${n.status}`;try{const o=JSON.parse(a);o!=null&&o.error&&(r=o.error)}catch{a&&(r=a)}throw new Error(r)}return n.json()}function qe(){return{get:e=>w(e),post:(e,t)=>w(e,{method:"POST",body:t?JSON.stringify(t):void 0}),del:e=>w(e,{method:"DELETE"})}}const I=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,O=Q,ke=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return O(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:o}=t,l=Object.keys(r).map(i=>{const c=n==null?void 0:n[i],h=o==null?void 0:o[i];if(c===null)return null;const m=I(c)||I(h);return r[i][m]}),s=n&&Object.entries(n).reduce((i,c)=>{let[h,m]=c;return m===void 0||(i[h]=m),i},{}),u=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((i,c)=>{let{class:h,className:m,...q}=c;return Object.entries(q).every(B=>{let[A,f]=B;return Array.isArray(f)?f.includes({...o,...s}[A]):{...o,...s}[A]===f})?[...i,h,m]:i},[]);return O(e,l,u,n==null?void 0:n.class,n==null?void 0:n.className)};function F(e){return e?e.flatMap(t=>t.type===X?F(t.children):[t]):[]}const Ce=S({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var u;if(!n.default)return null;const a=F(n.default()),r=a.findIndex(i=>i.type!==Z);if(r===-1)return a;const o=a[r];(u=o.props)==null||delete u.ref;const l=o.props?D(t,o.props):t,s=ee({...o,props:{}},l);return a.length===1?s:(a[r]=s,a)}}}),ze=["area","img","input"],Se=S({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const a=e.asChild?"template":e.as;return typeof a=="string"&&ze.includes(a)?()=>v(a,t):a!=="template"?()=>v(e.as,t,{default:n.default}):()=>v(Ce,t,{default:n.default})}}),Be=S({__name:"Badge",props:{asChild:{type:Boolean},as:{},variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=he(t,"class");return(a,r)=>(re(),te(p(Se),D({"data-slot":"badge",class:p(ae)(p(Ae)({variant:e.variant}),t.class)},p(n)),{default:ne(()=>[oe(a.$slots,"default")]),_:3},16,["class"]))}}),Ae=ke("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),k=z(!1),R=z(null),C=new Set;let d=null,x=null,g=1e3;function V(){if(d&&(d.readyState===WebSocket.OPEN||d.readyState===WebSocket.CONNECTING))return;const e=window.location.protocol==="https:"?"wss:":"ws:";d=new WebSocket(`${e}//${window.location.host}/ws`),d.addEventListener("open",()=>{k.value=!0,g=1e3}),d.addEventListener("message",t=>{try{const n=JSON.parse(t.data);R.value=new Date;for(const a of C)a(n)}catch{}}),d.addEventListener("close",()=>{k.value=!1,Ne()}),d.addEventListener("error",()=>{d==null||d.close()})}function Ne(){x||(x=setTimeout(()=>{x=null,g=Math.min(g*2,3e4),V()},g))}function $e(e){return E(()=>{e&&C.add(e),V()}),ie(()=>{e&&C.delete(e)}),{connected:k,lastUpdate:R}}export{Se as P,Ce as S,Be as _,Re as a,Ee as b,Pe as c,Ie as d,Ve as e,Oe as f,_e as g,Te as h,Me as i,qe as j,F as k,ke as l,De as p,he as r,ye as t,$e as u,Fe as w};
|
|
1
|
+
import{Y as b,a2 as N,u as p,h as $,ac as L,af as P,ae as W,r as z,i as E,M as U,w as M,U as _,W as G,_ as K,a4 as Y,a5 as H,t as j,H as J,aj as Q,F as X,a as S,ak as Z,m as D,al as ee,$ as v,b as te,z as ae,e as ne,o as re,f as oe,l as ie}from"./index-DRccbFO1.js";const se={"branch-detail.and-delete-the-source":"and delete the source branch.","branch-detail.approve-merge":"Approve & Merge","branch-detail.ask-your-agent":"Ask your agent","branch-detail.back":"Back","branch-detail.branch-merged-successfully":"Branch merged successfully.","branch-detail.branch-rejected-and-deleted":"Branch rejected and deleted.","branch-detail.branch-review-and-diff":"Branch review and diff","branch-detail.cancel":"Cancel","branch-detail.check-the-content-quality":"Check the content quality of the pending changes","branch-detail.confirm-merge":"Confirm merge","branch-detail.confirm-rejection":"Confirm rejection","branch-detail.continue-with-phase-2":"Continue with Phase 2 — patch source files with content references","branch-detail.delete-branch":"Delete Branch","branch-detail.failed-to-delete-branch":"Failed to delete branch. Please try again.","branch-detail.failed-to-merge-branch":"Failed to merge branch. Please try again.","branch-detail.file":"file","branch-detail.into":"into","branch-detail.merge":"Merge","branch-detail.no-diff-available-for":"No diff available for this branch.","branch-detail.preview-already-merged":"This branch is already merged into the content-tracking branch.","branch-detail.preview-check-unavailable":"Preview check could not run against this branch.","branch-detail.preview-conflicts-heading":"Files that would conflict","branch-detail.preview-ff-clean":"Fast-forward merge — no conflicts detected.","branch-detail.preview-files-changed-suffix":"files changed","branch-detail.preview-requires-3way":"Will require a three-way merge. Review the changes carefully before approving.","branch-detail.preview-title":"Merge preview","branch-detail.reject":"Reject","branch-detail.review-the-changes-on":"Review the changes on this branch and recommend approval or rejection","branch-detail.this-will-merge":"This will merge","branch-detail.this-will-permanently-delete":"This will permanently delete the branch","branches.add-sample-content-to":"Add sample content to my models","branches.aigenerated-changes-from-your":"AI-generated changes from your IDE will appear here for review.","branches.branch":"Branch","branches.branches-history":"Branches & History","branches.content":"Content","branches.content-saved":"Content Saved","branches.contentrain-operations-will-appear":"Contentrain operations will appear here as a timeline.","branches.create-a-new-content":"Create a new content model for my project","branches.deleted":"Deleted","branches.get-started":"Get started","branches.initialize-my-contentrain-project":"Initialize my contentrain project","branches.merged":"Merged","branches.model":"Model","branches.model-created":"Model Created","branches.model-updated":"Model Updated","branches.no-history-yet":"No history yet","branches.no-pending-branches":"No pending branches","branches.normalize":"Normalize","branches.normalize-my-project-extract":"Normalize my project — extract hardcoded strings","branches.operation":"Operation","branches.refresh":"Refresh","branches.review-pending-changes-and":"Review pending changes and track operations","branches.share-branch-reviews-with":"Share branch reviews with your team in Contentrain Studio.","branches.try-asking-your-ai":"Try asking your AI agent","branches.validate":"Validate","breadcrumb-ellipsis.more":"More","button.button":"button","common.off":"Off","common.on":"On","content-list.add-a-new-entry":"Add a new entry to ${modelId}","content-list.all-locales":"All locales","content-list.ask-your-agent":"Ask your agent","content-list.columns":"Columns","content-list.content-mutations-are-agent":"Content mutations are agent actions — copy a prompt above and paste it in your AI agent.","content-list.create-content-using-ai":"Create content using AI in your IDE.","content-list.create-sample-content-for":"Create sample content for ${modelId}","content-list.delete-draft-entries-from":"Delete draft entries from ${modelId}","content-list.generate-5-entries-for":"Generate 5 entries for ${modelId}","content-list.missing":"missing","content-list.no-entries-matching":'No entries matching "',"content-list.no-entries-yet":"No entries yet","content-list.page":"Page","content-list.refresh":"Refresh","content-list.required":"required","content-list.reset":"Reset","content-list.search-entries":"Search entries...","content-list.show":"Show","content-list.show-all":"Show all","content-list.toggle-columns":"Toggle columns","content-list.translate-modelid-content-to":"Translate ${modelId} content to Turkish","content-list.update-the-content-of":"Update the content of ${modelId}","content.browse-and-inspect-content":"Browse and inspect content by collection","content.collection":"Collection","content.content":"Content","content.create-models-using-your":"Create models using your IDE with AI assistance. Once models are defined, their content will appear here.","content.dictionary":"Dictionary","content.document":"Document","content.fields":"fields","content.filter-models":"Filter models...","content.i18n":"i18n","content.no-models-matching":'No models matching "',"content.no-models-yet":"No models yet","content.singleton":"Singleton","dashboard.branches":"Branches","dashboard.content-models":"Content Models","dashboard.content-saved":"Content Saved","dashboard.contentrain-init":"contentrain init","dashboard.context-updated":"Context Updated","dashboard.create-a-blog-model":"Create a blog model with title, content, and author fields","dashboard.create-models-using-ai":"Create models using AI in your IDE to get started.","dashboard.dashboard":"Dashboard","dashboard.deleted":"Deleted","dashboard.entries":"Entries","dashboard.fields":"fields","dashboard.fix-issues":"Fix issues","dashboard.fix-validation-errors-in":"Fix validation errors in my content","dashboard.full-report":"Full report","dashboard.generate-sample-content-for":"Generate sample content for my models","dashboard.get-started":"Get started","dashboard.i18n":"i18n","dashboard.issues":"Issues","dashboard.locales":"Locales","dashboard.manage-content-with-ai":"Manage content with AI chat and team review in Contentrain Studio.","dashboard.merged":"Merged","dashboard.model-created":"Model Created","dashboard.model-updated":"Model Updated","dashboard.models":"Models","dashboard.no-content-models-yet":"No content models yet","dashboard.no-operations-yet-start":"No operations yet. Start by creating models or content.","dashboard.normalize-my-project-extract":"Normalize my project — extract hardcoded strings","dashboard.not-a-contentrain-project":"Not a Contentrain project","dashboard.operation":"Operation","dashboard.populate":"Populate","dashboard.recent-operations":"Recent Operations","dashboard.review-pending-content-changes":"Review pending content changes","dashboard.run":"Run","dashboard.terms":"terms","dashboard.to-initialize":"to initialize.","dashboard.total":"total","dashboard.try-with-your-ai":"Try with your AI agent","dashboard.validation-summary":"Validation Summary","dashboard.view-all":"View all","dashboard.your-project-at-a":"Your project at a glance","dialog-content.close":"Close","dialog-footer.close":"Close","dialog-scroll-content.close":"Close","doctor.and-more":"and more.","doctor.checks-title":"Checks","doctor.duplicate-values-title":"Duplicate dictionary values","doctor.empty-cta":"Click Run to execute the health checks.","doctor.empty-title":"No report yet.","doctor.error-label":"error","doctor.missing-in":"missing in","doctor.missing-locale-title":"Missing locale keys","doctor.run-button":"Run","doctor.subtitle":"Project health report — git, Node, .contentrain/ structure, models, orphan content, branch pressure, SDK freshness.","doctor.summary-all-passed":"All checks passed","doctor.summary-failed-suffix":"failed","doctor.summary-passed-detail":"checks passed.","doctor.summary-review-below":"Review the failing rows below.","doctor.summary-title":"Summary","doctor.summary-warnings-suffix":"warnings","doctor.title":"Doctor","doctor.unused-keys-title":"Unused keys","doctor.usage-toggle-description":"Scan source files for unused keys, duplicate dictionary values, and locale gaps. Slower but surfaces content drift.","doctor.usage-toggle-label":"Usage analysis","doctor.warning-label":"warning","extraction-review-panel.strings":"strings","format.empty":"No format reference available yet.","format.loading":"Loading format reference…","format.subtitle":"Contentrain's content-format specification — how models, content, meta, and vocabulary are stored on disk.","format.title":"Format Reference","header.open-in-studio":"Open in Studio","index.ts.bgdestructive-textwhite-hoverbgdestructive90-focusvisibleringdestructive20":"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60","index.ts.border-bgbackground-shadowxs-hoverbgaccent":"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50","index.ts.bordertransparent-bgdestructive-textwhite-ahoverbgdestructive90":"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60","index.ts.bordertransparent-bgprimary-textprimaryforeground-ahoverbgprimary90":"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90","index.ts.bordertransparent-bgsecondary-textsecondaryforeground-ahoverbgsecondary90":"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90","index.ts.h10-roundedmd-px6-hassvgpx4":"h-10 rounded-md px-6 has-[>svg]:px-4","index.ts.h8-roundedmd-gap15-px3":"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5","index.ts.h9-px4-py2-hassvgpx3":"h-9 px-4 py-2 has-[>svg]:px-3","index.ts.icon":"icon","index.ts.textdestructive-bgcard-svgtextcurrent-dataslotalertdescriptiontextdestructive90":"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90","index.ts.textforeground-ahoverbgaccent-ahovertextaccentforeground":"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground","index.ts.textprimary-underlineoffset4-hoverunderline":"text-primary underline-offset-4 hover:underline","layout.dismiss":"Dismiss","layout.meta-changed-title":"SEO metadata updated","layout.watcher-paused-label":"Live updates paused:","layout.watcher-restart-hint":"Restart contentrain serve to reattach the watcher.","mobile-nav.branch":"Branch","mobile-nav.content":"Content","mobile-nav.dash":"Dash","mobile-nav.models":"Models","mobile-nav.valid":"Valid.","model-detail.add-a-category-field":"Add a 'category' field to ${modelId}","model-detail.ask-your-agent":"Ask your agent","model-detail.delete-the-modelid-model":"Delete the ${modelId} model","model-detail.fields":"Fields","model-detail.generate-5-sample-entries":"Generate 5 sample entries for ${modelId}","model-detail.i18n":"i18n","model-detail.import-snippet":"Import Snippet","model-detail.models":"Models","model-detail.req":"req","model-detail.sample-data":"Sample Data","model-detail.system-fields":"System Fields","model-detail.update-modelid-to-support":"Update ${modelId} to support i18n","model-detail.view-content":"View Content","models.add-a-testimonials-collection":"Add a testimonials collection model","models.ask-your-agent":"Ask your agent","models.clear-search":"Clear search","models.close":"Close","models.content-model-definitions":"Content model definitions","models.create-a-blog-model":"Create a blog model with title, content, slug, and author fields","models.create-a-faq-model":"Create a FAQ model with question and answer fields","models.create-a-new-content":"Create a new content model","models.create-and-manage-models":"Create and manage models with AI chat in Contentrain Studio.","models.create-content-models-using":"Create content models using AI in your IDE, then come back to inspect them here.","models.fields":"fields","models.filtered-from":"filtered from","models.i18n":"i18n","models.model":"model","models.models":"Models","models.no-models-found":"No models found","models.no-models-match":'No models match "',"models.no-models-yet":"No models yet","models.scaffold-my-project-with":"Scaffold my project with a landing page template","models.search":"Search","models.search-models-by-name":"Search models by name, domain, or kind...","models.total":"total","models.try-a-different-search":'". Try a different search term.',"normalize.adjust-the-normalize-plan":"Adjust the normalize plan — also include strings from the footer component","normalize.approve-or-request-changes":"Approve or request changes","normalize.approve-to-write-extractions":"Approve to write extractions to content models on a review branch. Reject to discard, or ask the agent to adjust the plan.","normalize.ask-your-ai-agent":"Ask your AI agent to get started","normalize.candidates":"candidates","normalize.click-an-extraction-to":"Click an extraction to see its source trace","normalize.content-extraction-and-i18n":"Content extraction and i18n readiness","normalize.continue-to-phase-2":"Continue to Phase 2 — patch source files with content references","normalize.copy-a-prompt-above":"Copy a prompt above or describe what you want extracted. The agent scans your source files, classifies strings, and builds an extraction plan.","normalize.delete":"Delete","normalize.extract-hardcoded-strings":"Extract hardcoded strings","normalize.extract-hero-section-text":"Extract hero section text into a content model","normalize.extracted":"extracted","normalize.extractions":"Extractions","normalize.extractions-across":"extractions across","normalize.files-scanned":"files scanned","normalize.how-it-works":"How it works","normalize.make-my-landing-page":"Make my landing page i18n-ready","normalize.merge":"Merge","normalize.merge-and-continue":"Merge and continue","normalize.merge-review-branches-into":"Merge review branches into main, then ask the agent to start Phase 2 — patching source files with content references.","normalize.models":"models","normalize.normalize":"Normalize","normalize.normalize-my-vue-project":"Normalize my Vue project — extract hardcoded strings","normalize.normalize-plan":"Normalize Plan","normalize.normalize-scans-your-source":"Normalize scans your source files for hardcoded strings and extracts them into content models, making your project i18n-ready.","normalize.patches":"patches","normalize.pending-normalize-branches":"Pending normalize branches","normalize.prompt-your-ai-agent":"Prompt your AI agent","normalize.remove-navigation-labels-from":"Remove navigation labels from the extraction plan","normalize.request-changes-from-your":"Request changes from your agent","normalize.review-and-merge-normalize":"Review and merge normalize branches into your main branch.","normalize.review-the-plan-here":"Review the plan here","normalize.scan-srcpages-for-content":"Scan src/pages for content strings and create extraction plan","normalize.skipped":"skipped","normalize.source-patches":"Source Patches","normalize.source-trace":"Source Trace","normalize.start-reuse-for-the":"Start reuse for the extracted content models","normalize.strings-found":"strings found","normalize.the-agent-sends-the":"The agent sends the plan to this dashboard. You review every extraction, source trace, and patch before anything is applied.","normalize.track-normalize-history-and":"Track normalize history and manage extractions in Contentrain Studio.","normalize.whats-next-ask-your":"What's next — ask your agent","primary-sidebar.branches":"Branches","primary-sidebar.content":"Content","primary-sidebar.contentrain":"Contentrain","primary-sidebar.dashboard":"Dashboard","primary-sidebar.doctor":"Doctor","primary-sidebar.format":"Format","primary-sidebar.models":"Models","primary-sidebar.normalize":"Normalize","primary-sidebar.validate":"Validate","router.ts.branches":"branches","router.ts.content":"content","router.ts.dashboard":"dashboard","router.ts.models":"models","router.ts.normalize":"normalize","router.ts.validate":"validate","scroll-bar.vertical":"vertical","select-content.popper":"popper","separator.horizontal":"horizontal","source-trace-panel.content-entry":"Content Entry","source-trace-panel.reuse-patch":"Reuse Patch","source-trace-panel.source-file":"Source File","source-trace-panel.source-trace":"Source Trace","status-bar.locales":"locales","status-bar.models":"models","studio-hint.open-studio":"Open Studio","sub-sidebar-layout.no-models-found":"No models found","sub-sidebar-layout.search":"Search...","tree-select.no-scannable-files-found":"No scannable files found","trust-badge.blocked":"Blocked","trust-badge.partial":"Partial","trust-badge.pending-review":"Pending review","trust-badge.validated":"Validated","trust-badge.warnings":"warnings","use-api.ts.contenttype":"Content-Type","use-api.ts.delete":"DELETE","use-api.ts.post":"POST","use-formatters.ts.2digit":"2-digit","use-formatters.ts.short":"short","validate.all-checks-passed":"All checks passed","validate.all-issue-types-are":"All issue types are hidden. Adjust filters above to see issues.","validate.ask-your-agent":"Ask your agent","validate.by-model":"By Model","validate.by-severity":"By Severity","validate.check-content-quality-and":"Check content quality and i18n completeness","validate.content-quality-report":"Content quality report","validate.entries":"Entries","validate.errors":"Errors","validate.errors-2":"Errors (","validate.fix-all-validation-errors":"Fix all validation errors in my content","validate.fix-warnings":"fix warnings","validate.models":"Models","validate.notice":"notice","validate.notices":"Notices","validate.notices-2":"Notices (","validate.quality-check":"quality check","validate.refreshing-validation":"Refreshing validation...","validate.review-and-fix-validation":"Review and fix validation warnings","validate.updated":"Updated","validate.validate-my-content-models":"Validate my content models","validate.validation":"Validation","validate.validation-results-update-automatically":"Validation results update automatically when your agent runs validation tools.","validate.warnings":"Warnings","validate.warnings-2":"Warnings (","validate.your-content-and-models":"Your content and models are in great shape. No errors, warnings, or notices found."},de="en";class le{constructor(t,n){this._data=t,this._locale=null,this._defaultLocale=n||null}locale(t){return this._locale=t,this}get(t,n){let a;if(this._locale)a=this._data.get(this._locale)??{};else if(this._defaultLocale&&this._data.has(this._defaultLocale))a=this._data.get(this._defaultLocale);else{const o=this._data.keys().next().value;a=this._data.get(o)??{}}if(t===void 0)return a;const r=a[t];if(r!==void 0)return n?r.replace(/\{(\w+)\}/g,(o,i)=>{const d=n[i];return d!==void 0?String(d):o}):r}}const ce={"serve-ui-texts":new Map([["en",se]])};function Ie(e){const t=ce[e];if(!t)throw new Error(`Unknown dictionary model: "${e}"`);return new le(t,de)}function Oe(e){return Y()?(H(e),!0):!1}const y=new WeakMap,Pe=(...e)=>{var t;const n=e[0],a=(t=_())==null?void 0:t.proxy;if(a==null&&!G())throw new Error("injectLocal must be called in setup");return a&&y.has(a)&&n in y.get(a)?y.get(a)[n]:K(...e)};function ue(e){if(!b(e))return N(e);const t=new Proxy({},{get(n,a,r){return p(Reflect.get(e.value,a,r))},set(n,a,r){return b(e.value[a])&&!b(r)?e.value[a].value=r:e.value[a]=r,!0},deleteProperty(n,a){return Reflect.deleteProperty(e.value,a)},has(n,a){return Reflect.has(e.value,a)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return N(t)}function me(e){return ue($(e))}function he(e,...t){const n=t.flat(),a=n[0];return me(()=>Object.fromEntries(typeof a=="function"?Object.entries(j(e)).filter(([r,o])=>!a(J(o),r)):Object.entries(j(e)).filter(r=>!n.includes(r[0]))))}const Ee=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=e=>typeof e<"u",pe=Object.prototype.toString,_e=e=>pe.call(e)==="[object Object]",ge=()=>{};function fe(e,t){function n(...a){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,a),{fn:t,thisArg:this,args:a})).then(r).catch(o)})}return n}const T=e=>e();function be(e=T,t={}){const{initialState:n="active"}=t,a=ye(n==="active");function r(){a.value=!1}function o(){a.value=!0}const i=(...d)=>{a.value&&e(...d)};return{isActive:P(a),pause:r,resume:o,eventFilter:i}}function De(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ve(e){return _()}function Te(e){return Array.isArray(e)?e:[e]}function ye(...e){if(e.length!==1)return L(...e);const t=e[0];return typeof t=="function"?P(W(()=>({get:t,set:ge}))):z(t)}function we(e,t,n={}){const{eventFilter:a=T,...r}=n;return M(e,fe(a,t),r)}function Fe(e,t,n={}){const{eventFilter:a,initialState:r="active",...o}=n,{eventFilter:i,pause:d,resume:u,isActive:s}=be(a,{initialState:r});return{stop:we(e,t,{...o,eventFilter:i}),pause:d,resume:u,isActive:s}}function Re(e,t=!0,n){ve()?E(e,n):t?e():U(e)}function Ve(e,t,n){return M(e,t,{...n,immediate:!0})}const xe="/api";async function w(e,t){const n=await fetch(`${xe}${e}`,{headers:{"Content-Type":"application/json"},...t});if(!n.ok){const a=await n.text();let r=`API ${n.status}`,o;try{const i=JSON.parse(a);i!=null&&i.message?r=i.message:i!=null&&i.error&&(r=i.error),o=i==null?void 0:i.data}catch{a&&(r=a)}throw Object.assign(new Error(r),o!==void 0?{data:o}:{})}return n.json()}function qe(){return{get:e=>w(e),post:(e,t)=>w(e,{method:"POST",body:t?JSON.stringify(t):void 0}),del:e=>w(e,{method:"DELETE"})}}const I=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,O=Q,ke=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return O(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:o}=t,i=Object.keys(r).map(s=>{const c=n==null?void 0:n[s],h=o==null?void 0:o[s];if(c===null)return null;const m=I(c)||I(h);return r[s][m]}),d=n&&Object.entries(n).reduce((s,c)=>{let[h,m]=c;return m===void 0||(s[h]=m),s},{}),u=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((s,c)=>{let{class:h,className:m,...q}=c;return Object.entries(q).every(B=>{let[A,f]=B;return Array.isArray(f)?f.includes({...o,...d}[A]):{...o,...d}[A]===f})?[...s,h,m]:s},[]);return O(e,i,u,n==null?void 0:n.class,n==null?void 0:n.className)};function F(e){return e?e.flatMap(t=>t.type===X?F(t.children):[t]):[]}const Ce=S({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var u;if(!n.default)return null;const a=F(n.default()),r=a.findIndex(s=>s.type!==Z);if(r===-1)return a;const o=a[r];(u=o.props)==null||delete u.ref;const i=o.props?D(t,o.props):t,d=ee({...o,props:{}},i);return a.length===1?d:(a[r]=d,a)}}}),ze=["area","img","input"],Se=S({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const a=e.asChild?"template":e.as;return typeof a=="string"&&ze.includes(a)?()=>v(a,t):a!=="template"?()=>v(e.as,t,{default:n.default}):()=>v(Ce,t,{default:n.default})}}),Be=S({__name:"Badge",props:{asChild:{type:Boolean},as:{},variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=he(t,"class");return(a,r)=>(re(),te(p(Se),D({"data-slot":"badge",class:p(ae)(p(Ae)({variant:e.variant}),t.class)},p(n)),{default:ne(()=>[oe(a.$slots,"default")]),_:3},16,["class"]))}}),Ae=ke("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),k=z(!1),R=z(null),C=new Set;let l=null,x=null,g=1e3;function V(){if(l&&(l.readyState===WebSocket.OPEN||l.readyState===WebSocket.CONNECTING))return;const e=window.location.protocol==="https:"?"wss:":"ws:";l=new WebSocket(`${e}//${window.location.host}/ws`),l.addEventListener("open",()=>{k.value=!0,g=1e3}),l.addEventListener("message",t=>{try{const n=JSON.parse(t.data);R.value=new Date;for(const a of C)a(n)}catch{}}),l.addEventListener("close",()=>{k.value=!1,Ne()}),l.addEventListener("error",()=>{l==null||l.close()})}function Ne(){x||(x=setTimeout(()=>{x=null,g=Math.min(g*2,3e4),V()},g))}function $e(e){return E(()=>{e&&C.add(e),V()}),ie(()=>{e&&C.delete(e)}),{connected:k,lastUpdate:R}}export{Se as P,Ce as S,Be as _,Re as a,Ee as b,Pe as c,Ie as d,Ve as e,Oe as f,_e as g,Te as h,Me as i,qe as j,F as k,ke as l,De as p,he as r,ye as t,$e as u,Fe as w};
|
package/dist/serve-ui/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-DRccbFO1.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-KZ2rT4mJ.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body class="min-h-screen bg-background font-sans text-foreground antialiased">
|
|
@@ -9,6 +9,7 @@ import { mergeBranch } from "@contentrain/mcp/git/transaction";
|
|
|
9
9
|
import { branchDiff, checkBranchHealth, deleteRemoteBranch } from "@contentrain/mcp/git/branch-lifecycle";
|
|
10
10
|
import { existsSync, readFileSync } from "node:fs";
|
|
11
11
|
import { readFile, unlink, writeFile } from "node:fs/promises";
|
|
12
|
+
import { normalizeOperationError } from "@contentrain/mcp/git/errors";
|
|
12
13
|
import { createApp, createError, createRouter, defineEventHandler, getQuery, getRouterParam, readBody, toNodeListener } from "h3";
|
|
13
14
|
import { WebSocketServer } from "ws";
|
|
14
15
|
import { watch as watch$1 } from "chokidar";
|
|
@@ -468,18 +469,22 @@ async function createServeApp(options) {
|
|
|
468
469
|
commit: result.commit,
|
|
469
470
|
action: result.action,
|
|
470
471
|
sync: result.sync,
|
|
472
|
+
base_advance: result.base_advance,
|
|
473
|
+
remote_push: result.remote_push,
|
|
474
|
+
...result.warning ? { warning: result.warning } : {},
|
|
471
475
|
remote: result.remote
|
|
472
476
|
};
|
|
473
477
|
} catch (error) {
|
|
474
|
-
const
|
|
478
|
+
const normalized = normalizeOperationError(error, "approve");
|
|
475
479
|
broadcast({
|
|
476
480
|
type: "branch:merge-conflict",
|
|
477
481
|
branch: branchName,
|
|
478
|
-
message
|
|
482
|
+
message: normalized.error
|
|
479
483
|
});
|
|
480
484
|
throw createError({
|
|
481
485
|
statusCode: 409,
|
|
482
|
-
message: `Merge failed: ${
|
|
486
|
+
message: `Merge failed: ${normalized.error}`,
|
|
487
|
+
data: normalized
|
|
483
488
|
});
|
|
484
489
|
}
|
|
485
490
|
}));
|
|
@@ -777,18 +782,22 @@ async function createServeApp(options) {
|
|
|
777
782
|
commit: result.commit,
|
|
778
783
|
action: result.action,
|
|
779
784
|
sync: result.sync,
|
|
785
|
+
base_advance: result.base_advance,
|
|
786
|
+
remote_push: result.remote_push,
|
|
787
|
+
...result.warning ? { warning: result.warning } : {},
|
|
780
788
|
remote: result.remote
|
|
781
789
|
};
|
|
782
790
|
} catch (error) {
|
|
783
|
-
const
|
|
791
|
+
const normalized = normalizeOperationError(error, "approve");
|
|
784
792
|
broadcast({
|
|
785
793
|
type: "branch:merge-conflict",
|
|
786
794
|
branch: branchName,
|
|
787
|
-
message
|
|
795
|
+
message: normalized.error
|
|
788
796
|
});
|
|
789
797
|
throw createError({
|
|
790
798
|
statusCode: 409,
|
|
791
|
-
message: `Merge failed: ${
|
|
799
|
+
message: `Merge failed: ${normalized.error}`,
|
|
800
|
+
data: normalized
|
|
792
801
|
});
|
|
793
802
|
}
|
|
794
803
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, r as formatTable, t as formatCount } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-CaL6uO8q.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-CczlaT6o.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/status.ts
|
|
@@ -5,7 +5,7 @@ import { intro, log, outro } from "@clack/prompts";
|
|
|
5
5
|
import { countEntries, readModel } from "@contentrain/mcp/core/model-manager";
|
|
6
6
|
import { createGit } from "@contentrain/mcp/git/identity";
|
|
7
7
|
import { CONTENTRAIN_BRANCH } from "@contentrain/types";
|
|
8
|
-
import { checkBranchHealth } from "@contentrain/mcp/git/branch-lifecycle";
|
|
8
|
+
import { checkBranchHealth, contentBranchRelation } from "@contentrain/mcp/git/branch-lifecycle";
|
|
9
9
|
import { validateProject } from "@contentrain/mcp/core/validator";
|
|
10
10
|
//#region src/commands/status.ts
|
|
11
11
|
var status_default = defineCommand({
|
|
@@ -63,13 +63,10 @@ var status_default = defineCommand({
|
|
|
63
63
|
const contentBranchExists = allLocal.all.includes(CONTENTRAIN_BRANCH);
|
|
64
64
|
const contentBranchInfo = { exists: contentBranchExists };
|
|
65
65
|
if (contentBranchExists) try {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
`${baseBranch}..${CONTENTRAIN_BRANCH}`
|
|
71
|
-
]);
|
|
72
|
-
contentBranchInfo["ahead"] = Number.parseInt(aheadRaw.trim(), 10);
|
|
66
|
+
const relation = await contentBranchRelation(git, ctx.config?.repository?.default_branch ?? "main");
|
|
67
|
+
contentBranchInfo["ahead"] = relation.ahead;
|
|
68
|
+
contentBranchInfo["behind"] = relation.behind;
|
|
69
|
+
contentBranchInfo["relation"] = relation.relation;
|
|
73
70
|
} catch {}
|
|
74
71
|
jsonResult["content_branch"] = contentBranchInfo;
|
|
75
72
|
} catch {}
|
|
@@ -122,15 +119,17 @@ var status_default = defineCommand({
|
|
|
122
119
|
const git = createGit(projectRoot);
|
|
123
120
|
if ((await git.branchLocal()).all.includes(CONTENTRAIN_BRANCH)) try {
|
|
124
121
|
const baseBranch = ctx.config?.repository?.default_branch ?? "main";
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if (ahead > 0) {
|
|
122
|
+
const { ahead, behind, relation } = await contentBranchRelation(git, baseBranch);
|
|
123
|
+
if (relation === "diverged") {
|
|
124
|
+
log.warning(pc.bold(`\nContent branch`));
|
|
125
|
+
log.message(` ${pc.cyan(CONTENTRAIN_BRANCH)} and ${baseBranch} have diverged — ${pc.yellow(String(ahead))} content commit(s) ahead, ${pc.red(String(behind))} base commit(s) behind`);
|
|
126
|
+
log.message(` Writes still land on ${pc.cyan(CONTENTRAIN_BRANCH)}, but ${baseBranch} cannot fast-forward until the branches are reconciled.`);
|
|
127
|
+
} else if (relation === "content_ahead") {
|
|
132
128
|
log.info(pc.bold(`\nContent branch`));
|
|
133
129
|
log.message(` ${pc.cyan(CONTENTRAIN_BRANCH)} is ${pc.yellow(String(ahead))} commit(s) ahead of ${baseBranch}`);
|
|
130
|
+
} else if (relation === "base_ahead") {
|
|
131
|
+
log.info(pc.bold(`\nContent branch`));
|
|
132
|
+
log.message(` ${pc.cyan(CONTENTRAIN_BRANCH)} is ${pc.yellow(String(behind))} commit(s) behind ${baseBranch} — the next write fast-forwards it`);
|
|
134
133
|
} else {
|
|
135
134
|
log.info(pc.bold(`\nContent branch`));
|
|
136
135
|
log.message(` ${pc.cyan(CONTENTRAIN_BRANCH)} is in sync with ${baseBranch}`);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
//#region src/studio/index.ts
|
|
3
|
+
var studio_default = defineCommand({
|
|
4
|
+
meta: {
|
|
5
|
+
name: "studio",
|
|
6
|
+
description: "Interact with Contentrain Studio"
|
|
7
|
+
},
|
|
8
|
+
subCommands: {
|
|
9
|
+
login: () => import("./login-BBrpSIn2.mjs").then((m) => m.default),
|
|
10
|
+
logout: () => import("./logout-6UriBhYh.mjs").then((m) => m.default),
|
|
11
|
+
whoami: () => import("./whoami-JXOEA4vl.mjs").then((m) => m.default),
|
|
12
|
+
connect: () => import("./connect-BgrS9le_.mjs").then((m) => m.default),
|
|
13
|
+
status: () => import("./status-BRo3eFxi.mjs").then((m) => m.default),
|
|
14
|
+
activity: () => import("./activity-3JA0eECa.mjs").then((m) => m.default),
|
|
15
|
+
usage: () => import("./usage-0MVnFzfq.mjs").then((m) => m.default),
|
|
16
|
+
branches: () => import("./branches-g2vq3Ka-.mjs").then((m) => m.default),
|
|
17
|
+
"cdn-init": () => import("./cdn-init-DU_kUt56.mjs").then((m) => m.default),
|
|
18
|
+
"cdn-build": () => import("./cdn-build-BT87QXnP.mjs").then((m) => m.default),
|
|
19
|
+
webhooks: () => import("./webhooks-CjQ03K_4.mjs").then((m) => m.default),
|
|
20
|
+
submissions: () => import("./submissions-BDEURUE9.mjs").then((m) => m.default)
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { studio_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, r as formatTable, t as formatCount } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-CaL6uO8q.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-CczlaT6o.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, outro, select, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/submissions.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, n as formatPercent, r as formatTable } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-CaL6uO8q.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-CczlaT6o.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/usage.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, o as statusIcon, r as formatTable } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-CaL6uO8q.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-CczlaT6o.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, multiselect, outro, select, spinner, text } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/webhooks.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { i as checkPermissions, n as resolveStudioClient, r as AuthExpiredError } from "./client-
|
|
2
|
+
import { i as checkPermissions, n as resolveStudioClient, r as AuthExpiredError } from "./client-CaL6uO8q.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import { intro, log, outro } from "@clack/prompts";
|
|
5
5
|
//#region src/studio/commands/whoami.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentrain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "CLI for Contentrain — AI content governance infrastructure",
|
|
6
6
|
"type": "module",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"zod": "^3.24.0",
|
|
50
50
|
"@contentrain/rules": "0.7.0",
|
|
51
51
|
"@contentrain/skills": "0.8.0",
|
|
52
|
-
"@contentrain/mcp": "3.
|
|
53
|
-
"@contentrain/query": "7.0.
|
|
54
|
-
"@contentrain/types": "1.
|
|
52
|
+
"@contentrain/mcp": "3.1.1",
|
|
53
|
+
"@contentrain/query": "7.0.7",
|
|
54
|
+
"@contentrain/types": "1.3.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/ws": "^8.5.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{c as X,a as j,o as a,b as m,e as o,f as T,m as O,u as e,i as ie,z as Z,p as c,y as L,j as t,s as u,g as v,G as q,q as i,B as s,S as xe,Z as be,F as z,x as N,L as G,h as C,r as F,X as J,C as ye,v as ke}from"./index-ChZMsiq8.js";import{u as we}from"./content-CUJS4qD7.js";import{u as ze}from"./project-CoRDn0ek.js";import{a as $,_ as Ce}from"./PageHeader.vue_vue_type_script_setup_true_lang-f_qa-M1s.js";import{_ as $e,C as Be,a as V}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-DGijfAoG.js";import{P as ce,r as De,d as Fe,_ as je,j as Pe}from"./useWatch-BEMqYN2q.js";import{_ as Ie}from"./TrustBadge.vue_vue_type_script_setup_true_lang-CNzxpJIB.js";import{_ as K,a as Me,b as qe,c as Te}from"./CollapsibleTrigger.vue_vue_type_script_setup_true_lang-ClPT-9J4.js";import{_ as Ae}from"./CardContent.vue_vue_type_script_setup_true_lang-Wep4RMkj.js";import{_ as Re}from"./Separator.vue_vue_type_script_setup_true_lang-D-ZdYJPm.js";import{i as ue,D as Se,_ as Q,b as Y,c as ee,d as te}from"./DialogTitle.vue_vue_type_script_setup_true_lang-VT8-tcWV.js";import{b as We,u as Ne}from"./useId-D0eDf3m4.js";import{u as de}from"./Presence-CfATKqRO.js";import{A as Le}from"./arrow-left-Dxkqq18_.js";import{G as se}from"./git-merge-zRH3kO3U.js";import{G as ae}from"./git-branch-C8WJyunb.js";import{P as Oe,M as Ge}from"./plus-BKiDA6K4.js";import{F as Ve}from"./file-text-CNkcFAch.js";import"./shield-check-CiRjJIVW.js";import"./getActiveElement-FUKBWQwh.js";import"./ConfigProvider-DPWUDqGh.js";/**
|
|
2
|
-
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const E=X("CircleCheckBigIcon",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
7
|
-
* @license lucide-vue-next v0.474.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const re=X("CircleXIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
12
|
-
* @license lucide-vue-next v0.474.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const U=X("FileIcon",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);var Ee=j({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(x){const _=x;de();const p=ue();return(h,D)=>(a(),m(e(ce),O(_,{id:e(p).descriptionId}),{default:o(()=>[T(h.$slots,"default")]),_:3},16,["id"]))}}),Ue=Ee,Xe=j({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(x){const _=x,p=ue(),{forwardRef:h,currentElement:D}=de();return p.contentId||(p.contentId=We(void 0,"reka-dialog-content")),ie(()=>{p.triggerElement.value=D.value}),(P,n)=>(a(),m(e(ce),O(_,{ref:e(h),type:P.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":e(p).open.value||!1,"aria-controls":e(p).open.value?e(p).contentId:void 0,"data-state":e(p).open.value?"open":"closed",onClick:e(p).onOpenToggle}),{default:o(()=>[T(P.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Ze=Xe;const le=j({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(x){const _=x,p=De(_,"class"),h=Ne(p);return(D,P)=>(a(),m(e(Ue),O({"data-slot":"dialog-description"},e(h),{class:e(Z)("text-muted-foreground text-sm",_.class)}),{default:o(()=>[T(D.$slots,"default")]),_:3},16,["class"]))}}),ne=j({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]},showCloseButton:{type:Boolean,default:!1}},setup(x){const _=x;return(p,h)=>(a(),c("div",{"data-slot":"dialog-footer",class:L(e(Z)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",_.class))},[T(p.$slots,"default"),x.showCloseButton?(a(),m(e(Se),{key:0,"as-child":""},{default:o(()=>[t(e($),{variant:"outline"},{default:o(()=>[...h[0]||(h[0]=[u(" Close ",-1)])]),_:1})]),_:1})):v("",!0)],2))}}),oe=j({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(x){const _=x;return(p,h)=>(a(),m(e(Ze),O({"data-slot":"dialog-trigger"},_),{default:o(()=>[T(p.$slots,"default")]),_:3},16))}}),He="/merge-2.svg",Je={class:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs"},Ke={class:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs"},Qe={class:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs"},Ye={class:"px-6 py-6 space-y-4"},et={class:"text-sm"},tt={class:"flex items-start gap-3"},st={class:"flex-1 space-y-2 min-w-0"},at={class:"text-sm font-medium"},rt={class:"text-xs text-muted-foreground"},lt={key:0,class:"text-xs text-muted-foreground"},nt={key:1,class:"space-y-1 mt-1"},ot={class:"text-xs font-medium flex items-center gap-2"},it={class:"space-y-1 font-mono text-xs"},ct={key:2,class:"text-xs text-muted-foreground italic"},ut={key:2,class:"rounded-lg border border-amber-200 bg-amber-50 p-4 dark:border-amber-900 dark:bg-amber-950"},dt={class:"flex items-start gap-3"},pt={class:"flex-1 space-y-2"},ft={class:"text-sm font-medium text-amber-900 dark:text-amber-100"},mt={class:"mt-2 space-y-1 font-mono text-xs text-amber-900/80 dark:text-amber-100/80"},ht={key:3,class:"flex justify-center py-12"},vt={class:"flex items-center gap-4 flex-wrap"},_t={class:"flex items-center gap-2"},gt={class:"text-xs font-mono bg-muted px-2 py-1 rounded"},xt={class:"flex items-center gap-2"},bt={class:"text-xs font-mono bg-primary/10 text-primary px-2 py-1 rounded"},yt={class:"ml-auto flex items-center gap-3 text-xs text-muted-foreground"},kt={class:"flex items-center gap-1"},wt={class:"flex items-center gap-1 text-status-success"},zt={class:"flex items-center gap-1 text-status-error"},Ct={key:0,class:"rounded-lg border border-border bg-muted/30 p-4 font-mono text-xs text-muted-foreground overflow-x-auto whitespace-pre-wrap"},$t={key:1,class:"space-y-3"},Bt={class:"font-mono text-xs text-foreground flex-1 truncate"},Dt={class:"flex items-center gap-2 text-xs shrink-0"},Ft={key:0,class:"text-status-success font-mono"},jt={key:1,class:"text-status-error font-mono"},Pt={class:"max-h-96 overflow-auto custom-scrollbar"},It={class:"p-0 m-0"},Mt={class:"block text-xs leading-5"},qt={key:2,class:"flex flex-col items-center py-12 text-center"},Tt={class:"text-sm text-muted-foreground"},as=j({__name:"BranchDetailPage",setup(x){const _=ke(),p=ye(),h=we(),D=ze(),P=Pe(),n=Fe("serve-ui-texts").locale("en").get(),y=C(()=>decodeURIComponent(_.params.branchName)),b=C(()=>h.branchDiff),k=F(!1),w=F(null),A=F(!1),R=F(!1),B=F(null);async function pe(){try{const g=encodeURIComponent(y.value),r=await P.get(`/branches/${g}/sync-status`);B.value=r.warning}catch{B.value=null}}const d=F(null);async function fe(){d.value=await D.fetchMergePreview(y.value)}const S=C(()=>{const r=y.value.replace("contentrain/","").split("/");return{scope:r[0]??"unknown",target:r.length>2?r.slice(1,-1).join("/"):r[1]??"",timestamp:r.length>2?r[r.length-1]??"":""}}),I=C(()=>{var W;if(!((W=b.value)!=null&&W.diff))return[];const g=b.value.diff,r=[];let l=null;for(const f of g.split(`
|
|
17
|
-
`))if(f.startsWith("diff --git")){l&&r.push(l);const M=f.match(/b\/(.+)$/);l={path:(M==null?void 0:M[1])??"unknown",additions:0,deletions:0,lines:[]},l.lines.push({text:f,type:"header"})}else l&&(f.startsWith("+++")||f.startsWith("---")||f.startsWith("index ")?l.lines.push({text:f,type:"header"}):f.startsWith("@@")?l.lines.push({text:f,type:"hunk"}):f.startsWith("+")?(l.additions++,l.lines.push({text:f,type:"add"})):f.startsWith("-")?(l.deletions++,l.lines.push({text:f,type:"remove"})):l.lines.push({text:f,type:"context"}));return l&&r.push(l),r}),me=C(()=>I.value.reduce((g,r)=>g+r.additions,0)),he=C(()=>I.value.reduce((g,r)=>g+r.deletions,0)),ve=C(()=>y.value.includes("normalize")),H=C(()=>{var r;if(!((r=b.value)!=null&&r.stat))return 0;const g=b.value.stat.match(/(\d+)\s+files?\s+changed/);return g?Number.parseInt(g[1],10):I.value.length});async function _e(){k.value=!0,w.value=null,A.value=!1;try{await h.approveBranch(y.value),w.value={type:"success",message:n["branch-detail.branch-merged-successfully"]},q.success(n["branch-detail.branch-merged-successfully"]),setTimeout(()=>p.push("/branches"),1500)}catch{w.value={type:"error",message:n["branch-detail.failed-to-merge-branch"]},q.error(n["branch-detail.failed-to-merge-branch"])}finally{k.value=!1}}async function ge(){k.value=!0,w.value=null,R.value=!1;try{await h.rejectBranch(y.value),w.value={type:"success",message:n["branch-detail.branch-rejected-and-deleted"]},q.success(n["branch-detail.branch-rejected-and-deleted"]),setTimeout(()=>p.push("/branches"),1500)}catch{w.value={type:"error",message:n["branch-detail.failed-to-delete-branch"]},q.error(n["branch-detail.failed-to-delete-branch"])}finally{k.value=!1}}return ie(async()=>{try{await h.fetchBranchDiff(y.value)}catch{q.error("Failed to load branch data.")}pe(),fe()}),(g,r)=>(a(),c("div",null,[t(Ce,{title:S.value.target||S.value.scope,description:e(n)["branch-detail.branch-review-and-diff"]},{actions:o(()=>[t(e($),{variant:"ghost",size:"sm",onClick:r[0]||(r[0]=l=>e(p).push("/branches"))},{default:o(()=>[t(e(Le),{class:"mr-1.5 size-4"}),u(" "+s(e(n)["branch-detail.back"]),1)]),_:1}),t(e(Q),{open:A.value,"onUpdate:open":r[2]||(r[2]=l=>A.value=l)},{default:o(()=>[t(e(oe),{"as-child":""},{default:o(()=>[t(e($),{variant:"default",size:"sm",disabled:k.value||!b.value},{default:o(()=>[t(e(se),{class:"mr-1.5 size-4"}),u(" "+s(e(n)["branch-detail.approve-merge"]),1)]),_:1},8,["disabled"])]),_:1}),t(e(Y),null,{default:o(()=>[t(e(ee),null,{default:o(()=>[t(e(te),null,{default:o(()=>[u(s(e(n)["branch-detail.confirm-merge"]),1)]),_:1}),t(e(le),null,{default:o(()=>{var l;return[u(s(e(n)["branch-detail.this-will-merge"])+" ",1),i("code",Je,s(y.value),1),u(" "+s(e(n)["branch-detail.into"])+" ",1),i("code",Ke,s(((l=b.value)==null?void 0:l.base)??"main"),1),u(" "+s(e(n)["branch-detail.and-delete-the-source"]),1)]}),_:1})]),_:1}),t(e(ne),null,{default:o(()=>[t(e($),{variant:"outline",size:"sm",onClick:r[1]||(r[1]=l=>A.value=!1)},{default:o(()=>[u(s(e(n)["branch-detail.cancel"]),1)]),_:1}),t(e($),{variant:"default",size:"sm",disabled:k.value,onClick:_e},{default:o(()=>[k.value?(a(),m(e(G),{key:0,class:"mr-1.5 size-4 animate-spin"})):(a(),m(e(Be),{key:1,class:"mr-1.5 size-4"})),u(" "+s(e(n)["branch-detail.merge"]),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"]),t(e(Q),{open:R.value,"onUpdate:open":r[4]||(r[4]=l=>R.value=l)},{default:o(()=>[t(e(oe),{"as-child":""},{default:o(()=>[t(e($),{variant:"destructive",size:"sm",disabled:k.value||!b.value},{default:o(()=>[t(e(J),{class:"mr-1.5 size-4"}),u(" "+s(e(n)["branch-detail.reject"]),1)]),_:1},8,["disabled"])]),_:1}),t(e(Y),null,{default:o(()=>[t(e(ee),null,{default:o(()=>[t(e(te),null,{default:o(()=>[u(s(e(n)["branch-detail.confirm-rejection"]),1)]),_:1}),t(e(le),null,{default:o(()=>[u(s(e(n)["branch-detail.this-will-permanently-delete"])+" ",1),i("code",Qe,s(y.value),1),r[5]||(r[5]=u(". All changes in this branch will be lost. ",-1))]),_:1})]),_:1}),t(e(ne),null,{default:o(()=>[t(e($),{variant:"outline",size:"sm",onClick:r[3]||(r[3]=l=>R.value=!1)},{default:o(()=>[u(s(e(n)["branch-detail.cancel"]),1)]),_:1}),t(e($),{variant:"destructive",size:"sm",disabled:k.value,onClick:ge},{default:o(()=>[k.value?(a(),m(e(G),{key:0,class:"mr-1.5 size-4 animate-spin"})):(a(),m(e(J),{key:1,class:"mr-1.5 size-4"})),u(" "+s(e(n)["branch-detail.delete-branch"]),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])]),_:1},8,["title","description"]),i("div",Ye,[w.value?(a(),c("div",{key:0,class:L(e(Z)("flex items-center gap-3 rounded-lg border p-4",w.value.type==="success"?"border-status-success/30 bg-status-success/5":"border-status-error/30 bg-status-error/5"))},[w.value.type==="success"?(a(),m(e(E),{key:0,class:"size-5 text-status-success shrink-0"})):(a(),m(e(re),{key:1,class:"size-5 text-status-error shrink-0"})),i("span",et,s(w.value.message),1)],2)):v("",!0),d.value?(a(),c("div",{key:1,class:L(["rounded-lg border p-4",d.value.alreadyMerged?"border-status-info/30 bg-status-info/5":d.value.conflicts&&d.value.conflicts.length>0?"border-status-error/30 bg-status-error/5":d.value.canFastForward?"border-status-success/30 bg-status-success/5":"border-status-warning/30 bg-status-warning/5"])},[i("div",tt,[d.value.alreadyMerged?(a(),m(e(E),{key:0,class:"size-5 shrink-0 text-status-info"})):d.value.canFastForward&&(!d.value.conflicts||d.value.conflicts.length===0)?(a(),m(e(E),{key:1,class:"size-5 shrink-0 text-status-success"})):d.value.conflicts&&d.value.conflicts.length>0?(a(),m(e(xe),{key:2,class:"size-5 shrink-0 text-status-error"})):(a(),m(e(be),{key:3,class:"size-5 shrink-0 text-status-warning"})),i("div",st,[i("p",at,s(e(n)["branch-detail.preview-title"]),1),i("p",rt,[d.value.alreadyMerged?(a(),c(z,{key:0},[u(s(e(n)["branch-detail.preview-already-merged"]),1)],64)):d.value.canFastForward&&(!d.value.conflicts||d.value.conflicts.length===0)?(a(),c(z,{key:1},[u(s(e(n)["branch-detail.preview-ff-clean"]),1)],64)):(a(),c(z,{key:2},[u(s(e(n)["branch-detail.preview-requires-3way"]),1)],64))]),!d.value.alreadyMerged&&d.value.filesChanged>0?(a(),c("p",lt,s(d.value.filesChanged)+" "+s(e(n)["branch-detail.preview-files-changed-suffix"]),1)):v("",!0),d.value.conflicts&&d.value.conflicts.length>0?(a(),c("div",nt,[i("p",ot,[u(s(e(n)["branch-detail.preview-conflicts-heading"])+" ",1),t(e(je),{variant:"outline",class:"text-[10px] border-status-error/50 text-status-error"},{default:o(()=>[u(s(d.value.conflicts.length),1)]),_:1})]),i("ul",it,[(a(!0),c(z,null,N(d.value.conflicts,l=>(a(),c("li",{key:l,class:"flex items-center gap-1.5"},[t(e(U),{class:"size-3 shrink-0 text-status-error"}),u(" "+s(l),1)]))),128))])])):v("",!0),d.value.conflicts===null?(a(),c("p",ct,s(e(n)["branch-detail.preview-check-unavailable"]),1)):v("",!0)])])],2)):v("",!0),B.value&&B.value.skipped.length>0?(a(),c("div",ut,[i("div",dt,[t(e(re),{class:"size-5 shrink-0 text-amber-600 dark:text-amber-400"}),i("div",pt,[i("p",ft,s(B.value.skipped.length)+" file"+s(B.value.skipped.length===1?"":"s")+" skipped during selective sync ",1),r[6]||(r[6]=i("p",{class:"text-xs text-amber-800 dark:text-amber-200"}," The merge landed in git, but the developer's working tree has uncommitted changes that would have been overwritten. Review and commit or discard these files, then run the sync again manually if needed. ",-1)),i("ul",mt,[(a(!0),c(z,null,N(B.value.skipped,l=>(a(),c("li",{key:l,class:"flex items-center gap-1.5"},[t(e(U),{class:"size-3 shrink-0"}),u(" "+s(l),1)]))),128))])])])])):v("",!0),e(h).loading?(a(),c("div",ht,[t(e(G),{class:"size-6 animate-spin text-primary"})])):b.value?(a(),c(z,{key:4},[t(e(K),null,{default:o(()=>[t(e(Ae),{class:"p-4"},{default:o(()=>[i("div",vt,[i("div",_t,[t(e(ae),{class:"size-4 text-muted-foreground"}),i("code",gt,s(b.value.base),1)]),t(e(se),{class:"size-4 text-primary"}),i("div",xt,[t(e(ae),{class:"size-4 text-primary"}),i("code",bt,s(y.value.replace("contentrain/","")),1)]),i("div",yt,[t(e(Ie),{status:S.value.scope==="normalize"?"pending":"partial",reason:S.value.scope==="normalize"?"Review required":void 0},null,8,["status","reason"]),i("span",kt,[t(e(U),{class:"size-3"}),u(" "+s(H.value)+" "+s(e(n)["branch-detail.file"])+s(H.value!==1?"s":""),1)]),i("span",wt,[t(e(Oe),{class:"size-3"}),u(" "+s(me.value),1)]),i("span",zt,[t(e(Ge),{class:"size-3"}),u(" "+s(he.value),1)])])])]),_:1})]),_:1}),b.value.stat?(a(),c("pre",Ct,s(b.value.stat),1)):v("",!0),I.value.length>0?(a(),c("div",$t,[(a(!0),c(z,null,N(I.value,(l,W)=>(a(),m(e(Te),{key:W,"default-open":!0},{default:o(()=>[t(e(K),{class:"overflow-hidden"},{default:o(()=>[t(e(Me),{class:"flex w-full items-center gap-3 p-3 hover:bg-muted/50 transition-colors text-left"},{default:o(()=>[t(e(Ve),{class:"size-4 text-muted-foreground shrink-0"}),i("span",Bt,s(l.path),1),i("div",Dt,[l.additions>0?(a(),c("span",Ft,"+"+s(l.additions),1)):v("",!0),l.deletions>0?(a(),c("span",jt,"-"+s(l.deletions),1)):v("",!0)])]),_:2},1024),t(e(qe),null,{default:o(()=>[t(e(Re)),i("div",Pt,[i("pre",It,[i("code",Mt,[(a(!0),c(z,null,N(l.lines,(f,M)=>(a(),c(z,{key:M},[f.type!=="header"?(a(),c("span",{key:0,class:L([{"bg-status-success/10 text-status-success":f.type==="add","bg-status-error/10 text-status-error":f.type==="remove","bg-primary/5 text-primary font-medium":f.type==="hunk","text-muted-foreground":f.type==="context"},"block px-4 font-mono"])},s(f.text),3)):v("",!0)],64))),128))])])])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),t($e,{title:e(n)["branch-detail.ask-your-agent"],class:"mt-4"},{default:o(()=>[t(V,{prompt:e(n)["branch-detail.review-the-changes-on"]},null,8,["prompt"]),t(V,{prompt:e(n)["branch-detail.check-the-content-quality"]},null,8,["prompt"]),ve.value?(a(),m(V,{key:0,prompt:e(n)["branch-detail.continue-with-phase-2"]},null,8,["prompt"])):v("",!0)]),_:1},8,["title"])])):(a(),c("div",qt,[r[7]||(r[7]=i("img",{src:He,alt:"",class:"empty-illustration mb-4"},null,-1)),i("p",Tt,s(e(n)["branch-detail.no-diff-available-for"]),1)]))],64)):v("",!0)])]))}});export{as as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o}from"./Presence-CfATKqRO.js";const[e]=o("ConfigProvider");export{e as i};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as Z,a as T,o as l,p as m,y as F,u as e,z as E,f as I,F as S,x as L,h as U,b as h,e as r,j as s,q as t,A as ie,B as n,s as u,g as C,w as ce,X as de,L as N,r as P,i as ue,G as B,a9 as J}from"./index-ChZMsiq8.js";import{_ as w,j as me,d as fe,u as pe}from"./useWatch-BEMqYN2q.js";import{u as xe}from"./content-CUJS4qD7.js";import{_ as _e,S as ge,a as O}from"./PageHeader.vue_vue_type_script_setup_true_lang-f_qa-M1s.js";import{A as ee,_ as he}from"./StudioHint.vue_vue_type_script_setup_true_lang-C_9M35tB.js";import{_ as H,a as j}from"./AgentPromptGroup.vue_vue_type_script_setup_true_lang-DGijfAoG.js";import{a as te,b as se,_ as A,c as ne}from"./CollapsibleTrigger.vue_vue_type_script_setup_true_lang-ClPT-9J4.js";import{_ as W}from"./Separator.vue_vue_type_script_setup_true_lang-D-ZdYJPm.js";import{C as ae}from"./chevron-down-DxPRdtQ2.js";import{B as ve}from"./book-marked-BJCFfYPg.js";import{B as ye}from"./book-open-BrhESfqB.js";import{F as X}from"./file-code-DAeYB6-U.js";import{L as ze,T as Q}from"./trash-2-B_0ZPRjy.js";import{_ as q}from"./CardContent.vue_vue_type_script_setup_true_lang-Wep4RMkj.js";import{A as Y}from"./arrow-down-DuuSrZrX.js";import{D as be}from"./database-DXeLd4fP.js";import{M as ke,P as we}from"./plus-BKiDA6K4.js";import{G as K}from"./git-merge-zRH3kO3U.js";import"./useId-D0eDf3m4.js";import"./Presence-CfATKqRO.js";/**
|
|
2
|
-
* @license lucide-vue-next v0.474.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const $e=Z("CodeIcon",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
7
|
-
* @license lucide-vue-next v0.474.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const oe=Z("MapPinIcon",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),le=T({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(g){const o=g;return(a,z)=>(l(),m("div",{"data-slot":"card-header",class:F(e(E)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",o.class))},[I(a.$slots,"default")],2))}}),re=T({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(g){const o=g;return(a,z)=>(l(),m("h3",{"data-slot":"card-title",class:F(e(E)("leading-none font-semibold",o.class))},[I(a.$slots,"default")],2))}}),Pe="/select-data-type.svg",je={class:"space-y-4"},Ce={class:"flex items-center gap-3"},Be={class:"font-medium text-sm font-mono"},Re={class:"divide-y divide-border"},Se=["onClick"],Me={class:"flex-1 min-w-0"},Ae={class:"text-sm font-medium text-foreground truncate"},Fe={class:"flex items-center gap-2 mt-1 flex-wrap"},Ne={class:"font-mono text-xs text-muted-foreground"},Ee={class:"font-mono text-xs text-primary"},Le=T({__name:"ExtractionReviewPanel",props:{models:{},extractions:{},selectedModels:{}},emits:["select-extraction"],setup(g,{emit:o}){const a=g,z=o,v={collection:{icon:ze,color:"text-blue-500",bg:"bg-blue-500/10"},singleton:{icon:X,color:"text-teal-500",bg:"bg-teal-500/10"},document:{icon:ye,color:"text-green-500",bg:"bg-green-500/10"},dictionary:{icon:ve,color:"text-amber-500",bg:"bg-amber-500/10"}};function x(f){return v[f]??v.collection}const b=U(()=>{const f=new Map;for(const i of a.extractions)f.has(i.model)||f.set(i.model,[]),f.get(i.model).push(i);return[...f.entries()].toSorted((i,_)=>_[1].length-i[1].length)});function p(f){return a.models.find(i=>i.id===f)}function $(f){return a.selectedModels.has(f)}return(f,i)=>(l(),m("div",je,[(l(!0),m(S,null,L(b.value,([_,R])=>(l(),h(e(ne),{key:_,"default-open":b.value.length<=5},{default:r(()=>[s(e(A),{class:F(e(E)(!$(_)&&"opacity-50"))},{default:r(()=>[s(e(te),{class:"flex w-full items-center justify-between p-4 hover:bg-muted/50 transition-colors rounded-t-lg"},{default:r(()=>{var y,M,D,V;return[t("div",Ce,[t("div",{class:F(e(E)("flex size-8 items-center justify-center rounded-md",x(((y=p(_))==null?void 0:y.kind)??"collection").bg))},[(l(),h(ie(x(((M=p(_))==null?void 0:M.kind)??"collection").icon),{class:F(e(E)("size-4",x(((D=p(_))==null?void 0:D.kind)??"collection").color))},null,8,["class"]))],2),t("span",Be,n(_),1),s(e(w),{variant:"secondary",class:"text-[10px]"},{default:r(()=>[u(n(R.length)+" strings",1)]),_:2},1024),(V=p(_))!=null&&V.domain?(l(),h(e(w),{key:0,variant:"outline",class:"text-[10px]"},{default:r(()=>{var c;return[u(n((c=p(_))==null?void 0:c.domain),1)]}),_:2},1024)):C("",!0)]),s(e(ae),{class:"size-4 text-muted-foreground transition-transform"})]}),_:2},1024),s(e(se),null,{default:r(()=>[s(e(W)),t("div",Re,[(l(!0),m(S,null,L(R,(y,M)=>(l(),m("button",{key:M,class:"flex w-full items-start gap-3 p-4 text-left hover:bg-muted/30 transition-colors",onClick:D=>z("select-extraction",y)},[s(e(oe),{class:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),t("div",Me,[t("p",Ae,'"'+n(y.value)+'"',1),t("div",Fe,[t("span",Ne,n(y.file),1),s(e(w),{variant:"outline",class:"text-[10px]"},{default:r(()=>[u("L"+n(y.line),1)]),_:2},1024),s(e(ee),{class:"size-3 text-muted-foreground"}),t("span",Ee,n(y.model)+"."+n(y.field),1),y.locale?(l(),h(e(w),{key:0,variant:"secondary",class:"text-[10px]"},{default:r(()=>[u(n(y.locale),1)]),_:2},1024)):C("",!0)])])],8,Se))),128))])]),_:2},1024)]),_:2},1032,["class"])]),_:2},1032,["default-open"]))),128))]))}}),Te={class:"flex items-center justify-between"},De={class:"flex items-center gap-2 mb-2"},qe={class:"flex size-6 items-center justify-center rounded bg-blue-500/10"},Ve={class:"font-mono text-xs text-muted-foreground"},Ge={key:0,class:"flex items-center justify-center py-4"},Oe={key:1,class:"rounded-md border bg-muted/30 overflow-hidden font-mono text-xs"},He={class:"w-8 shrink-0 text-right text-muted-foreground/50 select-none"},Ke={class:"flex justify-center"},Ue={class:"flex items-center gap-2 mb-2"},We={class:"flex size-6 items-center justify-center rounded bg-emerald-500/10"},Xe={class:"rounded-md border bg-muted/30 p-3"},Je={class:"flex items-center gap-2 flex-wrap"},Qe={class:"font-mono text-xs text-primary"},Ye={class:"text-xs text-foreground"},Ze={class:"flex justify-center"},Ie={class:"flex items-center gap-2 mb-2"},et={class:"flex size-6 items-center justify-center rounded bg-violet-500/10"},tt={class:"rounded-md border overflow-hidden font-mono text-xs"},st={class:"flex gap-3 px-3 py-1.5 bg-red-500/5 text-red-600 dark:text-red-400 line-through"},nt={class:"flex gap-3 px-3 py-1.5 bg-green-500/5 text-green-600 dark:text-green-400"},at=T({__name:"SourceTracePanel",props:{extraction:{},patches:{}},emits:["close"],setup(g,{emit:o}){const a=g,z=o,v=me(),x=P([]),b=P(0),p=P(!1);function $(){return a.extraction?a.patches.find(f=>f.file===a.extraction.file&&f.line===a.extraction.line):null}return ce(()=>a.extraction,async f=>{if(!f){x.value=[];return}p.value=!0;try{const i=await v.get(`/normalize/file-context?file=${encodeURIComponent(f.file)}&line=${f.line}&range=4`);x.value=i.lines,b.value=i.highlight}catch{x.value=[]}finally{p.value=!1}},{immediate:!0}),(f,i)=>g.extraction?(l(),h(e(A),{key:0,class:"border-primary/20"},{default:r(()=>[s(e(le),{class:"pb-3"},{default:r(()=>[t("div",Te,[s(e(re),{class:"text-sm"},{default:r(()=>[...i[1]||(i[1]=[u("Source Trace",-1)])]),_:1}),t("button",{class:"rounded-md p-1 hover:bg-muted transition-colors",onClick:i[0]||(i[0]=_=>z("close"))},[s(e(de),{class:"size-4 text-muted-foreground"})])])]),_:1}),s(e(q),{class:"space-y-4"},{default:r(()=>[t("div",null,[t("div",De,[t("div",qe,[s(e(X),{class:"size-3.5 text-blue-500"})]),i[2]||(i[2]=t("span",{class:"text-xs font-medium text-foreground"},"Source File",-1)),t("span",Ve,n(g.extraction.file)+":"+n(g.extraction.line),1)]),p.value?(l(),m("div",Ge,[s(e(N),{class:"size-4 animate-spin text-muted-foreground"})])):x.value.length>0?(l(),m("div",Oe,[(l(!0),m(S,null,L(x.value,_=>(l(),m("div",{key:_.num,class:F(e(E)("flex gap-3 px-3 py-0.5",_.num===b.value&&"bg-primary/10 border-l-2 border-primary"))},[t("span",He,n(_.num),1),t("span",{class:F(["whitespace-pre overflow-x-auto",_.num===b.value&&"text-foreground font-medium"])},n(_.content),3)],2))),128))])):C("",!0)]),t("div",Ke,[s(e(Y),{class:"size-5 text-muted-foreground"})]),t("div",null,[t("div",Ue,[t("div",We,[s(e(be),{class:"size-3.5 text-emerald-500"})]),i[3]||(i[3]=t("span",{class:"text-xs font-medium text-foreground"},"Content Entry",-1))]),t("div",Xe,[t("div",Je,[s(e(w),{variant:"secondary",class:"font-mono text-[10px]"},{default:r(()=>[u(n(g.extraction.model),1)]),_:1}),s(e(ee),{class:"size-3 text-muted-foreground"}),t("span",Qe,n(g.extraction.field),1),i[4]||(i[4]=t("span",{class:"text-xs text-muted-foreground"},"=",-1)),t("span",Ye,'"'+n(g.extraction.value)+'"',1),g.extraction.locale?(l(),h(e(w),{key:0,variant:"outline",class:"text-[10px]"},{default:r(()=>[u(n(g.extraction.locale),1)]),_:1})):C("",!0)])])]),$()?(l(),m(S,{key:0},[t("div",Ze,[s(e(Y),{class:"size-5 text-muted-foreground"})]),t("div",null,[t("div",Ie,[t("div",et,[s(e($e),{class:"size-3.5 text-violet-500"})]),i[5]||(i[5]=t("span",{class:"text-xs font-medium text-foreground"},"Reuse Patch",-1))]),t("div",tt,[t("div",st,[i[6]||(i[6]=t("span",{class:"w-6 shrink-0 text-right select-none"},"-",-1)),t("span",null,n($().old_value),1)]),t("div",nt,[i[7]||(i[7]=t("span",{class:"w-6 shrink-0 text-right select-none"},"+",-1)),t("span",null,n($().new_expression),1)])])])],64)):C("",!0)]),_:1})]),_:1})):C("",!0)}}),ot={class:"space-y-3"},lt={class:"flex items-center gap-2"},rt={class:"font-mono text-xs text-foreground"},it={class:"divide-y divide-border"},ct={class:"flex items-center gap-2 mb-2"},dt={class:"rounded-md border overflow-hidden font-mono text-xs"},ut={class:"flex items-start gap-2 px-3 py-1.5 bg-red-500/5"},mt={class:"text-red-600 dark:text-red-400 line-through whitespace-pre-wrap break-all"},ft={class:"flex items-start gap-2 px-3 py-1.5 bg-green-500/5"},pt={class:"text-green-600 dark:text-green-400 whitespace-pre-wrap break-all"},xt=T({__name:"PatchPreviewPanel",props:{patches:{}},setup(g){const o=g,a=U(()=>{const z=new Map;for(const v of o.patches)z.has(v.file)||z.set(v.file,[]),z.get(v.file).push(v);return[...z.entries()].toSorted((v,x)=>x[1].length-v[1].length)});return(z,v)=>(l(),m("div",ot,[(l(!0),m(S,null,L(a.value,([x,b])=>(l(),h(e(ne),{key:x,"default-open":a.value.length<=5},{default:r(()=>[s(e(A),null,{default:r(()=>[s(e(te),{class:"flex w-full items-center justify-between p-3 hover:bg-muted/50 transition-colors rounded-t-lg"},{default:r(()=>[t("div",lt,[s(e(X),{class:"size-4 text-muted-foreground"}),t("span",rt,n(x),1),s(e(w),{variant:"secondary",class:"text-[10px]"},{default:r(()=>[u(n(b.length),1)]),_:2},1024)]),s(e(ae),{class:"size-4 text-muted-foreground transition-transform"})]),_:2},1024),s(e(se),null,{default:r(()=>[s(e(W)),t("div",it,[(l(!0),m(S,null,L(b,(p,$)=>(l(),m("div",{key:$,class:"p-3"},[t("div",ct,[s(e(w),{variant:"outline",class:"text-[10px]"},{default:r(()=>[u("L"+n(p.line),1)]),_:2},1024)]),t("div",dt,[t("div",ut,[s(e(ke),{class:"mt-0.5 size-3 shrink-0 text-red-500"}),t("span",mt,n(p.old_value),1)]),t("div",ft,[s(e(we),{class:"mt-0.5 size-3 shrink-0 text-green-500"}),t("span",pt,n(p.new_expression),1)])])]))),128))])]),_:2},1024)]),_:2},1024)]),_:2},1032,["default-open"]))),128))]))}}),_t={class:"px-6 py-6"},gt={key:0,class:"flex justify-center py-12"},ht={key:1,class:"space-y-8"},vt={class:"flex flex-col items-center py-12 text-center"},yt={class:"text-xl font-semibold"},zt={class:"mt-2 max-w-md text-sm text-muted-foreground"},bt={class:"mx-auto max-w-2xl"},kt={class:"space-y-4"},wt={class:"flex items-start gap-4"},$t={class:"text-sm font-medium"},Pt={class:"text-xs text-muted-foreground mt-0.5"},jt={class:"flex items-start gap-4"},Ct={class:"text-sm font-medium"},Bt={class:"text-xs text-muted-foreground mt-0.5"},Rt={class:"flex items-start gap-4"},St={class:"text-sm font-medium"},Mt={class:"text-xs text-muted-foreground mt-0.5"},At={class:"flex items-start gap-4"},Ft={class:"text-sm font-medium"},Nt={class:"text-xs text-muted-foreground mt-0.5"},Et={key:2,class:"space-y-6"},Lt={class:"text-sm font-semibold"},Tt={class:"text-xs text-muted-foreground mt-0.5"},Dt={class:"flex items-center gap-2"},qt={class:"max-w-md"},Vt={class:"text-foreground tabular-nums"},Gt={class:"text-foreground tabular-nums"},Ot={class:"text-foreground tabular-nums"},Ht={class:"text-foreground tabular-nums"},Kt={class:"text-foreground tabular-nums"},Ut={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},Wt={class:"text-sm font-semibold text-foreground mb-3"},Xt={class:"text-sm font-semibold text-foreground mb-3"},Jt={key:1,class:"flex flex-col items-center justify-center rounded-xl border border-dashed border-border py-12 text-center"},Qt={class:"text-xs text-muted-foreground"},Yt={key:1},Zt={class:"text-sm font-semibold text-foreground mb-3"},It={key:3,class:"space-y-6"},es={class:"flex flex-col items-center py-6 text-center"},ts={class:"flex size-14 items-center justify-center rounded-full bg-status-info/10 mb-4"},ss={class:"text-lg font-semibold"},ns={class:"mt-1 text-sm text-muted-foreground"},as={class:"space-y-3 max-w-2xl mx-auto"},os={class:"font-mono text-xs text-foreground flex-1 truncate"},ls={class:"max-w-2xl mx-auto"},rs={key:4,class:"space-y-8"},is={class:"flex flex-col items-center py-12 text-center"},cs={class:"flex size-16 items-center justify-center rounded-full bg-status-success/10 mb-4"},ds={class:"max-w-2xl mx-auto space-y-4"},Ss=T({__name:"NormalizePage",setup(g){const o=xe(),a=fe("serve-ui-texts").locale("en").get(),z=U(()=>{var c,d;return o.normalizePlan?"plan":(d=(c=o.normalizeResults)==null?void 0:c.pendingBranches)!=null&&d.length?"branches":M.value?"done":"empty"}),v=P(null),x=P(new Set),b=P(!1),p=P(!1),$=P(!1);function f(c){v.value=c}async function i(){b.value=!0;try{const c=x.value.size?[...x.value]:void 0;await o.approvePlan(c),B.success("Plan approved — extraction branch created. Review and merge below.",{duration:6e3}),await Promise.all([o.fetchNormalizePlan(),o.fetchNormalizeResults()])}catch(c){B.error(c instanceof Error?c.message:"Failed to approve plan")}finally{b.value=!1}}async function _(){p.value=!0;try{await o.rejectPlan(),o.normalizePlan=null,B.success("Plan rejected")}catch(c){B.error(c instanceof Error?c.message:"Failed to reject plan")}finally{p.value=!1}}const R=P(null),y=P(null),M=P(!1);async function D(c){var d,k;R.value=c;try{await o.approveBranch(c),await o.fetchNormalizeResults(),B.success("Branch merged — tell your agent to continue with Phase 2",{duration:6e3}),(k=(d=o.normalizeResults)==null?void 0:d.pendingBranches)!=null&&k.length||(M.value=!0)}catch(G){B.error(G instanceof Error?G.message:"Failed to merge branch")}finally{R.value=null}}async function V(c){y.value=c;try{await o.rejectBranch(c),await o.fetchNormalizeResults(),B.success("Branch deleted successfully")}catch(d){B.error(d instanceof Error?d.message:"Failed to delete branch")}finally{y.value=null}}return pe(c=>{c.type==="normalize:plan-updated"&&o.fetchNormalizePlan(),(c.type==="branch:created"||c.type==="branch:merged")&&o.fetchNormalizeResults()}),ue(async()=>{$.value=!0;try{if(await Promise.all([o.fetchNormalizePlan(),o.fetchNormalizeResults()]),o.normalizePlan)for(const c of o.normalizePlan.models)x.value.add(c.id)}catch(c){B.error(c instanceof Error?c.message:"Failed to load normalize data")}finally{$.value=!1}}),(c,d)=>(l(),m("div",null,[s(_e,{title:e(a)["normalize.normalize"],description:e(a)["normalize.content-extraction-and-i18n"]},null,8,["title","description"]),t("div",_t,[$.value?(l(),m("div",gt,[s(e(N),{class:"size-5 animate-spin text-muted-foreground"})])):z.value==="empty"?(l(),m("div",ht,[t("div",vt,[d[1]||(d[1]=t("img",{src:Pe,alt:"",class:"empty-illustration mb-6"},null,-1)),t("h2",yt,n(e(a)["normalize.extract-hardcoded-strings"]),1),t("p",zt,n(e(a)["normalize.normalize-scans-your-source"]),1)]),t("div",bt,[s(H,{title:e(a)["normalize.ask-your-ai-agent"]},{default:r(()=>[s(j,{prompt:e(a)["normalize.normalize-my-vue-project"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.scan-srcpages-for-content"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.extract-hero-section-text"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.make-my-landing-page"]},null,8,["prompt"])]),_:1},8,["title"])]),s(e(A),{class:"mx-auto max-w-2xl"},{default:r(()=>[s(e(le),{class:"pb-3"},{default:r(()=>[s(e(re),{class:"text-sm font-medium flex items-center gap-2"},{default:r(()=>[s(e(ge),{class:"size-4 text-primary"}),u(" "+n(e(a)["normalize.how-it-works"]),1)]),_:1})]),_:1}),s(e(W)),s(e(q),{class:"pt-4"},{default:r(()=>[t("div",kt,[t("div",wt,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[2]||(d[2]=[u("1",-1)])]),_:1}),t("div",null,[t("p",$t,n(e(a)["normalize.prompt-your-ai-agent"]),1),t("p",Pt,n(e(a)["normalize.copy-a-prompt-above"]),1)])]),t("div",jt,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[3]||(d[3]=[u("2",-1)])]),_:1}),t("div",null,[t("p",Ct,n(e(a)["normalize.review-the-plan-here"]),1),t("p",Bt,n(e(a)["normalize.the-agent-sends-the"]),1)])]),t("div",Rt,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[4]||(d[4]=[u("3",-1)])]),_:1}),t("div",null,[t("p",St,n(e(a)["normalize.approve-or-request-changes"]),1),t("p",Mt,n(e(a)["normalize.approve-to-write-extractions"]),1)])]),t("div",At,[s(e(w),{variant:"secondary",class:"mt-0.5 shrink-0 size-7 flex items-center justify-center rounded-full font-mono text-xs"},{default:r(()=>[...d[5]||(d[5]=[u("4",-1)])]),_:1}),t("div",null,[t("p",Ft,n(e(a)["normalize.merge-and-continue"]),1),t("p",Nt,n(e(a)["normalize.merge-review-branches-into"]),1)])])])]),_:1})]),_:1})])):z.value==="plan"&&e(o).normalizePlan?(l(),m("div",Et,[s(e(A),null,{default:r(()=>[s(e(q),{class:"flex items-center justify-between p-4"},{default:r(()=>[t("div",null,[t("h3",Lt,n(e(a)["normalize.normalize-plan"]),1),t("p",Tt,[u(n(e(o).normalizePlan.extractions.length)+" "+n(e(a)["normalize.extractions-across"])+" "+n(e(o).normalizePlan.models.length)+" "+n(e(a)["normalize.models"])+" ",1),e(o).normalizePlan.patches.length?(l(),m(S,{key:0},[u(" · "+n(e(o).normalizePlan.patches.length)+" "+n(e(a)["normalize.patches"]),1)],64)):C("",!0)])]),t("div",Dt,[s(e(O),{variant:"outline",disabled:p.value||b.value,onClick:_},{default:r(()=>[p.value?(l(),h(e(N),{key:0,class:"size-4 animate-spin"})):(l(),h(e(Q),{key:1})),u(" "+n(p.value?"Rejecting...":"Reject"),1)]),_:1},8,["disabled"]),s(e(O),{disabled:b.value||p.value,onClick:i},{default:r(()=>[b.value?(l(),h(e(N),{key:0,class:"size-4 animate-spin"})):(l(),h(e(J),{key:1})),u(" "+n(b.value?"Applying...":"Approve & Apply"),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),t("div",qt,[s(H,{title:e(a)["normalize.request-changes-from-your"]},{default:r(()=>[s(j,{prompt:e(a)["normalize.adjust-the-normalize-plan"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.remove-navigation-labels-from"]},null,8,["prompt"])]),_:1},8,["title"])]),e(o).normalizePlan.scan_stats?(l(),h(e(A),{key:0,class:"bg-muted/30"},{default:r(()=>[s(e(q),{class:"flex items-center gap-6 p-4 text-xs text-muted-foreground"},{default:r(()=>[t("span",null,[t("strong",Vt,n(e(o).normalizePlan.scan_stats.files_scanned),1),u(" "+n(e(a)["normalize.files-scanned"]),1)]),t("span",null,[t("strong",Gt,n(e(o).normalizePlan.scan_stats.raw_strings),1),u(" "+n(e(a)["normalize.strings-found"]),1)]),t("span",null,[t("strong",Ot,n(e(o).normalizePlan.scan_stats.candidates_sent),1),u(" "+n(e(a)["normalize.candidates"]),1)]),t("span",null,[t("strong",Ht,n(e(o).normalizePlan.scan_stats.extracted),1),u(" "+n(e(a)["normalize.extracted"]),1)]),t("span",null,[t("strong",Kt,n(e(o).normalizePlan.scan_stats.skipped),1),u(" "+n(e(a)["normalize.skipped"]),1)])]),_:1})]),_:1})):C("",!0),t("div",Ut,[t("div",null,[t("h3",Wt,n(e(a)["normalize.extractions"]),1),s(Le,{models:e(o).normalizePlan.models,extractions:e(o).normalizePlan.extractions,"selected-models":x.value,onSelectExtraction:f},null,8,["models","extractions","selected-models"])]),t("div",null,[t("h3",Xt,n(e(a)["normalize.source-trace"]),1),v.value?(l(),h(at,{key:0,extraction:v.value,patches:e(o).normalizePlan.patches,onClose:d[0]||(d[0]=k=>v.value=null)},null,8,["extraction","patches"])):(l(),m("div",Jt,[s(e(oe),{class:"size-6 text-muted-foreground/40 mb-2"}),t("p",Qt,n(e(a)["normalize.click-an-extraction-to"]),1)]))])]),e(o).normalizePlan.patches.length>0?(l(),m("div",Yt,[t("h3",Zt,n(e(a)["normalize.source-patches"]),1),s(xt,{patches:e(o).normalizePlan.patches},null,8,["patches"])])):C("",!0)])):z.value==="branches"&&e(o).normalizeResults?(l(),m("div",It,[t("div",es,[t("div",ts,[s(e(K),{class:"size-7 text-status-info"})]),t("h2",ss,n(e(a)["normalize.pending-normalize-branches"]),1),t("p",ns,n(e(a)["normalize.review-and-merge-normalize"]),1)]),t("div",as,[(l(!0),m(S,null,L(e(o).normalizeResults.pendingBranches,k=>(l(),h(e(A),{key:k.name,class:"overflow-hidden"},{default:r(()=>[s(e(q),{class:"flex items-center gap-3 p-4"},{default:r(()=>[s(e(K),{class:"size-4 text-status-info shrink-0"}),t("span",os,n(k.name),1),s(e(O),{variant:"outline",size:"sm",disabled:y.value===k.name||R.value===k.name,onClick:G=>V(k.name)},{default:r(()=>[y.value===k.name?(l(),h(e(N),{key:0,class:"size-4 animate-spin"})):(l(),h(e(Q),{key:1})),u(" "+n(e(a)["normalize.delete"]),1)]),_:2},1032,["disabled","onClick"]),s(e(O),{size:"sm",disabled:R.value===k.name||y.value===k.name,onClick:G=>D(k.name)},{default:r(()=>[R.value===k.name?(l(),h(e(N),{key:0,class:"size-4 animate-spin"})):(l(),h(e(K),{key:1})),u(" "+n(e(a)["normalize.merge"]),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),t("div",ls,[s(H,{title:e(a)["normalize.whats-next-ask-your"]},{default:r(()=>[s(j,{prompt:e(a)["normalize.continue-to-phase-2"]},null,8,["prompt"]),s(j,{prompt:e(a)["normalize.start-reuse-for-the"]},null,8,["prompt"])]),_:1},8,["title"])])])):z.value==="done"?(l(),m("div",rs,[t("div",is,[t("div",cs,[s(e(J),{class:"size-8 text-status-success"})]),d[6]||(d[6]=t("h2",{class:"text-xl font-semibold"},"Phase 1 complete",-1)),d[7]||(d[7]=t("p",{class:"mt-2 max-w-md text-sm text-muted-foreground"}," Content strings have been extracted into models and merged. Tell your AI agent to continue with Phase 2 — patching source files with content references. ",-1))]),t("div",ds,[s(H,{title:"Tell your agent"},{default:r(()=>[s(j,{prompt:"Continue to Phase 2 — patch serve-ui source files with content references",label:"recommended"}),s(j,{prompt:"Start reuse for all extracted content models in serve-ui domain"})]),_:1})])])):C("",!0),s(he,{message:e(a)["normalize.track-normalize-history-and"],class:"mt-6"},null,8,["message"])])]))}});export{Ss as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as r}from"./ConfigProvider-DPWUDqGh.js";import{r as n,h as i}from"./index-ChZMsiq8.js";function c(t){const e=r({dir:n("ltr")});return i(()=>{var o;return(t==null?void 0:t.value)||((o=e.dir)==null?void 0:o.value)||"ltr"})}export{c as u};
|
package/dist/studio-aKJw68fB.mjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from "citty";
|
|
2
|
-
//#region src/studio/index.ts
|
|
3
|
-
var studio_default = defineCommand({
|
|
4
|
-
meta: {
|
|
5
|
-
name: "studio",
|
|
6
|
-
description: "Interact with Contentrain Studio"
|
|
7
|
-
},
|
|
8
|
-
subCommands: {
|
|
9
|
-
login: () => import("./login-yLBoeLVM.mjs").then((m) => m.default),
|
|
10
|
-
logout: () => import("./logout-DBm34b7e.mjs").then((m) => m.default),
|
|
11
|
-
whoami: () => import("./whoami-D0ZYvnWU.mjs").then((m) => m.default),
|
|
12
|
-
connect: () => import("./connect-CKx-SfQ7.mjs").then((m) => m.default),
|
|
13
|
-
status: () => import("./status-BAQ8GFyN.mjs").then((m) => m.default),
|
|
14
|
-
activity: () => import("./activity-DP5wjWLV.mjs").then((m) => m.default),
|
|
15
|
-
usage: () => import("./usage-CC7Chuf6.mjs").then((m) => m.default),
|
|
16
|
-
branches: () => import("./branches-D_LPptfM.mjs").then((m) => m.default),
|
|
17
|
-
"cdn-init": () => import("./cdn-init-CGl8-QCR.mjs").then((m) => m.default),
|
|
18
|
-
"cdn-build": () => import("./cdn-build-BuacuDbL.mjs").then((m) => m.default),
|
|
19
|
-
webhooks: () => import("./webhooks-C-D4zHq8.mjs").then((m) => m.default),
|
|
20
|
-
submissions: () => import("./submissions-JTtZXvcf.mjs").then((m) => m.default)
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
//#endregion
|
|
24
|
-
export { studio_default as default };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|