@inkeep/open-knowledge 0.60.0 → 0.60.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.
Files changed (96) hide show
  1. package/dist/{acp-harness-probe-o_l1Yg2J.mjs → acp-harness-probe-CTmTCFio.mjs} +2 -2
  2. package/dist/cli.mjs +6 -6
  3. package/dist/constants-PaCww95-.mjs +2 -0
  4. package/dist/index.mjs +1 -1
  5. package/dist/init-B7UOvhfD.mjs +1 -0
  6. package/dist/{init-BhSCDOwN.mjs → init-BcaG47lk.mjs} +3 -3
  7. package/dist/{launch-json-removal-CDtK_Ueo.mjs → launch-json-removal-DOgEjqCi.mjs} +2 -2
  8. package/dist/{loader-DGPSAako.mjs → loader-BZ5z0m_f.mjs} +2 -2
  9. package/dist/loader-CE3plnuL.mjs +1 -0
  10. package/dist/preview-DIVx3FCQ.mjs +1 -0
  11. package/dist/{preview-BqINaXr2.mjs → preview-wyCkMlxS.mjs} +2 -2
  12. package/dist/public/assets/{ActivityModeContent-_Kopxpth.js → ActivityModeContent-BH3nUmKi.js} +1 -1
  13. package/dist/public/assets/{AgentDiffPane-C9vavOBW.js → AgentDiffPane-ulYiZICp.js} +1 -1
  14. package/dist/public/assets/{CodeMirrorPropInput-Cw9Wgv0Z.js → CodeMirrorPropInput-D5dluJAa.js} +1 -1
  15. package/dist/public/assets/{DocumentContext-CKBQLPkm.js → DocumentContext-C0nL2SXC.js} +1 -1
  16. package/dist/public/assets/{EditorModeToggle-BO-U-stJ.js → EditorModeToggle-CPc75zv0.js} +1 -1
  17. package/dist/public/assets/{EnableSyncConfirmDialog-OQmj0lgC.js → EnableSyncConfirmDialog-_4B5kdmf.js} +1 -1
  18. package/dist/public/assets/{ExcalidrawDocEditor-XBVeHLJH.js → ExcalidrawDocEditor-C5fCyPDa.js} +1 -1
  19. package/dist/public/assets/FeedbackForm-D_sc5CWU.js +1 -0
  20. package/dist/public/assets/{ImportSkillDialog-JTroqgtg.js → ImportSkillDialog-CfhVYZbV.js} +1 -1
  21. package/dist/public/assets/{LintConfigEditor-Cjn744bz.js → LintConfigEditor-BJZcVBKl.js} +1 -1
  22. package/dist/public/assets/{ManagedArtifactProperties-DnH4WPYi.js → ManagedArtifactProperties-COaU0QeT.js} +1 -1
  23. package/dist/public/assets/ManagedArtifactProperties-DqkbIYRf.js +1 -0
  24. package/dist/public/assets/{MermaidDocEditor-9WKd_xgY.js → MermaidDocEditor-B6o0wQi9.js} +1 -1
  25. package/dist/public/assets/{PropertyDisplayRow-DdhcdIOL.js → PropertyDisplayRow-CRD3p4U5.js} +1 -1
  26. package/dist/public/assets/{SchemaConfigEditor-TJOWgbWx.js → SchemaConfigEditor-DWv0rRAz.js} +1 -1
  27. package/dist/public/assets/{SessionsHost-k_yT98_h.js → SessionsHost-4Dzze9r3.js} +2 -2
  28. package/dist/public/assets/{SettingsDialogBody-Bbaxgaq5.js → SettingsDialogBody-DCoAb0Bd.js} +1 -1
  29. package/dist/public/assets/{ShareReceiveMissDialog-GK2Vx2SV.js → ShareReceiveMissDialog-DUdi0fBR.js} +1 -1
  30. package/dist/public/assets/{SkillInstallMenu-8gIaj3K5.js → SkillInstallMenu-BVG38yZJ.js} +1 -1
  31. package/dist/public/assets/{SkillToolbarControls-DiX-HmhZ.js → SkillToolbarControls-BpFI6ORp.js} +1 -1
  32. package/dist/public/assets/{SourceEditor-Dubsx6EI.js → SourceEditor-DinqAqAo.js} +1 -1
  33. package/dist/public/assets/{TerminalWindowApp-B0XS4Hcx.js → TerminalWindowApp-DQNGwwgH.js} +1 -1
  34. package/dist/public/assets/{TextDocEditor-DwRrVvT6.js → TextDocEditor-CPa4xvfB.js} +1 -1
  35. package/dist/public/assets/ThreadView-kSlERwEa.js +14 -0
  36. package/dist/public/assets/{TimelineDiffPane-CGZJWY1U.js → TimelineDiffPane-DXgcXY3B.js} +1 -1
  37. package/dist/public/assets/{agent-diff-store-CqhHOxEp.js → agent-diff-store-CK_MxQ13.js} +1 -1
  38. package/dist/public/assets/{auth-state-cache-BB3XgwHT.js → auth-state-cache-BIQOr5wy.js} +1 -1
  39. package/dist/public/assets/{comment-chips-q2xW3a4a.js → comment-chips-DS7pK-yD.js} +1 -1
  40. package/dist/public/assets/{config-provider-jTKr3hjM.js → config-provider-mFv1sqH4.js} +3 -3
  41. package/dist/public/assets/i18n-BphO6l4i.js +1 -0
  42. package/dist/public/assets/{index-B4Yy1ZPO.js → index-yY_6Xj9r.js} +7 -7
  43. package/dist/public/assets/messages-C8jffdCe.js +1 -0
  44. package/dist/public/assets/messages-CHwiuY_J.js +1 -0
  45. package/dist/public/assets/messages-CU7VLvME.js +1 -0
  46. package/dist/public/assets/messages-CiFiW58E.js +1 -0
  47. package/dist/public/assets/messages-CjKUNgHP.js +1 -0
  48. package/dist/public/assets/messages-D3MBHECc.js +1 -0
  49. package/dist/public/assets/messages-D9ldJ6Xm.js +1 -0
  50. package/dist/public/assets/messages-DN37a6Ol.js +1 -0
  51. package/dist/public/assets/messages-DdRp2uUH.js +1 -0
  52. package/dist/public/assets/messages-DoKxyRgP.js +1 -0
  53. package/dist/public/assets/messages-J0QBWpSt.js +1 -0
  54. package/dist/public/assets/{messages-C_imTCtv.js → messages-W4EQLozB.js} +1 -1
  55. package/dist/public/assets/{pending-receive-nav-store-D17Qn4Gr.js → pending-receive-nav-store-DY9saaUe.js} +1 -1
  56. package/dist/public/assets/{progress-DphMBTZQ.js → progress-D6Zw3AMw.js} +1 -1
  57. package/dist/public/assets/{selection-context-C2Y6r5R9.js → selection-context-CoupzfPD.js} +1 -1
  58. package/dist/public/assets/{skill-actions-DgO1eUGv.js → skill-actions-D9yzisvl.js} +1 -1
  59. package/dist/public/assets/{src-8kgNVqg9.js → src-7eans9jB.js} +1 -1
  60. package/dist/public/assets/{typing-burst-detector-BQN1kkiQ.js → typing-burst-detector-HcBOgWZw.js} +1 -1
  61. package/dist/public/assets/{uninstall-C_cCW9T6.js → uninstall-OtG696J2.js} +1 -1
  62. package/dist/public/assets/{use-activity-panel-Bf6QGzBV.js → use-activity-panel-DA5KxLH2.js} +1 -1
  63. package/dist/public/assets/{use-open-skill-BCHQBNLa.js → use-open-skill-qA__uomh.js} +1 -1
  64. package/dist/public/assets/{use-popular-skills-CK1_ANLy.js → use-popular-skills-CkOc4ZFI.js} +1 -1
  65. package/dist/public/assets/{use-terminal-enabled-BYaosbiD.js → use-terminal-enabled-mj1HMZEE.js} +1 -1
  66. package/dist/public/assets/{use-timeline-entry-diff-BH3jqpge.js → use-timeline-entry-diff-eQroikMP.js} +1 -1
  67. package/dist/public/index.html +21 -21
  68. package/dist/public/uninstall.html +3 -3
  69. package/dist/{repair-launch-json-CVqY8TPd.mjs → repair-launch-json-lQ3MNndS.mjs} +2 -2
  70. package/dist/{repair-mcp-configs-CzWgYBvX.mjs → repair-mcp-configs-C4fL65Xz.mjs} +2 -2
  71. package/dist/{src-_AYeVekY.mjs → src-DcVEef7Z.mjs} +2 -2
  72. package/dist/src-moIQrzY3.mjs +1 -0
  73. package/dist/start-BmB4MBvz.mjs +1 -0
  74. package/dist/{start-DZKOc5NY.mjs → start-Ckzt4Bnt.mjs} +2 -2
  75. package/package.json +4 -4
  76. package/dist/constants--aRb5VI5.mjs +0 -2
  77. package/dist/init-DdyPdt3q.mjs +0 -1
  78. package/dist/loader-CP0Kb_eZ.mjs +0 -1
  79. package/dist/preview-BkIHL83G.mjs +0 -1
  80. package/dist/public/assets/FeedbackForm-xL0JcY4M.js +0 -1
  81. package/dist/public/assets/ManagedArtifactProperties-Cz-TenGH.js +0 -1
  82. package/dist/public/assets/ThreadView-DjiRLX3i.js +0 -14
  83. package/dist/public/assets/i18n-Ddg_NfF0.js +0 -1
  84. package/dist/public/assets/messages-BhuJJrXm.js +0 -1
  85. package/dist/public/assets/messages-C1-8WsW-.js +0 -1
  86. package/dist/public/assets/messages-C2SkGuOW.js +0 -1
  87. package/dist/public/assets/messages-C8J0bHS1.js +0 -1
  88. package/dist/public/assets/messages-CRyXNONN.js +0 -1
  89. package/dist/public/assets/messages-CWqIKcIn.js +0 -1
  90. package/dist/public/assets/messages-D8ZJtm04.js +0 -1
  91. package/dist/public/assets/messages-D91wY0jc.js +0 -1
  92. package/dist/public/assets/messages-DKrriYGt.js +0 -1
  93. package/dist/public/assets/messages-TSlW_hwS.js +0 -1
  94. package/dist/public/assets/messages-UVTad7G3.js +0 -1
  95. package/dist/src-BzvUVt1x.mjs +0 -1
  96. package/dist/start-w8CVHb1k.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Dn as t,Fr as n,Rr as r,Tn as i,Vr as a,dr as o,fn as s,fr as c,on as l,vr as u}from"./DocumentContext-CKBQLPkm.js";import{n as d,r as f}from"./dist-Nvb76hAm.js";import{t as p}from"./compiler-runtime-BfE3aGVn.js";import{i as m}from"./local-menu-action-bus-aAi23OVU.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-DPvMEqsq.js";import{rt as v}from"./CodeMirrorPropInput-Cw9Wgv0Z.js";import{Ai as y,Fn as b,Pn as x,Xn as S,Zn as C,mr as w}from"./dist-C1cuuJXO2.js";import{n as T}from"./dist-DTX2HxC82.js";import{t as E}from"./dist-BgXDUIPy.js";import{t as ne}from"./createLucideIcon-CAkY8Blx.js";import{t as re}from"./x-wQUDJS55.js";import{f as ie}from"./doc-paths-Bc7iTgnL.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=S({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:b(e,Math.max(0,t-H),t),suffix:b(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 s(e,()=>{let n=l(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,r=null,s=null,l=-1,u=()=>{let t=i(e.docName);if(!t||t.isDestroyed)return!1;if(n||(n=!0,o(e.threadId)),e.quote===``)return r===null&&(r=Date.now(),c(e.threadId)),!0;let a=t.state.doc.content.size;return(s===null||a!==l)&&(s=U(t.state.doc,e.quote,e.context),l=a),!s||!J(t,s,e.docName,{instant:!0})?!1:(r===null&&(r=Date.now(),c(e.threadId)),!0)};a(`comments`),u(),i(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()&&r!==null&&Date.now()-r>=Se&&f()},h=t(m),g=window.setInterval(m,xe),_=window.setTimeout(()=>{r===null&&T.error(n?E._({id:`KeXgA-`}):E._({id:`JDQ5I5`})),f()},be);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function we(){return n().length}function Te(){let e=(0,O.c)(4),t=n(),r;if(e[0]!==t){r=new Map;for(let e of t){let t=u(e)?.docName;t!==void 0&&r.set(t,(r.get(t)??0)+1)}e[0]=t,e[1]=r}else r=e[1];let i;return e[2]===r?i=e[3]:(i=[...r].map(Ee),e[2]=r,e[3]=i),i}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 r()}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{Dn as t,Fr as n,Rr as r,Tn as i,Vr as a,dr as o,fn as s,fr as c,on as l,vr as u}from"./DocumentContext-C0nL2SXC.js";import{n as d,r as f}from"./dist-Nvb76hAm.js";import{t as p}from"./compiler-runtime-BfE3aGVn.js";import{i as m}from"./local-menu-action-bus-aAi23OVU.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-DPvMEqsq.js";import{rt as v}from"./CodeMirrorPropInput-D5dluJAa.js";import{Ai as y,Fn as b,Pn as x,Xn as S,Zn as C,mr as w}from"./dist-C1cuuJXO2.js";import{n as T}from"./dist-DTX2HxC82.js";import{t as E}from"./dist-BgXDUIPy.js";import{t as ne}from"./createLucideIcon-CAkY8Blx.js";import{t as re}from"./x-wQUDJS55.js";import{f as ie}from"./doc-paths-Bc7iTgnL.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=S({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:b(e,Math.max(0,t-H),t),suffix:b(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 s(e,()=>{let n=l(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,r=null,s=null,l=-1,u=()=>{let t=i(e.docName);if(!t||t.isDestroyed)return!1;if(n||(n=!0,o(e.threadId)),e.quote===``)return r===null&&(r=Date.now(),c(e.threadId)),!0;let a=t.state.doc.content.size;return(s===null||a!==l)&&(s=U(t.state.doc,e.quote,e.context),l=a),!s||!J(t,s,e.docName,{instant:!0})?!1:(r===null&&(r=Date.now(),c(e.threadId)),!0)};a(`comments`),u(),i(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()&&r!==null&&Date.now()-r>=Se&&f()},h=t(m),g=window.setInterval(m,xe),_=window.setTimeout(()=>{r===null&&T.error(n?E._({id:`KeXgA-`}):E._({id:`JDQ5I5`})),f()},be);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function we(){return n().length}function Te(){let e=(0,O.c)(4),t=n(),r;if(e[0]!==t){r=new Map;for(let e of t){let t=u(e)?.docName;t!==void 0&&r.set(t,(r.get(t)??0)+1)}e[0]=t,e[1]=r}else r=e[1];let i;return e[2]===r?i=e[3]:(i=[...r].map(Ee),e[2]=r,e[3]=i),i}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 r()}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(`