@inkeep/open-knowledge 0.52.5 → 0.52.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/{acp-harness-probe-D8lWeMYs.mjs → acp-harness-probe-C5VlRcp6.mjs} +2 -2
- package/dist/cli.mjs +37 -37
- package/dist/constants-Dy1GGjmr.mjs +2 -0
- package/dist/{git-handle--xISIJuo.mjs → git-handle-BxjRPCxW.mjs} +2 -2
- package/dist/git-handle-MmJWq1we.mjs +1 -0
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +135 -135
- package/dist/{init-DAp0k8pn.mjs → init-2b5ga8Bn.mjs} +5 -5
- package/dist/init-BQW3JzjO.mjs +1 -0
- package/dist/{launch-json-removal-C1xPWBKL.mjs → launch-json-removal-BTCPKAIi.mjs} +2 -2
- package/dist/{loader-DEQaoLYB.mjs → loader-CR33sDUl.mjs} +2 -2
- package/dist/loader-M6SsqT_T.mjs +1 -0
- package/dist/md-manager-DvauwrLt.mjs +2 -0
- package/dist/{open-browser-CV5L0bD3.mjs → open-browser-Bp_PADnW.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-CHL4RkuG.mjs → preview-9logziT3.mjs} +2 -2
- package/dist/preview-qCLQm5qI.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DgOXZQPM.js → ActivityModeContent-DDjrqNMY.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DxMmxvZ_.js → AgentDiffPane-ZNFEXc_i.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-Dr4KCMFV.js → AgentThreadClientBinder-C6VOwZkD.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-ChinF2OV.js → ChangedOutsideBadge-H7FINGGt.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-BG6vAU3f.js → CodeMirrorPropInput-Dm_i6ZFf.js} +1 -1
- package/dist/public/assets/{DocumentContext-dF2iyDoR.js → DocumentContext-szVV1fVy.js} +8 -8
- package/dist/public/assets/{EditorModeToggle-v0ruFGAI.js → EditorModeToggle-DvnPLlja.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CoTYoRIg.js → EnableSyncConfirmDialog-ChoEq0DU.js} +1 -1
- package/dist/public/assets/FeedbackForm-CdfQfmxg.js +1 -0
- package/dist/public/assets/{GraphPanel-ovwXA2NQ.js → GraphPanel-CEzLuqY6.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-C4hZ7UL5.js → ImportSkillDialog-Bb_uaAgF.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-Qiz8julD.js → LintConfigEditor-DK3VGKVs.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-B5pd1t-W.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-Z-YF-aB8.js +2 -0
- package/dist/public/assets/{McpConsentDialogBody-BSCT3OvM.js → McpConsentDialogBody-D6vhdhvn.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-C4p4uQqN.js → MermaidDocEditor-CdMcNH1K.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BicwB-J9.js → ReportBugDialogBody-DeBhdZfN.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-D6hcCq89.js → SchemaConfigEditor-DEyXtam3.js} +1 -1
- package/dist/public/assets/{SessionsHost-OteEtmPR.js → SessionsHost-BMNTi7yU.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-eShyjwp_.js → SettingsDialogBody-BkgcHbgJ.js} +4 -4
- package/dist/public/assets/{ShareBranchSwitchDialog-DDrNzFpA.js → ShareBranchSwitchDialog-DxktB3r8.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CXNvnUuO.js → ShareReceiveDialog-D-XtsO7r.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-Bzfc6gmc.js → ShareReceiveMissDialog-QyAZHgSx.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-BAS_3XLj.js → SkillEditBanner-BWQ32mel.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-CLT-BIkT.js → SkillOriginInline-CCXU6r9K.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-ChzkHlc2.js → SkillToolbarControls-C4l-ExkC.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-XPbdtH71.js → SlidesToolbarControls-7AXzTumF.js} +1 -1
- package/dist/public/assets/{SourceEditor-GHoDb1-I.js → SourceEditor-n3FmZ5uT.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DxlLFrrc.js → TerminalPanel-DnBVJwtb.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-CYIfwjHf.js → TerminalWindowApp-MRzFnQYj.js} +1 -1
- package/dist/public/assets/{TextDocEditor-DfWDVWNo.js → TextDocEditor-b-e4xXil.js} +1 -1
- package/dist/public/assets/{ThreadView-CbGlUw2z.js → ThreadView-CGFzmia3.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-CPn64osU.js → TimelineDiffPane-CchFe3_j.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D6dVnd_h.js → agent-diff-store-DOZTdgPj.js} +1 -1
- package/dist/public/assets/auth-state-cache-Dfg2JLBY.js +11 -0
- package/dist/public/assets/{client-version-CjhiC-Jt.js → client-version-7YMypzyJ.js} +1 -1
- package/dist/public/assets/{comment-chips-msfGGi8U.js → comment-chips-DpxHRgmj.js} +1 -1
- package/dist/public/assets/{config-provider-D-VNxNBY.js → config-provider-adYhj3gU.js} +3 -3
- package/dist/public/assets/{dist-8YlYwLg8.js → dist-BzfrsvTh.js} +121 -121
- package/dist/public/assets/{doc-paths-78wumkT9.js → doc-paths-CW1IFrYA.js} +1 -1
- package/dist/public/assets/{documents-events-DKMYe_0X.js → documents-events-DPB-rPGP.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CGtSLM3V.js → file-tree-adapter-SvAwORmT.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CZ9kiPBg.js → file-tree-utils-CD6AFEev.js} +1 -1
- package/dist/public/assets/{folder-config-api-fyPH9MBe.js → folder-config-api-DECOVmJn.js} +1 -1
- package/dist/public/assets/{follow-file-BaVLq6cx.js → follow-file-CIGLgHvp.js} +1 -1
- package/dist/public/assets/i18n-BsOL8j4y.js +1 -0
- package/dist/public/assets/index-DPlcZJ0t.js +2095 -0
- package/dist/public/assets/{lint-config-client-CedjssG2.js → lint-config-client-xbGFkSUV.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BxyZeWyD.js → markdownlint-rule-browser-mcRSb6TR.js} +1 -1
- package/dist/public/assets/messages-B3q8S9Xi.js +1 -0
- package/dist/public/assets/messages-BKDPxHLc.js +1 -0
- package/dist/public/assets/messages-BZksDSuA.js +1 -0
- package/dist/public/assets/messages-BsdSHCbl.js +1 -0
- package/dist/public/assets/messages-BvUYpG4U.js +1 -0
- package/dist/public/assets/messages-CZj797h9.js +1 -0
- package/dist/public/assets/messages-CpTe5fsc.js +1 -0
- package/dist/public/assets/messages-Cx10p5ee.js +1 -0
- package/dist/public/assets/messages-DRe80BU0.js +1 -0
- package/dist/public/assets/messages-RFWmQ0zc.js +1 -0
- package/dist/public/assets/messages-f4T0c1f4.js +1 -0
- package/dist/public/assets/navigation-targets-Di-e5Xgh.js +1 -0
- package/dist/public/assets/{open-managed-artifact-tab-CVw5wiFN.js → open-managed-artifact-tab-BDrP7c9Q.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DyyFinN6.js → pending-receive-nav-store-C49SWp2G.js} +1 -1
- package/dist/public/assets/{prop-types-BKsu1Pla.js → prop-types-rNWO17zq.js} +1 -1
- package/dist/public/assets/{receive-store-DbAkD4vm.js → receive-store-CzHcxuhu.js} +1 -1
- package/dist/public/assets/{selection-context-DJzHAfeZ.js → selection-context-BGUOnaGz.js} +1 -1
- package/dist/public/assets/skill-actions-C18T1CE_.js +2 -0
- package/dist/public/assets/skill-scope-T3ILPDuO.js +1 -0
- package/dist/public/assets/skills-api-kF-de_tA.js +1 -0
- package/dist/public/assets/{src-Kocvrol1.js → src-Cwd2nlpi.js} +1 -1
- package/dist/public/assets/{tag-pill-input-CaySXFvi.js → tag-pill-input-B4XQ4nCv.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-Djv7KQmO.js → target-navigation-intent-BShDksCm.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-DghW2MNw.js → terminal-cli-display-Cb4hZImR.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-CBR70eGX.js → terminal-launch-events-BZbUxjf2.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-C1pBFgq5.js → terminal-telemetry-BXei6J5i.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-mfCCGiI2.js → typing-burst-detector-SZlWsWen.js} +3 -3
- package/dist/public/assets/{uninstall-DtIVpzW8.js → uninstall-DURll1w5.js} +1 -1
- package/dist/public/assets/{use-activity-panel-w209_TE7.js → use-activity-panel-Bzjhtdam.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-lxp6AFtt.js → use-apply-config-color-theme-4v0CHupZ.js} +1 -1
- package/dist/public/assets/{use-collab-url-B0illVqB.js → use-collab-url-BI8-6Q70.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-D4pfJFa6.js → use-live-xterm-theme-CJcAFhaO.js} +1 -1
- package/dist/public/assets/use-open-skill-CO00_zKe.js +1 -0
- package/dist/public/assets/{use-popular-skills-D2yWnUy-.js → use-popular-skills-BbEsnH4g.js} +1 -1
- package/dist/public/assets/{use-settings-route-CSes8Uwx.js → use-settings-route-BrGJ-4C8.js} +1 -1
- package/dist/public/assets/{use-skill-origin-B7sZ5WC1.js → use-skill-origin-DJK4B2EI.js} +1 -1
- package/dist/public/assets/use-skills-CgW3_c2J.js +1 -0
- package/dist/public/assets/{use-terminal-enabled-DM8hVWf8.js → use-terminal-enabled-BBnglW9Q.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DxEnQQVQ.js → use-timeline-entry-diff-Bb5ydByU.js} +1 -1
- package/dist/public/assets/{use-workspace-DogmR2pu.js → use-workspace-DzB9pyD0.js} +1 -1
- package/dist/public/index.html +45 -45
- package/dist/public/uninstall.html +4 -4
- package/dist/{repair-launch-json-Dl0Gey9L.mjs → repair-launch-json-sRpGJnLT.mjs} +2 -2
- package/dist/{repair-mcp-configs-DvqxHaU5.mjs → repair-mcp-configs-B0gc_BZ3.mjs} +2 -2
- package/dist/{repair-skills-pGap1_gF.mjs → repair-skills-6KHgz0Jo.mjs} +2 -2
- package/dist/repair-skills-B_JnDxHU.mjs +1 -0
- package/dist/{server-lock-CyyeFKIF.mjs → server-lock-XNc0dGvF.mjs} +2 -2
- package/dist/server-lock-vEBQUai6.mjs +1 -0
- package/dist/{skill-teardown-DxeHIPsr.mjs → skill-teardown-B6HJfl80.mjs} +2 -2
- package/dist/{src-Qlsty_8B.mjs → src-BkmYz3mW.mjs} +1 -1
- package/dist/src-DAZ_ELve.mjs +1 -0
- package/dist/{src-DZEg-Zy7.mjs → src-DVc0ORbR.mjs} +315 -313
- package/dist/{src-B8SfUeFe.mjs → src-DiueG9n0.mjs} +120 -120
- package/dist/{src-DuQtFnj2.mjs → src-DyLgWs7S.mjs} +4 -4
- package/dist/start-B0bHKpAA.mjs +1 -0
- package/dist/{start-DhG8qpNf.mjs → start-COvLdqgH.mjs} +5 -5
- package/dist/ui-BOU936pt.mjs +1 -0
- package/dist/{ui-BQkXNsD0.mjs → ui-CWpbw0Q2.mjs} +3 -3
- package/dist/{write-project-skill-DHATTSra.mjs → write-project-skill-B0KKzsOU.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-Cq9xPd4B.mjs +0 -2
- package/dist/git-handle-Dt3gdxML.mjs +0 -1
- package/dist/init-Bdkg_LMu.mjs +0 -1
- package/dist/loader-D6TvYuZR.mjs +0 -1
- package/dist/md-manager-RNjkssEV.mjs +0 -2
- package/dist/preview-Bzc9OLIC.mjs +0 -1
- package/dist/public/assets/FeedbackForm-hMBuqLQh.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-16Q3Ko9H.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CNc3-2jZ.js +0 -2
- package/dist/public/assets/auth-state-cache-Cgyydfw6.js +0 -11
- package/dist/public/assets/i18n-gFEbQZNX.js +0 -1
- package/dist/public/assets/index-BSXrWulb.js +0 -2095
- package/dist/public/assets/messages-BFSFw083.js +0 -1
- package/dist/public/assets/messages-But-gxxm.js +0 -1
- package/dist/public/assets/messages-C2dy97-C.js +0 -1
- package/dist/public/assets/messages-C6mfKAsF.js +0 -1
- package/dist/public/assets/messages-CT0uUq60.js +0 -1
- package/dist/public/assets/messages-CoCHeX4T.js +0 -1
- package/dist/public/assets/messages-D2Xjng5y.js +0 -1
- package/dist/public/assets/messages-DGIb-W2n.js +0 -1
- package/dist/public/assets/messages-DZjmC-3B.js +0 -1
- package/dist/public/assets/messages-DmRUKkYi.js +0 -1
- package/dist/public/assets/messages-Vp_S0vgN.js +0 -1
- package/dist/public/assets/navigation-targets-BS-NLUXq.js +0 -1
- package/dist/public/assets/skill-actions-ZS4T13Ax.js +0 -2
- package/dist/public/assets/skill-scope-CnsZQNOC.js +0 -1
- package/dist/public/assets/skills-api-BYVWoHSe.js +0 -1
- package/dist/public/assets/use-open-skill-BF7e4PgL.js +0 -1
- package/dist/public/assets/use-skills-BxzTRUh9.js +0 -1
- package/dist/repair-skills-uGkRmBYx.mjs +0 -1
- package/dist/server-lock-DwSyFoTt.mjs +0 -1
- package/dist/src-lASptBjy.mjs +0 -1
- package/dist/start-CXRN7Bpx.mjs +0 -1
- package/dist/ui-BkhU6wt_.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Cr as t,Dr as n,Mr as r,Or as i,_n as a,cr as o,dr as s,nr as c,yn as l}from"./DocumentContext-dF2iyDoR.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{c as p}from"./local-menu-action-bus-Cypryz6Z.js";import{t as m}from"./utils-CPqDy6Hr.js";import{t as h}from"./button-CA0dewJJ.js";import{rt as g,st as _}from"./CodeMirrorPropInput-BG6vAU3f.js";import{t as v}from"./checkbox-vidgONxv.js";import{Dn as y,En as b,Vn as x,nr as S,ui as C}from"./dist-8YlYwLg8.js";import{t as w}from"./createLucideIcon-Bhw2PmPp.js";import{t as ee}from"./chevron-down-DabHDQTe.js";import{t as T}from"./x-DS57FvHW.js";import{f as E}from"./doc-paths-78wumkT9.js";var D=w(`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=w(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),k=f(),A=`245,158,11`,te=A,ne={fill:.22,line:.7},re={fill:.45,line:1},ie=.45;function ae(e,t){let n=te,{fill:r,line:i}=t?re:ne;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 M(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 oe(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:ae(e??a.covering[0],e!==void 0),threadId:M(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 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 se(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ce(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=le(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),ue(n),!0}return!1}function le(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 ue(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${A},${ie})`),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 R(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=b(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 z(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=C(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=z(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)}if(r.length===1)return V(e,r[0]);let i=n?.prefix??``,a=n?.suffix??``,o=[],s=-1;for(let t of r){let n=x(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`});n>s?(s=n,o=[t]):n===s&&o.push(t)}return V(e,o[0])}var U=64;function de(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=R(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=R(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var fe=220,pe=24;function me(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-fe;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+pe)}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){let n=g(e);if(!n)return;let r=K(n.dom);if(!r){e.commands.scrollIntoView();return}let i,a;try{i=n.coordsAtPos(t.from),a=n.coordsAtPos(t.to)}catch{return}let o=r.getBoundingClientRect(),s=me({anchorTop:i.top,anchorBottom:Math.max(i.bottom,a.bottom),viewTop:o.top,viewBottom:o.bottom,insetTop:q(r)});if(s===0)return;let c=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollTo({top:r.scrollTop+s,behavior:c?`auto`:`smooth`})}var he=1e4;function ge(e){let t=()=>{let t=a(e.docName);if(!t||t.isDestroyed)return!1;let n=W(t.state.doc,e.quote,e.context);return n&&(t.chain().focus().setTextSelection(n).run(),J(t,n)),c(e.threadId),!0};if(r(`comments`),t())return;window.location.assign(E(e.docName));let n=!1,i=()=>{n||(n=!0,o(),window.clearTimeout(s))},o=l(()=>{t()&&i()}),s=window.setTimeout(i,he);t()&&i()}var Y=e();function _e(){let e=(0,k.c)(2),t=n(),r;if(e[0]!==t){r=[];for(let e of t){let t=o(e);t!==null&&r.push(t)}e[0]=t,e[1]=r}else r=e[1];return r}function ve(){return i().length}function ye(e){let t=(0,k.c)(34),{count:n,attached:r,expanded:i,onAttach:a,onToggleExpanded:o,onDismiss:s}=e,{_:c}=d();if(n===0)return null;if(!r){let e;t[0]===c?e=t[1]:(e=c({id:`UpOct_`}),t[0]=c,t[1]=e);let n,r,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=m(`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,Y.jsx)(p,{className:`size-3`}),i=(0,Y.jsx)(u,{id:`VbyRUy`}),t[2]=n,t[3]=r,t[4]=i):(n=t[2],r=t[3],i=t[4]);let o;return t[5]!==a||t[6]!==e?(o=(0,Y.jsxs)(h,{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[5]=a,t[6]=e,t[7]=o):o=t[7],o}let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=m(`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[8]=l):l=t[8];let f;t[9]!==c||t[10]!==i?(f=c(i?{id:`kMKqP_`}:{id:`15MMFT`}),t[9]=c,t[10]=i,t[11]=f):f=t[11];let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Y.jsx)(D,{className:`size-3`}),t[12]=g):g=t[12];let _;t[13]===n?_=t[14]:(_=(0,Y.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[13]=n,t[14]=_);let v=i&&`rotate-180`,y;t[15]===v?y=t[16]:(y=m(`size-3 transition-transform`,v),t[15]=v,t[16]=y);let b;t[17]===y?b=t[18]:(b=(0,Y.jsx)(ee,{className:y}),t[17]=y,t[18]=b);let x;t[19]!==i||t[20]!==o||t[21]!==f||t[22]!==_||t[23]!==b?(x=(0,Y.jsxs)(h,{type:`button`,size:`sm`,variant:`ghost`,"aria-expanded":i,"aria-label":f,onClick:o,"data-testid":`composer-comments-peek`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[g,_,b]}),t[19]=i,t[20]=o,t[21]=f,t[22]=_,t[23]=b,t[24]=x):x=t[24];let S;t[25]===c?S=t[26]:(S=c({id:`pFRz_E`}),t[25]=c,t[26]=S);let C;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Y.jsx)(T,{className:`size-3`}),t[27]=C):C=t[27];let w;t[28]!==s||t[29]!==S?(w=(0,Y.jsx)(h,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":S,onClick:s,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:C}),t[28]=s,t[29]=S,t[30]=w):w=t[30];let E;return t[31]!==w||t[32]!==x?(E=(0,Y.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:l,children:[x,w]}),t[31]=w,t[32]=x,t[33]=E):E=t[33],E}function X(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Z(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function be(e){let t=(0,k.c)(14),{thread:n,className:r}=e,i=n.anchor?.quote??``;if(n.target.kind===`property`){let e;t[0]!==n.target.key||t[1]!==n.target.path?(e=Z(n.target.key,n.target.path),t[0]=n.target.key,t[1]=n.target.path,t[2]=e):e=t[2];let a=e,o;t[3]===r?o=t[4]:(o=m(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[3]=r,t[4]=o);let s=i===``?``:` “${i}”`,c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,Y.jsxs)(`span`,{className:o,children:[a,`:`,s]}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}let a;t[9]===r?a=t[10]:(a=m(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[9]=r,t[10]=a);let o;return t[11]!==i||t[12]!==a?(o=(0,Y.jsxs)(`span`,{className:a,children:[`“`,i,`”`]}),t[11]=i,t[12]=a,t[13]=o):o=t[13],o}function Q(e){ge({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>=xe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var xe=30;function Se(e){let n=(0,k.c)(9),{threads:r}=e,{_:a}=d(),o=i();if(r.length===0)return null;let c;if(n[0]!==a||n[1]!==o||n[2]!==r){let e;n[4]!==a||n[5]!==o?(e=e=>{let n=e.status===`orphaned`,r=o.includes(e.id);return(0,Y.jsxs)(`li`,{className:m(`flex items-start gap-2 rounded-md border bg-background/60 px-2 py-1.5`,!r&&`opacity-50`),children:[(0,Y.jsx)(v,{checked:r,onCheckedChange:()=>t(e.id),"aria-label":a({id:`Uoux8m`}),className:`mt-0.5`}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1 rounded border px-1 py-px text-[10px] text-muted-foreground`,title:e.docName,children:[(0,Y.jsx)(_,{className:`size-2.5 shrink-0`}),(0,Y.jsx)(`span`,{className:`truncate`,children:X(e.docName)})]}),n&&(0,Y.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-[10px] text-amber-600 dark:text-amber-500`,title:a({id:`MBe6TE`}),children:[(0,Y.jsx)(O,{className:`size-2.5`}),(0,Y.jsx)(u,{id:`2UgoBZ`})]})]}),(0,Y.jsxs)(h,{type:`button`,variant:`ghost`,"aria-label":a({id:`rscgd_`,values:{0:X(e.docName)}}),onClick:()=>Q(e),className:`h-auto min-h-0 w-full min-w-0 flex-col items-start gap-1 px-0 py-0 text-left font-normal hover:bg-transparent`,children:[(0,Y.jsx)(be,{thread:e}),(0,Y.jsx)(`span`,{className:`line-clamp-2 w-full text-xs whitespace-normal text-foreground/90`,children:e.body})]})]}),(0,Y.jsx)(h,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":a({id:`1jym2J`}),onClick:()=>s(e.id),className:`size-5 shrink-0 p-0 text-muted-foreground hover:text-foreground`,children:(0,Y.jsx)(T,{className:`size-3`})})]},e.id)},n[4]=a,n[5]=o,n[6]=e):e=n[6],c=r.map(e),n[0]=a,n[1]=o,n[2]=r,n[3]=c}else c=n[3];let l;return n[7]===c?l=n[8]:(l=(0,Y.jsx)(`ul`,{"data-testid":`composer-comments-list`,className:`mt-1 flex max-h-64 basis-full list-none flex-col gap-1 overflow-y-auto subtle-scrollbar`,children:c}),n[7]=c,n[8]=l),l}function Ce(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 we(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Te(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Ee(e){if(!e.repeats)return null;let t=we(e.prefix),n=Te(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 De(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{Cr as t,Dr as n,Mr as r,Or as i,_n as a,cr as o,dr as s,nr as c,yn as l}from"./DocumentContext-szVV1fVy.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{c as p}from"./local-menu-action-bus-Cypryz6Z.js";import{t as m}from"./utils-CPqDy6Hr.js";import{t as h}from"./button-CA0dewJJ.js";import{rt as g,st as _}from"./CodeMirrorPropInput-Dm_i6ZFf.js";import{t as v}from"./checkbox-vidgONxv.js";import{Dn as y,En as b,Vn as x,nr as S,ui as C}from"./dist-BzfrsvTh.js";import{t as w}from"./createLucideIcon-Bhw2PmPp.js";import{t as ee}from"./chevron-down-DabHDQTe.js";import{t as T}from"./x-DS57FvHW.js";import{f as E}from"./doc-paths-CW1IFrYA.js";var D=w(`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=w(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),k=f(),A=`245,158,11`,te=A,ne={fill:.22,line:.7},re={fill:.45,line:1},ie=.45;function ae(e,t){let n=te,{fill:r,line:i}=t?re:ne;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 M(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 oe(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:ae(e??a.covering[0],e!==void 0),threadId:M(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 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 se(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ce(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=le(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),ue(n),!0}return!1}function le(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 ue(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${A},${ie})`),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 R(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=b(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 z(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=C(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=z(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)}if(r.length===1)return V(e,r[0]);let i=n?.prefix??``,a=n?.suffix??``,o=[],s=-1;for(let t of r){let n=x(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`});n>s?(s=n,o=[t]):n===s&&o.push(t)}return V(e,o[0])}var U=64;function de(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=R(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=R(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var fe=220,pe=24;function me(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-fe;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+pe)}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){let n=g(e);if(!n)return;let r=K(n.dom);if(!r){e.commands.scrollIntoView();return}let i,a;try{i=n.coordsAtPos(t.from),a=n.coordsAtPos(t.to)}catch{return}let o=r.getBoundingClientRect(),s=me({anchorTop:i.top,anchorBottom:Math.max(i.bottom,a.bottom),viewTop:o.top,viewBottom:o.bottom,insetTop:q(r)});if(s===0)return;let c=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollTo({top:r.scrollTop+s,behavior:c?`auto`:`smooth`})}var he=1e4;function ge(e){let t=()=>{let t=a(e.docName);if(!t||t.isDestroyed)return!1;let n=W(t.state.doc,e.quote,e.context);return n&&(t.chain().focus().setTextSelection(n).run(),J(t,n)),c(e.threadId),!0};if(r(`comments`),t())return;window.location.assign(E(e.docName));let n=!1,i=()=>{n||(n=!0,o(),window.clearTimeout(s))},o=l(()=>{t()&&i()}),s=window.setTimeout(i,he);t()&&i()}var Y=e();function _e(){let e=(0,k.c)(2),t=n(),r;if(e[0]!==t){r=[];for(let e of t){let t=o(e);t!==null&&r.push(t)}e[0]=t,e[1]=r}else r=e[1];return r}function ve(){return i().length}function ye(e){let t=(0,k.c)(34),{count:n,attached:r,expanded:i,onAttach:a,onToggleExpanded:o,onDismiss:s}=e,{_:c}=d();if(n===0)return null;if(!r){let e;t[0]===c?e=t[1]:(e=c({id:`UpOct_`}),t[0]=c,t[1]=e);let n,r,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=m(`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,Y.jsx)(p,{className:`size-3`}),i=(0,Y.jsx)(u,{id:`VbyRUy`}),t[2]=n,t[3]=r,t[4]=i):(n=t[2],r=t[3],i=t[4]);let o;return t[5]!==a||t[6]!==e?(o=(0,Y.jsxs)(h,{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[5]=a,t[6]=e,t[7]=o):o=t[7],o}let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=m(`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[8]=l):l=t[8];let f;t[9]!==c||t[10]!==i?(f=c(i?{id:`kMKqP_`}:{id:`15MMFT`}),t[9]=c,t[10]=i,t[11]=f):f=t[11];let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Y.jsx)(D,{className:`size-3`}),t[12]=g):g=t[12];let _;t[13]===n?_=t[14]:(_=(0,Y.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[13]=n,t[14]=_);let v=i&&`rotate-180`,y;t[15]===v?y=t[16]:(y=m(`size-3 transition-transform`,v),t[15]=v,t[16]=y);let b;t[17]===y?b=t[18]:(b=(0,Y.jsx)(ee,{className:y}),t[17]=y,t[18]=b);let x;t[19]!==i||t[20]!==o||t[21]!==f||t[22]!==_||t[23]!==b?(x=(0,Y.jsxs)(h,{type:`button`,size:`sm`,variant:`ghost`,"aria-expanded":i,"aria-label":f,onClick:o,"data-testid":`composer-comments-peek`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[g,_,b]}),t[19]=i,t[20]=o,t[21]=f,t[22]=_,t[23]=b,t[24]=x):x=t[24];let S;t[25]===c?S=t[26]:(S=c({id:`pFRz_E`}),t[25]=c,t[26]=S);let C;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Y.jsx)(T,{className:`size-3`}),t[27]=C):C=t[27];let w;t[28]!==s||t[29]!==S?(w=(0,Y.jsx)(h,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":S,onClick:s,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:C}),t[28]=s,t[29]=S,t[30]=w):w=t[30];let E;return t[31]!==w||t[32]!==x?(E=(0,Y.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:l,children:[x,w]}),t[31]=w,t[32]=x,t[33]=E):E=t[33],E}function X(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Z(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function be(e){let t=(0,k.c)(14),{thread:n,className:r}=e,i=n.anchor?.quote??``;if(n.target.kind===`property`){let e;t[0]!==n.target.key||t[1]!==n.target.path?(e=Z(n.target.key,n.target.path),t[0]=n.target.key,t[1]=n.target.path,t[2]=e):e=t[2];let a=e,o;t[3]===r?o=t[4]:(o=m(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[3]=r,t[4]=o);let s=i===``?``:` “${i}”`,c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,Y.jsxs)(`span`,{className:o,children:[a,`:`,s]}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}let a;t[9]===r?a=t[10]:(a=m(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[9]=r,t[10]=a);let o;return t[11]!==i||t[12]!==a?(o=(0,Y.jsxs)(`span`,{className:a,children:[`“`,i,`”`]}),t[11]=i,t[12]=a,t[13]=o):o=t[13],o}function Q(e){ge({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>=xe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var xe=30;function Se(e){let n=(0,k.c)(9),{threads:r}=e,{_:a}=d(),o=i();if(r.length===0)return null;let c;if(n[0]!==a||n[1]!==o||n[2]!==r){let e;n[4]!==a||n[5]!==o?(e=e=>{let n=e.status===`orphaned`,r=o.includes(e.id);return(0,Y.jsxs)(`li`,{className:m(`flex items-start gap-2 rounded-md border bg-background/60 px-2 py-1.5`,!r&&`opacity-50`),children:[(0,Y.jsx)(v,{checked:r,onCheckedChange:()=>t(e.id),"aria-label":a({id:`Uoux8m`}),className:`mt-0.5`}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1 rounded border px-1 py-px text-[10px] text-muted-foreground`,title:e.docName,children:[(0,Y.jsx)(_,{className:`size-2.5 shrink-0`}),(0,Y.jsx)(`span`,{className:`truncate`,children:X(e.docName)})]}),n&&(0,Y.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-[10px] text-amber-600 dark:text-amber-500`,title:a({id:`MBe6TE`}),children:[(0,Y.jsx)(O,{className:`size-2.5`}),(0,Y.jsx)(u,{id:`2UgoBZ`})]})]}),(0,Y.jsxs)(h,{type:`button`,variant:`ghost`,"aria-label":a({id:`rscgd_`,values:{0:X(e.docName)}}),onClick:()=>Q(e),className:`h-auto min-h-0 w-full min-w-0 flex-col items-start gap-1 px-0 py-0 text-left font-normal hover:bg-transparent`,children:[(0,Y.jsx)(be,{thread:e}),(0,Y.jsx)(`span`,{className:`line-clamp-2 w-full text-xs whitespace-normal text-foreground/90`,children:e.body})]})]}),(0,Y.jsx)(h,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":a({id:`1jym2J`}),onClick:()=>s(e.id),className:`size-5 shrink-0 p-0 text-muted-foreground hover:text-foreground`,children:(0,Y.jsx)(T,{className:`size-3`})})]},e.id)},n[4]=a,n[5]=o,n[6]=e):e=n[6],c=r.map(e),n[0]=a,n[1]=o,n[2]=r,n[3]=c}else c=n[3];let l;return n[7]===c?l=n[8]:(l=(0,Y.jsx)(`ul`,{"data-testid":`composer-comments-list`,className:`mt-1 flex max-h-64 basis-full list-none flex-col gap-1 overflow-y-auto subtle-scrollbar`,children:c}),n[7]=c,n[8]=l),l}function Ce(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 we(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Te(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Ee(e){if(!e.repeats)return null;let t=we(e.prefix),n=Te(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 De(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=Ee(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(`
|