@inkeep/open-knowledge 0.71.0-beta.6 → 0.71.0-beta.7
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/dist/assets/skills/packs/codebase-wiki/references/generate-and-refresh.md +1 -1
- package/dist/assets/skills/packs/knowledge-base/SKILL.md +2 -0
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/assets/skills/project/references/linking.md +3 -2
- package/dist/cli.mjs +67 -66
- package/dist/config-schema.json +11 -1
- package/dist/config.project.schema.json +11 -1
- package/dist/constants-DwR639Ts.mjs +1 -0
- package/dist/dist-DKlhl927.mjs +2096 -0
- package/dist/dist-qYD3pfVS.mjs +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +153 -153
- package/dist/init-BzHxbuZn.mjs +1 -0
- package/dist/{init-DJozyAP4.mjs → init-C6uC-pHM.mjs} +61 -61
- package/dist/{launch-json-removal-CLXqZ8FV.mjs → launch-json-removal-0-LDzwWY.mjs} +1 -1
- package/dist/{loader-OHqd0KW8.mjs → loader-C6YUFXp_.mjs} +1 -1
- package/dist/loader-CHRSVq8P.mjs +1 -0
- package/dist/{md-manager-BGnqyqi1-BnHkV2Y4.mjs → md-manager-BGnqyqi1-CZVfdoIA.mjs} +160 -160
- package/dist/{open-browser-BD03Xcs2.mjs → open-browser-F_j_IYn7.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-Dnpx-15V.mjs → preview-CEpj7Mao.mjs} +1 -1
- package/dist/preview-UdinIn5O.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-BJdaznjT.js → ActivityModeContent-CrK7FNzo.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-CWXtIJBB.js → AddPropertiesButton-AI0vmmaL.js} +2 -2
- package/dist/public/assets/{AgentDiffPane-Bgb-TqdH.js → AgentDiffPane-BhVcfw4T.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-DpyzkD9R.js → AgentThreadClientBinder-DybMgazg.js} +1 -1
- package/dist/public/assets/{BugReportHistory-NoOgL4e-.js → BugReportHistory-DbM8sn96.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-DYkbQ_VP.js → BugReportHistoryDialog-B6I-9wxu.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-Btu3mHtw.js → CodeMirrorPropInput-DZ37msDr.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-Co7zxbd1.js → ConsentDialogBody-B_lo3uhI.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-CjYhHYXW.js → DiffViewBoundary-CWJp6t9z.js} +1 -1
- package/dist/public/assets/{DocumentContext-Ds-fn6hr.js → DocumentContext-BKydxNvt.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-dclY5DGp.js → EditorModeToggle-CS_utqU8.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CY7bePze.js → EnableSyncConfirmDialog-KyNQgWB6.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-7BkV5yaY.js → ExcalidrawDocEditor-UVdcaTsJ.js} +1 -1
- package/dist/public/assets/FeedbackForm-Cutnpobj.js +1 -0
- package/dist/public/assets/{GraphPanel-CAy7iK1-.js → GraphPanel-BSDs51EQ.js} +1 -1
- package/dist/public/assets/{ImageAttachments-CckZxudE.js → ImageAttachments-bSsPilJg.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CM7GHBVC.js → ImportSkillDialog-PeOcRH0t.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-D2adiJ_F.js → LintConfigEditor-D94SABSS.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-biGQX3ij.js → ManagedArtifactProperties-CWKnsTBm.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-MFvwtJu1.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-BUTIxTnE.js → MermaidDocEditor-CcwHIUjb.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-fM_A-_6U.js → PropertyDisplayRow-B4xqYm_E.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-Bm7qna_x.js → RegisteredAgentIcon-DMGzGpgO.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-Bv7pQbuO.js → ReportBugDialogBody-g5Q3mbZH.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-0PV_UPMP.js → ReportBugMenuTrigger-DYFailxM.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-VAFLWTdf.js → SchemaConfigEditor-DjPwBQNE.js} +1 -1
- package/dist/public/assets/{SessionsHost-ChTej8aQ.js → SessionsHost-C0yYRHT8.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-BwNmDXzH.js → SettingsDialogBody-BPfLFgw5.js} +2 -2
- package/dist/public/assets/{ShareBranchSwitchDialog-DVGxVZvK.js → ShareBranchSwitchDialog-CJQ4GB6s.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-D4hyoVKV.js → ShareReceiveDialog-D6i_iBQ2.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-AD5BnGhc.js → ShareReceiveMissDialog-BG-9weDG.js} +1 -1
- package/dist/public/assets/{SkillCostValue-DMXVUaE7.js → SkillCostValue-CBfC2ips.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-D9FB_lST.js → SkillEditBanner-BlIGzLHz.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-DtSVNYK4.js → SkillForkDialog-CgsMSc30.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-BuFRSp_z.js → SkillInstallMenu-uMprT60y.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-BW_RoHYE.js → SkillOriginInline-enwQuYHp.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-BKD6xxHt.js → SkillToolbarControls-B-PypQ4o.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-8odjAztJ.js → SlidesToolbarControls-BUC_eJlL.js} +1 -1
- package/dist/public/assets/{SourceEditor-C7uucUJz.js → SourceEditor-BNJ55TFa.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CfiR68PD.js → TerminalPanel-CBeAAbrl.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-CmC7nqwp.js → TerminalWindowApp-DZGUZH3I.js} +1 -1
- package/dist/public/assets/{TextDocEditor-eGnW8YYf.js → TextDocEditor-brfeinqj.js} +1 -1
- package/dist/public/assets/{ThreadView-Bzyz7WGW.js → ThreadView-CkTKdoML.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BrwPPIS_.js → TimelineDiffPane-DKE8nvJu.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D-0KFcBI.js → agent-diff-store-DTkGqDNJ.js} +1 -1
- package/dist/public/assets/{auth-state-cache-DI1ZZBIU.js → auth-state-cache-B74qBpm2.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-B5xbQpHt.js → bug-report-send-manager-TbN4yaBB.js} +1 -1
- package/dist/public/assets/{client-version-9_WlPld6.js → client-version-Bc5HP7Ed.js} +1 -1
- package/dist/public/assets/{comment-chips-Ckz0ppef.js → comment-chips-_zFbamgQ.js} +1 -1
- package/dist/public/assets/{config-provider-C1jgKj52.js → config-provider-ChXWQGkn.js} +3 -3
- package/dist/public/assets/{dist-DbRnfSz4.js → dist-D9bF1HlE.js} +106 -106
- package/dist/public/assets/{doc-hash-xMWnMdX4.js → doc-hash-8FM9bAVM.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-Ch4SaORf.js → doc-undo-manager-X-4SK3tE.js} +1 -1
- package/dist/public/assets/{documents-events-CgeDb9QZ.js → documents-events-CDRChc0H.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-B41-ZDHD.js → file-tree-adapter-By107gc7.js} +1 -1
- package/dist/public/assets/{file-tree-utils-DzFH_0CO.js → file-tree-utils-DMzGqq6M.js} +1 -1
- package/dist/public/assets/{folder-config-api-gItnLltV.js → folder-config-api-CTQSuqyE.js} +1 -1
- package/dist/public/assets/i18n-B_wD5kF7.js +1 -0
- package/dist/public/assets/{index-BD5kzJoS.js → index-zvWCvjzE.js} +8 -8
- package/dist/public/assets/{launcher-selection-CnKhsntZ.js → launcher-selection-Dq-Iaz-L.js} +1 -1
- package/dist/public/assets/{lint-config-client-B2LNzQAQ.js → lint-config-client-DqYHlt4A.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-D1aD4zPr.js → markdownlint-rule-browser-DrdibywL.js} +1 -1
- package/dist/public/assets/{messages-y8_jNBCz.js → messages-1LOOFG95.js} +1 -1
- package/dist/public/assets/{messages-BXPO00AB.js → messages-BSC5unlW.js} +1 -1
- package/dist/public/assets/{messages-D_FOmYUB.js → messages-BTgz3B0o.js} +1 -1
- package/dist/public/assets/{messages-CP6dJaKR.js → messages-C3--iCKr.js} +1 -1
- package/dist/public/assets/{messages-D6neQG-E.js → messages-C7VPCAvR.js} +1 -1
- package/dist/public/assets/{messages-UMvjOgaE.js → messages-CDtZN7oO.js} +1 -1
- package/dist/public/assets/{messages-BNu69c9T.js → messages-CcvMPPNj.js} +1 -1
- package/dist/public/assets/{messages-fNPV3zbW.js → messages-Cn1JY5rt.js} +1 -1
- package/dist/public/assets/{messages-COnreDlS.js → messages-CoNpmm1Q.js} +1 -1
- package/dist/public/assets/{messages-DXNxHZer.js → messages-Dk1dP4RM.js} +1 -1
- package/dist/public/assets/{messages-C3-Gi9UU.js → messages-aRsNVdyl.js} +1 -1
- package/dist/public/assets/{messages-CnkmjihR.js → messages-rCFMyEKG.js} +1 -1
- package/dist/public/assets/{page-list-cache-CjTFJKo7.js → page-list-cache-V-AO2spP.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-B95_ZpJ4.js → pending-receive-nav-store-Do6Wyxgf.js} +1 -1
- package/dist/public/assets/{progress-ByyPqwYa.js → progress-CsqOEsMm.js} +1 -1
- package/dist/public/assets/{project-paths-OL9RkD5R.js → project-paths-B-8h-2Qm.js} +1 -1
- package/dist/public/assets/{prop-types-CHZ5GpmQ.js → prop-types-BiZ7iVmx.js} +1 -1
- package/dist/public/assets/{receive-store-C6AmiC1-.js → receive-store-B6Bh7pE6.js} +1 -1
- package/dist/public/assets/{selection-context-DXlbV8vJ.js → selection-context-BO2a7KXC.js} +1 -1
- package/dist/public/assets/{skill-scope-BgVsrS6b.js → skill-scope-fCMVJzDA.js} +1 -1
- package/dist/public/assets/{skills-api-Dk5al98n.js → skills-api-BS-ceHz7.js} +1 -1
- package/dist/public/assets/{src-BFdtDZAW.js → src-nmwU0ldn.js} +1 -1
- package/dist/public/assets/{startup-marks-DxOAcnz5.js → startup-marks-CobjbgVK.js} +1 -1
- package/dist/public/assets/{tag-pill-input-CQfRLAYz.js → tag-pill-input-DJbRn5A_.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BS7YXP0N.js → target-navigation-intent-R9KdQ2Fu.js} +1 -1
- package/dist/public/assets/{telemetry-startup-DiFIuo5_.js → telemetry-startup-K2Nstnyj.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-DiFJCQCx.js → terminal-cli-display-BWdubsSN.js} +1 -1
- package/dist/public/assets/{terminal-command-events-Vv4PGtMR.js → terminal-command-events-B7Whrr3Y.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-BAc42SWB.js → terminal-telemetry-_cBq_q5j.js} +1 -1
- package/dist/public/assets/typing-burst-detector-C2nvGXMC.js +8 -0
- package/dist/public/assets/{uninstall-BqrgrhoX.js → uninstall-TIAWU-c7.js} +1 -1
- package/dist/public/assets/{use-activity-panel-C8_6jEhu.js → use-activity-panel-C5TZ8RXy.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-DkdH-hj1.js → use-apply-config-color-theme-Uti0nOvh.js} +1 -1
- package/dist/public/assets/{use-collab-url-m1hL6d8r.js → use-collab-url-ZMEUMnOG.js} +1 -1
- package/dist/public/assets/{use-conflicts-Bn99xsOZ.js → use-conflicts-BdwovYNz.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DskS89_F.js → use-live-xterm-theme-BochpJxE.js} +1 -1
- package/dist/public/assets/{use-open-skill-CH8ZramM.js → use-open-skill-KBtbW4Wi.js} +1 -1
- package/dist/public/assets/{use-settings-route-Dn37NV_v.js → use-settings-route-CmOczB8a.js} +1 -1
- package/dist/public/assets/{use-skill-origin-Ck9TjCRI.js → use-skill-origin-D6OucFH_.js} +1 -1
- package/dist/public/assets/{use-skills-Cb2xrAj_.js → use-skills-1LOwCFf7.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CgDjbKYK.js → use-terminal-enabled-D4AOYOMu.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-Ddrq1TdM.js → use-timeline-entry-diff-Ce-Bum_V.js} +1 -1
- package/dist/public/assets/{use-workspace-BmKjRyd0.js → use-workspace-BjpBfGfA.js} +1 -1
- package/dist/public/index.html +53 -53
- package/dist/public/uninstall.html +4 -4
- package/dist/registry-probes-DGYPCg_v.mjs +17 -0
- package/dist/{removal-file-path-Bov8OpTu.mjs → removal-file-path-Bou0-83a.mjs} +1 -1
- package/dist/{repair-launch-json-D0ZDjWKk.mjs → repair-launch-json-Bhf7WU7n.mjs} +1 -1
- package/dist/{repair-mcp-configs-BHLHBbhv.mjs → repair-mcp-configs-B2C8BilS.mjs} +1 -1
- package/dist/schemas/v0/config.project.schema.json +11 -1
- package/dist/src-7BbZKGEP.mjs +11 -0
- package/dist/src-Dq8ubGoV.mjs +1 -0
- package/dist/{start-M8sUGkJO.mjs → start-CTaWXsob.mjs} +3 -3
- package/dist/start-DTz0nLjj.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-PI7Uk_9U.mjs +0 -1
- package/dist/dist-Cu24mffC.mjs +0 -1
- package/dist/dist-WGEb77w6.mjs +0 -2096
- package/dist/init-Cxs22dc-.mjs +0 -1
- package/dist/loader-yEu9PpEQ.mjs +0 -1
- package/dist/preview-DPw19SOR.mjs +0 -1
- package/dist/public/assets/FeedbackForm-D6x1Kme5.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BjI35KVX.js +0 -1
- package/dist/public/assets/i18n-Ca-WWW0i.js +0 -1
- package/dist/public/assets/typing-burst-detector-7NR-qtpk.js +0 -8
- package/dist/registry-probes-5hlj224V.mjs +0 -17
- package/dist/src-BC24Oo35.mjs +0 -1
- package/dist/src-DR9TaQqK.mjs +0 -11
- package/dist/start-B_atGdZj.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Fr as t,Nn as n,Pr as r,Vr as i,Yn as a,di as o,ii as s,qn as c,si as l}from"./DocumentContext-Ds-fn6hr.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{t as p}from"./utils-CPqDy6Hr.js";import{t as m}from"./button-Cym3gapE.js";import{i as h,n as g,t as _}from"./tooltip-DttaCTqz.js";import{Bi as v,Bn as y,nr as b,tr as x,yr as S,zn as C}from"./dist-DbRnfSz4.js";import{n as w}from"./dist-CJhtNlOm2.js";import{t as T}from"./dist-Cr4-nBVI.js";import{i as E}from"./local-menu-action-bus-4I1Xm40D.js";import{t as D}from"./createLucideIcon-B6ULg5PN.js";import{Et as O}from"./CodeMirrorPropInput-Btu3mHtw.js";import{t as ee}from"./x-CnGRb1ER.js";import{l as te}from"./doc-hash-xMWnMdX4.js";var k=D(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),A=f(),j=`var(--ok-comment-hue,37,99,235)`,ne=j,re={fill:.22,line:.7},ie={fill:.45,line:1},ae=.45;function oe(e,t){let n=ne,{fill:r,line:i}=t?ie:re;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function M(e){return e.map(e=>e.id??`·`).join(`|`)}function se(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function N(e,t){return e.id===null||e.id===t}function ce(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>N(e,t));i.push({from:a.from,to:a.to,style:oe(e??a.covering[0],e!==void 0),threadId:se(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&M(a.covering)===M(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var P=`data-comment-reveal`;function F(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function I(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${F(e)}"]`)}function le(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ue(e){I(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function L(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${F(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=R(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),de(n),!0}return!1}function R(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function de(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${j},${ae})`),e.setAttribute(P,`true`);let t=()=>{e.removeAttribute(P),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function z(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=C(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function fe(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function B(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:S(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:S(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=v(t.length);return c-s>l?null:{start:s,end:c}}function V(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function H(e,t,n){if(t.length===0)return null;let r=fe(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=S(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=B(e.text,t,n);return r===null?null:V(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||S(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=x({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,r[0])}let l=[],u=-1;for(let t of r){let n=b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,l[0])}var U=64;function pe(e,t,n){return{prefix:y(e,Math.max(0,t-U),t),suffix:y(e,n,Math.min(e.content.size,n+U))}}function W(e,t,n){return G(e)(t,n)}function G(e){let t=z(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=z(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var me=220,he=24;function ge(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-me;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+he)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,t,r,i){let a=O(e);if(!a)return!1;let o=K(a.dom);if(!o)return n(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(t.from),c=a.coordsAtPos(t.to)}catch{return!1}let l=o.getBoundingClientRect(),u=ge({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:q(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return n(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var _e=1e4,ve=80,ye=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function be(e){let n=!1,i=null,s=null,l=-1,u=()=>{let a=c(e.docName);if(!a||a.isDestroyed)return!1;if(n||(n=!0,r(e.threadId)),e.quote===``)return i===null&&(i=Date.now(),t(e.threadId)),!0;let o=a.state.doc.content.size;return(s===null||o!==l)&&(s=W(a.state.doc,e.quote,e.context),l=o),!s||!J(a,s,e.docName,{instant:!0})?!1:(i===null&&(i=Date.now(),t(e.threadId)),!0)};o(`comments`),u(),c(e.docName)===null&&window.location.assign(te(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Y)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&i!==null&&Date.now()-i>=ye&&f()},h=a(m),g=window.setInterval(m,ve),_=window.setTimeout(()=>{i===null&&w.error(n?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},_e);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function xe(){return s().length}function Se(){let e=(0,A.c)(4),t=s(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=i(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let r;return e[2]===n?r=e[3]:(r=[...n].map(Ce),e[2]=n,e[3]=r),r}function Ce(e){let[t,n]=e;return{docName:t,count:n}}function we(e){let t=(0,A.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=d();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=p(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,X.jsx)(E,{className:`size-3`}),i=(0,X.jsx)(u,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=p(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=f):f=t[10];let v;t[11]===l?v=t[12]:(v=l({id:`2zvUIK`}),t[11]=l,t[12]=v);let y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(k,{className:`size-3`}),t[13]=y):y=t[13];let b;t[14]!==n||t[15]!==c.length?(b=c.length>1?(0,X.jsx)(u,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=b):b=t[16];let x;t[17]!==v||t[18]!==b?(x=(0,X.jsx)(h,{asChild:!0,children:(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":v,onClick:Ee,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[y,b]})}),t[17]=v,t[18]=b,t[19]=x):x=t[19];let S;t[20]===c?S=t[21]:(S=(0,X.jsx)(g,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Te)}):(0,X.jsx)(u,{id:`2zvUIK`})}),t[20]=c,t[21]=S);let C;t[22]!==x||t[23]!==S?(C=(0,X.jsxs)(_,{children:[x,S]}),t[22]=x,t[23]=S,t[24]=C):C=t[24];let w;t[25]===l?w=t[26]:(w=l({id:`pFRz_E`}),t[25]=l,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(ee,{className:`size-3`}),t[27]=T):T=t[27];let D;t[28]!==o||t[29]!==w?(D=(0,X.jsx)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":w,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:T}),t[28]=o,t[29]=w,t[30]=D):D=t[30];let O;return t[31]!==D||t[32]!==C?(O=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:f,children:[C,D]}),t[31]=D,t[32]=C,t[33]=O):O=t[33],O}function Te(e){return(0,X.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,X.jsx)(`span`,{className:`truncate`,children:Z(e.docName)})]},e.docName)}function Ee(){return l()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Q(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function De(e){be({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{L({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Oe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Oe=30;function ke(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ae(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function je(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Me(e){if(!e.repeats)return null;let t=Ae(e.prefix),n=je(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ne(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
1
|
+
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Fr as t,Nn as n,Pr as r,Vr as i,Yn as a,di as o,ii as s,qn as c,si as l}from"./DocumentContext-BKydxNvt.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{t as p}from"./utils-CPqDy6Hr.js";import{t as m}from"./button-Cym3gapE.js";import{i as h,n as g,t as _}from"./tooltip-DttaCTqz.js";import{Bi as v,Bn as y,nr as b,tr as x,yr as S,zn as C}from"./dist-D9bF1HlE.js";import{n as w}from"./dist-CJhtNlOm2.js";import{t as T}from"./dist-Cr4-nBVI.js";import{i as E}from"./local-menu-action-bus-4I1Xm40D.js";import{t as D}from"./createLucideIcon-B6ULg5PN.js";import{Et as O}from"./CodeMirrorPropInput-DZ37msDr.js";import{t as ee}from"./x-CnGRb1ER.js";import{l as te}from"./doc-hash-8FM9bAVM.js";var k=D(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),A=f(),j=`var(--ok-comment-hue,37,99,235)`,ne=j,re={fill:.22,line:.7},ie={fill:.45,line:1},ae=.45;function oe(e,t){let n=ne,{fill:r,line:i}=t?ie:re;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function M(e){return e.map(e=>e.id??`·`).join(`|`)}function se(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function N(e,t){return e.id===null||e.id===t}function ce(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>N(e,t));i.push({from:a.from,to:a.to,style:oe(e??a.covering[0],e!==void 0),threadId:se(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&M(a.covering)===M(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var P=`data-comment-reveal`;function F(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function I(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${F(e)}"]`)}function le(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ue(e){I(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function L(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${F(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=R(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),de(n),!0}return!1}function R(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function de(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${j},${ae})`),e.setAttribute(P,`true`);let t=()=>{e.removeAttribute(P),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function z(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=C(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function fe(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function B(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:S(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:S(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=v(t.length);return c-s>l?null:{start:s,end:c}}function V(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function H(e,t,n){if(t.length===0)return null;let r=fe(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=S(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=B(e.text,t,n);return r===null?null:V(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||S(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=x({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,r[0])}let l=[],u=-1;for(let t of r){let n=b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,l[0])}var U=64;function pe(e,t,n){return{prefix:y(e,Math.max(0,t-U),t),suffix:y(e,n,Math.min(e.content.size,n+U))}}function W(e,t,n){return G(e)(t,n)}function G(e){let t=z(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=z(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var me=220,he=24;function ge(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-me;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+he)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,t,r,i){let a=O(e);if(!a)return!1;let o=K(a.dom);if(!o)return n(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(t.from),c=a.coordsAtPos(t.to)}catch{return!1}let l=o.getBoundingClientRect(),u=ge({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:q(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return n(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var _e=1e4,ve=80,ye=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function be(e){let n=!1,i=null,s=null,l=-1,u=()=>{let a=c(e.docName);if(!a||a.isDestroyed)return!1;if(n||(n=!0,r(e.threadId)),e.quote===``)return i===null&&(i=Date.now(),t(e.threadId)),!0;let o=a.state.doc.content.size;return(s===null||o!==l)&&(s=W(a.state.doc,e.quote,e.context),l=o),!s||!J(a,s,e.docName,{instant:!0})?!1:(i===null&&(i=Date.now(),t(e.threadId)),!0)};o(`comments`),u(),c(e.docName)===null&&window.location.assign(te(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Y)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&i!==null&&Date.now()-i>=ye&&f()},h=a(m),g=window.setInterval(m,ve),_=window.setTimeout(()=>{i===null&&w.error(n?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},_e);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function xe(){return s().length}function Se(){let e=(0,A.c)(4),t=s(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=i(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let r;return e[2]===n?r=e[3]:(r=[...n].map(Ce),e[2]=n,e[3]=r),r}function Ce(e){let[t,n]=e;return{docName:t,count:n}}function we(e){let t=(0,A.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=d();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=p(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,X.jsx)(E,{className:`size-3`}),i=(0,X.jsx)(u,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=p(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=f):f=t[10];let v;t[11]===l?v=t[12]:(v=l({id:`2zvUIK`}),t[11]=l,t[12]=v);let y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(k,{className:`size-3`}),t[13]=y):y=t[13];let b;t[14]!==n||t[15]!==c.length?(b=c.length>1?(0,X.jsx)(u,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=b):b=t[16];let x;t[17]!==v||t[18]!==b?(x=(0,X.jsx)(h,{asChild:!0,children:(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":v,onClick:Ee,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[y,b]})}),t[17]=v,t[18]=b,t[19]=x):x=t[19];let S;t[20]===c?S=t[21]:(S=(0,X.jsx)(g,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Te)}):(0,X.jsx)(u,{id:`2zvUIK`})}),t[20]=c,t[21]=S);let C;t[22]!==x||t[23]!==S?(C=(0,X.jsxs)(_,{children:[x,S]}),t[22]=x,t[23]=S,t[24]=C):C=t[24];let w;t[25]===l?w=t[26]:(w=l({id:`pFRz_E`}),t[25]=l,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(ee,{className:`size-3`}),t[27]=T):T=t[27];let D;t[28]!==o||t[29]!==w?(D=(0,X.jsx)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":w,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:T}),t[28]=o,t[29]=w,t[30]=D):D=t[30];let O;return t[31]!==D||t[32]!==C?(O=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:f,children:[C,D]}),t[31]=D,t[32]=C,t[33]=O):O=t[33],O}function Te(e){return(0,X.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,X.jsx)(`span`,{className:`truncate`,children:Z(e.docName)})]},e.docName)}function Ee(){return l()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Q(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function De(e){be({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{L({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Oe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Oe=30;function ke(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ae(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function je(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Me(e){if(!e.repeats)return null;let t=Ae(e.prefix),n=je(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ne(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
2
2
|
`))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
|
|
3
3
|
`))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=Me(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
|
|
4
4
|
`))i.push(`> ${e}`)}return i.join(`
|