@inkeep/open-knowledge 0.72.0-beta.4 → 0.72.0-beta.5
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/cli.mjs +67 -67
- package/dist/constants-DEplBBeL.mjs +1 -0
- package/dist/{dist-B7NFh0MZ.mjs → dist-CIcphNQy.mjs} +484 -484
- package/dist/{dist-D7HUGErx.mjs → dist-DJSvIyoE.mjs} +1 -1
- package/dist/index.mjs +194 -194
- package/dist/init-BGrCTWN-.mjs +1 -0
- package/dist/{init-R__-FL-k.mjs → init-CpWmzBSx.mjs} +7 -7
- package/dist/{launch-json-removal-7D0nQT56.mjs → launch-json-removal-DHoIXMAW.mjs} +1 -1
- package/dist/{loader-BRYG-jTN.mjs → loader-BGm6eeZp.mjs} +1 -1
- package/dist/loader-CSqioEBS.mjs +1 -0
- package/dist/{md-manager-BGnqyqi1-hmuoZRep.mjs → md-manager-BGnqyqi1-Bo-Rq5FL.mjs} +98 -98
- package/dist/{open-browser-4-j8NELI.mjs → open-browser-Bq5FSdgJ.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-DjhHIWGN.mjs → preview-BJFciD0a.mjs} +1 -1
- package/dist/preview-Bkrg2o4g.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DLnzCgfz.js → ActivityModeContent-DuV-Wxoa.js} +1 -1
- package/dist/public/assets/AddPropertiesButton-DPmktRPG.js +2 -0
- package/dist/public/assets/{AgentDiffPane-B5amlfmP.js → AgentDiffPane-CxU1PJrg.js} +1 -1
- package/dist/public/assets/{AgentIconCluster-DiWkEX6O.js → AgentIconCluster-BfdKE6ui.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-iSWzdyTG.js → AgentThreadClientBinder-DjubXLi6.js} +1 -1
- package/dist/public/assets/{BugReportHistory-CounGQhT.js → BugReportHistory-C_ZU9yMs.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-CgPrrnbM.js → BugReportHistoryDialog-DJiu9Guq.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-D97WOcle.js +3 -0
- package/dist/public/assets/{ConsentDialogBody-BD4DWbp5.js → ConsentDialogBody-Dqev0b07.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-BXdwk2Iq.js → DiffViewBoundary-CFZjF4Xj.js} +1 -1
- package/dist/public/assets/DocumentContext-DX4_PUWv.js +39 -0
- package/dist/public/assets/{EditorModeToggle-Dg7vVHl3.js → EditorModeToggle-CvJLZD0M.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-R-Z946N5.js → EnableSyncConfirmDialog-czS5nsXI.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-CY1lJS-2.js → ExcalidrawDocEditor-Cz-kIZcN.js} +1 -1
- package/dist/public/assets/FeedbackForm-C1whS86p.js +1 -0
- package/dist/public/assets/{GraphPanel-omwwsp_N.js → GraphPanel-Brw8ehEB.js} +1 -1
- package/dist/public/assets/{ImageAttachments-BpYJnzlN.js → ImageAttachments-CC1lPWjh.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-BTpla3g7.js → ImportSkillDialog-d_yMgunZ.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CVkLVVX0.js → LintConfigEditor-Cql11JCw.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BG4Fy3XQ.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-C1nhYITR.js → ManagedArtifactProperties-DVOVMN78.js} +1 -1
- package/dist/public/assets/MermaidDocEditor-BzvUKrvv.js +1 -0
- package/dist/public/assets/{OpenInAgentMenuItem-CzPwpHyZ.js → OpenInAgentMenuItem-pI7QqxQ8.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-BGe6-4L9.js → PropertyDisplayRow-EAikSGib.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-Dit7Zlh0.js → RegisteredAgentIcon-H1tWUX4M.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CiI1lRKj.js → ReportBugDialogBody-B0Hz8PSu.js} +2 -2
- package/dist/public/assets/{ReportBugMenuTrigger-DoDCPu1X.js → ReportBugMenuTrigger-fqTsxaHY.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-CSINzXTv.js → SchemaConfigEditor-q_ojTlU-.js} +1 -1
- package/dist/public/assets/{SessionsHost-Crwf7ff-.js → SessionsHost-Bype_V2w.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-ClOXAL7Y.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-DqSgSjyg.js → ShareBranchSwitchDialog-DOFGWcAi.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BZtxSZra.js → ShareReceiveDialog-DeXX0A9G.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-dnAsxL19.js → ShareReceiveMissDialog-DikJivBp.js} +1 -1
- package/dist/public/assets/{SkillCostValue-CHZQh8Rq.js → SkillCostValue-Bz3F4Rhv.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-SYzSHptQ.js → SkillEditBanner-CwcNkco_.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-Cz82rkwA.js → SkillForkDialog-CkG_oW7h.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-CNY0p5vX.js → SkillInstallMenu-B87ijGMQ.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DuKHAOBP.js → SkillOriginInline-Ca3SXbe0.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-CjE7B4SI.js → SkillToolbarControls-BaE_PtLx.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-C5RytnIw.js → SlidesToolbarControls-BYkwABPX.js} +1 -1
- package/dist/public/assets/SourceEditor-DdIDVFJy.js +1 -0
- package/dist/public/assets/{TerminalPanel-Lr-gSBEo.js → TerminalPanel-Dg4Odd7P.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-Cbqv2j6x.js → TerminalWindowApp-CuHu-kBD.js} +1 -1
- package/dist/public/assets/TextDocEditor-aXrm23PN.js +1 -0
- package/dist/public/assets/{ThreadView-BhfeLCUr.js → ThreadView-DwpDF29Z.js} +6 -6
- package/dist/public/assets/{TimelineDiffPane-DeUhHr6c.js → TimelineDiffPane-COILPEZH.js} +1 -1
- package/dist/public/assets/agent-connection-status-CORLBJuD.js +1 -0
- package/dist/public/assets/auth-state-cache-D93mj765.js +11 -0
- package/dist/public/assets/{bug-report-send-manager-C8UOqZop.js → bug-report-send-manager-0zuWMSw7.js} +1 -1
- package/dist/public/assets/client-version-C8sAZlzC.js +1 -0
- package/dist/public/assets/{comment-chips-DG6TcreO.js → comment-chips-DaPmziL-.js} +1 -1
- package/dist/public/assets/{config-provider-CL2LHJwy.js → config-provider-xvx1bLbF.js} +4 -4
- package/dist/public/assets/{css-color-to-hex-21hHTVNl.js → css-color-to-hex-DPzuRcEY.js} +1 -1
- package/dist/public/assets/{dist-75Tp0j2s.js → dist-BBNlIz6B.js} +194 -194
- package/dist/public/assets/{doc-hash-0sJsliMq.js → doc-hash-BP0Io59r.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-CUMz1Lu7.js → doc-undo-manager-Cp9RgUJD.js} +1 -1
- package/dist/public/assets/{documents-events-DvTemRtX.js → documents-events-BhW9c1L3.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-C-zUZxGY.js → file-tree-adapter-CV_ZL37X.js} +1 -1
- package/dist/public/assets/{file-tree-utils-DQrKhuvs.js → file-tree-utils-Ba9yRKBT.js} +1 -1
- package/dist/public/assets/{folder-config-api-O8wiP8u9.js → folder-config-api-VEvZwzig.js} +1 -1
- package/dist/public/assets/index-0EMkZ_HU.js +2205 -0
- package/dist/public/assets/{lint-config-client-D_K_I33M.js → lint-config-client-qZ7mC1Zy.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-D_33Iwwv.js → markdownlint-rule-browser-BJMH4HJX.js} +1 -1
- package/dist/public/assets/messages-BVMprXL3.js +1 -0
- package/dist/public/assets/messages-Bqfd7jkb.js +1 -0
- package/dist/public/assets/messages-CH72i-bO.js +1 -0
- package/dist/public/assets/messages-CzlIjFg6.js +1 -0
- package/dist/public/assets/messages-D8dZFF9f.js +1 -0
- package/dist/public/assets/messages-D9axSU6Y.js +1 -0
- package/dist/public/assets/messages-DKTKP9pT.js +1 -0
- package/dist/public/assets/messages-DMFl2kw9.js +1 -0
- package/dist/public/assets/messages-DSA8fzIO.js +1 -0
- package/dist/public/assets/messages-bATdY7jB.js +1 -0
- package/dist/public/assets/messages-dbMtQLBB.js +1 -0
- package/dist/public/assets/messages-knxD2r8o.js +1 -0
- package/dist/public/assets/navigation-targets-DBLYH48Z.js +1 -0
- package/dist/public/assets/{page-list-cache-DmQP_SV8.js → page-list-cache-ia70Eztn.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-lpN2Xg2z.js → pending-receive-nav-store-DsL1PcWo.js} +1 -1
- package/dist/public/assets/{progress-CpKCXRqy.js → progress-CqeKUHyJ.js} +4 -4
- package/dist/public/assets/{project-paths-gqDqqCq-.js → project-paths-BWUfIMzR.js} +1 -1
- package/dist/public/assets/prop-types-Cu1KjM7N.js +1 -0
- package/dist/public/assets/{receive-store-CmP1Rnn7.js → receive-store-MWZ6Efgw.js} +1 -1
- package/dist/public/assets/{selection-context-BYtzxyLE.js → selection-context-BzpZfjkH.js} +1 -1
- package/dist/public/assets/{skill-scope-zjfKF_hV.js → skill-scope-nA3yMJC-.js} +1 -1
- package/dist/public/assets/{skills-api-DefDq-V9.js → skills-api-DM_st9cJ.js} +1 -1
- package/dist/public/assets/{src-DyfxwlyE.js → src-Bew9jsBg.js} +1 -1
- package/dist/public/assets/startup-marks-DjGilb1Q.js +1 -0
- package/dist/public/assets/{tag-pill-input-fBTfmjgu.js → tag-pill-input-I-zmy30v.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-JS6hYcot.js → target-navigation-intent-ZRGm8Ebz.js} +1 -1
- package/dist/public/assets/{telemetry-impl-CFkmFcv6.js → telemetry-impl-Ccp0NCP8.js} +1 -1
- package/dist/public/assets/{telemetry-startup-Bac091X8.js → telemetry-startup-BTPhdwGS.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-B8ySenln.js → terminal-cli-display-UR6Dbpk0.js} +1 -1
- package/dist/public/assets/{terminal-command-events-DrvZC8Eu.js → terminal-command-events-MPQ3tB2h.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-qWlFGuUx.js → terminal-launch-events-BBSlYIZk.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-CpRQ96Ji.js → terminal-telemetry-pvyydkXE.js} +1 -1
- package/dist/public/assets/typing-burst-detector-BbwwSUxU.js +8 -0
- package/dist/public/assets/{uninstall-v61_ZoXT.js → uninstall-DxyqZMFJ.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DCGFCgW4.js → use-activity-panel-CXRjvVsk.js} +1 -1
- package/dist/public/assets/use-apply-config-language-CJPbOFtI.js +2 -0
- package/dist/public/assets/{use-collab-url-mFOjr2IA.js → use-collab-url-D-Rpmggc.js} +1 -1
- package/dist/public/assets/{use-conflicts-C8dN_iXo.js → use-conflicts-GDmwqh_O.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-B9dAAZD3.js → use-live-xterm-theme-RBRq5pG-.js} +1 -1
- package/dist/public/assets/{use-open-skill-BAPaR7kA.js → use-open-skill-DDuaC258.js} +1 -1
- package/dist/public/assets/{use-settings-route-BxaIY7g8.js → use-settings-route-DmYoFPHM.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CZlBPaka.js → use-skill-origin-DbioIXic.js} +1 -1
- package/dist/public/assets/{use-skills-C6QmTsGG.js → use-skills-BagPzj6D.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-D0rb9s4e.js → use-terminal-enabled-CHN--3NP.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-C_2xolry.js +5 -0
- package/dist/public/assets/{use-workspace-CPN4D3G_.js → use-workspace-BX0piG-D.js} +1 -1
- package/dist/public/index.html +55 -55
- package/dist/public/uninstall.html +4 -4
- package/dist/{registry-probes-Cthf_D-E.mjs → registry-probes-C3ywQM6a.mjs} +2 -2
- package/dist/{removal-file-path-B3Ia2LYa.mjs → removal-file-path-BH9TBBEA.mjs} +1 -1
- package/dist/{repair-launch-json-LAfXDQlt.mjs → repair-launch-json-B2dn8CrD.mjs} +1 -1
- package/dist/{repair-mcp-configs-Dz9benJ2.mjs → repair-mcp-configs-DgYY6svQ.mjs} +1 -1
- package/dist/src-DC0SGbZ5.mjs +11 -0
- package/dist/src-R3Q_wbFF.mjs +1 -0
- package/dist/start-BteyuLah.mjs +1 -0
- package/dist/{start-C9LxTCYi.mjs → start-beQe9K3u.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-tN6BLxqK.mjs +0 -1
- package/dist/init-0RF5mT_e.mjs +0 -1
- package/dist/loader-BicS4rg_.mjs +0 -1
- package/dist/preview-DtEWXaoq.mjs +0 -1
- package/dist/public/assets/AddPropertiesButton-5U2Y3uKp.js +0 -2
- package/dist/public/assets/CodeMirrorPropInput-Cmq0OheO.js +0 -3
- package/dist/public/assets/DocumentContext-TAFDDp6U.js +0 -39
- package/dist/public/assets/FeedbackForm-CUHxAufb.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-D_9Orim7.js +0 -1
- package/dist/public/assets/MermaidDocEditor-Nc0VfQkz.js +0 -1
- package/dist/public/assets/SettingsDialogBody-Bl3NZ37F.js +0 -12
- package/dist/public/assets/SourceEditor-CAEGq_cL.js +0 -1
- package/dist/public/assets/TextDocEditor-BbjLCMRm.js +0 -1
- package/dist/public/assets/agent-connection-status-XSdlZ0uj.js +0 -1
- package/dist/public/assets/auth-state-cache-lPOpwdxt.js +0 -11
- package/dist/public/assets/client-version-DMKN1tA1.js +0 -1
- package/dist/public/assets/index-YzLx3klx.js +0 -2205
- package/dist/public/assets/messages-BYiJXmNN.js +0 -1
- package/dist/public/assets/messages-BwGMYA_G.js +0 -1
- package/dist/public/assets/messages-CFWXeDS9.js +0 -1
- package/dist/public/assets/messages-CbXu74T2.js +0 -1
- package/dist/public/assets/messages-Czy5uUdz.js +0 -1
- package/dist/public/assets/messages-DKoHMjaK.js +0 -1
- package/dist/public/assets/messages-DVDSsf5u.js +0 -1
- package/dist/public/assets/messages-Dnppvuua.js +0 -1
- package/dist/public/assets/messages-IHf96h9y.js +0 -1
- package/dist/public/assets/messages-ijpiuVRD.js +0 -1
- package/dist/public/assets/messages-lPluOXUP.js +0 -1
- package/dist/public/assets/messages-nbT9wGXG.js +0 -1
- package/dist/public/assets/navigation-targets-CLA-LGSO.js +0 -1
- package/dist/public/assets/prop-types-Cz_4UFXS.js +0 -1
- package/dist/public/assets/startup-marks-DkofILWo.js +0 -1
- package/dist/public/assets/typing-burst-detector-BBbOZnKo.js +0 -8
- package/dist/public/assets/use-apply-config-language-BS-vov2w.js +0 -2
- package/dist/public/assets/use-timeline-entry-diff-6pBvX9Gh.js +0 -5
- package/dist/src-BCVXAb8B.mjs +0 -1
- package/dist/src-CQqhz0Kv.mjs +0 -11
- package/dist/start-C5D7Sm06.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Bn as t,Br as n,Vr as r,_i as i,er as a,nr as o,pi as s,qr as c,ui as l}from"./DocumentContext-TAFDDp6U.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{t as p}from"./utils-CPqDy6Hr.js";import{t as m}from"./button-Cym3gapE.js";import{i as h,n as g,t as _}from"./tooltip-BnyyQDRs.js";import{Bn as v,Vn as y,Wi as b,br as x,nr as S,rr as C}from"./dist-75Tp0j2s.js";import{n as w}from"./dist-CJhtNlOm2.js";import{t as T}from"./dist-Cr4-nBVI.js";import{i as ee}from"./local-menu-action-bus-4I1Xm40D.js";import{t as E}from"./createLucideIcon-B6ULg5PN.js";import{Et as D}from"./CodeMirrorPropInput-Cmq0OheO.js";import{t as te}from"./x-DIayTyoR.js";import{l as ne}from"./doc-hash-0sJsliMq.js";var O=E(`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`}]]),k=f(),re=`var(--ok-comment-hue, rgb(37 99 235))`,ie={fill:.22,line:.7},ae={fill:.45,line:1},oe=.45;function A(e){return`color-mix(in srgb,${re} ${e*100}%,transparent)`}function se(e,t){let{fill:n,line:r}=t?ae:ie;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:${A(n)}`,`box-shadow:inset 0 -2px 0 ${A(r)}`,``].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 ce(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>N(e,t));i.push({from:a.from,to:a.to,style:se(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 le(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ue(e){I(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function L(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${F(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=R(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),de(n),!0}return!1}function R(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function de(e){e.style.setProperty(`--comment-reveal-fill`,A(oe)),e.setAttribute(P,`true`);let t=()=>{e.removeAttribute(P),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function z(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=v(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function fe(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function B(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:x(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:x(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=b(t.length);return c-s>l?null:{start:s,end:c}}function V(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function H(e,t,n){if(t.length===0)return null;let r=fe(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=x(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=B(e.text,t,n);return r===null?null:V(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||x(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=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,r[0])}let l=[],u=-1;for(let t of r){let n=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=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,l[0])}var U=64;function pe(e,t,n){return{prefix:y(e,Math.max(0,t-U),t),suffix:y(e,n,Math.min(e.content.size,n+U))}}function W(e,t,n){return G(e)(t,n)}function G(e){let t=z(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=z(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var me=220,he=24;function ge(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-me;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+he)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,n,r,i){let a=D(e);if(!a)return!1;let o=K(a.dom);if(!o)return t(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(n.from),c=a.coordsAtPos(n.to)}catch{return!1}let l=o.getBoundingClientRect(),u=ge({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:q(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return t(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var _e=1e4,Y=80,ve=1500,X=[`wheel`,`touchstart`,`mousedown`,`keydown`];function ye(e){let t=!1,s=null,c=null,l=-1,u=()=>{let i=a(e.docName);if(!i||i.isDestroyed)return!1;if(t||(t=!0,n(e.threadId)),e.quote===``)return s===null&&(s=Date.now(),r(e.threadId)),!0;let o=i.state.doc.content.size;return(c===null||o!==l)&&(c=W(i.state.doc,e.quote,e.context),l=o),!c||!J(i,c,e.docName,{instant:!0})?!1:(s===null&&(s=Date.now(),r(e.threadId)),!0)};i(`comments`),u(),a(e.docName)===null&&window.location.assign(ne(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of X)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&s!==null&&Date.now()-s>=ve&&f()},h=o(m),g=window.setInterval(m,Y),_=window.setTimeout(()=>{s===null&&w.error(t?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},_e);for(let e of X)window.addEventListener(e,p,!0);m()}var Z=e();function be(){return l().length}function xe(){let e=(0,k.c)(4),t=l(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=c(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(Se),e[2]=n,e[3]=r),r}function Se(e){let[t,n]=e;return{docName:t,count:n}}function Ce(e){let t=(0,k.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=d();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=p(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,Z.jsx)(ee,{className:`size-3`}),i=(0,Z.jsx)(u,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,Z.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=p(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=f):f=t[10];let v;t[11]===l?v=t[12]:(v=l({id:`2zvUIK`}),t[11]=l,t[12]=v);let y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(O,{className:`size-3`}),t[13]=y):y=t[13];let b;t[14]!==n||t[15]!==c.length?(b=c.length>1?(0,Z.jsx)(u,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,Z.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=b):b=t[16];let x;t[17]!==v||t[18]!==b?(x=(0,Z.jsx)(h,{asChild:!0,children:(0,Z.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":v,onClick:Te,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[y,b]})}),t[17]=v,t[18]=b,t[19]=x):x=t[19];let S;t[20]===c?S=t[21]:(S=(0,Z.jsx)(g,{className:`max-w-64`,children:c.length>1?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(we)}):(0,Z.jsx)(u,{id:`2zvUIK`})}),t[20]=c,t[21]=S);let C;t[22]!==x||t[23]!==S?(C=(0,Z.jsxs)(_,{children:[x,S]}),t[22]=x,t[23]=S,t[24]=C):C=t[24];let w;t[25]===l?w=t[26]:(w=l({id:`pFRz_E`}),t[25]=l,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(te,{className:`size-3`}),t[27]=T):T=t[27];let E;t[28]!==o||t[29]!==w?(E=(0,Z.jsx)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":w,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:T}),t[28]=o,t[29]=w,t[30]=E):E=t[30];let D;return t[31]!==E||t[32]!==C?(D=(0,Z.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:f,children:[C,E]}),t[31]=E,t[32]=C,t[33]=D):D=t[33],D}function we(e){return(0,Z.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,Z.jsx)(`span`,{className:`truncate`,children:Q(e.docName)})]},e.docName)}function Te(){return s()}function Q(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Ee(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function De(e){ye({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{L({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Oe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Oe=30;function ke(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ae(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function je(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Me(e){if(!e.repeats)return null;let t=Ae(e.prefix),n=je(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ne(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
1
|
+
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{In as t,Ir as n,Lr as r,Qn as i,Ur as a,Xn as o,li as s,oi as c,pi as l}from"./DocumentContext-DX4_PUWv.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{t as p}from"./utils-CPqDy6Hr.js";import{t as m}from"./button-Cym3gapE.js";import{i as h,n as g,t as _}from"./tooltip-BnyyQDRs.js";import{Gn as v,Wn as y,Yi as b,or as x,sr as S,wr as C}from"./dist-BBNlIz6B.js";import{n as w}from"./dist-CJhtNlOm2.js";import{t as T}from"./dist-Cr4-nBVI.js";import{i as ee}from"./local-menu-action-bus-4I1Xm40D.js";import{t as E}from"./createLucideIcon-B6ULg5PN.js";import{Mt as D}from"./CodeMirrorPropInput-D97WOcle.js";import{t as te}from"./x-DIayTyoR.js";import{l as ne}from"./doc-hash-BP0Io59r.js";var O=E(`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`}]]),k=f(),re=`var(--ok-comment-hue, rgb(37 99 235))`,ie={fill:.22,line:.7},ae={fill:.45,line:1},oe=.45;function A(e){return`color-mix(in srgb,${re} ${e*100}%,transparent)`}function se(e,t){let{fill:n,line:r}=t?ae:ie;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:${A(n)}`,`box-shadow:inset 0 -2px 0 ${A(r)}`,``].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 ce(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>N(e,t));i.push({from:a.from,to:a.to,style:se(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 le(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ue(e){I(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function L(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${F(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=R(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),de(n),!0}return!1}function R(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function de(e){e.style.setProperty(`--comment-reveal-fill`,A(oe)),e.setAttribute(P,`true`);let t=()=>{e.removeAttribute(P),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function z(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=y(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function fe(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function B(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:C(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:C(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=b(t.length);return c-s>l?null:{start:s,end:c}}function V(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function H(e,t,n){if(t.length===0)return null;let r=fe(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=C(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=B(e.text,t,n);return r===null?null:V(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||C(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=x({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||S(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,r[0])}let l=[],u=-1;for(let t of r){let n=S(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,l[0])}var U=64;function pe(e,t,n){return{prefix:v(e,Math.max(0,t-U),t),suffix:v(e,n,Math.min(e.content.size,n+U))}}function W(e,t,n){return G(e)(t,n)}function G(e){let t=z(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=z(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var me=220,he=24;function ge(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-me;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+he)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,n,r,i){let a=D(e);if(!a)return!1;let o=K(a.dom);if(!o)return t(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(n.from),c=a.coordsAtPos(n.to)}catch{return!1}let l=o.getBoundingClientRect(),u=ge({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:q(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return t(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var _e=1e4,Y=80,ve=1500,X=[`wheel`,`touchstart`,`mousedown`,`keydown`];function ye(e){let t=!1,a=null,s=null,c=-1,u=()=>{let i=o(e.docName);if(!i||i.isDestroyed)return!1;if(t||(t=!0,n(e.threadId)),e.quote===``)return a===null&&(a=Date.now(),r(e.threadId)),!0;let l=i.state.doc.content.size;return(s===null||l!==c)&&(s=W(i.state.doc,e.quote,e.context),c=l),!s||!J(i,s,e.docName,{instant:!0})?!1:(a===null&&(a=Date.now(),r(e.threadId)),!0)};l(`comments`),u(),o(e.docName)===null&&window.location.assign(ne(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of X)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&a!==null&&Date.now()-a>=ve&&f()},h=i(m),g=window.setInterval(m,Y),_=window.setTimeout(()=>{a===null&&w.error(t?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},_e);for(let e of X)window.addEventListener(e,p,!0);m()}var Z=e();function be(){return c().length}function xe(){let e=(0,k.c)(4),t=c(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=a(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(Se),e[2]=n,e[3]=r),r}function Se(e){let[t,n]=e;return{docName:t,count:n}}function Ce(e){let t=(0,k.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=d();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=p(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,Z.jsx)(ee,{className:`size-3`}),i=(0,Z.jsx)(u,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,Z.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=p(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=f):f=t[10];let v;t[11]===l?v=t[12]:(v=l({id:`2zvUIK`}),t[11]=l,t[12]=v);let y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(O,{className:`size-3`}),t[13]=y):y=t[13];let b;t[14]!==n||t[15]!==c.length?(b=c.length>1?(0,Z.jsx)(u,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,Z.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=b):b=t[16];let x;t[17]!==v||t[18]!==b?(x=(0,Z.jsx)(h,{asChild:!0,children:(0,Z.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":v,onClick:Te,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[y,b]})}),t[17]=v,t[18]=b,t[19]=x):x=t[19];let S;t[20]===c?S=t[21]:(S=(0,Z.jsx)(g,{className:`max-w-64`,children:c.length>1?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(we)}):(0,Z.jsx)(u,{id:`2zvUIK`})}),t[20]=c,t[21]=S);let C;t[22]!==x||t[23]!==S?(C=(0,Z.jsxs)(_,{children:[x,S]}),t[22]=x,t[23]=S,t[24]=C):C=t[24];let w;t[25]===l?w=t[26]:(w=l({id:`pFRz_E`}),t[25]=l,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(te,{className:`size-3`}),t[27]=T):T=t[27];let E;t[28]!==o||t[29]!==w?(E=(0,Z.jsx)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":w,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:T}),t[28]=o,t[29]=w,t[30]=E):E=t[30];let D;return t[31]!==E||t[32]!==C?(D=(0,Z.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:f,children:[C,E]}),t[31]=E,t[32]=C,t[33]=D):D=t[33],D}function we(e){return(0,Z.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,Z.jsx)(`span`,{className:`truncate`,children:Q(e.docName)})]},e.docName)}function Te(){return s()}function Q(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Ee(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function De(e){ye({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{L({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Oe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Oe=30;function ke(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ae(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function je(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Me(e){if(!e.repeats)return null;let t=Ae(e.prefix),n=je(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ne(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
2
2
|
`))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
|
|
3
3
|
`))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=Me(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
|
|
4
4
|
`))i.push(`> ${e}`)}return i.join(`
|