@inkeep/open-knowledge 0.56.0 → 0.58.0-beta.0

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.
Files changed (165) hide show
  1. package/dist/{acp-harness-probe-CW_nXSWP.mjs → acp-harness-probe-C81MseWi.mjs} +2 -2
  2. package/dist/cli.mjs +6 -6
  3. package/dist/config-schema.json +2 -1
  4. package/dist/config.user.schema.json +2 -1
  5. package/dist/constants-KQqlCqby.mjs +2 -0
  6. package/dist/fs-traced-BEuPZxxL.mjs +1 -0
  7. package/dist/{fs-traced-uUie5siN.mjs → fs-traced-xJfl5Rxd.mjs} +2 -2
  8. package/dist/{git-handle-BI3zkVk-.mjs → git-handle-B0tCzHAN.mjs} +2 -2
  9. package/dist/git-handle-DQRBUWfE.mjs +1 -0
  10. package/dist/index.d.mts +2 -1
  11. package/dist/index.mjs +2 -2
  12. package/dist/init-CN9hVk4i.mjs +1 -0
  13. package/dist/{init--f4zFUMB.mjs → init-DsYoP76e.mjs} +3 -3
  14. package/dist/{launch-json-removal-CfLRLAib.mjs → launch-json-removal-eC8G1wb1.mjs} +2 -2
  15. package/dist/loader-96qtkdFs.mjs +1 -0
  16. package/dist/{loader-B4KkmTuM.mjs → loader-DA2uxgAD.mjs} +2 -2
  17. package/dist/md-manager-IForifhX.mjs +2 -0
  18. package/dist/{open-browser-CvutfNRO.mjs → open-browser-B3YQRXop.mjs} +2 -2
  19. package/dist/parse-worker.mjs +1 -1
  20. package/dist/{preview-BbBZEvyk.mjs → preview-BYiBtNwO.mjs} +2 -2
  21. package/dist/preview-DOK0jq1H.mjs +1 -0
  22. package/dist/public/assets/{ActivityModeContent-CuxM2GI1.js → ActivityModeContent-DpWNwM6n.js} +1 -1
  23. package/dist/public/assets/{AgentDiffPane-CAsMvyqx.js → AgentDiffPane-vuhizpEd.js} +1 -1
  24. package/dist/public/assets/{AgentThreadClientBinder-FSBCMKY3.js → AgentThreadClientBinder-ChxqWHn_.js} +1 -1
  25. package/dist/public/assets/{CodeMirrorPropInput-Cw0ePGRQ.js → CodeMirrorPropInput-3xTSMwVk.js} +2 -2
  26. package/dist/public/assets/{DocumentContext-BOGc7fjB.js → DocumentContext-CHPcruUq.js} +1 -1
  27. package/dist/public/assets/{EditorModeToggle-DDFDVZ-W.js → EditorModeToggle-CwqwRfuU.js} +1 -1
  28. package/dist/public/assets/{EnableSyncConfirmDialog-rACItPww.js → EnableSyncConfirmDialog-BGsAPro5.js} +1 -1
  29. package/dist/public/assets/FeedbackForm-Cc58Nk7P.js +1 -0
  30. package/dist/public/assets/{GraphPanel--hj263vb.js → GraphPanel-COPEU9QX.js} +1 -1
  31. package/dist/public/assets/{ImportSkillDialog-Dip726xX.js → ImportSkillDialog-DqCi6EGK.js} +1 -1
  32. package/dist/public/assets/{LintConfigEditor-mJ7Vq7Gu.js → LintConfigEditor-BwsiJDfg.js} +1 -1
  33. package/dist/public/assets/ManagedArtifactProperties-6zQd8tBx.js +1 -0
  34. package/dist/public/assets/{ManagedArtifactProperties-CM_NiJGd.js → ManagedArtifactProperties-v6Fpk3Fo.js} +1 -1
  35. package/dist/public/assets/{McpConsentDialogBody-BAZN_O20.js → McpConsentDialogBody-CVb-mMB8.js} +1 -1
  36. package/dist/public/assets/{MermaidDocEditor-B1RjPntQ.js → MermaidDocEditor-6MtXqzan.js} +1 -1
  37. package/dist/public/assets/{PropertyDisplayRow-BUTotMt7.js → PropertyDisplayRow-DqvVKGtH.js} +1 -1
  38. package/dist/public/assets/{ReportBugDialogBody-CBkRZUpU.js → ReportBugDialogBody-Ajl3p6In.js} +1 -1
  39. package/dist/public/assets/{SchemaConfigEditor-DlZiHNGy.js → SchemaConfigEditor-BsE7oA0r.js} +1 -1
  40. package/dist/public/assets/{SessionsHost-Dmk8ARcn.js → SessionsHost-CUgKgDkz.js} +2 -2
  41. package/dist/public/assets/SettingsDialogBody-BwytOGSu.js +12 -0
  42. package/dist/public/assets/{ShareBranchSwitchDialog-BNq_3Gef.js → ShareBranchSwitchDialog-oqH7CVAK.js} +1 -1
  43. package/dist/public/assets/{ShareReceiveDialog-B5FddHIB.js → ShareReceiveDialog-qvhiGzxM.js} +1 -1
  44. package/dist/public/assets/{ShareReceiveMissDialog-DJsrMn_9.js → ShareReceiveMissDialog-CA3y3xQf.js} +1 -1
  45. package/dist/public/assets/{SkillEditBanner-BW2VDVIo.js → SkillEditBanner-C2NwXGwp.js} +1 -1
  46. package/dist/public/assets/{SkillInstallMenu-CxQT1ld3.js → SkillInstallMenu-BgV-kMhM.js} +3 -3
  47. package/dist/public/assets/{SkillOriginInline-DUXTbZ1I.js → SkillOriginInline-Bfr_LvLW.js} +1 -1
  48. package/dist/public/assets/{SkillToolbarControls-DZaJ1ZyP.js → SkillToolbarControls-Dod_5zs_.js} +1 -1
  49. package/dist/public/assets/{SlidesToolbarControls-DNGBygyg.js → SlidesToolbarControls-Cib12Sqv.js} +1 -1
  50. package/dist/public/assets/{SourceEditor-HnDtiE3q.js → SourceEditor-CNg6hcSq.js} +1 -1
  51. package/dist/public/assets/{TerminalPanel-18X_ZMlO.js → TerminalPanel-CyjfYWsq.js} +1 -1
  52. package/dist/public/assets/{TerminalWindowApp-B6mvY0PM.js → TerminalWindowApp-Ce4imhj9.js} +1 -1
  53. package/dist/public/assets/{TextDocEditor-BpXrF4Sq.js → TextDocEditor-CTZRYi5V.js} +1 -1
  54. package/dist/public/assets/{ThreadView-CuvPDOR2.js → ThreadView-CI9w5I4i.js} +1 -1
  55. package/dist/public/assets/{TimelineDiffPane-BEO6_jvM.js → TimelineDiffPane-m1We7iSj.js} +1 -1
  56. package/dist/public/assets/{agent-diff-store-DuZJJ7Ci.js → agent-diff-store-Bxwv7QUN.js} +1 -1
  57. package/dist/public/assets/{auth-state-cache-CHAm12x1.js → auth-state-cache-CxjHGWZm.js} +1 -1
  58. package/dist/public/assets/client-version-5Ke_ACOR.js +1 -0
  59. package/dist/public/assets/{comment-chips-0OZCB2iB.js → comment-chips-ChCY4B1k.js} +1 -1
  60. package/dist/public/assets/{config-provider-Cgwz6Lof.js → config-provider-Cow2MOvb.js} +3 -3
  61. package/dist/public/assets/{dist-A3OTH2KL2.js → dist-COv61_fZ2.js} +2 -2
  62. package/dist/public/assets/{doc-paths-BABCQ0wh.js → doc-paths-7BigDJzU.js} +1 -1
  63. package/dist/public/assets/{documents-events-CK6j9M45.js → documents-events-BG9v7ZR8.js} +1 -1
  64. package/dist/public/assets/{file-tree-adapter-DcrKUDBN.js → file-tree-adapter-BaT9ZAI6.js} +1 -1
  65. package/dist/public/assets/{file-tree-utils-CJ-q2ioX.js → file-tree-utils-BnMWB0rN.js} +1 -1
  66. package/dist/public/assets/{folder-config-api-CjDyND9I.js → folder-config-api-CspTyRPC.js} +1 -1
  67. package/dist/public/assets/{follow-file-DAdcgwn_.js → follow-file-CfdGzNSh.js} +1 -1
  68. package/dist/public/assets/i18n-DtNuevxm.js +1 -0
  69. package/dist/public/assets/{index-aXt_JWZ2.js → index-Cp5x9JeS.js} +7 -7
  70. package/dist/public/assets/{lint-config-client-Ci5UGAFH.js → lint-config-client-D4Gin48u.js} +1 -1
  71. package/dist/public/assets/{markdownlint-rule-browser-6w4wGoBF.js → markdownlint-rule-browser-qdlEJqGK.js} +1 -1
  72. package/dist/public/assets/messages-B-36DfpF.js +1 -0
  73. package/dist/public/assets/messages-BYJHcIk0.js +1 -0
  74. package/dist/public/assets/messages-BaI5ubzY.js +1 -0
  75. package/dist/public/assets/messages-BhNfOuoD.js +1 -0
  76. package/dist/public/assets/messages-CIAvaKgB.js +1 -0
  77. package/dist/public/assets/messages-COdCL7Ya.js +1 -0
  78. package/dist/public/assets/messages-CPWYTaHY.js +1 -0
  79. package/dist/public/assets/messages-Dtcb5u8J.js +1 -0
  80. package/dist/public/assets/messages-Kwe4pdGx.js +1 -0
  81. package/dist/public/assets/messages-PZjg3eYF.js +1 -0
  82. package/dist/public/assets/messages-rCGMF4pK.js +1 -0
  83. package/dist/public/assets/messages-xnmpxMsz.js +1 -0
  84. package/dist/public/assets/{navigation-targets-Cq8reTNr.js → navigation-targets-BlmF0SDc.js} +1 -1
  85. package/dist/public/assets/{open-managed-artifact-tab-WbPC9lqJ.js → open-managed-artifact-tab-DyQLDLZu.js} +1 -1
  86. package/dist/public/assets/{pending-receive-nav-store-DWYln4pm.js → pending-receive-nav-store-BP3YcKOH.js} +1 -1
  87. package/dist/public/assets/{prop-types-JZyx8uP_.js → prop-types-x3L5Ba9q.js} +1 -1
  88. package/dist/public/assets/{receive-store-Bq6Ld9zP.js → receive-store-DyKO2VJp.js} +1 -1
  89. package/dist/public/assets/{selection-context-h9OrguDp.js → selection-context-BdxcxNyo.js} +1 -1
  90. package/dist/public/assets/{skill-actions-P6hLIq0o.js → skill-actions-DFktYEsA.js} +1 -1
  91. package/dist/public/assets/{skill-scope-CbkpErsk.js → skill-scope-Dvl0F_Nc.js} +1 -1
  92. package/dist/public/assets/{skills-api-C_ayTuhp.js → skills-api-D3yktqw_.js} +1 -1
  93. package/dist/public/assets/{src-BdAe1iLc.js → src-CiwcnlkH.js} +1 -1
  94. package/dist/public/assets/{tag-pill-input-Bl7OJSC_.js → tag-pill-input-B-KJK7ye.js} +1 -1
  95. package/dist/public/assets/{target-navigation-intent-BBy6G0-P.js → target-navigation-intent-Cq4g4MwT.js} +1 -1
  96. package/dist/public/assets/{telemetry-impl-BXKSOWP8.js → telemetry-impl-aSUUu3k2.js} +2 -2
  97. package/dist/public/assets/{telemetry-startup-BbS8KkvZ.js → telemetry-startup-D6l5t8d3.js} +1 -1
  98. package/dist/public/assets/{terminal-cli-display-_UKgGxrA.js → terminal-cli-display-CpAOcb2j.js} +1 -1
  99. package/dist/public/assets/{terminal-launch-events-gIAwvS38.js → terminal-launch-events-mKO9oOVx.js} +1 -1
  100. package/dist/public/assets/terminal-telemetry-zuOv8zuu.js +1 -0
  101. package/dist/public/assets/{typing-burst-detector-ClR2eDHr.js → typing-burst-detector-0Kh3NkMo.js} +1 -1
  102. package/dist/public/assets/{uninstall-CKF78F-5.js → uninstall-Cq81zlCV.js} +1 -1
  103. package/dist/public/assets/{use-activity-panel-yqtV5LnI.js → use-activity-panel-9LDeBM04.js} +1 -1
  104. package/dist/public/assets/{use-apply-config-color-theme-BIhgV6Ch.js → use-apply-config-color-theme-B1zL7AB7.js} +1 -1
  105. package/dist/public/assets/{use-collab-url-Cp-Rj0bC.js → use-collab-url-CBEaRBLp.js} +1 -1
  106. package/dist/public/assets/{use-live-xterm-theme-BT8isURw.js → use-live-xterm-theme-Bg0pl-eA.js} +1 -1
  107. package/dist/public/assets/{use-open-skill-D96TChRC.js → use-open-skill-BJyEtUo4.js} +1 -1
  108. package/dist/public/assets/{use-popular-skills-BvPp-gxD.js → use-popular-skills-DmIQH2eT.js} +1 -1
  109. package/dist/public/assets/{use-settings-route-BNd_oo0M.js → use-settings-route-CQWgqLVD.js} +1 -1
  110. package/dist/public/assets/{use-skill-origin-BenKziPn.js → use-skill-origin-DschKPDB.js} +1 -1
  111. package/dist/public/assets/{use-skills-bayaEv_Y.js → use-skills-RGrgR7Ae.js} +1 -1
  112. package/dist/public/assets/{use-terminal-enabled-CX-aqvuQ.js → use-terminal-enabled-CC64PnYB.js} +1 -1
  113. package/dist/public/assets/{use-timeline-entry-diff-BbNfyqQd.js → use-timeline-entry-diff-CbaYxlTE.js} +1 -1
  114. package/dist/public/assets/{use-workspace-tdp7vU_c.js → use-workspace-CTox7-Ea.js} +1 -1
  115. package/dist/public/index.html +46 -46
  116. package/dist/public/uninstall.html +4 -4
  117. package/dist/{repair-launch-json-Z9hZ2Ecf.mjs → repair-launch-json-CW1yfrNA.mjs} +2 -2
  118. package/dist/{repair-mcp-configs-BFWH-O-X.mjs → repair-mcp-configs-BqKBiNtK.mjs} +2 -2
  119. package/dist/repair-skills-BzuY54h2.mjs +1 -0
  120. package/dist/{repair-skills-GEvrJzaq.mjs → repair-skills-D-WezUYL.mjs} +2 -2
  121. package/dist/schemas/v0/config.user.schema.json +2 -1
  122. package/dist/{server-lock-C-cXu0qQ.mjs → server-lock-BHY1C3dW.mjs} +2 -2
  123. package/dist/server-lock-CXt9yQWS.mjs +1 -0
  124. package/dist/{skill-teardown-D1piAzOB.mjs → skill-teardown-C5wK_7-E.mjs} +2 -2
  125. package/dist/{sleep-OHCt3UoV.mjs → sleep-D_nNc7T_.mjs} +2 -2
  126. package/dist/src-BtDCSEOa.mjs +1 -0
  127. package/dist/{src-DHp3eXPs.mjs → src-Bw_6oq5M.mjs} +1 -1
  128. package/dist/{src-DQgEWrUq.mjs → src-DMi2O7yV.mjs} +2 -2
  129. package/dist/src-DoyY0aGc.mjs +2017 -0
  130. package/dist/{src-BljoChXq.mjs → src-hSizEeWj.mjs} +2 -2
  131. package/dist/{start-Byz-i73C.mjs → start-B_8D33Kj.mjs} +4 -4
  132. package/dist/start-D-mZWiuS.mjs +1 -0
  133. package/dist/{ui-vKry5mIJ.mjs → ui-CDGZp9uY.mjs} +3 -3
  134. package/dist/{write-project-skill-BfsBXTaY.mjs → write-project-skill-CqUFi6y1.mjs} +2 -2
  135. package/package.json +4 -4
  136. package/dist/constants-C0QuALA7.mjs +0 -2
  137. package/dist/fs-traced-DN8Ne6OV.mjs +0 -1
  138. package/dist/git-handle-Bo4ytezq.mjs +0 -1
  139. package/dist/init-yZIwxM4j.mjs +0 -1
  140. package/dist/loader-fKOwJB6S.mjs +0 -1
  141. package/dist/md-manager-Q1tI0hzy.mjs +0 -2
  142. package/dist/preview-ssmwZAWL.mjs +0 -1
  143. package/dist/public/assets/FeedbackForm-Cg1ck408.js +0 -1
  144. package/dist/public/assets/ManagedArtifactProperties-DChOnvya.js +0 -1
  145. package/dist/public/assets/SettingsDialogBody-DboXXu3o.js +0 -12
  146. package/dist/public/assets/client-version-xTNgCY5Y.js +0 -1
  147. package/dist/public/assets/i18n-BYT2p-2f.js +0 -1
  148. package/dist/public/assets/messages--jxWd8S9.js +0 -1
  149. package/dist/public/assets/messages-AeBLaR0m.js +0 -1
  150. package/dist/public/assets/messages-B0JNOJmY.js +0 -1
  151. package/dist/public/assets/messages-B2eEA6Eu.js +0 -1
  152. package/dist/public/assets/messages-Cc-y5Qm7.js +0 -1
  153. package/dist/public/assets/messages-CzCSQgXH.js +0 -1
  154. package/dist/public/assets/messages-D4ZMaS59.js +0 -1
  155. package/dist/public/assets/messages-DE2yRe7p.js +0 -1
  156. package/dist/public/assets/messages-Svp7hzk5.js +0 -1
  157. package/dist/public/assets/messages-pZwFjfzt.js +0 -1
  158. package/dist/public/assets/messages-xE4lQcWR.js +0 -1
  159. package/dist/public/assets/terminal-telemetry-BoIx62eZ.js +0 -1
  160. package/dist/repair-skills-dpqiLSBb.mjs +0 -1
  161. package/dist/server-lock-BJIPnZ6Y.mjs +0 -1
  162. package/dist/src-BtcwR3z-.mjs +0 -1
  163. package/dist/src-Dhqa-DT-.mjs +0 -2017
  164. package/dist/start-wRJOuq9q.mjs +0 -1
  165. /package/dist/public/assets/{__vite-browser-external-DD8Jl_VU.js → __vite-browser-external-N4Ia604h.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Fr as t,Mr as n,Sn as r,ar as i,bn as a,fr as o,in as s,kr as c,or as l,un as u}from"./DocumentContext-BOGc7fjB.js";import{n as d,r as f}from"./dist-Nvb76hAm.js";import{t as p}from"./compiler-runtime-BfE3aGVn.js";import{c as m}from"./local-menu-action-bus-DLBgRRdU.js";import{t as h}from"./utils-CPqDy6Hr.js";import{t as g}from"./button-CA0dewJJ.js";import{i as _,n as ee,t as te}from"./tooltip-DHXgxWLL.js";import{nt as v}from"./CodeMirrorPropInput-Cw0ePGRQ.js";import{Di as y,Jn as b,Mn as x,Nn as S,Yn as C,dr as w}from"./dist-A3OTH2KL2.js";import{t as T}from"./dist-DoS8xGN6.js";import{n as E}from"./dist-BLaUOTRG.js";import{t as ne}from"./createLucideIcon-6iYxif1u.js";import{t as re}from"./x-CSyDwLV0.js";import{f as ie}from"./doc-paths-BABCQ0wh.js";var D=ne(`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`}]]),O=p(),k=`245,158,11`,ae=k,oe={fill:.22,line:.7},A={fill:.45,line:1},se=.45;function ce(e,t){let n=ae,{fill:r,line:i}=t?A:oe;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 j(e){return e.map(e=>e.id??`·`).join(`|`)}function le(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 ue(e,t){return e.id===null||e.id===t}function de(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=>ue(e,t));i.push({from:a.from,to:a.to,style:ce(e??a.covering[0],e!==void 0),threadId:le(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&&j(a.covering)===j(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var M=`data-comment-reveal`;function N(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function P(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${N(e)}"]`)}function fe(e){let t=P(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function pe(e){P(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function F(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="${N(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=I(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),me(n),!0}return!1}function I(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 me(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${k},${se})`),e.setAttribute(M,`true`);let t=()=>{e.removeAttribute(M),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 L(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=x(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 R(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 z(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:w(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:w(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=y(t.length);return c-s>l?null:{start:s,end:c}}function B(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 V(e,t,n){if(t.length===0)return null;let r=R(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=w(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=z(e.text,t,n);return r===null?null:B(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||w(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=b({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||C(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,r[0])}let l=[],u=-1;for(let t of r){let n=C(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=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,l[0])}var H=64;function he(e,t,n){return{prefix:S(e,Math.max(0,t-H),t),suffix:S(e,n,Math.min(e.content.size,n+H))}}function U(e,t,n){return W(e)(t,n)}function W(e){let t=L(e),n=null;return(r,i)=>{let a=V(t,r,i);return a===null?(n??=L(e,{includeBlockComponents:!0}),V(n,r,i)):a}}var ge=220,_e=24,ve=600;function G(e,t){return u(e,()=>{let n=s(e);t(),window.setTimeout(()=>n.release(),ve)})}function ye(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-ge;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+_e)}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,n,r){let i=v(e);if(!i)return!1;let a=K(i.dom);if(!a)return G(n,()=>e.commands.scrollIntoView());let o,s;try{o=i.coordsAtPos(t.from),s=i.coordsAtPos(t.to)}catch{return!1}let c=a.getBoundingClientRect(),l=ye({anchorTop:o.top,anchorBottom:Math.max(o.bottom,s.bottom),viewTop:c.top,viewBottom:c.bottom,insetTop:q(a)});if(l===0)return!0;let u=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return G(n,()=>a.scrollTo({top:a.scrollTop+l,behavior:r?.instant||u?`auto`:`smooth`}))}var be=1e4,xe=80,Se=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function Ce(e){let n=!1,o=null,s=null,c=-1,u=()=>{let t=a(e.docName);if(!t||t.isDestroyed)return!1;if(n||(n=!0,i(e.threadId)),e.quote===``)return o===null&&(o=Date.now(),l(e.threadId)),!0;let r=t.state.doc.content.size;return(s===null||r!==c)&&(s=U(t.state.doc,e.quote,e.context),c=r),!s||!J(t,s,e.docName,{instant:!0})?!1:(o===null&&(o=Date.now(),l(e.threadId)),!0)};t(`comments`),u(),a(e.docName)===null&&window.location.assign(ie(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()&&o!==null&&Date.now()-o>=Se&&f()},h=r(m),g=window.setInterval(m,xe),_=window.setTimeout(()=>{o===null&&E.error(n?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},be);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function we(){return c().length}function Te(){let e=(0,O.c)(4),t=c(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=o(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(Ee),e[2]=n,e[3]=r),r}function Ee(e){let[t,n]=e;return{docName:t,count:n}}function De(e){let t=(0,O.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}=f();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=h(`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)(m,{className:`size-3`}),i=(0,X.jsx)(d,{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)(g,{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 u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=h(`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]=u):u=t[10];let p;t[11]===l?p=t[12]:(p=l({id:`2zvUIK`}),t[11]=l,t[12]=p);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(D,{className:`size-3`}),t[13]=v):v=t[13];let y;t[14]!==n||t[15]!==c.length?(y=c.length>1?(0,X.jsx)(d,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(d,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=y):y=t[16];let b;t[17]!==p||t[18]!==y?(b=(0,X.jsx)(_,{asChild:!0,children:(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":p,onClick:ke,"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:[v,y]})}),t[17]=p,t[18]=y,t[19]=b):b=t[19];let x;t[20]===c?x=t[21]:(x=(0,X.jsx)(ee,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Oe)}):(0,X.jsx)(d,{id:`2zvUIK`})}),t[20]=c,t[21]=x);let S;t[22]!==b||t[23]!==x?(S=(0,X.jsxs)(te,{children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24];let C;t[25]===l?C=t[26]:(C=l({id:`pFRz_E`}),t[25]=l,t[26]=C);let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(re,{className:`size-3`}),t[27]=w):w=t[27];let T;t[28]!==o||t[29]!==C?(T=(0,X.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":C,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:w}),t[28]=o,t[29]=C,t[30]=T):T=t[30];let E;return t[31]!==T||t[32]!==S?(E=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:u,children:[S,T]}),t[31]=T,t[32]=S,t[33]=E):E=t[33],E}function Oe(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 ke(){return n()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Ae(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function je(e){Ce({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=()=>{F({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Q)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Q=30;function Me(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 Ne(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Pe(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Fe(e){if(!e.repeats)return null;let t=Ne(e.prefix),n=Pe(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 Ie(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,Mr as n,Sn as r,ar as i,bn as a,fr as o,in as s,kr as c,or as l,un as u}from"./DocumentContext-CHPcruUq.js";import{n as d,r as f}from"./dist-Nvb76hAm.js";import{t as p}from"./compiler-runtime-BfE3aGVn.js";import{c as m}from"./local-menu-action-bus-DLBgRRdU.js";import{t as h}from"./utils-CPqDy6Hr.js";import{t as g}from"./button-CA0dewJJ.js";import{i as _,n as ee,t as te}from"./tooltip-DHXgxWLL.js";import{nt as v}from"./CodeMirrorPropInput-3xTSMwVk.js";import{Di as y,Jn as b,Mn as x,Nn as S,Yn as C,dr as w}from"./dist-COv61_fZ2.js";import{t as T}from"./dist-DoS8xGN6.js";import{n as E}from"./dist-BLaUOTRG.js";import{t as ne}from"./createLucideIcon-6iYxif1u.js";import{t as re}from"./x-CSyDwLV0.js";import{f as ie}from"./doc-paths-7BigDJzU.js";var D=ne(`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`}]]),O=p(),k=`245,158,11`,ae=k,oe={fill:.22,line:.7},A={fill:.45,line:1},se=.45;function ce(e,t){let n=ae,{fill:r,line:i}=t?A:oe;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 j(e){return e.map(e=>e.id??`·`).join(`|`)}function le(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 ue(e,t){return e.id===null||e.id===t}function de(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=>ue(e,t));i.push({from:a.from,to:a.to,style:ce(e??a.covering[0],e!==void 0),threadId:le(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&&j(a.covering)===j(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var M=`data-comment-reveal`;function N(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function P(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${N(e)}"]`)}function fe(e){let t=P(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function pe(e){P(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function F(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="${N(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=I(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),me(n),!0}return!1}function I(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 me(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${k},${se})`),e.setAttribute(M,`true`);let t=()=>{e.removeAttribute(M),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 L(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=x(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 R(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 z(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:w(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:w(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=y(t.length);return c-s>l?null:{start:s,end:c}}function B(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 V(e,t,n){if(t.length===0)return null;let r=R(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=w(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=z(e.text,t,n);return r===null?null:B(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||w(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=b({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||C(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,r[0])}let l=[],u=-1;for(let t of r){let n=C(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=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,l[0])}var H=64;function he(e,t,n){return{prefix:S(e,Math.max(0,t-H),t),suffix:S(e,n,Math.min(e.content.size,n+H))}}function U(e,t,n){return W(e)(t,n)}function W(e){let t=L(e),n=null;return(r,i)=>{let a=V(t,r,i);return a===null?(n??=L(e,{includeBlockComponents:!0}),V(n,r,i)):a}}var ge=220,_e=24,ve=600;function G(e,t){return u(e,()=>{let n=s(e);t(),window.setTimeout(()=>n.release(),ve)})}function ye(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-ge;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+_e)}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,n,r){let i=v(e);if(!i)return!1;let a=K(i.dom);if(!a)return G(n,()=>e.commands.scrollIntoView());let o,s;try{o=i.coordsAtPos(t.from),s=i.coordsAtPos(t.to)}catch{return!1}let c=a.getBoundingClientRect(),l=ye({anchorTop:o.top,anchorBottom:Math.max(o.bottom,s.bottom),viewTop:c.top,viewBottom:c.bottom,insetTop:q(a)});if(l===0)return!0;let u=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return G(n,()=>a.scrollTo({top:a.scrollTop+l,behavior:r?.instant||u?`auto`:`smooth`}))}var be=1e4,xe=80,Se=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function Ce(e){let n=!1,o=null,s=null,c=-1,u=()=>{let t=a(e.docName);if(!t||t.isDestroyed)return!1;if(n||(n=!0,i(e.threadId)),e.quote===``)return o===null&&(o=Date.now(),l(e.threadId)),!0;let r=t.state.doc.content.size;return(s===null||r!==c)&&(s=U(t.state.doc,e.quote,e.context),c=r),!s||!J(t,s,e.docName,{instant:!0})?!1:(o===null&&(o=Date.now(),l(e.threadId)),!0)};t(`comments`),u(),a(e.docName)===null&&window.location.assign(ie(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()&&o!==null&&Date.now()-o>=Se&&f()},h=r(m),g=window.setInterval(m,xe),_=window.setTimeout(()=>{o===null&&E.error(n?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},be);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function we(){return c().length}function Te(){let e=(0,O.c)(4),t=c(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=o(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(Ee),e[2]=n,e[3]=r),r}function Ee(e){let[t,n]=e;return{docName:t,count:n}}function De(e){let t=(0,O.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}=f();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=h(`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)(m,{className:`size-3`}),i=(0,X.jsx)(d,{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)(g,{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 u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=h(`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]=u):u=t[10];let p;t[11]===l?p=t[12]:(p=l({id:`2zvUIK`}),t[11]=l,t[12]=p);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(D,{className:`size-3`}),t[13]=v):v=t[13];let y;t[14]!==n||t[15]!==c.length?(y=c.length>1?(0,X.jsx)(d,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(d,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=y):y=t[16];let b;t[17]!==p||t[18]!==y?(b=(0,X.jsx)(_,{asChild:!0,children:(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":p,onClick:ke,"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:[v,y]})}),t[17]=p,t[18]=y,t[19]=b):b=t[19];let x;t[20]===c?x=t[21]:(x=(0,X.jsx)(ee,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Oe)}):(0,X.jsx)(d,{id:`2zvUIK`})}),t[20]=c,t[21]=x);let S;t[22]!==b||t[23]!==x?(S=(0,X.jsxs)(te,{children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24];let C;t[25]===l?C=t[26]:(C=l({id:`pFRz_E`}),t[25]=l,t[26]=C);let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(re,{className:`size-3`}),t[27]=w):w=t[27];let T;t[28]!==o||t[29]!==C?(T=(0,X.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":C,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:w}),t[28]=o,t[29]=C,t[30]=T):T=t[30];let E;return t[31]!==T||t[32]!==S?(E=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:u,children:[S,T]}),t[31]=T,t[32]=S,t[33]=E):E=t[33],E}function Oe(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 ke(){return n()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Ae(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function je(e){Ce({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=()=>{F({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Q)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Q=30;function Me(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 Ne(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Pe(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Fe(e){if(!e.repeats)return null;let t=Ne(e.prefix),n=Pe(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 Ie(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=Fe(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(`