farming-code 2.2.11 → 2.2.13
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/README.md +9 -8
- package/README.zh_cn.md +9 -8
- package/backend/agent-manager.js +108 -5
- package/backend/codex-session-archive.js +13 -4
- package/backend/config-manager.js +5 -0
- package/backend/executable-discovery.js +2 -0
- package/backend/server.js +72 -0
- package/backend/usage-monitor.js +97 -15
- package/backend/workspace-directory.js +80 -0
- package/dist/assets/App-xASd_Y0F.js +206 -0
- package/dist/assets/{FileEditorMarkdownPreview--Cri80nQ.js → FileEditorMarkdownPreview-UlVd0O4D.js} +1 -1
- package/dist/assets/FileEditorPane-Dxx4rKOg.js +2 -0
- package/dist/assets/IconGlyphs-AU22gPDY.js +1 -0
- package/dist/assets/{ProjectFilesSection-Cz1wG4NT.js → ProjectFilesSection-DE7Nb9Jk.js} +3 -3
- package/dist/assets/ReviewPage-CeDKDyZh.js +3 -0
- package/dist/assets/code-dark-DPiuyeSp.css +1 -0
- package/dist/assets/{index-miO2r9IZ.js → index-CYZKdoqi.js} +2 -2
- package/dist/assets/main-Bqtb5kuz.css +1 -0
- package/dist/assets/{monaco.contribution-CyLosfZI.js → monaco.contribution-BXz-lfFB.js} +2 -2
- package/dist/assets/{tsMode-DGZTlTj8.js → tsMode-B0oUTcXQ.js} +1 -1
- package/dist/assets/workspace-editor-monaco-BICJESG0.js +4 -0
- package/dist/assets/workspace-editor-monaco-DRJ7IaXk.js +1 -0
- package/dist/crt-markdown-assets/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/crt-markdown-renderer.css +1 -0
- package/dist/crt-markdown-renderer.js +361 -0
- package/dist/crt-mermaid-renderer.js +3595 -0
- package/dist/farming-2/site.webmanifest +2 -0
- package/dist/index.html +1 -1
- package/frontend/skins/crt/app.js +55 -32
- package/frontend/skins/crt/index.html +47 -31
- package/frontend/skins/crt/styles/markdown.css +251 -0
- package/frontend/skins/crt/styles/monochrome-green.css +14 -3
- package/package.json +5 -2
- package/dist/assets/App-CHYpgECZ.js +0 -208
- package/dist/assets/FileEditorPane-DGJlEKdf.js +0 -2
- package/dist/assets/IconGlyphs-Cc14sepw.js +0 -1
- package/dist/assets/ReviewPage-LonRc6Fz.js +0 -3
- package/dist/assets/code-dark-B1pAtO_P.css +0 -1
- package/dist/assets/main-DNe0jPw-.css +0 -1
- package/dist/assets/workspace-editor-monaco-5gFbeDPF.js +0 -1
- package/dist/assets/workspace-editor-monaco-xPv8JzHH.js +0 -4
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-DECur_0Z.js";import{i as t,t as n}from"./jsx-runtime-BthL93pI.js";import{c as r,s as i}from"./editor.api2-B9h6iFPK.js";import{C as a,E as o,T as s,b as c,g as l,k as u,l as d,m as f,n as p,o as m,r as h,s as g,u as _,v}from"./file-icons-Bw2qd5iT.js";import{g as y}from"./IconGlyphs-Cc14sepw.js";import{d as b,t as x}from"./FileEditorMarkdownPreview--Cri80nQ.js";import{i as S,l as C,n as w,p as T,r as E,t as D,u as O}from"./workspace-working-copy-D8-s_Sgh.js";import{A as k,C as A,D as j,E as M,M as N,O as ee,_ as P,a as F,b as I,d as te,f as L,g as R,h as z,j as B,k as ne,m as V,n as re,o as ie,p as H,r as ae,t as oe,u as se,v as ce,w as U,y as le}from"./workspace-editor-model-BQol4qbA.js";import{t as ue}from"./useWorkspaceMenuKeyboard-Brws6Ar9.js";import{a as de,c as fe,d as pe,f as me,h as he,l as W,m as ge,n as _e,r as ve,s as ye,t as G,u as K}from"./workspace-editor-monaco-xPv8JzHH.js";var q=e(t()),J=n();function be({previewOpen:e}){return e?(0,J.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,J.jsx)(`path`,{d:`M9 3.5V11.5C9 11.776 8.776 12 8.5 12C8.224 12 8 11.776 8 11.5V4.831L5.376 7.83C5.187 8.048 4.814 8.048 4.624 7.83L2 4.831V11.5C2 11.776 1.776 12 1.5 12C1.224 12 1 11.776 1 11.5V3.5C1 3.292 1.129 3.105 1.324 3.032C1.521 2.96 1.74 3.014 1.876 3.171L5 6.741L8.124 3.171C8.261 3.014 8.478 2.959 8.676 3.032C8.871 3.105 9 3.292 9 3.5ZM14.854 9.146C14.659 8.951 14.342 8.951 14.147 9.146L13.001 10.292V3.5C13.001 3.224 12.777 3 12.501 3C12.225 3 12.001 3.224 12.001 3.5V10.293L10.855 9.147C10.66 8.952 10.343 8.952 10.148 9.147C9.953 9.342 9.953 9.659 10.148 9.854L12.148 11.854C12.246 11.952 12.757 11.952 12.855 11.854L14.855 9.854C15.05 9.659 15.05 9.342 14.855 9.147L14.854 9.146Z`})}):(0,J.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,J.jsx)(`path`,{d:`M12.5 1H3.5C2.122 1 1 2.122 1 3.5V12.5C1 13.878 2.122 15 3.5 15H12.5C13.878 15 15 13.878 15 12.5V3.5C15 2.122 13.878 1 12.5 1ZM14 12.5C14 13.327 13.327 14 12.5 14H3.5C2.673 14 2 13.327 2 12.5V3.5C2 2.673 2.673 2 3.5 2H12.5C13.327 2 14 2.673 14 3.5V12.5ZM12 3H4C3.448 3 3 3.448 3 4V6C3 6.552 3.448 7 4 7H12C12.552 7 13 6.552 13 6V4C13 3.448 12.552 3 12 3ZM12 6H4V4H12V6ZM12 8H9C8.448 8 8 8.448 8 9V12C8 12.552 8.448 13 9 13H12C12.552 13 13 12.552 13 12V9C13 8.448 12.552 8 12 8ZM12 12H9V9H12V12ZM7 8.5C7 8.776 6.776 9 6.5 9H3.5C3.224 9 3 8.776 3 8.5C3 8.224 3.224 8 3.5 8H6.5C6.776 8 7 8.224 7 8.5ZM7 10.5C7 10.776 6.776 11 6.5 11H3.5C3.224 11 3 10.776 3 10.5C3 10.224 3.224 10 3.5 10H6.5C6.776 10 7 10.224 7 10.5ZM7 12.5C7 12.776 6.776 13 6.5 13H3.5C3.224 13 3 12.776 3 12.5C3 12.224 3.224 12 3.5 12H6.5C6.776 12 7 12.224 7 12.5Z`})})}function xe(){return(0,J.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,J.jsx)(`path`,{d:`M5.5 2H2.5C1.673 2 1 2.673 1 3.5V12.5C1 13.327 1.673 14 2.5 14H5.5C6.327 14 7 13.327 7 12.5V3.5C7 2.673 6.327 2 5.5 2ZM2.5 3H5.5C5.775 3 6 3.224 6 3.5V5H2V3.5C2 3.224 2.225 3 2.5 3ZM5.5 13H2.5C2.225 13 2 12.776 2 12.5V6H6V12.5C6 12.776 5.775 13 5.5 13ZM13.5 2H10.5C9.673 2 9 2.673 9 3.5V12.5C9 13.327 9.673 14 10.5 14H13.5C14.327 14 15 13.327 15 12.5V3.5C15 2.673 14.327 2 13.5 2ZM10.5 3H13.5C13.775 3 14 3.224 14 3.5V8H10V3.5C10 3.224 10.225 3 10.5 3ZM13.5 13H10.5C10.225 13 10 12.776 10 12.5V10H14V12.5C14 12.776 13.775 13 13.5 13Z`})})}function Y(){return(0,J.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,J.jsx)(`path`,{d:`M2.5 2C1.673 2 1 2.673 1 3.5V12.5C1 13.327 1.673 14 2.5 14H13.5C14.327 14 15 13.327 15 12.5V3.5C15 2.673 14.327 2 13.5 2H2.5ZM2 3.5C2 3.224 2.225 3 2.5 3H7.5V13H2.5C2.225 13 2 12.776 2 12.5V3.5ZM8.5 13V3H13.5C13.775 3 14 3.224 14 3.5V12.5C14 12.776 13.775 13 13.5 13H8.5ZM3.5 5H6V6H3.5V5ZM3.5 7H6V8H3.5V7ZM10 5H12.5V6H10V5ZM10 7H12.5V8H10V7ZM10 9H12.5V10H10V9Z`})})}function Se(){return(0,J.jsxs)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:[(0,J.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M5 6.5V3.75C5 2.765 4.121 2.25 3.251 2.25C2.363 2.25 1.99 2.553 1.897 2.646C1.702 2.841 1.688 3.17 1.883 3.365C2.077 3.561 2.38 3.573 2.576 3.378C2.588 3.37 2.773 3.25 3.25 3.25C3.28 3.25 4 3.256 4 3.75V4.056C3.796 4.023 3.552 4 3.25 4C1.937 4 1.25 4.754 1.25 5.5C1.25 6.246 1.937 7 3.25 7C3.622 7 3.911 6.937 4.145 6.851C4.236 6.943 4.361 7 4.5 7C4.776 7 5 6.776 5 6.5ZM3.251 5C3.623 5 3.857 5.038 4.001 5.074V5.811C3.908 5.885 3.698 6 3.251 6C2.602 6 2.251 5.742 2.251 5.5C2.251 5.258 2.602 5 3.251 5Z`}),(0,J.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.001 7C9.104 7 10.001 5.991 10.001 4.75C10.001 3.509 9.104 2.5 8.001 2.5C7.635 2.5 7.296 2.619 7.001 2.813V1.5C7.001 1.224 6.777 1 6.501 1C6.225 1 6.001 1.224 6.001 1.5V6.5C6.001 6.776 6.225 7 6.501 7C6.718 7 6.898 6.86 6.967 6.666C7.27 6.873 7.621 7 8.001 7ZM8.001 3.5C8.553 3.5 9.001 4.061 9.001 4.75C9.001 5.439 8.553 6 8.001 6C7.449 6 7.001 5.439 7.001 4.75C7.001 4.061 7.449 3.5 8.001 3.5Z`}),(0,J.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.539 13.653C4.31 13.857 3.699 13.976 3.33 13.514C3.117 13.248 3 12.888 3 12.5C3 12.112 3.118 11.752 3.33 11.486C3.701 11.022 4.311 11.141 4.54 11.347C4.744 11.533 5.06 11.515 5.246 11.311C5.431 11.106 5.415 10.79 5.209 10.605C4.422 9.895 3.233 10.009 2.549 10.861C2.195 11.305 2 11.886 2 12.5C2 13.114 2.195 13.696 2.549 14.139C2.93 14.613 3.445 14.875 4 14.875C4.441 14.875 4.859 14.709 5.208 14.395C5.413 14.21 5.43 13.894 5.245 13.689C5.059 13.484 4.743 13.466 4.539 13.653Z`}),(0,J.jsx)(`path`,{d:`M12.5 4H11.5C11.224 4 11 4.224 11 4.5C11 4.776 11.224 5 11.5 5H12.5C12.775 5 13 5.224 13 5.5V11.499C13 11.775 12.775 11.999 12.5 11.999H8.707L9.853 10.853C10.048 10.658 10.048 10.341 9.853 10.146C9.658 9.951 9.341 9.951 9.146 10.146L7.146 12.146C7.049 12.244 7 12.372 7 12.5C7 12.628 7.048 12.756 7.146 12.854L9.146 14.854C9.341 15.049 9.658 15.049 9.853 14.854C10.048 14.659 10.048 14.342 9.853 14.147L8.707 13.001H12.5C13.327 13.001 14 12.328 14 11.501V5.5C14 4.673 13.327 4 12.5 4Z`})]})}function X(e,t,n){return e.showMarkdownPreview?n?t.showMarkdownSource:t.openMarkdownPreview:n?t.showFileSource:t.openFilePreview}function Ce({actions:e,copy:t,diffOpen:n,markdownSplitOpen:r,openFile:i,sourcePreviewOpen:a,wordWrapEnabled:o,statusText:s,onReload:c,onSave:l,onToggleMarkdownSplit:u,onToggleSourcePreview:d,onToggleWordWrap:f,onToggleDiff:p}){let m=e.showMarkdownPreview||e.showSourcePreview,h=X(e,t,a),g=r?t.closeMarkdownSplitPreview:t.openMarkdownSplitPreview;return(0,J.jsxs)(`div`,{className:`code-file-editor-actions`,children:[e.showStatus&&s&&(0,J.jsx)(`span`,{className:`code-file-editor-status ${i.externalChanged?`warning`:``}`,children:s}),e.showSave&&(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action save`,onClick:()=>l(!1),disabled:i.saving,"aria-label":t.saveFile,title:t.saveFile}),e.showDiff&&(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action diff ${n?`active`:``}`,onClick:p,disabled:i.saving,"aria-label":n?t.closeDiff:t.openFileDiff,title:n?t.closeDiff:t.openFileDiff,children:(0,J.jsx)(xe,{})}),m&&(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action source-preview`,onClick:d,disabled:i.saving,"aria-label":h,title:h,children:(0,J.jsx)(be,{previewOpen:a})}),e.showMarkdownPreview&&(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action markdown-split ${r?`active`:``}`,onClick:u,disabled:i.saving,"aria-label":g,title:g,children:(0,J.jsx)(Y,{})}),e.showWordWrap&&(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action word-wrap ${o?`active`:``}`,onClick:f,disabled:i.saving,"aria-pressed":o,"aria-label":o?t.disableWordWrap:t.enableWordWrap,title:o?t.disableWordWrap:t.enableWordWrap,children:(0,J.jsx)(Se,{})}),e.showReload&&(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action reload`,onClick:c,disabled:i.saving,"aria-label":t.reloadFile,title:t.reloadFile}),e.showOverwrite&&(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action overwrite`,onClick:()=>l(!0),disabled:i.saving,"aria-label":t.overwriteChangedFile,title:t.overwriteChangedFile,children:(0,J.jsx)(y,{className:`code-file-editor-action-svg`})})]})}function we({openFile:e,copy:t,onRevealInExplorer:n}){let r=(0,q.useMemo)(()=>M(e.file.path),[e.file.path]);return r.length<=1?(0,J.jsx)(`span`,{"aria-hidden":`true`}):(0,J.jsx)(`nav`,{className:`code-file-editor-breadcrumbs`,title:e.file.path,"aria-label":t.filePath,children:r.map((r,i,a)=>{let o=i===a.length-1,s=j(a,i);return(0,J.jsxs)(`button`,{type:`button`,className:`code-file-editor-breadcrumb ${o?`current`:``}`,onClick:()=>n(e.agentId,s,o?`file`:`directory`),"aria-label":t.revealInExplorer(s),children:[(0,J.jsx)(`span`,{className:`code-file-editor-breadcrumb-name`,children:r}),!o&&(0,J.jsx)(`span`,{className:`code-file-editor-breadcrumb-separator`,"aria-hidden":`true`})]},`${i}-${r}`)})})}function Z(){return(0,J.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,J.jsx)(`path`,{d:`M13.5 8.00023H3.70701L7.85301 3.85423C8.04801 3.65923 8.04801 3.34223 7.85301 3.14723C7.65801 2.95223 7.34101 2.95223 7.14601 3.14723L2.14601 8.14723C1.95101 8.34223 1.95101 8.65923 2.14601 8.85423L7.14601 13.8542C7.24401 13.9522 7.37201 14.0002 7.50001 14.0002C7.62801 14.0002 7.75601 13.9512 7.85401 13.8542C8.04901 13.6592 8.04901 13.3422 7.85401 13.1472L3.70801 9.00123H13.501C13.777 9.00123 14.001 8.77723 14.001 8.50123C14.001 8.22523 13.777 8.00123 13.501 8.00123L13.5 8.00023Z`})})}function Te(){return(0,J.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,J.jsx)(`path`,{d:`M13.854 8.14576L8.854 3.14576C8.659 2.95076 8.342 2.95076 8.147 3.14576C7.952 3.34076 7.952 3.65776 8.147 3.85276L12.293 7.99876H2.5C2.224 7.99876 2 8.22276 2 8.49876C2 8.77476 2.224 8.99876 2.5 8.99876H12.293L8.147 13.1448C7.952 13.3398 7.952 13.6568 8.147 13.8518C8.245 13.9498 8.373 13.9978 8.501 13.9978C8.629 13.9978 8.757 13.9488 8.855 13.8518L13.855 8.85176C14.05 8.65676 14.05 8.33976 13.855 8.14476L13.854 8.14576Z`})})}function Ee(){return(0,J.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,J.jsx)(`path`,{d:`M13 13.5C13 13.776 12.776 14 12.5 14C9.46198 14 6.99998 11.538 6.99998 8.50001V3.70701L4.35398 6.35301C4.15898 6.54801 3.84198 6.54801 3.64698 6.35301C3.45198 6.15801 3.45198 5.84101 3.64698 5.64601L7.14698 2.14601C7.34198 1.95101 7.65898 1.95101 7.85398 2.14601L11.354 5.64601C11.549 5.84101 11.549 6.15801 11.354 6.35301C11.159 6.54801 10.842 6.54801 10.647 6.35301L8.00098 3.70701V8.50001C8.00098 10.985 10.016 13 12.501 13C12.777 13 13.001 13.224 13.001 13.5H13Z`})})}function De({openFile:e,openFiles:t,copy:n,onBackToAgent:r,onSelectOpenFile:i,canNavigateBack:a,canNavigateForward:o,onNavigateHistory:s,onSetTabRef:c,onOpenTabContextMenu:l,onTabAuxClick:u,onTabKeyDown:d,onCloseTab:f}){return(0,J.jsxs)(`div`,{className:`code-file-editor-tab-strip`,children:[(0,J.jsxs)(`div`,{className:`code-file-editor-navigation`,children:[e.sourceAgentId&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action code-file-editor-agent-return`,onClick:()=>r(e.sourceAgentId),"aria-label":n.backToAgent,title:n.backToAgent,"data-testid":`code-file-editor-back`,children:(0,J.jsx)(Ee,{})}),(0,J.jsx)(`span`,{className:`code-file-editor-navigation-divider`,"aria-hidden":`true`})]}),(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action code-file-editor-history-back`,onClick:()=>{s(-1)},disabled:!a,"aria-label":n.goBack,title:n.goBack,"data-testid":`code-file-editor-history-back`,children:(0,J.jsx)(Z,{})}),(0,J.jsx)(`button`,{type:`button`,className:`code-file-editor-action code-file-editor-history-forward`,onClick:()=>{s(1)},disabled:!o,"aria-label":n.goForward,title:n.goForward,"data-testid":`code-file-editor-history-forward`,children:(0,J.jsx)(Te,{})})]}),(0,J.jsx)(`div`,{className:`code-file-editor-tabs`,role:`tablist`,children:t.map((t,r)=>{let a=U(t),o=a===U(e),s=T(t),m=O(t);return(0,J.jsxs)(`div`,{id:k(t),ref:e=>c(a,e),className:`code-file-editor-tab ${o?`active`:``} ${s}`.trim(),title:t.file.path,role:`tab`,"aria-selected":o,"aria-controls":`code-file-editor-panel`,"aria-label":B(t),tabIndex:o?0:-1,onClick:()=>i(t.agentId,t.file.path),onContextMenu:e=>l(e,r),onAuxClick:e=>u(e,r),onKeyDown:e=>d(e,r),children:[(0,J.jsx)(`img`,{className:`code-file-type-icon file`,src:p(t.file.path),alt:``,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`code-file-editor-tab-name`,children:H(t.file.path)}),(0,J.jsxs)(`span`,{className:`code-file-editor-tab-tail`,children:[m&&(0,J.jsx)(`span`,{className:`code-file-editor-dirty`,title:m===`external`?n.changedOnDisk:n.unsavedChanges}),(0,J.jsx)(`button`,{type:`button`,tabIndex:-1,className:`code-file-editor-close`,onClick:e=>{e.stopPropagation(),f(r)},"aria-label":n.closeFile(t.file.path)})]})]},a)})})]})}function Oe({openFile:e,openFiles:t,editorMode:n,copy:r,statusText:i,onBackToAgent:a,onSelectOpenFile:o,canNavigateBack:s,canNavigateForward:c,onNavigateHistory:l,onSetTabRef:u,onOpenTabContextMenu:d,onTabAuxClick:f,onTabKeyDown:p,onCloseTab:m,onRevealInExplorer:h,onSave:g,onReload:_,onToggleSourcePreview:v,onToggleMarkdownSplit:y,onToggleWordWrap:b,onToggleDiff:x,canPreviewMarkdown:S,canPreviewSource:C,diffOpen:w,markdownSplitOpen:T,sourcePreviewOpen:E,wordWrapEnabled:D}){let O=L(e,n,{canPreviewMarkdown:S,canPreviewSource:C,statusText:i,showBreadcrumbs:e.file.path.includes(`/`)});return(0,J.jsxs)(`header`,{className:`code-file-editor-header`,children:[(0,J.jsx)(De,{openFile:e,openFiles:t,copy:r,onBackToAgent:a,onSelectOpenFile:o,canNavigateBack:s,canNavigateForward:c,onNavigateHistory:l,onSetTabRef:u,onOpenTabContextMenu:d,onTabAuxClick:f,onTabKeyDown:p,onCloseTab:m}),O.showBar&&(0,J.jsxs)(`div`,{className:`code-file-editor-bar`,children:[(0,J.jsx)(we,{openFile:e,copy:r,onRevealInExplorer:h}),(0,J.jsx)(Ce,{actions:O,copy:r,diffOpen:w,openFile:e,markdownSplitOpen:T,sourcePreviewOpen:E,wordWrapEnabled:D,statusText:i,onReload:_,onSave:g,onToggleMarkdownSplit:y,onToggleSourcePreview:v,onToggleWordWrap:b,onToggleDiff:x})]})]})}function ke({blame:e,loading:t,error:n,copy:r}){return!t&&!n&&(!e||e.isGitRepo&&e.lines.length>0)?null:(0,J.jsx)(`div`,{className:`code-file-blame-toast ${n?`error`:``}`,"data-testid":`code-file-blame-state`,children:t?r.loadingBlame:n||(e&&!e.isGitRepo?r.notGitRepository:r.noCommittedLines)})}function Q({x:e,y:t,copy:n,blameOpen:r,readOnly:i,showBlameContextAction:a,showLineChangesContextActions:o,onClose:s,onRunAction:c}){let l=(0,q.useRef)(null),u=ue({menuOpen:!0,menuRef:l,onClose:s});return(0,J.jsxs)(`div`,{ref:l,className:`code-editor-context-menu`,"data-testid":`code-editor-context-menu`,role:`menu`,style:{left:e,top:t},onKeyDown:u,onMouseDown:e=>e.stopPropagation(),children:[a&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`toggle-blame`),children:r?n.hideBlame:n.annotateWithBlame}),(0,J.jsx)(`div`,{className:`code-editor-context-separator`,role:`separator`})]}),o&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`line-changes-previous`),children:n.openLineChangesWithPreviousRevision}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`line-changes-working`),children:n.openLineChangesWithWorkingFile}),(0,J.jsx)(`div`,{className:`code-editor-context-separator`,role:`separator`})]}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`cut`),disabled:i,children:n.cut}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`copy`),children:n.copy}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`paste`),disabled:i,children:n.paste}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`select-all`),children:n.selectAll})]})}function Ae({label:e,saving:t,copy:n,onConfirmSave:r,onDiscard:i,onCancel:a}){return(0,J.jsx)(`div`,{className:`code-file-save-confirm-backdrop`,"data-testid":`code-file-save-confirm`,role:`presentation`,onMouseDown:e=>e.stopPropagation(),children:(0,J.jsxs)(`div`,{className:`code-file-save-confirm-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`code-file-save-confirm-title`,"aria-describedby":`code-file-save-confirm-description`,onKeyDown:e=>{e.key===`Escape`&&!t&&(e.preventDefault(),a())},children:[(0,J.jsx)(`div`,{className:`code-file-save-confirm-brand`,"aria-hidden":`true`,children:`F`}),(0,J.jsx)(`h2`,{id:`code-file-save-confirm-title`,children:n.saveBeforeCloseTitle(e)}),(0,J.jsx)(`p`,{id:`code-file-save-confirm-description`,children:n.saveBeforeCloseDescription}),(0,J.jsxs)(`div`,{className:`code-file-save-confirm-actions`,children:[(0,J.jsx)(`button`,{type:`button`,className:`primary`,onClick:r,disabled:t,children:t?n.savingFile:n.save}),(0,J.jsx)(`button`,{type:`button`,onClick:i,disabled:t,children:n.dontSave}),(0,J.jsx)(`button`,{type:`button`,onClick:a,disabled:t,children:n.cancel})]})]})})}function je({menu:e,openFiles:t,copy:n,onRunAction:r}){return(0,J.jsxs)(`div`,{className:`code-context-menu code-file-tab-context-menu`,"data-testid":`code-file-tab-context-menu`,role:`menu`,style:{left:e.x,top:e.y},children:[(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close`),children:n.close}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-others`),disabled:t.length<=1,children:n.closeOthers}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-right`),disabled:e.index>=t.length-1,children:n.closeToRight}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-saved`),disabled:!D(t),children:n.closeSaved}),(0,J.jsx)(`div`,{className:`code-context-menu-separator`,role:`separator`}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-all`),children:n.closeAll})]})}function Me({blame:e,blameError:t,blameLoading:n,blameOpen:r,copy:i,editorContextMenu:a,readOnly:o,openFiles:s,pendingCloseOpen:c,pendingCloseLabel:l,pendingCloseSaving:u,showBlameContextAction:d,showLineChangesContextActions:f,tabContextMenu:p,onCancelPendingClose:m,onCloseEditorContextMenu:h,onConfirmSaveAndClose:g,onDiscardAndClose:_,onRunEditorContextAction:v,onRunTabContextAction:y}){return(0,J.jsxs)(J.Fragment,{children:[a&&(0,J.jsx)(Q,{x:a.x,y:a.y,copy:i,blameOpen:r,readOnly:o,showBlameContextAction:d,showLineChangesContextActions:f,onClose:h,onRunAction:e=>void v(e)}),p&&(0,J.jsx)(je,{menu:p,openFiles:s,copy:i,onRunAction:y}),c&&(0,J.jsx)(Ae,{label:l,saving:u,copy:i,onConfirmSave:()=>void g(),onDiscard:_,onCancel:m}),r&&(0,J.jsx)(ke,{blame:e,loading:n,error:t,copy:i})]})}function Ne({filePath:e,line:t,authorProfileUrl:n,copy:r,onClose:i}){return(0,J.jsxs)(`section`,{className:`code-file-blame-detail`,"data-testid":`code-file-blame-detail`,"aria-label":r.gitBlameDetails,children:[(0,J.jsxs)(`div`,{className:`code-file-blame-detail-main`,children:[(0,J.jsxs)(`div`,{className:`code-file-blame-detail-title`,children:[(0,J.jsx)(`strong`,{children:t.summary||t.shortCommit}),(0,J.jsx)(`code`,{title:t.commit,children:t.shortCommit})]}),(0,J.jsx)(`div`,{className:`code-file-blame-detail-subtitle`,children:e})]}),(0,J.jsxs)(`div`,{className:`code-file-blame-detail-rows`,children:[(0,J.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,J.jsx)(`span`,{children:r.author}),n?(0,J.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,children:t.author}):(0,J.jsx)(`strong`,{children:t.author||r.unknown})]}),(0,J.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,J.jsx)(`span`,{children:r.commit}),(0,J.jsx)(`strong`,{title:t.commit,children:t.shortCommit})]}),(0,J.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,J.jsx)(`span`,{children:r.date}),(0,J.jsx)(`strong`,{children:re(t.authorTime)||r.uncommitted})]}),(0,J.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,J.jsx)(`span`,{children:r.line}),(0,J.jsx)(`strong`,{children:t.lineNumber})]})]}),(0,J.jsx)(`button`,{type:`button`,className:`code-file-blame-detail-close`,onClick:i,"aria-label":r.closeBlameDetails})]})}function Pe(e,t){if(e.loading)return t.loadingDiff;if(e.error)return e.error;let n=e.diff;return n?n.isGitRepo?n.binary?t.binaryDiffUnavailable:n.truncated?t.diffTooLarge:n.patch.trim()?typeof n.originalContent!=`string`||typeof n.modifiedContent!=`string`?t.diffUnavailable:``:t.noFileDiff:t.notGitRepository:``}function Fe(e){let t=e.diff;return!!(t&&t.isGitRepo&&!t.binary&&!t.truncated&&t.patch.trim()&&typeof t.originalContent==`string`&&typeof t.modifiedContent==`string`)}function Ie(e,t){let n=C(e.file.path,e.workspaceRoot);return i.from({scheme:`farming-diff`,path:n.startsWith(`/`)?n:`/${n}`,query:t})}function Le(e,t,n,i){let a=Ie(e,t);return r.getModel(a)?.dispose(),r.createModel(n,i,a)}function Re({openFile:e,diffState:t,copy:n,onClose:i}){let a=(0,q.useRef)(null),o=(0,q.useRef)(null),s=(0,q.useRef)(null),c=(0,q.useRef)(null),l=Fe(t),d=(0,q.useMemo)(()=>Pe(t,n),[n,t]);return(0,q.useEffect)(()=>{if(!l)return;let e=a.current;if(!e)return;_e(),G();let t=r.createDiffEditor(e,{theme:ge(),automaticLayout:!1,renderSideBySide:!u(),originalEditable:!1,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fixedOverflowWidgets:!0,renderOverviewRuler:!0,enableSplitViewResizing:!u(),ignoreTrimWhitespace:!1,glyphMargin:!0,lineNumbersMinChars:4,unicodeHighlight:{ambiguousCharacters:!1,invisibleCharacters:!0,nonBasicASCII:!1}});o.current=t;let n=new ResizeObserver(()=>t.layout());n.observe(e);let i=new MutationObserver(()=>G(t));return i.observe(document.body,{attributes:!0,attributeFilter:[`data-appearance`]}),window.requestAnimationFrame(()=>t.layout()),()=>{n.disconnect(),i.disconnect(),t.dispose(),s.current?.dispose(),c.current?.dispose(),s.current=null,c.current=null,o.current=null}},[l]),(0,q.useEffect)(()=>{if(!l||!t.diff)return;let n=o.current;if(!n)return;s.current?.dispose(),c.current?.dispose();let r=pe(e.file.path,t.diff.modifiedContent),i=Le(e,`original`,t.diff.originalContent??``,r),a=Le(e,`modified`,t.diff.modifiedContent??``,r);s.current=i,c.current=a,n.setModel({original:i,modified:a}),window.requestAnimationFrame(()=>n.layout())},[t.diff,e,l]),(0,J.jsxs)(`section`,{className:`code-file-diff-view`,"data-testid":`code-file-diff-view`,"aria-label":n.fileDiff,children:[(0,J.jsxs)(`header`,{className:`code-file-diff-header`,children:[(0,J.jsxs)(`div`,{className:`code-file-diff-title`,children:[(0,J.jsx)(`strong`,{children:n.fileDiff}),(0,J.jsx)(`span`,{children:e.file.path})]}),(0,J.jsx)(`button`,{type:`button`,className:`code-file-diff-close`,"aria-label":n.closeDiff,onClick:i})]}),d&&(0,J.jsx)(`div`,{className:`code-file-diff-state ${t.error?`error`:``}`,children:d}),(0,J.jsx)(`div`,{ref:a,className:`code-file-diff-monaco ${l?``:`hidden`}`,"data-testid":`code-file-diff-monaco`})]})}function ze({left:e,width:t,rows:n,copy:r,onShowDetail:i}){return n.length===0?null:(0,J.jsx)(`div`,{className:`code-file-inline-blame-layer`,"aria-label":r.gitBlameAnnotations,children:n.map(({line:n,top:a})=>(0,J.jsx)(`button`,{type:`button`,className:`code-file-inline-blame ${n.uncommitted?`uncommitted`:``}`,style:{left:e,top:a,width:t},title:`${n.shortCommit} ${n.author||r.unknown} ${n.summary}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),i(n)},children:te(n)},`${n.lineNumber}-${n.commit}-${n.author}`))})}function Be(e,t){return e===`previous`?t.openLineChangesWithPreviousRevision:t.openLineChangesWithWorkingFile}function Ve({mode:e,lineNumber:t,loading:n,error:r,changes:i,copy:a,onClose:o}){let s=i?.commit?`${i.commit.shortHash} ${i.commit.summary||``}`.trim():``,c=n?a.loadingLineChanges:r||(i&&!i.available?a.noLineChanges:``),l=i?.patch?i.patch.split(`
|
|
2
|
-
`):[];return(0,J.jsxs)(`div`,{className:`code-file-line-changes-panel`,"data-testid":`code-file-line-changes-panel`,children:[(0,J.jsxs)(`div`,{className:`code-file-line-changes-main`,children:[(0,J.jsxs)(`div`,{className:`code-file-line-changes-title`,children:[(0,J.jsx)(`strong`,{children:Be(e,a)}),(0,J.jsxs)(`code`,{children:[a.line,` `,t]})]}),s&&(0,J.jsx)(`div`,{className:`code-file-line-changes-subtitle`,children:s}),c&&(0,J.jsx)(`div`,{className:`code-file-line-changes-state ${r?`error`:``}`,children:c}),!n&&!r&&i?.available&&(0,J.jsx)(`pre`,{className:`code-file-line-changes-patch`,"aria-label":a.lineChanges,children:l.map((e,t)=>(0,J.jsx)(`span`,{className:`code-file-line-changes-line ${I(e)}`,children:e||` `},`${t}-${e}`))})]}),(0,J.jsx)(`button`,{type:`button`,className:`code-file-line-changes-close`,"aria-label":a.closeLineChanges,onClick:o})]})}function He({openFile:e,activeTabDomId:t,copy:n,sourcePreviewOpen:r}){let i=e.file.preview??null,a=r&&ie(e.file.path)?{kind:`image`,mediaType:`image/svg+xml`}:null,o=i?.kind===`image`?i:a,s=i?.kind===`pdf`?i:null,c=i?.kind===`binary`?i:null;return o?(0,J.jsx)(`section`,{className:`code-file-preview-panel`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":t,tabIndex:-1,children:(0,J.jsx)(`div`,{className:`code-file-image-preview-frame`,children:(0,J.jsx)(`img`,{className:`code-file-image-preview`,"data-testid":`code-file-image-preview`,src:l(e.agentId,e.file.path,e.file.sha1),alt:H(e.file.path),draggable:!1})})}):s?(0,J.jsx)(`section`,{className:`code-file-preview-panel`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":t,tabIndex:-1,children:(0,J.jsx)(`iframe`,{className:`code-file-pdf-preview`,"data-testid":`code-file-pdf-preview`,src:l(e.agentId,e.file.path,e.file.sha1),title:n.previewFor(e.file.path)})}):c?(0,J.jsx)(`section`,{className:`code-file-preview-panel metadata`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":t,"aria-label":n.previewFor(e.file.path),tabIndex:-1,children:(0,J.jsx)(`img`,{className:`code-file-metadata-preview-icon`,"data-testid":`code-file-metadata-preview-icon`,src:p(e.file.path),alt:``,"aria-hidden":`true`,draggable:!1})}):null}function Ue({activeTabDomId:e,blame:t,blameAuthorProfileUrl:n,blameDetailLine:r,blameOpen:i,blameOverlay:a,copy:o,cursorPosition:s,diffState:c,editorMode:l,editorHostRef:u,lineChanges:d,markdownSplitOpen:f,markdownPreviewOpen:p,sourcePreviewOpen:m,openFile:h,onClearBlameDetail:g,onCloseLineChanges:_,onCloseDiff:v,onOpenFilePath:y,onShowBlameDetail:b}){let S=ne({diffOnly:l.diffOnly,diffOpen:c.open,markdownSplitOpen:f,markdownPreviewOpen:p,sourcePreviewOpen:m,visualPreview:l.visualPreview}),C=(0,q.useRef)(null),w=S.showEditorOverlays||S.showMarkdownPreview;return(0,J.jsxs)(J.Fragment,{children:[S.showDiffView&&(0,J.jsx)(Re,{openFile:h,diffState:c,copy:o,onClose:v}),(0,J.jsxs)(`div`,{className:`code-file-editor-source-region ${S.showMarkdownSplit?`markdown-split`:``} ${S.showMonaco||S.showMarkdownSplit?``:`hidden`}`.trim(),"data-testid":S.showMarkdownSplit?`code-file-markdown-split`:void 0,children:[(0,J.jsx)(`div`,{id:`code-file-editor-panel`,ref:u,className:`code-file-monaco`,"data-testid":`code-file-monaco`,role:`tabpanel`,"aria-labelledby":e,tabIndex:-1}),S.showMarkdownSplit&&(0,J.jsx)(x,{ref:C,activeTabDomId:e,openFile:h,onOpenFilePath:y,copy:o})]}),S.showDiffOnlyPreview&&(0,J.jsx)(`section`,{className:`code-file-preview-panel metadata`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":e,tabIndex:-1,children:(0,J.jsx)(`div`,{className:`code-file-diff-state`,children:o.deletedFileDiffOnly})}),S.showMarkdownPreview&&(0,J.jsx)(x,{activeTabDomId:e,openFile:h,onOpenFilePath:y,copy:o}),S.showEditorOverlays&&i&&t?.isGitRepo&&(0,J.jsx)(ze,{left:a.left,width:a.width,rows:a.rows,copy:o,onShowDetail:b}),(0,J.jsx)(He,{openFile:h,activeTabDomId:e,copy:o,sourcePreviewOpen:S.showSourcePreview}),S.showEditorOverlays&&i&&r&&(0,J.jsx)(Ne,{filePath:h.file.path,line:r,authorProfileUrl:n,copy:o,onClose:g}),S.showEditorOverlays&&d&&(0,J.jsx)(Ve,{mode:d.mode,lineNumber:d.lineNumber,loading:d.loading,error:d.error,changes:d.changes,copy:o,onClose:_}),w&&(0,J.jsx)(`div`,{className:`code-file-editor-statusbar`,"data-testid":`code-file-editor-statusbar`,children:(0,J.jsx)(`span`,{className:`code-file-editor-cursor-position`,children:o.cursorPosition(s.lineNumber,s.column)})})]})}function We(e){return e instanceof h&&ae(e.status)}function Ge({openFile:e,disabled:t,onRevealLine:n}){let r=(0,q.useRef)(0),i=(0,q.useRef)(U(e)),[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(!1),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(null),[p,h]=(0,q.useState)(`unknown`),[_,v]=(0,q.useState)(null);i.current=U(e);let y=(0,q.useMemo)(()=>{let e=l?.lines??[];return{compact:oe(e,!0),regular:oe(e,!1)}},[l]),b=(0,q.useCallback)(()=>{v(null)},[]),x=(0,q.useCallback)(async()=>{if(t)return h(`unavailable`),null;c(!0),f(null);try{let t=await m(e.agentId,e.file.path);return u(t),h(t.isGitRepo&&t.lines.length>0?`available`:`unavailable`),t}catch(e){return u(null),f(e instanceof Error?e.message:`Failed to load blame`),h(We(e)?`unavailable`:`unknown`),null}finally{c(!1)}},[t,e.agentId,e.file.path,e.file.sha1]),S=(0,q.useCallback)(async()=>{if(t)return h(`unavailable`),`unavailable`;let n=U(e),a=r.current+1;r.current=a;try{let t=await g(e.agentId,e.file.path);if(r.current!==a||i.current!==n)return null;let o=t.available?`available`:`unavailable`;return h(o),o}catch{return r.current!==a||i.current!==n?null:(h(`unavailable`),`unavailable`)}},[t,e]),C=(0,q.useCallback)(async()=>{if(!t){if(a){o(!1),v(null);return}(p===`unknown`?await S():p)!==`unavailable`&&o(!0)}},[p,a,S,t]),w=(0,q.useCallback)(e=>{n(e.lineNumber,{focusEditor:!1}),v({line:e})},[n]);return(0,q.useEffect)(()=>{u(null),f(null),h(t?`unavailable`:`unknown`)},[t,e.agentId,e.file]),(0,q.useEffect)(()=>{t&&(o(!1),u(null),f(null),h(`unavailable`))},[t,e.agentId,e.file.path]),(0,q.useEffect)(()=>{if(!a)return;let e=!1;return x().then(t=>{e||(!t?.isGitRepo||t.lines.length===0)&&(o(!1),v(null))}),()=>{e=!0}},[a,x]),(0,q.useEffect)(()=>{v(null)},[a,e.agentId,e.file.path]),{blameOpen:a,blameLoading:s,blame:l,blameError:d,blameCapability:p,blameDetail:_,blameLabelWidths:y,checkBlameCapability:S,toggleBlame:C,showBlameDetail:w,clearBlameDetail:b}}function Ke({blame:e,blameLabelWidths:t,blameOpen:n,editorHostRef:i,editorRef:a,disabled:o}){let[s,c]=(0,q.useState)({left:0,width:112,rows:[]}),l=(0,q.useCallback)(()=>{let s=a.current,l=i.current;if(!s||!l||!n||!e?.isGitRepo||o){c({left:0,width:112,rows:[]}),s?.updateOptions({lineDecorationsWidth:10});return}let u=l.clientWidth<=520?t.compact:t.regular;s.updateOptions({lineDecorationsWidth:u+12});let d=s.getLayoutInfo(),f=l.offsetTop,p=s.getScrollTop(),m=s.getOption(r.EditorOption.lineHeight),h=l.offsetLeft+Math.max(0,d.contentLeft-u-8),g=N({visibleRanges:s.getVisibleRanges(),scrollTop:p,hostHeight:l.clientHeight,lineHeight:m});c({left:h,width:u,rows:V(e.lines,{...g,hostTop:f,scrollTop:p,hostHeight:l.clientHeight,lineHeight:m,getTopForLineNumber:e=>s.getTopForLineNumber(e)})})},[e,t,n,o,i,a]);return(0,q.useEffect)(()=>{let e=a.current;if(!e)return;l();let t=e.onDidScrollChange(l),n=e.onDidLayoutChange(l),r=window.requestAnimationFrame(l);return()=>{t.dispose(),n.dispose(),window.cancelAnimationFrame(r)}},[a,l]),{blameOverlay:s}}function qe({blameCapability:e,blameOpen:t,canShowBlame:n,canShowLineChanges:i,editorRef:a,readOnly:o,onCheckBlameCapability:s,onClearBlameDetail:c,onCloseTabContextMenu:l,onOpenLineChanges:u,onToggleBlame:d}){let[f,p]=(0,q.useState)(null),m=(0,q.useCallback)(()=>{p(null)},[]),h=(0,q.useCallback)(e=>{let i=e.target.type,o=new Set([r.MouseTargetType.GUTTER_GLYPH_MARGIN,r.MouseTargetType.GUTTER_LINE_NUMBERS,r.MouseTargetType.GUTTER_LINE_DECORATIONS,r.MouseTargetType.GUTTER_VIEW_ZONE]),u=e.target.position?.lineNumber??a.current?.getPosition()?.lineNumber??1,d=o.has(i)?`gutter`:`editor`;e.event.preventDefault(),e.event.stopPropagation(),c(),l();let f={x:Math.max(8,Math.min(e.event.posx,window.innerWidth-220)),y:Math.max(8,Math.min(e.event.posy,window.innerHeight-230)),kind:d,lineNumber:u};if(d===`gutter`&&n&&!t){s().then(e=>{e!==null&&p(f)});return}p(f)},[t,n,a,s,c,l]),g=(0,q.useCallback)(async e=>{let t=a.current,r=f;if(m(),!t)return;let s=t.getModel(),c=t.getSelection();if(e===`toggle-blame`){if(!n)return;await d();return}if(e===`line-changes-previous`||e===`line-changes-working`){if(!i)return;let n=r?.lineNumber??t.getPosition()?.lineNumber??1;await u(e===`line-changes-previous`?`previous`:`working`,n);return}if(e===`select-all`&&s){t.setSelection(s.getFullModelRange()),t.focus();return}if(!(!s||!c)){if(e===`copy`||e===`cut`){let n=s.getValueInRange(c);n&&await navigator.clipboard?.writeText(n).catch(()=>{}),e===`cut`&&n&&!o&&t.executeEdits(`farming-context-menu`,[{range:c,text:``,forceMoveMarkers:!0}]),t.focus();return}if(e===`paste`&&!o){let e=await navigator.clipboard?.readText().catch(()=>``)??``;e&&t.executeEdits(`farming-context-menu`,[{range:c,text:e,forceMoveMarkers:!0}]),t.focus()}}},[n,i,m,f,a,u,d,o]),_=!!(f&&f.kind===`gutter`&&n&&(t||e===`available`)),v=!!(f&&f.kind===`gutter`&&i);return(0,q.useEffect)(()=>{let e=e=>{let t=e.target;t instanceof Element&&t.closest(`.code-editor-context-menu, .code-file-tab-context-menu, .code-file-blame-detail, .code-file-inline-blame, .code-file-line-changes-panel`)||(p(null),l())},t=e=>{e.key===`Escape`&&(p(null),l())};return document.addEventListener(`mousedown`,e,!0),document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`mousedown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[l]),{editorContextMenu:f,closeEditorContextMenu:m,openEditorContextMenu:h,runEditorContextAction:g,showBlameContextAction:_,showLineChangesContextActions:v}}function Je({openFile:e,diffDisabled:t,onClearBlameDetail:n}){let r=(0,q.useRef)(0),i=(0,q.useRef)(void 0),a=(0,q.useRef)(U(e)),[o,s]=(0,q.useState)({open:!1,loading:!1,error:null,diff:null});a.current=U(e);let c=(0,q.useCallback)(()=>{r.current+=1,s({open:!1,loading:!1,error:null,diff:null})},[]),l=(0,q.useCallback)(async()=>{if(t)return;let i=r.current+1,o=U(e);r.current=i,n(),s({open:!0,loading:!0,error:null,diff:null});try{let t=await d(e.agentId,e.file.path);if(r.current!==i||a.current!==o)return;s({open:!0,loading:!1,error:null,diff:t})}catch(e){if(r.current!==i||a.current!==o)return;s({open:!0,loading:!1,error:e instanceof Error?e.message:`Failed to load diff`,diff:null})}},[t,n,e]),u=(0,q.useCallback)(()=>{if(o.open){c();return}l()},[c,o.open,l]);return(0,q.useEffect)(()=>{r.current+=1,s({open:!1,loading:!1,error:null,diff:null})},[t,e.agentId,e.file]),(0,q.useEffect)(()=>{!e.diffRequestId||t||i.current===e.diffRequestId||(i.current=e.diffRequestId,l())},[t,l,e.diffRequestId]),{diffState:o,closeDiff:c,toggleDiff:u}}function Ye({openFile:e,disabled:t,onClearBlameDetail:n,onRevealLine:r}){let i=(0,q.useRef)(0),a=(0,q.useRef)(U(e)),[o,s]=(0,q.useState)(null);a.current=U(e);let c=(0,q.useCallback)(()=>{s(null)},[]),l=(0,q.useCallback)(async(o,c)=>{if(t)return;let l=i.current+1,u=U(e);i.current=l,n(),s(le(o,c)),r(c,{focusEditor:!1});try{let t=await f(e.agentId,e.file.path,c,o);if(i.current!==l||a.current!==u)return;s(ce(o,c,t))}catch(e){if(i.current!==l||a.current!==u)return;s(P(o,c,e))}},[t,n,r,e]);return(0,q.useEffect)(()=>{i.current+=1,s(null)},[t,e.agentId,e.file]),{lineChanges:o,openLineChanges:l,closeLineChanges:c}}function Xe({editorRef:e,onFocusEditor:t}){(0,q.useEffect)(()=>{if(!window.__FARMING_E2E__)return;let n={focus(){return t(),!!e.current},revealLine(t){let n=e.current,r=n?.getModel();if(!n||!r)return!1;let i=Math.min(Math.max(1,t),r.getLineCount());return n.setPosition({lineNumber:i,column:1}),n.revealLineInCenter(i),n.focus(),!0},insertText(t){let n=e.current,r=n?.getSelection();return!n||!r?!1:(n.pushUndoStop(),n.executeEdits(`farming-e2e`,[{range:r,text:t,forceMoveMarkers:!0}]),n.pushUndoStop(),n.focus(),!0)},undo(){let t=e.current;return t?(t.focus(),t.trigger(`farming-e2e`,`undo`,null),!0):!1},getValue(){return e.current?.getValue()??``},getScrollTop(){return e.current?.getScrollTop()??0}};return window.__farmingFileEditorTest=n,()=>{window.__farmingFileEditorTest===n&&delete window.__farmingFileEditorTest}},[e,t])}function Ze({openFile:e,openFiles:t,readOnly:n,wordWrapEnabled:i,editorLabel:l,onChangeDraft:u,onFocusFilesSearch:d,onRecordNavigationCursor:f,onSaveShortcut:p,onOpenContextMenuRef:m}){let h=(0,q.useRef)(null),g=(0,q.useRef)(null),_=(0,q.useRef)(new Map),v=(0,q.useRef)(null),y=(0,q.useRef)(new Map),b=(0,q.useRef)(null),x=(0,q.useRef)(null),S=(0,q.useRef)(null),C=(0,q.useRef)(null),w=(0,q.useRef)(null),T=(0,q.useRef)(u),E=(0,q.useRef)(d),D=(0,q.useRef)(f),O=(0,q.useRef)(p),k=(0,q.useRef)(e.agentId),j=(0,q.useRef)(e.file.path),M=(0,q.useRef)(e.workspaceRoot),N=(0,q.useRef)(i),ee=(0,q.useRef)(l),P=(0,q.useRef)(null),F=(0,q.useRef)(0),I=(0,q.useRef)(0),[te,L]=(0,q.useState)({lineNumber:1,column:1});T.current=u,E.current=d,D.current=f,O.current=p,k.current=e.agentId,j.current=e.file.path,M.current=e.workspaceRoot,N.current=i,ee.current=l;let R=(0,q.useCallback)(e=>{let t=e?.getPosition();t&&L(e=>e.lineNumber===t.lineNumber&&e.column===t.column?e:{lineNumber:t.lineNumber,column:t.column})},[]),B=(0,q.useCallback)(()=>{let e=()=>{let e=g.current;e&&e.focus()};e(),window.requestAnimationFrame(e)},[]),ne=(0,q.useCallback)((e,t={})=>{let n=g.current;n&&(n.setPosition({lineNumber:e,column:1}),n.revealLineInCenter(e),t.focusEditor!==!1&&n.focus())},[]),V=(0,q.useCallback)(e=>{if(!e)return;let t=e.getVisibleRanges()[0]?.startLineNumber;if(!t||t<1)return;let n=e.getPosition(),r=M.current||`agent:${k.current}`,i=j.current;o({version:1,surface:`file`,resource:{kind:`file`,workspace:r,path:i},locator:{kind:`file-line`,id:i},position:{unit:`line-column`,value:t,...n?.column?{column:n.column}:{}}})},[]);return Xe({editorRef:g,onFocusEditor:B}),(0,q.useEffect)(()=>{let t=h.current;if(!t)return;_e(),G();let n=r.create(t,K({value:e.draft,language:pe(e.file.path,e.draft),ariaLabel:ee.current,wordWrapEnabled:N.current}));G(n);let i=()=>W(n,N.current),a=he(),o=()=>i();typeof a.addEventListener==`function`?a.addEventListener(`change`,o):a.addListener(o),i(),g.current=n,b.current=n.onDidChangeModelContent(()=>{F.current>0||T.current(n.getValue())}),x.current=n.onDidChangeCursorPosition(e=>{if(R(n),V(n),I.current>0||e.reason!==r.CursorChangeReason.Explicit||e.source===`api`)return;let t=n.getSelection();D.current?.({agentId:k.current,filePath:j.current,lineNumber:e.position.lineNumber,column:e.position.column,endColumn:t?.endColumn})}),S.current=n.onDidScrollChange(()=>{V(n)}),fe(n,{getAgentId:()=>k.current,onFocusFilesSearch:e=>E.current(e),onSaveShortcut:()=>O.current()}),C.current=n.onContextMenu(e=>m.current(e));let s=e=>{let t=de(n,e);t&&m.current(t)};t.addEventListener(`contextmenu`,s,!0),w.current=new ResizeObserver(()=>n.layout()),w.current.observe(t);let c=new MutationObserver(()=>G(n));return c.observe(document.body,{attributes:!0,attributeFilter:[`data-appearance`]}),()=>{let e=v.current;e&&_.current.set(e,n.saveViewState()),V(n),w.current?.disconnect(),w.current=null,c.disconnect(),C.current?.dispose(),C.current=null,t.removeEventListener(`contextmenu`,s,!0),typeof a.removeEventListener==`function`?a.removeEventListener(`change`,o):a.removeListener(o),x.current?.dispose(),x.current=null,S.current?.dispose(),S.current=null,b.current?.dispose(),b.current=null,n.dispose(),ve(),_.current.clear(),g.current=null,v.current=null}},[m,V,R]),(0,q.useEffect)(()=>{let t=g.current;if(!t)return;let n=U(e),r=A(e),i=v.current;i&&i!==n&&_.current.set(i,t.saveViewState());let o=me(e);t.getModel()!==o&&t.setModel(o);let l=y.current.get(n);if((i!==n||l!==r)&&o.getValue()!==e.draft){F.current+=1;try{o.setValue(e.draft)}finally{--F.current}}if(y.current.set(n,r),i!==n){let r=_.current.get(n);if(r)t.restoreViewState(r);else{let n=s(e.workspaceRoot||`agent:${e.agentId}`,e.file.path),r=a(n);r?.surface===`file`&&r.resource.kind===`file`&&r.position.value<=o.getLineCount()?t.revealLineInCenter(r.position.value):r&&c(n)}v.current=n}R(t)},[e,R]),(0,q.useEffect)(()=>{ye([...t,e],_.current)},[e,t]),(0,q.useEffect)(()=>{let t=g.current,n=e.cursor;if(!t||!n||P.current===n.requestId)return;let r=t.getModel(),i=z(n,{lineCount:r?.getLineCount()??1,getLineMaxColumn:e=>r?.getLineMaxColumn(e)??1});I.current+=1;try{t.setSelection(i),t.revealLineInCenter(i.startLineNumber),t.focus()}finally{window.setTimeout(()=>{I.current=Math.max(0,I.current-1)},120)}P.current=n.requestId,L({lineNumber:i.startLineNumber,column:i.startColumn})},[e.cursor,e.file.path]),(0,q.useEffect)(()=>{let e=g.current;e&&e.updateOptions({readOnly:n,domReadOnly:n})},[n]),(0,q.useEffect)(()=>{let e=g.current;e&&W(e,i)},[i]),{editorHostRef:h,editorRef:g,cursorPosition:te,focusEditor:B,revealLine:ne}}function Qe({openFile:e,openFiles:t,onCloseEditorTab:n,onFocusEditorTab:r,onFocusFilesSearch:i,onSaveFile:a}){let o=(0,q.useCallback)(e=>{i(e),window.requestAnimationFrame(()=>i(e)),window.setTimeout(()=>i(e),120)},[i]);return(0,q.useCallback)(i=>{if(i.altKey||!(i.ctrlKey||i.metaKey))return;if(i.key.toLowerCase()===`p`){i.preventDefault(),i.stopPropagation(),o(e.agentId);return}if(i.key.toLowerCase()===`s`){i.preventDefault(),i.stopPropagation(),a(!1);return}let s=t.findIndex(t=>U(t)===U(e));if(s!==-1){if(i.key===`PageUp`){i.preventDefault(),i.stopPropagation(),r((s-1+t.length)%t.length);return}if(i.key===`PageDown`){i.preventDefault(),i.stopPropagation(),r((s+1)%t.length);return}i.key.toLowerCase()===`w`&&(i.preventDefault(),i.stopPropagation(),n(s))}},[n,r,a,e,t,o])}function $(e){return U(e)}function $e(e){return e.filter((e,t,n)=>n.findIndex(t=>$(t)===$(e))===t)}function et(e,t,n){let r=e[n];if(!r||$(r)!==$(t))return t;let i=e.filter(e=>$(e)!==$(r));return i[Math.max(0,n-1)]??i[n]??null}function tt(e,t,n){let r=new Set(n.map($)),i=e.filter(e=>!r.has($(e)));return i.find(e=>$(e)===$(t))??i[0]??null}function nt(e,t){let n=$e(e),r=n.filter(S);return{closeFiles:n,dirtyFiles:r,pendingClose:r.length>0?{files:r,closeFiles:n,nextFocusFile:t}:null,nextFocusFile:t}}function rt(e){return e.nextFocusFile&&e.closeFiles.some(t=>$(t)===$(e.nextFocusFile))?null:e.nextFocusFile}function it(e,t,n){if(e===`close`){let e=t[n];return e?[e]:[]}return e===`close-others`?t.filter((e,t)=>t!==n):e===`close-right`?t.slice(n+1):e===`close-saved`?t.filter(w):[...t]}function at({openFile:e,openFiles:t,filesLabel:n,onSelectOpenFile:r,onCloseOpenFile:i,onCloseOpenFiles:a,onDismissEditorContextMenu:o,onSaveOpenFile:s}){let c=(0,q.useRef)(new Map),l=(0,q.useRef)(null),[u,d]=(0,q.useState)(null),[f,p]=(0,q.useState)(null),[m,h]=(0,q.useState)(!1),g=(0,q.useCallback)(()=>{d(null)},[]),_=(0,q.useCallback)((e,t)=>{t?c.current.set(e,t):c.current.delete(e)},[]),v=(0,q.useCallback)(e=>{let n=t[e];n&&(l.current=U(n),r(n.agentId,n.file.path))},[r,t]),y=(0,q.useCallback)((e,t)=>{if(e.length===0)return;let n=e.map(e=>({agentId:e.agentId,filePath:e.file.path,workspaceRoot:e.workspaceRoot}));if(l.current=t?U(t):null,n.length===1){let e=n[0];e&&i(e.agentId,e.filePath,e.workspaceRoot);return}a(n)},[i,a]),b=(0,q.useCallback)((e,t)=>{let n=nt(e,t),r=n.closeFiles;if(r.length!==0){if(n.pendingClose){p(n.pendingClose),h(!1);return}y(r,n.nextFocusFile)}},[y]),x=(0,q.useCallback)(n=>{let r=t[n];r&&b([r],et(t,e,n))},[e,t,b]),S=(0,q.useCallback)(n=>{b(n,tt(t,e,n))},[e,t,b]),C=(0,q.useCallback)((e,n)=>{e.preventDefault(),e.stopPropagation();let i=t[n];i&&r(i.agentId,i.file.path),o(),d({x:Math.max(8,Math.min(e.clientX,window.innerWidth-230)),y:Math.max(8,Math.min(e.clientY,window.innerHeight-190)),index:n})},[o,r,t]),w=(0,q.useCallback)(e=>{if(!u)return;let n=u.index;if(d(null),e===`close`){x(n);return}S(it(e,t,n))},[x,S,t,u]),T=(0,q.useCallback)((e,n)=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`ArrowLeft`){e.preventDefault(),v((n-1+t.length)%t.length);return}if(e.key===`ArrowRight`){e.preventDefault(),v((n+1)%t.length);return}if(e.key===`Home`){e.preventDefault(),v(0);return}if(e.key===`End`){e.preventDefault(),v(t.length-1);return}if(e.key===`Enter`||e.key===` `){e.preventDefault(),v(n);return}(e.key===`Delete`||e.key===`Backspace`)&&(e.preventDefault(),x(n))}},[x,v,t.length]),E=(0,q.useCallback)((e,t)=>{e.button===1&&(e.preventDefault(),e.stopPropagation(),x(t))},[x]),D=(0,q.useCallback)(async()=>{if(!f||m)return;h(!0);for(let e of f.files)if(!await s(e,!1)){h(!1);return}let e=rt(f),t=f.closeFiles;p(null),h(!1),y(t,e)},[y,s,f,m]),O=(0,q.useCallback)(()=>{if(!f)return;let e=rt(f),t=f.closeFiles;p(null),h(!1),y(t,e)},[y,f]),k=(0,q.useCallback)(()=>{p(null),h(!1)},[]),A=(0,q.useMemo)(()=>f?f.files.length===1?H(f.files[0]?.file.path??``):`${f.files.length} ${n}`:``,[n,f]);return(0,q.useEffect)(()=>{let t=U(e),n=c.current.get(t);n?.scrollIntoView({block:`nearest`,inline:`nearest`}),l.current===t&&(n?.focus(),l.current=null)},[e,t.length]),{tabContextMenu:u,pendingClose:f,pendingCloseSaving:m,pendingCloseLabel:A,closeTabContextMenu:g,setTabRef:_,focusEditorTab:v,closeEditorTab:x,openEditorTabContextMenu:C,runTabContextAction:w,handleEditorTabKeyDown:T,handleEditorTabAuxClick:E,confirmSaveAndClose:D,discardAndClose:O,cancelPendingClose:k}}function ot({openFile:e,readOnly:t,onUpdateOpenFile:n}){let r=(0,q.useCallback)(async(e,t=!1)=>{if(E(e))return!0;if(e.saving)return!1;if(!t&&!e.dirty)return!0;n({...e,saving:!0,error:null});try{let r=await v(e.agentId,e.file.path,e.draft,e.file.sha1,t);return n({...e,file:r,draft:r.content,dirty:!1,externalChanged:!1,saving:!1,error:null}),!0}catch(t){let r=t instanceof h&&t.status===409;return n({...e,saving:!1,externalChanged:e.externalChanged||r,error:t instanceof Error?t.message:`Failed to save file`}),!1}},[n]);return{saveOpenWorkspaceFile:r,saveFile:(0,q.useCallback)(async(n=!1)=>{t||await r(e,n)},[e,t,r]),reloadFile:(0,q.useCallback)(async()=>{n({...e,saving:!0,error:null});try{let t=await _(e.agentId,e.file.path);n({...e,file:t,draft:t.content,dirty:!1,externalChanged:!1,saving:!1,error:null})}catch(t){n({...e,saving:!1,error:t instanceof Error?t.message:`Failed to reload file`})}},[n,e])}}var st=``,ct=`farming.code.fileEditor.wordWrap`;function lt(){if(typeof window>`u`)return!1;try{return window.localStorage.getItem(ct)===`1`}catch{return!1}}function ut(e){if(!(typeof window>`u`))try{window.localStorage.setItem(ct,e?`1`:`0`)}catch{}}function dt({openFile:e,openFiles:t,onChangeDraft:n,onUpdateOpenFile:r,onSelectOpenFile:i,onOpenFilePath:a,canNavigateBack:o,canNavigateForward:s,onNavigateHistory:c,onCloseOpenFile:l,onCloseOpenFiles:u,onRevealInExplorer:d,onFocusFilesSearch:f,onRecordNavigationCursor:p,onBackToAgent:m,copy:h}){let g=(0,q.useRef)(()=>{}),_=(0,q.useRef)(()=>{}),v=k(e),y=R(e),[x,S]=(0,q.useState)({}),[C,w]=(0,q.useState)({}),[T,E]=(0,q.useState)(lt),D=U(e),O=!y.preview&&!y.diffOnly&&F(e.file.path),A=!y.preview&&!y.diffOnly&&ie(e.file.path),j=x[D],M=O||A?j!==!1:!1,N=O&&M,P=N&&C[D]===!0,I=N&&!P,te=A&&M,L=!y.canEditText||b(e.agentId)||e.file.readOnly===!0,z=y.canShowBlame&&e.file.external!==!0,B=y.canShowLineChanges&&e.file.external!==!0,{saveOpenWorkspaceFile:ne,saveFile:V,reloadFile:re}=ot({openFile:e,readOnly:L,onUpdateOpenFile:r}),{tabContextMenu:H,pendingClose:ae,pendingCloseSaving:oe,pendingCloseLabel:ce,closeTabContextMenu:le,setTabRef:ue,focusEditorTab:de,closeEditorTab:fe,openEditorTabContextMenu:pe,runTabContextAction:me,handleEditorTabKeyDown:he,handleEditorTabAuxClick:W,confirmSaveAndClose:ge,discardAndClose:_e,cancelPendingClose:ve}=at({openFile:e,openFiles:t,filesLabel:h.files,onSelectOpenFile:i,onCloseOpenFile:l,onCloseOpenFiles:u,onDismissEditorContextMenu:()=>_.current(),onSaveOpenFile:ne}),ye=Qe({openFile:e,openFiles:t,onCloseEditorTab:fe,onFocusEditorTab:de,onFocusFilesSearch:f,onSaveFile:V}),{editorHostRef:G,editorRef:K,cursorPosition:be,revealLine:xe}=Ze({openFile:e,openFiles:t,readOnly:L,wordWrapEnabled:T,editorLabel:h.editorFor(e.file.path),onChangeDraft:n,onFocusFilesSearch:f,onRecordNavigationCursor:p,onSaveShortcut:()=>{V(!1)},onOpenContextMenuRef:g}),{blameOpen:Y,blameLoading:Se,blame:X,blameError:Ce,blameCapability:we,blameDetail:Z,blameLabelWidths:Te,checkBlameCapability:Ee,toggleBlame:De,showBlameDetail:ke,clearBlameDetail:Q}=Ge({openFile:e,disabled:!z,onRevealLine:xe}),{lineChanges:Ae,openLineChanges:je,closeLineChanges:Ne}=Ye({openFile:e,disabled:!B,onClearBlameDetail:Q,onRevealLine:xe}),{diffState:Pe,closeDiff:Fe,toggleDiff:Ie}=Je({openFile:e,diffDisabled:!y.canShowDiff,onClearBlameDetail:Q}),{blameOverlay:Le}=Ke({blame:X,blameLabelWidths:Te,blameOpen:Y,editorHostRef:G,editorRef:K,disabled:!z}),{editorContextMenu:Re,closeEditorContextMenu:ze,openEditorContextMenu:Be,runEditorContextAction:Ve,showBlameContextAction:He,showLineChangesContextActions:We}=qe({blameCapability:we,blameOpen:Y,canShowBlame:z,canShowLineChanges:B,editorRef:K,readOnly:L,onCheckBlameCapability:Ee,onClearBlameDetail:Q,onCloseTabContextMenu:le,onOpenLineChanges:je,onToggleBlame:De});g.current=Be,_.current=ze;let Xe=ee(e)===`changedOnDisk`?h.changedOnDisk:null,$=Z?se(Z.line.author,st):``;return(0,q.useEffect)(()=>{if(!(typeof document>`u`))return document.body.classList.toggle(`code-mobile-markdown-reading`,N),()=>{document.body.classList.remove(`code-mobile-markdown-reading`)}},[N]),(0,q.useEffect)(()=>{let e=K.current;if(!e)return;let t=window.requestAnimationFrame(()=>e.layout());return()=>window.cancelAnimationFrame(t)},[K,P,I,M]),(0,J.jsxs)(`section`,{className:`code-file-editor ${N?`markdown-reading`:``}`.trim(),"data-testid":`code-file-editor`,onKeyDownCapture:ye,children:[(0,J.jsx)(Oe,{openFile:e,openFiles:t,editorMode:y,copy:h,statusText:Xe,onBackToAgent:m,onSelectOpenFile:i,canNavigateBack:o,canNavigateForward:s,onNavigateHistory:c,onSetTabRef:ue,onOpenTabContextMenu:pe,onTabAuxClick:W,onTabKeyDown:he,onCloseTab:fe,onRevealInExplorer:d,onSave:V,onReload:re,onToggleSourcePreview:()=>{if(!O&&!A)return;let e=!M;S(t=>({...t,[D]:e})),O&&!e&&w(e=>({...e,[D]:!1}))},onToggleMarkdownSplit:()=>{O&&(S(e=>({...e,[D]:!0})),w(e=>({...e,[D]:!P})))},onToggleWordWrap:()=>{E(e=>{let t=!e;return ut(t),t})},onToggleDiff:Ie,canPreviewMarkdown:O,canPreviewSource:A,diffOpen:Pe.open,markdownSplitOpen:P,sourcePreviewOpen:M,wordWrapEnabled:T}),e.error&&(0,J.jsx)(`div`,{className:`code-file-editor-alert`,"data-testid":`code-file-editor-alert`,children:e.error}),(0,J.jsx)(Ue,{activeTabDomId:v,blame:X,blameAuthorProfileUrl:$,blameDetailLine:Z?.line??null,blameOpen:Y,blameOverlay:Le,copy:h,cursorPosition:be,diffState:Pe,editorMode:y,editorHostRef:G,lineChanges:Ae,markdownSplitOpen:P,markdownPreviewOpen:I,sourcePreviewOpen:te,openFile:e,onClearBlameDetail:Q,onCloseDiff:Fe,onCloseLineChanges:Ne,onOpenFilePath:a,onShowBlameDetail:ke}),(0,J.jsx)(Me,{blame:X,blameError:Ce,blameLoading:Se,blameOpen:Y,copy:h,editorContextMenu:Re,readOnly:L,openFiles:t,pendingCloseOpen:!!ae,pendingCloseLabel:ce,pendingCloseSaving:oe,showBlameContextAction:He,showLineChangesContextActions:We,tabContextMenu:H,onCancelPendingClose:ve,onCloseEditorContextMenu:ze,onConfirmSaveAndClose:ge,onDiscardAndClose:_e,onRunEditorContextAction:Ve,onRunTabContextAction:me})]})}export{dt as FileEditorPane};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BthL93pI.js";var t=e();function n(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M3.14598 5.85423L7.64598 10.3542C7.84098 10.5492 8.15798 10.5492 8.35298 10.3542L12.853 5.85423C13.048 5.65923 13.048 5.34223 12.853 5.14723C12.658 4.95223 12.341 4.95223 12.146 5.14723L7.99998 9.29323L3.85398 5.14723C3.65898 4.95223 3.34198 4.95223 3.14698 5.14723C2.95198 5.34223 2.95098 5.65923 3.14598 5.85423Z`})})}function r(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M3.14603 9.85423C3.34103 10.0492 3.65803 10.0492 3.85303 9.85423L7.99903 5.70823L12.145 9.85423C12.34 10.0492 12.657 10.0492 12.852 9.85423C13.047 9.65923 13.047 9.34223 12.852 9.14723L8.35203 4.64723C8.15703 4.45223 7.84003 4.45223 7.64503 4.64723L3.14503 9.14723C2.95003 9.34223 2.95103 9.65923 3.14603 9.85423Z`})})}function i(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M9.14601 3.14623L4.64601 7.64623C4.45101 7.84123 4.45101 8.15823 4.64601 8.35323L9.14601 12.8532C9.34101 13.0482 9.65801 13.0482 9.85301 12.8532C10.048 12.6582 10.048 12.3412 9.85301 12.1462L5.70701 8.00023L9.85301 3.85423C10.048 3.65923 10.048 3.34223 9.85301 3.14723C9.65801 2.95223 9.34101 2.95223 9.14601 3.14723V3.14623Z`})})}function a(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M6.14601 3.14579C5.95101 3.34079 5.95101 3.65779 6.14601 3.85279L10.292 7.99879L6.14601 12.1448C5.95101 12.3398 5.95101 12.6568 6.14601 12.8518C6.34101 13.0468 6.65801 13.0468 6.85301 12.8518L11.353 8.35179C11.548 8.15679 11.548 7.83979 11.353 7.64478L6.85301 3.14479C6.65801 2.94979 6.34101 2.95079 6.14601 3.14579Z`})})}function o(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.854 8.14576L8.854 3.14576C8.659 2.95076 8.342 2.95076 8.147 3.14576C7.952 3.34076 7.952 3.65776 8.147 3.85276L12.293 7.99876H2.5C2.224 7.99876 2 8.22276 2 8.49876C2 8.77476 2.224 8.99876 2.5 8.99876H12.293L8.147 13.1448C7.952 13.3398 7.952 13.6568 8.147 13.8518C8.245 13.9498 8.373 13.9978 8.501 13.9978C8.629 13.9978 8.757 13.9488 8.855 13.8518L13.855 8.85176C14.05 8.65676 14.05 8.33976 13.855 8.14476L13.854 8.14576Z`})})}function s(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.854 8.146C13.659 7.951 13.342 7.951 13.147 8.146L9.00096 12.292V2.5C9.00096 2.224 8.77696 2 8.50096 2C8.22496 2 8.00096 2.224 8.00096 2.5V12.293L3.85496 8.147C3.65996 7.952 3.34296 7.952 3.14796 8.147C2.95296 8.342 2.95296 8.659 3.14796 8.854L8.14796 13.854C8.24596 13.952 8.37396 14 8.50196 14C8.62996 14 8.75796 13.951 8.85596 13.854L13.856 8.854C14.051 8.659 14.051 8.342 13.856 8.147L13.854 8.146Z`})})}function c(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.854 7.14576L8.85401 2.14576C8.65901 1.95076 8.34201 1.95076 8.14701 2.14576L3.14601 7.14576C2.95101 7.34076 2.95101 7.65776 3.14601 7.85276C3.34101 8.04776 3.65801 8.04776 3.85301 7.85276L7.99901 3.70676V13.4998C7.99901 13.7758 8.22301 13.9998 8.49901 13.9998C8.77501 13.9998 8.99901 13.7758 8.99901 13.4998V3.70676L13.145 7.85276C13.243 7.95076 13.371 7.99876 13.499 7.99876C13.627 7.99876 13.755 7.94976 13.853 7.85276C14.048 7.65776 14.048 7.34076 13.853 7.14576H13.854Z`})})}function l(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M8.70701 8.00001L12.353 4.35401C12.548 4.15901 12.548 3.84201 12.353 3.64701C12.158 3.45201 11.841 3.45201 11.646 3.64701L8.00001 7.29301L4.35401 3.64701C4.15901 3.45201 3.84201 3.45201 3.64701 3.64701C3.45201 3.84201 3.45201 4.15901 3.64701 4.35401L7.29301 8.00001L3.64701 11.646C3.45201 11.841 3.45201 12.158 3.64701 12.353C3.74501 12.451 3.87301 12.499 4.00101 12.499C4.12901 12.499 4.25701 12.45 4.35501 12.353L8.00101 8.70701L11.647 12.353C11.745 12.451 11.873 12.499 12.001 12.499C12.129 12.499 12.257 12.45 12.355 12.353C12.55 12.158 12.55 11.841 12.355 11.646L8.70901 8.00001H8.70701Z`})})}function u(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M10.0195 10.7266C9.06578 11.5217 7.83875 12 6.5 12C3.46243 12 1 9.53757 1 6.5C1 3.46243 3.46243 1 6.5 1C9.53757 1 12 3.46243 12 6.5C12 7.83875 11.5217 9.06578 10.7266 10.0195L13.8535 13.1464C14.0488 13.3417 14.0488 13.6583 13.8535 13.8536C13.6583 14.0488 13.3417 14.0488 13.1464 13.8536L10.0195 10.7266ZM11 6.5C11 4.01472 8.98528 2 6.5 2C4.01472 2 2 4.01472 2 6.5C2 8.98528 4.01472 11 6.5 11C8.98528 11 11 8.98528 11 6.5Z`})})}function d(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.6572 3.13573C13.8583 2.9465 14.175 2.95614 14.3643 3.15722C14.5535 3.35831 14.5438 3.675 14.3428 3.86425L5.84277 11.8642C5.64597 12.0494 5.33756 12.0446 5.14648 11.8535L1.64648 8.35351C1.45121 8.15824 1.45121 7.84174 1.64648 7.64647C1.84174 7.45121 2.15825 7.45121 2.35351 7.64647L5.50976 10.8027L13.6572 3.13573Z`})})}function f(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M8 1.5C8 1.22386 7.77614 1 7.5 1C7.22386 1 7 1.22386 7 1.5V7H1.5C1.22386 7 1 7.22386 1 7.5C1 7.77614 1.22386 8 1.5 8H7V13.5C7 13.7761 7.22386 14 7.5 14C7.77614 14 8 13.7761 8 13.5V8H13.5C13.7761 8 14 7.77614 14 7.5C14 7.22386 13.7761 7 13.5 7H8V1.5Z`})})}function p(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`}),(0,t.jsx)(`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`}),(0,t.jsx)(`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`}),(0,t.jsx)(`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`})]})}function m(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M5.5 1C4.673 1 4 1.673 4 2.5V4H2.5C1.673 4 1 4.673 1 5.5V13.5C1 14.327 1.673 15 2.5 15H10.5C11.327 15 12 14.327 12 13.5V12H13.5C14.327 12 15 11.327 15 10.5V2.5C15 1.673 14.327 1 13.5 1H5.5ZM5 2.5C5 2.224 5.224 2 5.5 2H13.5C13.776 2 14 2.224 14 2.5V10.5C14 10.776 13.776 11 13.5 11H12V5.5C12 4.673 11.327 4 10.5 4H5V2.5ZM2.5 5H10.5C10.776 5 11 5.224 11 5.5V13.5C11 13.776 10.776 14 10.5 14H2.5C2.224 14 2 13.776 2 13.5V5.5C2 5.224 2.224 5 2.5 5Z`})})}function h(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M18.75 1.5H5.25C3.1815 1.5 1.5 3.183 1.5 5.25V18.75C1.5 20.8185 3.1815 22.5 5.25 22.5H18.75C20.8185 22.5 22.5 20.8185 22.5 18.75V5.25C22.5 3.183 20.8185 1.5 18.75 1.5ZM21 18.75C21 19.9905 19.9905 21 18.75 21H5.25C4.0095 21 3 19.9905 3 18.75V5.25C3 4.0095 4.0095 3 5.25 3H18.75C19.9905 3 21 4.0095 21 5.25V18.75ZM10.281 13.281L5.781 17.781C5.634 17.928 5.442 18 5.25 18C5.058 18 4.866 17.9265 4.719 17.781C4.4265 17.4885 4.4265 17.013 4.719 16.7205L8.688 12.7515L4.719 8.7825C4.4265 8.49 4.4265 8.0145 4.719 7.722C5.0115 7.4295 5.487 7.4295 5.7795 7.722L10.2795 12.222C10.572 12.5145 10.572 12.99 10.2795 13.2825L10.281 13.281ZM19.5 17.25C19.5 17.664 19.164 18 18.75 18H11.25C10.836 18 10.5 17.664 10.5 17.25C10.5 16.836 10.836 16.5 11.25 16.5H18.75C19.164 16.5 19.5 16.836 19.5 17.25Z`})})}function g(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M14.56 7.44049C14.28 7.16049 13.9 7.00049 13.5 7.00049H13V4.00049C13 2.90049 12.1 2.00049 11 2.00049H3C1.9 2.00049 1 2.90049 1 4.00049V9.00049C1 10.1005 1.9 11.0005 3 11.0005V12.0005C3 12.8205 3.93 13.2905 4.59 12.8105L7 11.0505V11.5005C7 11.9005 7.16 12.2805 7.44 12.5605C7.72 12.8405 8.1 13.0005 8.5 13.0005H10.29L12.15 14.8505C12.19 14.9005 12.25 14.9405 12.31 14.9605C12.37 14.9905 12.43 15.0005 12.5 15.0005C12.57 15.0005 12.63 14.9905 12.69 14.9605C12.78 14.9205 12.86 14.8605 12.92 14.7805C12.97 14.7005 13 14.6005 13 14.5005V13.0005H13.5C13.9 13.0005 14.28 12.8405 14.56 12.5605C14.84 12.2805 15 11.9005 15 11.5005V8.50049C15 8.10049 14.84 7.72049 14.56 7.44049ZM6.75 10.0005L4 12.0005V10.0005H3C2.45 10.0005 2 9.55049 2 9.00049V4.00049C2 3.45049 2.45 3.00049 3 3.00049H11C11.55 3.00049 12 3.45049 12 4.00049V7.00049H8.5C8.1 7.00049 7.72 7.16049 7.44 7.44049C7.16 7.72049 7 8.10049 7 8.50049V10.0005H6.75ZM14 11.5005C14 11.6305 13.95 11.7605 13.85 11.8505C13.76 11.9505 13.63 12.0005 13.5 12.0005H12.5C12.37 12.0005 12.24 12.0505 12.15 12.1505C12.05 12.2405 12 12.3705 12 12.5005V13.2905L10.85 12.1505C10.81 12.1005 10.75 12.0605 10.69 12.0405C10.63 12.0105 10.57 12.0005 10.5 12.0005H8.5C8.37 12.0005 8.24 11.9505 8.15 11.8505C8.05 11.7605 8 11.6305 8 11.5005V8.50049C8 8.37049 8.05 8.24049 8.15 8.15049C8.24 8.05049 8.37 8.00049 8.5 8.00049H13.5C13.63 8.00049 13.76 8.05049 13.85 8.15049C13.95 8.24049 14 8.37049 14 8.50049V11.5005Z`})})}function _(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,t.jsx)(`path`,{d:`M8 2a6 6 0 0 0 0 12Z`,fill:`currentColor`,opacity:`0.38`}),(0,t.jsx)(`path`,{d:`M8 2v12`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`})]})}function v(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6.92 1.25h2.16l.32 1.66c.43.14.84.31 1.2.52l1.4-.95 1.53 1.53-.95 1.4c.21.37.39.77.52 1.2l1.65.31v2.16l-1.65.32c-.13.43-.31.84-.52 1.2l.95 1.4L12 13.53l-1.4-.95c-.36.21-.77.39-1.2.52l-.32 1.65H6.92L6.6 13.1a5.3 5.3 0 0 1-1.2-.52l-1.4.95L2.47 12l.95-1.4a5.3 5.3 0 0 1-.52-1.2l-1.65-.32V6.92L2.9 6.6c.13-.43.31-.83.52-1.2l-.95-1.4L4 2.47l1.4.95c.36-.21.77-.38 1.2-.52l.32-1.65Zm.83 1-.27 1.4-.3.08c-.55.14-1.06.36-1.5.65l-.27.18-1.18-.8-.47.47.8 1.18-.18.27c-.29.44-.51.95-.65 1.5l-.08.3-1.4.27v.66l1.4.27.08.3c.14.55.36 1.06.65 1.5l.18.27-.8 1.18.47.47 1.18-.8.27.18c.44.29.95.51 1.5.65l.3.08.27 1.4h.66l.27-1.4.3-.08c.55-.14 1.06-.36 1.5-.65l.27-.18 1.18.8.47-.47-.8-1.18.18-.27c.29-.44.51-.95.65-1.5l.08-.3 1.4-.27v-.66l-1.4-.27-.08-.3a4.3 4.3 0 0 0-.65-1.5l-.18-.27.8-1.18-.47-.47-1.18.8-.27-.18a4.3 4.3 0 0 0-1.5-.65l-.3-.08-.27-1.4h-.66ZM8 5.25a2.75 2.75 0 1 0 0 5.5 2.75 2.75 0 0 0 0-5.5ZM6.25 8a1.75 1.75 0 1 1 3.5 0 1.75 1.75 0 0 1-3.5 0Z`})})}function y(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M3 5v14h8V5H3Zm6 12H5V7h4v10Zm4 2h8V5h-8v14Zm2-12h4v10h-4V7Z`})})}function b(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M5 3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5Zm0 2h14v14H5V5Zm2 3v2h10V8H7Zm0 4v2h10v-2H7Zm0 4v2h10v-2H7Z`})})}function x(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{d:`M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z`}),(0,t.jsx)(`path`,{d:`M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z`})]})}function S(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6.306 2.146l-4.02 4.02v.708l4.02 4.02.708-.707L3.807 6.98H5.69c2.813 0 4.605.605 5.705 1.729 1.102 1.125 1.615 2.877 1.615 5.421v.35h1v-.35c0-2.646-.527-4.72-1.9-6.121C10.735 6.605 8.617 5.98 5.69 5.98H3.887l3.127-3.126-.708-.708z`})})}function C(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.5 4l.5-.5h8l.5.5v8l-.5.5H4l-.5-.5V4zm1 .5v7h7v-7h-7z`})})}function w(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{d:`M8.85352 11.7021H7.85449L7.03809 9.54297H3.77246L3.00439 11.7021H2L4.9541 4H5.88867L8.85352 11.7021ZM6.74268 8.73193L5.53418 5.4502C5.49479 5.34277 5.4554 5.1709 5.41602 4.93457H5.39453C5.35872 5.15299 5.31755 5.32487 5.271 5.4502L4.07324 8.73193H6.74268Z`}),(0,t.jsx)(`path`,{d:`M13.756 11.7021H12.8752V10.8428H12.8537C12.4706 11.5016 11.9066 11.8311 11.1618 11.8311C10.6139 11.8311 10.1843 11.686 9.87273 11.396C9.56479 11.106 9.41082 10.721 9.41082 10.2412C9.41082 9.21354 10.016 8.61556 11.2262 8.44727L12.8752 8.21631C12.8752 7.28174 12.4974 6.81445 11.7419 6.81445C11.0794 6.81445 10.4815 7.04004 9.94793 7.49121V6.58887C10.4886 6.24512 11.1117 6.07324 11.8171 6.07324C13.1097 6.07324 13.756 6.75716 13.756 8.125V11.7021ZM12.8752 8.91992L11.5485 9.10254C11.1403 9.15983 10.8324 9.26188 10.6247 9.40869C10.417 9.55192 10.3132 9.80794 10.3132 10.1768C10.3132 10.4453 10.4081 10.6655 10.5978 10.8374C10.7912 11.0057 11.0472 11.0898 11.3659 11.0898C11.8027 11.0898 12.1626 10.9377 12.4455 10.6333C12.7319 10.3254 12.8752 9.93685 12.8752 9.46777V8.91992Z`})]})}function T(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0 11H1V13H15V11H16V14H15H1H0V11Z`}),(0,t.jsx)(`path`,{d:`M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z`}),(0,t.jsx)(`path`,{d:`M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z`})]})}function E(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10.012 2h.976v3.113l2.56-1.557.486.885L11.47 6l2.564 1.559-.485.885-2.561-1.557V10h-.976V6.887l-2.56 1.557-.486-.885L9.53 6 6.966 4.441l.485-.885 2.561 1.557V2zM2 10h4v4H2v-4z`})})}function D(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M8 1C4.14 1 1 4.14 1 8C1 11.86 4.14 15 8 15C11.86 15 15 11.86 15 8C15 4.14 11.86 1 8 1ZM8 14C4.691 14 2 11.309 2 8C2 4.691 4.691 2 8 2C11.309 2 14 4.691 14 8C14 11.309 11.309 14 8 14ZM10.854 5.854L8.708 8L10.854 10.146C11.049 10.341 11.049 10.658 10.854 10.853C10.756 10.951 10.628 10.999 10.5 10.999C10.372 10.999 10.244 10.95 10.146 10.853L8 8.707L5.854 10.853C5.756 10.951 5.628 10.999 5.5 10.999C5.372 10.999 5.244 10.95 5.146 10.853C4.951 10.658 4.951 10.341 5.146 10.146L7.292 8L5.146 5.854C4.951 5.659 4.951 5.342 5.146 5.147C5.341 4.952 5.658 4.952 5.853 5.147L7.999 7.293L10.145 5.147C10.34 4.952 10.657 4.952 10.852 5.147C11.047 5.342 11.047 5.659 10.852 5.854H10.854Z`})})}export{v as C,T as E,u as S,h as T,x as _,g as a,E as b,i as c,l as d,_ as f,D as g,b as h,w as i,a as l,y as m,o as n,d as o,m as p,c as r,n as s,s as t,r as u,p as v,C as w,S as x,f as y};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-DECur_0Z.js";import{i as t,t as n}from"./jsx-runtime-BthL93pI.js";import{C as r,d as i,h as a,l as o,m as s,o as c,p as l,s as u}from"./IconGlyphs-Cc14sepw.js";import{a as d,c as f,d as p,i as m,l as h,n as g,o as _,r as v,s as y,t as b,u as x}from"./core-D0LFJkDt.js";import{A as S,C as ee,D as te,E as ne,F as re,M as ie,N as C,O as ae,P as oe,S as se,T as ce,_ as le,a as ue,b as w,c as de,d as fe,f as pe,g as me,h as he,i as ge,j as T,k as _e,l as ve,m as ye,n as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,x as Oe,y as ke}from"./api-D8nyOEbz.js";var E=e(t());function D(e){let t=[`package`,`import`,`option`,`optional`,`required`,`repeated`,`group`,`oneof`],n=[`double`,`float`,`int32`,`int64`,`uint32`,`uint64`,`sint32`,`sint64`,`fixed32`,`fixed64`,`sfixed32`,`sfixed64`,`bool`,`string`,`bytes`],r={match:[/(message|enum|service)\s+/,e.IDENT_RE],scope:{1:`keyword`,2:`title.class`}};return{name:`Protocol Buffers`,aliases:[`proto`],keywords:{keyword:t,type:n,literal:[`true`,`false`]},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{className:`function`,beginKeywords:`rpc`,end:/[{;]/,excludeEnd:!0,keywords:`rpc returns`},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}function Ae(e){return e instanceof Error&&e.message.trim()?e.message.trim():typeof e==`string`&&e.trim()?e.trim():`review file diff request failed`}function O(e){return e.diffLoaded===!1&&!ie(e)}function je(e,t,n,r={}){if(t.reviewId!==void 0&&r.reviewId!==t.reviewId)throw Error(`loaded review file belongs to a stale review`);if(n.path!==t.path)throw Error(`loaded review file path does not match requested path`);if(O(n))throw Error(`loaded review file is still a metadata-only row`);if(!e[t.patchset]?.some(e=>e.path===t.path))throw Error(`loaded review file path is no longer in the review catalog`);return{action:{patchset:t.patchset,path:t.path,...t.reviewId?{reviewId:t.reviewId}:{},type:`commit-file-diff-load`},catalog:se(e,t.patchset,{...n,diffLoaded:!0})}}function Me(e,t){return{error:Ae(t),patchset:e.patchset,path:e.path,...e.reviewId?{reviewId:e.reviewId}:{},type:`fail-file-diff-load`}}function k(e){return e===`added`?`A`:e===`copied`?`C`:e===`deleted`?`D`:e===`renamed`?`R`:e===`rewritten`?`W`:e===`unmodified`?`U`:e===`reverted`?`X`:`M`}function A(e){return e.status?e.status:k(e.kind)}function j(e){return _e(e)}function Ne(e){return e.binary?`binary`:ie(e)?`too-expensive`:e.diffLoaded===!1?`not-loaded`:`loaded`}function Pe(e,t,n={}){let r=n.patchset??e.patchRange.patchset,i=C(e,t.path,r),a=oe(e,r),o=i.loaded?i.status===`reviewed`:null;return{action:o===null?null:{ariaLabel:o?`Mark as unreviewed`:`Mark as reviewed`,disabled:!!n.mutationPending,label:o?`MARK UNREVIEWED`:`MARK REVIEWED`,nextReviewed:!o,visibility:`on-row-interaction`},added:t.added,binary:t.binary===!0,changeLabel:A(t),commentPaths:j(t),deleted:t.removed,...T(e,t.path,r)?{diffLoadError:T(e,t.path,r)}:{},diffLoadPending:a.pendingDiffPaths.includes(t.path),diffStatus:Ne(t),diffTooExpensive:t.diffTooExpensive===!0||t.diff.truncated===!0,expanded:a.expandedPaths.includes(t.path),...t.newMode?{newMode:t.newMode}:{},...t.newSha?{newSha:t.newSha}:{},...t.oldMode?{oldMode:t.oldMode}:{},...t.oldSha?{oldSha:t.oldSha}:{},path:t.path,pending:i.pending,...t.previousPath?{previousPath:t.previousPath}:{},reviewed:o,reviewedLabel:o===!0?`Reviewed`:null,reviewStatusLoaded:i.loaded,...Number.isInteger(t.size)?{size:t.size}:{},...Number.isInteger(t.sizeDelta)?{sizeDelta:t.sizeDelta}:{}}}function Fe(e){let t=typeof e==`string`?new URLSearchParams(e):e,n=t.get(`agentId`)?.trim()||``,r=[...new Set(t.getAll(`acpItem`).map(e=>e.trim()).filter(Boolean))];return!n||r.length===0||r.length>256?null:{agentId:n,itemIds:r}}function M(e,t,n){let r=e.get(t);if(r===null||r.trim()===``||!/^\d+$/.test(r.trim()))return;let i=Number(r.trim());return Number.isSafeInteger(i)&&i>=n?i:void 0}function Ie(e){let t=e.get(`ignoreWhitespace`);if(t===`ALL`||t===`IGNORE_ALL`)return`ALL`;if(t===`TRAILING`||t===`IGNORE_TRAILING`)return`TRAILING`;if(t===`LEADING_AND_TRAILING`||t===`IGNORE_LEADING_AND_TRAILING`)return`LEADING_AND_TRAILING`}function Le(e){let t=e.get(`metadataOnly`);return t===`1`||t===`true`?!0:void 0}function N(e){let t=e.get(`scope`);return t===`tracked`||t===`untracked`?t:void 0}function Re(e){let t=M(e,`context`,0),n=Ie(e),r=M(e,`limit`,1),i=Le(e),a=M(e,`modifiedWithinDays`,1),o=N(e),s=e.getAll(`path`).map(e=>e.trim()).filter(Boolean);return{...t===void 0?{}:{context:t},...n?{ignoreWhitespace:n}:{},...r===void 0?{}:{limit:r},...i===!0?{metadataOnly:i}:{},...o?{scope:o}:{},...s.length>0?{paths:s}:{},...o===`untracked`&&a!==void 0?{modifiedWithinDays:a}:{}}}function P(e){let t=typeof e==`string`?new URLSearchParams(e):e,n=t.get(`agentId`)?.trim()||``,r=t.get(`root`)?.trim()||``;if(n&&r)return{error:`only one review workspace target is allowed`,request:null};if(!n&&!r)return{request:null};let i=n?{agentId:n}:{root:r},a=Re(t),o=t.get(`reviewId`)?.trim()||``,s=t.get(`base`),c=t.get(`head`);if(!(s!==null||c!==null))return{request:{...i,...a,source:`working-copy`}};let l=w(s||``),u=w(c||``);return!l||!u?{error:`base and head revisions are invalid`,request:null}:{request:{...i,base:l,head:u,...a,...o?{reviewId:o}:{},source:`git-range`}}}function ze(e){return P(e?.search??``)}var F=n();async function Be(e,t){let n=[],r=[],i=0;return await Promise.all(Array.from({length:Math.min(4,t.length)},async()=>{for(;i<t.length;){let a=t[i++];if(a)try{n.push(await fe(e,a))}catch(e){r.push(e instanceof Error?e:Error(`review file diff request failed`))}}})),{errors:r,files:n}}function I(e){let t=nt(e.path),n=t===`python`,r=Ze(e.path).replace(/\W/g,`_`),i=(e,t)=>({kind:`context`,left:{line:e,text:t},right:{line:e,text:t}}),a=Array.from({length:128},(e,n)=>{let r=n+1,a=t===`python`?`#`:t===`markdown`?`<!--`:`//`,o=t===`markdown`?` -->`:``,s=r>=29?`unchanged review context ${r-28}`:`unchanged review prelude ${r}`;return i(r,`${r===29||r===128?` `:``}${a} ${s}${o}`)});if(e.kind===`added`){let t=n?`${r} = create_review_snapshot()`:`export const ${r} = createReviewSnapshot()`,i=n?`__all__ = ["${r}"]`:`export default ${r}`;return{hunks:[{header:`@@ -0,0 +1,2 @@ ${e.path}`,oldStart:0,oldLines:0,newStart:1,newLines:2,rows:[{kind:`added`,right:{line:1,text:t}},{kind:`added`,right:{line:2,text:i}}]}]}}if(e.kind===`deleted`){let t=n?`def summarize_changes():`:`export function summarizeChanges() {`,r=n?` return "legacy summary"`:` return 'legacy summary'`;return{hunks:[{header:`@@ -1,2 +0,0 @@ ${e.path}`,oldStart:1,oldLines:2,newStart:0,newLines:0,rows:[{kind:`deleted`,left:{line:1,text:t}},{kind:`deleted`,left:{line:2,text:r}}]}]}}let o=n?`def create_change_set(input: ChangeInput) -> list[ReviewEntry]:`:`export function createChangeSet(input: ChangeInput) {`,s=n?` return normalize_changes(input.files)`:` return normalizeChanges(input.files)`,c=n?` return create_review_entries(input.files, input.base)`:` return createReviewEntries(input.files, input.base)`,l=n?`def mark_reviewed(path: str) -> ReviewState:`:`export function markReviewed(path: string) {`,u=n?` return {"path": path, "reviewed_at": time.time()}`:` return { path, reviewedAt: Date.now() }`,d=n?`if not path:`:` if (!path) return null`,f=n?` return None`:` const snapshot = readSnapshot(input.base)`,p=n?`return {**snapshot, "files": input.files}`:` return { ...snapshot, files: input.files }`,m=n?``:`}`,h=n?` return finalize_change_set(input) `:` return finalizeChangeSet(input) `;return{hunks:[{commonContext:a,header:`@@ -129,7 +129,10 @@ ${e.path}`,oldStart:129,oldLines:7,newStart:129,newLines:10,rows:[i(129,o),{kind:`deleted`,left:{line:130,text:s}},{kind:`added`,right:{line:130,text:c}},i(131,m),{kind:`added`,right:{line:133,text:l}},{kind:`added`,right:{line:134,text:u}},i(135,d),i(136,f),{kind:`added`,right:{line:137,text:p}},i(138,m),{kind:`deleted`,left:{line:139,text:h},whitespaceOnly:!0},{kind:`added`,right:{line:139,text:h.trimEnd()},whitespaceOnly:!0}]}]}}function Ve(e){return{...e,diff:I(e)}}var He=Object.fromEntries(Object.entries({"Patchset 20":[{path:`clis/dataflow.py`,kind:`modified`,added:2,removed:85},{path:`clis/diagnose.py`,kind:`modified`,added:8,removed:11},{path:`clis/fetch_instance_log.py`,kind:`deleted`,added:0,removed:573},{path:`clis/fetch_logview.py`,kind:`modified`,added:2,removed:2},{path:`clis/fetch_meta_timeline.py`,kind:`modified`,added:0,removed:2},{path:`clis/fetch_quota_snapshot.py`,kind:`deleted`,added:0,removed:290},{path:`clis/hbo_plan_diagnose.py`,kind:`deleted`,added:0,removed:119},{path:`clis/parse_logview.py`,kind:`modified`,added:6,removed:2},{path:`clis/query_sls.py`,kind:`modified`,added:14,removed:2},{path:`devclis/README.md`,kind:`added`,added:15,removed:0},{path:`docs/cli/studio.md`,kind:`modified`,added:1,removed:2},{path:`tests/review/change-set.spec.ts`,kind:`renamed`,previousPath:`tests/changes/change-summary.spec.ts`,added:28,removed:6}],"Patchset 19":[{path:`clis/dataflow.py`,kind:`modified`,added:1,removed:52},{path:`clis/diagnose.py`,kind:`modified`,added:5,removed:6},{path:`clis/fetch_instance_log.py`,kind:`deleted`,added:0,removed:573},{path:`clis/fetch_logview.py`,kind:`modified`,added:1,removed:2},{path:`clis/fetch_meta_timeline.py`,kind:`modified`,added:0,removed:2},{path:`clis/hbo_plan_diagnose.py`,kind:`deleted`,added:0,removed:119},{path:`clis/parse_logview.py`,kind:`modified`,added:4,removed:2},{path:`clis/query_sls.py`,kind:`modified`,added:7,removed:1},{path:`docs/cli/studio.md`,kind:`modified`,added:1,removed:1}]}).map(([e,t])=>[e,t.map(Ve)])),Ue=`Working copy`,L=`Review`,R={"Patchset 20":[`clis/dataflow.py`,`clis/fetch_instance_log.py`],"Patchset 19":[`clis/fetch_instance_log.py`]},We=De,Ge=`farming.review.diff-preferences`;b.registerLanguage(`typescript`,m),b.registerLanguage(`python`,_),b.registerLanguage(`sql`,d),b.registerLanguage(`markdown`,y),b.registerLanguage(`cpp`,x),b.registerLanguage(`java`,h),b.registerLanguage(`protobuf`,D),b.registerLanguage(`json`,f),b.registerLanguage(`yaml`,g),b.registerLanguage(`bash`,p),b.registerLanguage(`xml`,v);function Ke(){if(typeof window>`u`)return We;try{return te(JSON.parse(window.localStorage.getItem(Ge)||`{}`))}catch{return We}}function qe(e,t=!0){return e?e.source===`git-range`?e.head:Ue:t?`Patchset 20`:L}function Je(e,t=!0){return e?e.source===`git-range`?e.base:`HEAD`:`Base`}function Ye(e,t=!0){return e?{[qe(e,t)]:[]}:t?He:{[L]:[]}}function Xe({catalog:e,comments:t,initialPatchset:n,basePatchset:r,initiallyExpand:i,reviewId:a}){let o=ne({catalog:e,comments:t,patchRange:{basePatchset:r,patchset:n},preferences:Ke(),reviewId:a,reviewedPathsByPatchset:n===`Patchset 20`||n===`Patchset 19`?R:{}});return i?{...o,patchsets:Object.fromEntries(Object.keys(e).map(t=>{let n=e[t]??[],r=n[1]?.path??n[0]?.path;return[t,{...oe(o,t),expandedPaths:r?[r]:[]}]}))}:o}function Ze(e){let t=e.split(`/`);return t[t.length-1]||e}function z(e){let t=Math.abs(e);return t<1024?`${e} B`:t<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function B(e){return e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]??e)}function Qe(e,t,n){return Array.from(e).slice(t,n).join(``)}function $e({action:e,pending:t,reviewed:n,reviewedLabel:r,onToggle:i}){return(0,F.jsxs)(`div`,{className:`review-review-status ${n?`reviewed`:``} ${t?`pending`:``}`,children:[r?(0,F.jsx)(`span`,{className:`review-reviewed-label`,children:r}):null,e?(0,F.jsx)(`button`,{type:`button`,"aria-checked":n===!0,"aria-label":`Reviewed`,"data-action-visibility":e.visibility,disabled:e.disabled,role:`switch`,title:t?`Saving review status`:e.ariaLabel,onClick:i,children:t?`SAVING…`:e.label}):(0,F.jsx)(`span`,{className:`review-review-loading`,children:`Reviewed status loading`})]})}function et({file:e,maxChangeSize:t}){if(e.binary)return(0,F.jsx)(`span`,{className:`review-change-bar binary`,"aria-label":`Binary file`});let n=e=>e===0?0:Math.max(2,Math.round(e/t*72));return(0,F.jsxs)(`span`,{className:`review-change-bar`,"aria-label":`+${e.added} −${e.removed}`,children:[(0,F.jsx)(`i`,{className:`added`,style:{width:`${n(e.added)}px`}}),(0,F.jsx)(`i`,{className:`deleted`,style:{width:`${n(e.removed)}px`}})]})}function tt({file:e}){if(e.binary){let t=typeof e.sizeDelta==`number`&&Number.isInteger(e.sizeDelta)?e.sizeDelta:null;return(0,F.jsx)(`span`,{className:`review-file-stats binary`,children:t===null?`Binary`:z(t)})}return(0,F.jsxs)(`span`,{className:`review-file-stats`,children:[e.added?(0,F.jsxs)(`span`,{className:`added`,children:[`+`,e.added]}):null,e.removed?(0,F.jsxs)(`span`,{className:`removed`,children:[`−`,e.removed]}):null]})}function nt(e){let t=e.toLowerCase();return t.endsWith(`.osql`)||t.endsWith(`.odpsql`)?`sql`:t.endsWith(`.py`)?`python`:t.endsWith(`.md`)||t.endsWith(`.mdx`)?`markdown`:/\.(c|cc|cpp|cxx|h|hh|hpp|hxx)$/.test(t)?`cpp`:t.endsWith(`.java`)?`java`:t.endsWith(`.proto`)?`protobuf`:t.endsWith(`.json`)?`json`:t.endsWith(`.yaml`)||t.endsWith(`.yml`)?`yaml`:/\.(bash|sh|zsh)$/.test(t)?`bash`:/\.(html|htm|xml)$/.test(t)?`xml`:`typescript`}function rt({intraline:e,language:t,line:n,side:r,text:i,preferences:a}){let o=n&&r?{"data-review-line":n,"data-review-side":r}:{},s=a.showTrailingWhitespace?i.match(/[ \t]+$/)?.[0]:void 0,c=s?i.slice(0,-s.length):i,l=a.intralineDifference?e:void 0,u=l?.length?it(c,l,t,a):V(c,t,a);return a.showTabs&&(u=u.replace(/\t/g,`<span class="review-tab-marker">⇥</span>`)),s&&(u+=`<span class="review-trailing-whitespace">${s.replace(/[ \t]/g,`·`)}</span>`),(0,F.jsx)(`code`,{...o,dangerouslySetInnerHTML:{__html:u}})}function V(e,t,n){return n.syntaxHighlighting&&e?b.highlight(e,{language:t,ignoreIllegals:!0}).value:B(e)}function it(e,t,n,r){let i=``,a=0,o=Array.from(e).length;for(let s of t){let t=Math.max(a,Math.min(s.start,o)),c=Math.max(t,Math.min(s.end,o));i+=V(Qe(e,a,t),n,r),c>t&&(i+=`<span class="review-intraline">${V(Qe(e,t,c),n,r)}</span>`),a=c}return i+=V(Qe(e,a),n,r),i}function H({kind:e,intraline:t,language:n,line:r,side:i,text:a,preferences:o,renderAttachment:s}){return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`review-diff-row unified ${e}`,children:[(0,F.jsx)(`span`,{children:r??``}),(0,F.jsx)(rt,{intraline:t,language:n,line:r,side:i,text:a,preferences:o})]}),r?s?.(r,[i]):null]})}function at({kind:e,language:t,leftLine:n,leftIntraline:r,leftText:i,rightLine:a,rightIntraline:o,rightText:s,preferences:c,renderAttachment:l}){let u=a??n,d=[...n?[`left`]:[],...a?[`right`]:[]];return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`review-diff-row ${e}`,children:[(0,F.jsx)(`span`,{children:n??``}),(0,F.jsx)(rt,{intraline:r,language:t,line:n,side:`left`,text:i??``,preferences:c}),(0,F.jsx)(`span`,{children:a??``}),(0,F.jsx)(rt,{intraline:o,language:t,line:a,side:`right`,text:s??``,preferences:c})]}),u?l?.(u,d):null]})}function U(e){let t=e.findIndex(e=>e.kind!==`context`);if(t<0)return{body:e,leading:[],trailing:[]};let n=e.length-1;for(;n>t&&e[n]?.kind===`context`;)--n;return{body:e.slice(t,n+1),leading:e.slice(0,t),trailing:e.slice(n+1)}}function W(e,t,n){let r=e.filter(e=>e.kind!==`context`&&e.kind!==`skipped`);return(t===`first`?r:[...r].reverse()).find(e=>e[n]?.line)?.[n]?.line}function ot(e,t){let n=e[t]?.rows??[],r=e[t-1]?.rows??[],i=[`left`,`right`].flatMap(e=>{let t=W(n,`first`,e);if(!t)return[];let i=W(r,`last`,e);return[Math.max(0,t-(i??0)-1)]});return i.length?Math.min(...i):0}function G(e,t){let n=e[t];if(!n)return 0;let r=e[t-1],i=r?r.oldStart+r.oldLines-1:0,a=r?r.newStart+r.newLines-1:0;return Math.max(0,Math.min(n.oldStart-i-1,n.newStart-a-1))}function K(e){let t=e.diff.hunks[e.diff.hunks.length-1],n=e.diff.leftMeta?.lines,r=e.diff.rightMeta?.lines;if(!t||!Number.isInteger(n)||!Number.isInteger(r))return 0;let i=t.oldStart+t.oldLines-1,a=t.newStart+t.newLines-1;return Math.max(0,Math.min((n??0)-i,(r??0)-a))}function st(e,t,n,r){let i=n[r-1],a=n[r];return`${e}:${t}:${i?`${i.oldStart+i.oldLines-1}:${i.newStart+i.newLines-1}`:`0:0`}>${a?`${a.oldStart}:${a.newStart}`:`0:0`}`}function q(e,t){let n=t.diff.hunks[t.diff.hunks.length-1],r=n?`${n.oldStart+n.oldLines-1}:${n.newStart+n.newLines-1}`:`0:0`;return`${e}:${t.path}:${r}>eof:${t.diff.leftMeta?.lines??0}:${t.diff.rightMeta?.lines??0}`}function ct(){return{aboveRows:[],belowRows:[]}}function lt(e,t,n,r,i){let a=n.diff.hunks[r],o=n.diff.hunks[r-1],s=U(a?.rows??[]),c=o?U(o.rows):null,l=[...a?.commonContext??[],...s.leading],u=!!a?.commonContext?.length,d=u?ot(n.diff.hunks,r):G(n.diff.hunks,r),f=st(e,n.path,n.diff.hunks,r),p=t[f]??ct(),m=c?.trailing.slice(0,r>0?Math.min(d,i):0)??[],h=Math.min(Math.max(0,d-m.length),i),g=h>0?l.slice(-h):[],_=Math.max(0,d-(u?m.length+g.length:0)-p.aboveRows.length-p.belowRows.length),v=u?W(o?.rows??[],`last`,`left`)??0:o?o.oldStart+o.oldLines-1:0,y=u?W(o?.rows??[],`last`,`right`)??0:o?o.newStart+o.newLines-1:0,b=v+(u?m.length:0)+p.aboveRows.length+1,x=y+(u?m.length:0)+p.aboveRows.length+1;return{availableRows:[...c?.trailing??[],...a?.commonContext??[],...s.leading].filter(e=>{let t=e.left?.line,n=e.right?.line;return t!==void 0&&n!==void 0&&t>=b&&t<b+_&&n>=x&&n<x+_}),baseAboveRows:m,baseBelowRows:g,expansion:p,header:a?.header??``,hiddenLines:_,key:f,location:r===0?`top`:`middle`,newHiddenStart:x,oldHiddenStart:b}}function ut(e,t,n,r){let i=n.diff.hunks[n.diff.hunks.length-1];if(!i)return null;let a=K(n),o=q(e,n),s=t[o]??ct(),c=U(i.rows).trailing,l=c.slice(0,Math.min(a,r)),u=Math.max(0,a-s.aboveRows.length),d=i.oldStart+i.oldLines-1,f=i.newStart+i.newLines-1,p=d+s.aboveRows.length+1,m=f+s.aboveRows.length+1;return{availableRows:c.filter(e=>{let t=e.left?.line,n=e.right?.line;return t!==void 0&&n!==void 0&&t>=p&&n>=m}),baseAboveRows:l,baseBelowRows:[],expansion:s,header:``,hiddenLines:u,key:o,location:`bottom`,newHiddenStart:m,oldHiddenStart:p}}function J({gap:e,onExpand:t}){let n=e.hiddenLines>10,r=!!e.expansion.pending;return(0,F.jsxs)(`div`,{className:`review-diff-hunk interactive`,role:`group`,"aria-label":`${e.hiddenLines} hidden common lines`,children:[(0,F.jsx)(`span`,{children:e.header}),(0,F.jsxs)(`span`,{className:`review-context-controls`,children:[n&&e.location!==`top`?(0,F.jsx)(`button`,{type:`button`,disabled:r,"aria-label":`Show 10 lines above`,onClick:()=>t(`above`),children:`+10↑`}):null,n&&e.location!==`top`?(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`−`}):null,(0,F.jsxs)(`button`,{type:`button`,disabled:r,"aria-label":`Show all ${e.hiddenLines} common lines`,onClick:()=>t(`all`),children:[`+`,e.hiddenLines,` common `,e.hiddenLines===1?`line`:`lines`]}),n&&e.location!==`bottom`?(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`−`}):null,n&&e.location!==`bottom`?(0,F.jsx)(`button`,{type:`button`,disabled:r,"aria-label":`Show 10 lines below`,onClick:()=>t(`below`),children:`+10↓`}):null]}),e.expansion.error?(0,F.jsx)(`span`,{className:`review-context-error`,role:`alert`,children:e.expansion.error}):null]})}function dt({contextKeyPrefix:e,contextGapExpansions:t,file:n,mode:r,preferences:i,renderAttachment:a,onExpandContext:o,onExpandSkippedContext:s}){let c=nt(n.path),l=n.diff.hunks.reduce((e,t)=>{for(let n of[...t.commonContext??[],...t.rows])n.left?.missingNewlineAtEnd&&(e.left=!0),n.right?.missingNewlineAtEnd&&(e.right=!0);return e},{left:!1,right:!1}),u=(t,r,a)=>{let o=Math.max(t.leftLines??0,t.rightLines??0),c=st(e,n.path,n.diff.hunks,a),l=i.context,u=Math.min(10,o);return(0,F.jsxs)(`button`,{type:`button`,className:`review-skipped-row`,onClick:()=>s(c,a,Math.min(1e4,l+u)),children:[`Show `,u,` more common lines (`,o,` hidden)`]},r)},d=(e,t,n)=>(0,F.jsx)(F.Fragment,{children:(i.ignoreWhitespace===`NONE`?e:e.filter(e=>!e.whitespaceOnly)).map((e,o)=>{let s=`${n}:${t}:${e.left?.line??``}:${e.right?.line??``}:${o}`;if(r===`unified`){if(e.kind===`skipped`)return u(e,s,t);if(e.kind===`context`){let t=e.right??e.left;return(0,F.jsx)(H,{intraline:t?.intraline,kind:`context`,language:c,line:t?.line,side:S(`context`,!!e.right),text:t?.text??``,preferences:i,renderAttachment:a},s)}return e.kind===`changed`?(0,F.jsxs)(E.Fragment,{children:[(0,F.jsx)(H,{intraline:e.left?.intraline,kind:`deleted`,language:c,line:e.left?.line,side:S(`deleted`,!1),text:e.left?.text??``,preferences:i,renderAttachment:a}),(0,F.jsx)(H,{intraline:e.right?.intraline,kind:`added`,language:c,line:e.right?.line,side:S(`added`,!0),text:e.right?.text??``,preferences:i,renderAttachment:a})]},s):e.left?(0,F.jsx)(H,{intraline:e.left.intraline,kind:`deleted`,language:c,line:e.left.line,side:S(`deleted`,!1),text:e.left.text,preferences:i,renderAttachment:a},s):(0,F.jsx)(H,{intraline:e.right?.intraline,kind:`added`,language:c,line:e.right?.line,side:S(`added`,!!e.right),text:e.right?.text??``,preferences:i,renderAttachment:a},s)}return e.kind===`skipped`?u(e,s,t):(0,F.jsx)(at,{kind:e.kind,language:c,leftIntraline:e.left?.intraline,leftLine:e.left?.line,leftText:e.left?.text,rightIntraline:e.right?.intraline,rightLine:e.right?.line,rightText:e.right?.text,preferences:i,renderAttachment:a},s)})}),f=n.diff.hunks.map((r,a)=>lt(e,t,n,a,i.context)),p=ut(e,t,n,i.context),m=[...f,...p?[p]:[]].filter(e=>e.hiddenLines>0&&e.hiddenLines<=3&&!e.expansion.pending&&!e.expansion.error),h=m.map(e=>`${e.key}:${e.hiddenLines}:${e.oldHiddenStart}:${e.newHiddenStart}`).join(`|`),g=(0,E.useRef)(o);g.current=o,(0,E.useEffect)(()=>{for(let e of m)g.current(e,`all`,{lines:e.hiddenLines,newStart:e.newHiddenStart,oldStart:e.oldHiddenStart})},[h]);let _=(e,t)=>{let n=t===`all`?e.hiddenLines:Math.min(10,e.hiddenLines),r=t===`below`?e.hiddenLines-n:0;o(e,t,{lines:n,newStart:e.newHiddenStart+r,oldStart:e.oldHiddenStart+r})},v=(e,t)=>{let n=e.expansion.aboveRows.length>0||e.expansion.belowRows.length>0,r=e.hiddenLines>3||!!e.expansion.error;return(0,F.jsxs)(F.Fragment,{children:[d(e.baseAboveRows,t,`context`),d(e.expansion.aboveRows,t,`context`),r?(0,F.jsx)(J,{gap:e,onExpand:t=>_(e,t)}):null,!r&&e.hiddenLines>0?(0,F.jsxs)(`div`,{className:`review-diff-hunk interactive loading`,role:`status`,children:[(0,F.jsx)(`span`,{children:e.header}),(0,F.jsxs)(`span`,{children:[`Loading `,e.hiddenLines,` common `,e.hiddenLines===1?`line`:`lines`,`…`]})]}):null,!r&&e.hiddenLines===0&&!n&&e.location!==`bottom`?(0,F.jsx)(`div`,{className:`review-diff-hunk ${t>0?`secondary`:``}`,children:(0,F.jsx)(`span`,{children:e.header})}):null,d(e.expansion.belowRows,t,`context`),d(e.baseBelowRows,t,`context`)]})};return(0,F.jsxs)(F.Fragment,{children:[n.diff.hunks.map((e,t)=>(0,F.jsxs)(E.Fragment,{children:[v(f[t],t),d(U(e.rows).body,t,`change`)]},`${e.header}:${t}`)),p?v(p,n.diff.hunks.length):null,l.left||l.right?(0,F.jsx)(`div`,{className:`review-newline-warning`,role:`note`,children:[l.left?`No newline at end of left file.`:``,l.right?`No newline at end of right file.`:``].filter(Boolean).join(` — `)}):null]})}function ft({row:e}){return e.diffLoadError?(0,F.jsxs)(`div`,{className:`review-diff-message error`,role:`alert`,children:[`Could not load diff: `,e.diffLoadError]}):e.diffLoadPending?(0,F.jsx)(`div`,{className:`review-diff-message`,role:`status`,children:`Loading diff…`}):e.diffStatus===`binary`?(0,F.jsx)(`div`,{className:`review-diff-message`,children:`Binary file changed`}):e.diffStatus===`too-expensive`?(0,F.jsx)(`div`,{className:`review-diff-message`,children:`Diff too large to render`}):e.diffStatus===`not-loaded`?(0,F.jsx)(`div`,{className:`review-diff-message`,children:`Diff not loaded yet`}):null}function pt({disabled:e,draft:t,target:n,onCancel:r,onDraftChange:i,onSave:a}){let o=n.side===`right`?`Patchset`:n.side===`left`?`Base`:`file`;return(0,F.jsxs)(`form`,{className:`review-comment-editor`,onSubmit:e=>{e.preventDefault(),a()},children:[(0,F.jsxs)(`header`,{children:[`Comment on `,n.range?n.range.start_line===n.range.end_line?`${o} line ${n.range.start_line}, columns ${n.range.start_character+1}–${n.range.end_character}`:`${o} lines ${n.range.start_line}–${n.range.end_line}`:`${o} line ${n.line}`]}),(0,F.jsx)(`textarea`,{"aria-label":`Review comment`,name:`farming-review-comment`,inputMode:`text`,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,enterKeyHint:`done`,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-bwignore":`true`,"data-form-type":`other`,autoFocus:!0,placeholder:`Leave a review comment…`,value:t,onChange:e=>i(e.target.value)}),(0,F.jsxs)(`footer`,{children:[(0,F.jsx)(`button`,{type:`button`,onClick:r,children:`CANCEL`}),(0,F.jsx)(`button`,{type:`submit`,disabled:e||!t.trim(),children:e?`SAVING…`:`SAVE COMMENT`})]})]})}function mt({comment:e,disabled:t,onDelete:n,onStatusChange:r}){let a=e.side===`right`?`Patchset`:e.side===`left`?`Base`:`File`,o=e.status||`open`,s=e.range?e.range.start_line===e.range.end_line?`${a} line ${e.range.start_line}, columns ${e.range.start_character+1}–${e.range.end_character}`:`${a} lines ${e.range.start_line}–${e.range.end_line}`:`${a} line ${e.line}`;return(0,F.jsxs)(`article`,{className:`review-comment-thread ${o}`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`span`,{children:o===`outdated`?`Outdated · ${s}`:s}),(0,F.jsxs)(`span`,{className:`review-comment-actions`,children:[(0,F.jsx)(`button`,{type:`button`,disabled:t,onClick:()=>r(o===`resolved`?`open`:`resolved`),children:o===`resolved`?`REOPEN`:`RESOLVE`}),(0,F.jsx)(`button`,{type:`button`,"aria-label":`Delete comment on line ${e.line}`,disabled:t,onClick:n,children:(0,F.jsx)(i,{})})]})]}),(0,F.jsx)(`p`,{children:e.body})]})}function ht(e,t){let n=(e instanceof Element?e:e?.parentElement)?.closest(`code[data-review-line][data-review-side]`)??null;return n&&t.contains(n)?n:null}function gt(e,t,n){let r=document.createRange();r.selectNodeContents(e);try{r.setEnd(t,n)}catch{return 0}return r.toString().length}function _t(e){let t=window.getSelection();if(!t||t.isCollapsed||!t.anchorNode||!t.focusNode)return null;let n=ht(t.anchorNode,e),r=ht(t.focusNode,e);if(!n||!r)return null;let i=n.dataset.reviewSide;if(i!==r.dataset.reviewSide||i!==`left`&&i!==`right`&&i!==`unified`)return null;let a=Number(n.dataset.reviewLine),o=Number(r.dataset.reviewLine);if(!Number.isInteger(a)||!Number.isInteger(o))return null;let s={character:gt(n,t.anchorNode,t.anchorOffset),line:a},c={character:gt(r,t.focusNode,t.focusOffset),line:o},l=s.line<c.line||s.line===c.line&&s.character<=c.character,u=l?s:c,d=l?c:s;return u.line===d.line&&u.character===d.character?null:{line:d.line,range:{end_character:d.character,end_line:d.line,start_character:u.character,start_line:u.line},side:i}}function Y(){let e=typeof window<`u`&&new URLSearchParams(window.location.search).get(`fixture`)===`1`,[t]=(0,E.useState)(()=>{let e=typeof window>`u`?``:window.location.search;return{requested:new URLSearchParams(e).has(`acpItem`),route:Fe(e)}}),n=t.route,[i]=(0,E.useState)(()=>ze(typeof window>`u`?null:window.location)),d=!e&&!t.requested&&i.request&&(i.request.source===`working-copy`||i.request.head===`now`)?i.request:null,[f,p]=(0,E.useState)(()=>d||t.requested?null:i.request),[m,h]=(0,E.useState)(null),[g,_]=(0,E.useState)(`final`),[v,y]=(0,E.useState)(!!(d||n)),b=t.requested?!n:!!i.error,x=!e,S=f?.source===`working-copy`,ne=f?.source===`git-range`,[ie,C]=(0,E.useState)(()=>b?{[L]:[]}:Ye(f,e)),[w,T]=(0,E.useState)(t.requested?n?``:`ACP review target is invalid`:i.error??``),[_e,De]=(0,E.useState)(null),[D,Ae]=(0,E.useState)(()=>{let t=b?{[L]:[]}:Ye(f,e);return Xe({basePatchset:b?`Base`:Je(f,e),catalog:t,comments:[],initialPatchset:b?L:qe(f,e),initiallyExpand:!x,reviewId:x?void 0:we})}),O=(0,E.useRef)(D),k=(0,E.useRef)(ie);k.current=ie;let[A,j]=(0,E.useState)(We),[Ne,M]=(0,E.useState)(!1),[Ie,Le]=(0,E.useState)(!1),[N,Re]=(0,E.useState)(``),[P,I]=(0,E.useState)(``),[Ve,He]=(0,E.useState)(``),[Ue,R]=(0,E.useState)([]),[Ze,z]=(0,E.useState)({}),[B,Qe]=(0,E.useState)(null),[nt,rt]=(0,E.useState)(``),[V,it]=(0,E.useState)(!1),[H,at]=(0,E.useState)(()=>new URLSearchParams(window.location.search).get(`comparison`)||``),[U,W]=(0,E.useState)(!1),ot=(0,E.useRef)(null),G=x?D.reviewId??``:we,K=D.patchRange.patchset,st=D.patchRange.basePatchset,q=oe(D,K),lt=new Set(q.expandedPaths),ut=D.diffMode,J=!!(m&&f?.source===`git-range`&&f.reviewId===m.reviewId&&f.head===m.head),ht=J?m?.scope:f?.source===`working-copy`?f.scope:void 0,gt=ht===`untracked`?`unified`:ut,Y=D.preferences,vt=f?{...f,context:Y.context,ignoreWhitespace:Y.ignoreWhitespace}:null,yt=(0,E.useRef)(vt);yt.current=vt;let X=J?{..._e??{workingTree:!0},head:void 0,workingTree:!0}:_e,Z=D.commentDraft,bt=D.commentDraft?.body??``,Q=ie[K]??[],xt=Q.reduce((e,t)=>e+t.added,0),St=Q.reduce((e,t)=>e+t.removed,0),Ct=Math.max(1,...Q.map(e=>e.added+e.removed)),$=e=>{let t=re(O.current,e,k.current);if(t.state!==O.current){O.current=t.state,Ae(t.state);for(let e of t.effects){if(e.type===`load-file-diff`){let t=yt.current;if(!t){$(Me(e,`review file diff source is unavailable`));continue}fe(t,e.path).then(t=>{let n=je(k.current,e,t,{reviewId:O.current.reviewId});k.current=n.catalog,C(n.catalog),$(n.action)}).catch(t=>$(Me(e,t)))}if(e.type===`save-reviewed-status`){let t=e.reviewId??G;le({...e,reviewId:t}).then(t=>$({patchset:e.patchset,paths:e.changes.map(e=>e.path),reviewedPaths:t.reviewedPaths,...e.reviewId?{reviewId:e.reviewId}:{},revision:t.revision,type:`commit-reviewed-status`})).catch(async n=>{let r=n instanceof be&&n.state?n.state:await xe(t,e.patchset).catch(()=>null);if(!r){let t=oe(O.current,e.patchset),n=new Set(t.reviewedPaths);for(let t of e.changes)t.reviewed?n.delete(t.path):n.add(t.path);r={reviewedPaths:[...n],revision:e.revision}}$({patchset:e.patchset,reviewedPaths:r.reviewedPaths,...e.reviewId?{reviewId:e.reviewId}:{},revision:r.revision,type:`restore-reviewed-status`}),Re(n instanceof Error?`Could not save Reviewed: ${n.message}`:`Could not save Reviewed status`)})}if(e.type===`save-comment`){let t=e.reviewId??G;me(t,e.comment).then(()=>$({id:e.comment.id,patchset:e.comment.patchset,pendingType:`save`,...e.reviewId?{reviewId:e.reviewId}:{},type:`commit-comment`})).catch(async n=>{$({comments:await Ce(t,e.comment.patchset).catch(()=>O.current.comments.filter(t=>t.id!==e.comment.id)),id:e.comment.id,patchset:e.comment.patchset,pendingType:`save`,...e.reviewId?{reviewId:e.reviewId}:{},type:`restore-comments`}),I(n instanceof Error?`Could not save comment: ${n.message}`:`Could not save comment`)})}if(e.type===`delete-comment`){let t=e.reviewId??G;ue(t,e.comment.patchset,e.comment.id).then(()=>$({id:e.comment.id,patchset:e.comment.patchset,pendingType:`delete`,...e.reviewId?{reviewId:e.reviewId}:{},type:`commit-comment`})).catch(async n=>{$({comments:await Ce(t,e.comment.patchset).catch(()=>[...O.current.comments,e.comment]),id:e.comment.id,patchset:e.comment.patchset,pendingType:`delete`,...e.reviewId?{reviewId:e.reviewId}:{},type:`restore-comments`}),I(n instanceof Error?`Could not delete comment: ${n.message}`:`Could not delete comment`)})}}}};(0,E.useEffect)(()=>(document.body.classList.add(`review-body`),()=>document.body.classList.remove(`review-body`)),[]),(0,E.useEffect)(()=>{if(!U)return;let e=e=>{ot.current?.contains(e.target)||W(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[U]),(0,E.useEffect)(()=>{if(!d&&!n)return;let e=!0;return y(!0),(n?Se(n.agentId,n.itemIds):(()=>{let e=d;return ge(`root`in e&&typeof e.root==`string`?{root:e.root}:{agentId:e.agentId},e.source===`git-range`?e.base:`HEAD`,e.source===`working-copy`?{modifiedWithinDays:e.modifiedWithinDays,paths:e.paths,scope:e.scope}:void 0)})()).then(t=>{if(!e)return;let n=he(t,`final`),r=new URLSearchParams(window.location.search);r.delete(`agentId`),r.delete(`acpItem`),r.set(`root`,t.root),r.set(`base`,n.base),r.set(`head`,n.head),r.set(`reviewId`,t.reviewId),r.set(`comparison`,`last-turn`),window.history.replaceState(null,``,`${window.location.pathname}?${r.toString()}`),h(t),_(`final`),at(`last-turn`),p(n),T(``)}).catch(t=>{e&&T(t instanceof Error?t.message:`review capture failed`)}).finally(()=>{e&&y(!1)}),()=>{e=!1}},[n,d]),(0,E.useEffect)(()=>{if(d||n||f?.source!==`git-range`||!f.reviewId)return;let e=!0;return pe(f.reviewId).then(t=>{if(!e)return;let n=t.revisions.find(e=>e.head===f.head)??t;h(n),at(e=>e||`last-turn`),_(f.base===n.fixesBase&&n.fixesBase!==n.base?`fixes`:`final`)}).catch(()=>{}),()=>{e=!1}},[n,d,f]),(0,E.useEffect)(()=>{if(!f)return;let e=!0,t=Ke();return ve({...f,context:t.context,ignoreWhitespace:t.ignoreWhitespace,metadataOnly:!0}).then(async n=>{let[r,i]=await Promise.all([xe(n.reviewId,n.patchset).catch(()=>null),Ce(n.reviewId,n.patchset).catch(()=>[])]);if(!e)return;let a=ee(Oe(n),n.patchset,i.map(e=>e.path)),o=ke({comments:i,preferences:t,...r?{reviewedPaths:r.reviewedPaths}:{},snapshot:n});r&&(o=re(o,{patchset:n.patchset,reviewedPaths:r.reviewedPaths,reviewId:n.reviewId,revision:r.revision,type:`hydrate-reviewed-status`},a).state),O.current=o,k.current=a,De(n.comparison??null),C(a),Ae(o),T(``)}).catch(t=>{e&&T(t instanceof Error?t.message:`review diff request failed`)}),()=>{e=!1}},[f]),(0,E.useEffect)(()=>{if(!N)return;let e=window.setTimeout(()=>Re(``),4e3);return()=>window.clearTimeout(e)},[N]),(0,E.useEffect)(()=>{if(!P)return;let e=window.setTimeout(()=>I(``),4e3);return()=>window.clearTimeout(e)},[P]),(0,E.useEffect)(()=>{try{window.localStorage.setItem(Ge,JSON.stringify(Y))}catch{}},[D.preferences]),(0,E.useEffect)(()=>{if(x||!G||!k.current[K])return;let e=!0;return xe(G,K).then(t=>{e&&$({patchset:K,reviewedPaths:t.reviewedPaths,reviewId:G,revision:t.revision,type:`hydrate-reviewed-status`})}).catch(()=>{}),Ce(G,K).then(t=>{if(!e)return;let n=ee(k.current,K,t.map(e=>e.path));n!==k.current&&(k.current=n,C(n)),$({comments:t,patchset:K,reviewId:G,type:`hydrate-comments`})}).catch(()=>{}),()=>{e=!1}},[x,K,G]),(0,E.useEffect)(()=>{let e=()=>{let e=``;for(let t of document.querySelectorAll(`.review-file-change.expanded[data-file-path]`)){let n=t.querySelector(`.review-file-change-header`);if(!n)continue;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();i.top<=1&&r.bottom>i.bottom&&(e=t.dataset.filePath??``)}He(t=>t===e?t:e)};return e(),window.addEventListener(`scroll`,e,{passive:!0}),document.body.addEventListener(`scroll`,e,{passive:!0}),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e),document.body.removeEventListener(`scroll`,e),window.removeEventListener(`resize`,e)}},[K,q.expandedPaths.join(`\0`)]);let wt=!!q.pendingReview,Tt=!!q.pendingComment,Et=(e,t)=>{$({path:e,reviewed:t,type:`set-file-reviewed`})},Dt=e=>{$({patchset:e,type:`select-patchset`})},Ot=Q.length>0&&Q.every(e=>lt.has(e.path)),kt=e=>{$({path:e,type:`toggle-file-expanded`})},At=()=>{j(Y),M(!0)},jt=()=>{let e=Y,t=te(A),n=e.context!==t.context||e.ignoreWhitespace!==t.ignoreWhitespace;if($({preferences:t,type:`set-preferences`}),M(!1),n&&z({}),!x||!f||!n)return;let r=K,i=new Map(Q.map(e=>[e.path,e])),a=q.expandedPaths.filter(e=>{let t=i.get(e);return!!(t&&t.kind!==`unmodified`&&!t.binary&&!t.diffTooExpensive)});a.length&&(R(e=>[...new Set([...e,...a])]),Be({...f,context:t.context,ignoreWhitespace:t.ignoreWhitespace},a).then(e=>{if(O.current.patchRange.patchset!==r)return;let t=k.current;for(let n of e.files)t=se(t,r,n);k.current=t,C(t);let n=e.errors[0];n&&T(n.message)}).finally(()=>R(e=>e.filter(e=>!a.includes(e)))))},Mt=()=>{navigator.clipboard&&navigator.clipboard.writeText(`34a15ae`).catch(()=>{}),Le(!0),window.setTimeout(()=>Le(!1),1200)},Nt=(e,t)=>{let n=yt.current;if(!n||Ue.includes(e))return;let r=K;R(t=>[...t,e]),fe({...n,context:t},e).then(e=>{let t=se(k.current,r,e);k.current=t,C(t)}).catch(e=>T(e instanceof Error?e.message:`review context request failed`)).finally(()=>R(t=>t.filter(t=>t!==e)))},Pt=(e,t,n,r)=>{let i=yt.current;if(t.expansion.pending||r.lines<1)return;let a=e=>{z(r=>{let i=r[t.key]??ct();return{...r,[t.key]:n===`below`?{...i,belowRows:[...e,...i.belowRows],error:void 0,pending:void 0}:{...i,aboveRows:[...i.aboveRows,...e],error:void 0,pending:void 0}}})},o=e=>{let n=e instanceof Error?e.message:`review context request failed`;z(e=>{let r=e[t.key]??ct();return{...e,[t.key]:{...r,error:n,pending:void 0}}})};if(z(e=>{let r=e[t.key]??ct();return{...e,[t.key]:{...r,error:void 0,pending:n}}}),!i){let e=t.availableRows.filter(e=>{let t=e.left?.line,n=e.right?.line;return t!==void 0&&n!==void 0&&t>=r.oldStart&&t<r.oldStart+r.lines&&n>=r.newStart&&n<r.newStart+r.lines});e.length===r.lines?a(e):o(Error(`review context is unavailable`));return}Te(i,e.path,r).then(e=>a(e.rows)).catch(o)},Ft=(e,t,n,r)=>{$({line:t,path:e,range:r,side:n,type:`start-comment`})},It=()=>{!Z||!bt.trim()||$({id:typeof crypto?.randomUUID==`function`?crypto.randomUUID():`comment-${Date.now()}-${Math.random().toString(36).slice(2)}`,type:`save-comment`})},Lt=(e,t)=>{G&&Ee(G,e.patchset,e.id,t).then(()=>Ce(G,e.patchset)).then(t=>$({comments:t,patchset:e.patchset,reviewId:G,type:`hydrate-comments`})).catch(e=>I(e instanceof Error?e.message:`review comment status failed`))},Rt=(e,t)=>{let n=he(e,t),r=new URLSearchParams(window.location.search);r.delete(`agentId`),r.set(`root`,e.root),r.set(`base`,n.base),r.set(`head`,n.head),r.set(`reviewId`,e.reviewId),r.set(`comparison`,`last-turn`),window.history.replaceState(null,``,`${window.location.pathname}?${r.toString()}`),h(e),_(t),at(`last-turn`),W(!1),p(n)},zt=f&&`root`in f&&f.root?{root:f.root}:f&&`agentId`in f&&f.agentId?{agentId:f.agentId}:m?{root:m.root}:null,Bt=()=>{let e=!U;W(e),!(!e||B||V||!zt)&&(it(!0),rt(``),de(zt).then(Qe).catch(e=>rt(e instanceof Error?e.message:`Comparison sources could not be loaded`)).finally(()=>it(!1)))},Vt=e=>{if(!B)return;let t={base:e.base,head:e.head,metadataOnly:!0,root:B.root,source:`git-range`},n=new URLSearchParams(window.location.search);n.delete(`agentId`),n.delete(`reviewId`),n.delete(`path`),n.delete(`scope`),n.delete(`modifiedWithinDays`),n.set(`root`,B.root),n.set(`base`,e.base),n.set(`head`,e.head),n.set(`comparison`,e.id),window.history.replaceState(null,``,`${window.location.pathname}?${n.toString()}`),at(e.id),W(!1),_(`final`),p(t)},Ht=()=>{!m||v||(y(!0),ye(m.reviewId).then(e=>{Rt(e,e.number>1?`fixes`:`final`),T(``)}).catch(e=>T(e instanceof Error?e.message:`review refresh failed`)).finally(()=>y(!1)))},Ut=e=>{!m||e===g||Rt(m,e)},Wt=ht,Gt=Wt===`tracked`?`Changes`:Wt===`untracked`?`Untracked`:`Files`,Kt=B?[B.unstaged,B.staged,...B.commits,...B.branches].find(e=>e.id===H):null,qt=J?`Last Turn`:Kt?.id.startsWith(`commit:`)?`Commit · ${Kt.label}`:Kt?.id.startsWith(`branch:`)?`Branch · ${Kt.label}`:Kt?.label??(S?`Working copy`:ne?`Changes`:Gt),Jt=H===`staged`?`Staged changes`:X?.workingTree?`Workspace changes`:X?.head?.message.split(`
|
|
2
|
-
`)[0]||`Commit details`,Yt=X?.head?`Commit message`:H===`staged`?`Index summary`:`Change summary`,Xt=H===`staged`?`Staged changes are stored in the Git index and do not have a commit author or commit message yet.`:`Uncommitted workspace changes do not have a commit author or commit message yet.`,Zt=v?`Capturing an immutable workspace revision…`:f?S?Wt===`tracked`?`No tracked changes in this workspace.`:Wt===`untracked`?`No untracked files modified in the last ${f.modifiedWithinDays??3} days.`:`No uncommitted files in this workspace.`:`No changed files in this range.`:`Open a real review with: farming review <git-dir> <base> <head|now>`,Qt=b?`Could not load review target`:ne?`Could not load git range`:`Could not load working copy`;return(0,F.jsxs)(`main`,{className:`review-root`,"data-testid":`review-page`,children:[(0,F.jsxs)(`section`,{className:`review-files`,"aria-label":`Changed files`,children:[(0,F.jsxs)(`header`,{className:`review-files-toolbar`,children:[(0,F.jsxs)(`div`,{className:`review-patch-info`,children:[(0,F.jsxs)(`div`,{className:`review-source-control`,ref:ot,children:[(0,F.jsxs)(`button`,{type:`button`,className:`review-source-trigger`,"aria-expanded":U,onClick:Bt,children:[(0,F.jsx)(`strong`,{children:qt}),(0,F.jsx)(u,{})]}),U?(0,F.jsxs)(`div`,{className:`review-source-menu`,role:`menu`,"aria-label":`Compare changes from`,children:[V?(0,F.jsx)(`p`,{children:`Loading comparisons…`}):null,nt?(0,F.jsx)(`p`,{className:`error`,children:nt}):null,B?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":H===`unstaged`,disabled:!B.unstaged.available,onClick:()=>Vt(B.unstaged),children:[(0,F.jsx)(`span`,{children:`Unstaged`}),H===`unstaged`?(0,F.jsx)(c,{}):null]}),(0,F.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":H===`staged`,disabled:!B.staged.available,onClick:()=>Vt(B.staged),children:[(0,F.jsx)(`span`,{children:`Staged`}),H===`staged`?(0,F.jsx)(c,{}):null]}),(0,F.jsxs)(`details`,{className:`review-source-submenu`,children:[(0,F.jsxs)(`summary`,{children:[`Commit `,(0,F.jsx)(o,{})]}),(0,F.jsx)(`div`,{children:B.commits.length?B.commits.map(e=>(0,F.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":H===e.id,onClick:()=>Vt(e),children:[(0,F.jsx)(`span`,{children:e.label}),H===e.id?(0,F.jsx)(c,{}):null]},e.id)):(0,F.jsx)(`p`,{children:`No commits available`})})]}),(0,F.jsxs)(`details`,{className:`review-source-submenu`,children:[(0,F.jsxs)(`summary`,{children:[`Branch `,(0,F.jsx)(o,{})]}),(0,F.jsx)(`div`,{children:B.branches.length?B.branches.map(e=>(0,F.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":H===e.id,onClick:()=>Vt(e),children:[(0,F.jsx)(`span`,{children:e.label}),H===e.id?(0,F.jsx)(c,{}):null]},e.id)):(0,F.jsx)(`p`,{children:`No other branches`})})]}),m?(0,F.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":J,onClick:()=>Rt(m,g),children:[(0,F.jsx)(`span`,{children:`Last Turn`}),J?(0,F.jsx)(c,{}):null]}):null]}):null]}):null]}),(0,F.jsxs)(`span`,{className:`review-total-stats`,children:[(0,F.jsxs)(`b`,{children:[`+`,xt]}),(0,F.jsxs)(`i`,{children:[`−`,St]})]}),x?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`select`,{"aria-label":`Patch set`,value:K,onChange:e=>Dt(e.target.value),children:[(0,F.jsx)(`option`,{value:`Patchset 20`,children:`Patchset 20`}),(0,F.jsx)(`option`,{value:`Patchset 19`,children:`Patchset 19`})]}),(0,F.jsxs)(`button`,{type:`button`,className:`review-commit`,onClick:Mt,title:`Copy commit`,children:[Ie?`Copied`:`34a15ae`,(0,F.jsx)(l,{})]})]}),J?(0,F.jsxs)(`span`,{className:`review-revision-label`,children:[`Revision `,m?.number]}):null]}),(0,F.jsxs)(`div`,{className:`review-files-actions`,children:[J&&m?(0,F.jsxs)(F.Fragment,{children:[m.number>1?(0,F.jsx)(`button`,{type:`button`,className:g===`fixes`?`active`:``,onClick:()=>Ut(`fixes`),children:`FIXES SINCE REVIEW`}):null,(0,F.jsx)(`button`,{type:`button`,disabled:v,onClick:Ht,children:v?`CAPTURING…`:`REFRESH`}),(0,F.jsx)(`span`,{className:`review-toolbar-separator`})]}):null,(0,F.jsx)(`button`,{type:`button`,onClick:()=>$({expanded:!Ot,paths:Q.map(e=>e.path),type:`set-all-files-expanded`}),children:Ot?`COLLAPSE ALL`:`EXPAND ALL`}),(0,F.jsx)(`span`,{className:`review-toolbar-separator`}),ht===`untracked`?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{children:`Diff view:`}),(0,F.jsx)(`button`,{type:`button`,className:`review-icon-action ${ut===`split`?`active`:``}`,"aria-label":`Side-by-side diff`,title:`Side-by-side diff`,onClick:()=>$({mode:`split`,type:`set-diff-mode`}),children:(0,F.jsx)(s,{})}),(0,F.jsx)(`button`,{type:`button`,className:`review-icon-action ${ut===`unified`?`active`:``}`,"aria-label":`Unified diff`,title:`Unified diff`,onClick:()=>$({mode:`unified`,type:`set-diff-mode`}),children:(0,F.jsx)(a,{})})]}),(0,F.jsx)(`button`,{type:`button`,className:`review-icon-action`,"aria-label":`Diff preferences`,title:`Diff preferences`,onClick:At,children:(0,F.jsx)(r,{})})]}),N||P?(0,F.jsx)(`span`,{className:`review-review-error`,role:`status`,children:N||P}):null]}),x&&X?(0,F.jsxs)(`details`,{className:`review-commit-message`,children:[(0,F.jsxs)(`summary`,{children:[(0,F.jsx)(`span`,{children:Yt}),(0,F.jsx)(`strong`,{children:Jt}),(0,F.jsx)(o,{})]}),(0,F.jsx)(`div`,{children:X.head?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`p`,{children:[(0,F.jsx)(`span`,{children:`Author`}),(0,F.jsx)(`strong`,{children:X.head.authorName}),X.head.authorEmail?` <${X.head.authorEmail}>`:``]}),X.head.authoredAt?(0,F.jsxs)(`p`,{children:[(0,F.jsx)(`span`,{children:`Date`}),new Date(X.head.authoredAt).toLocaleString()]}):null,(0,F.jsx)(`pre`,{children:X.head.message})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`p`,{children:[(0,F.jsx)(`span`,{children:`Based on`}),(0,F.jsx)(`strong`,{children:X.base?.message.split(`
|
|
3
|
-
`)[0]||st})]}),X.base?(0,F.jsxs)(`p`,{children:[(0,F.jsx)(`span`,{children:`Base author`}),X.base.authorName,X.base.authorEmail?` <${X.base.authorEmail}>`:``]}):null,(0,F.jsx)(`pre`,{children:Xt})]})})]}):null,(0,F.jsxs)(`div`,{className:`review-files-list`,children:[w?(0,F.jsxs)(`p`,{className:`review-working-copy-message`,role:`alert`,children:[Qt,`: `,w]}):null,x&&!w&&Q.length===0?(0,F.jsx)(`p`,{className:`review-working-copy-message`,role:`status`,children:Zt}):null,Q.map(e=>{let t=Pe(D,e,{mutationPending:wt}),n=ce(D,t.commentPaths),r=n.filter(e=>e.status===`outdated`),i=t=>ae(e,t);return(0,F.jsxs)(`article`,{className:`review-file-change ${t.expanded?`expanded`:``} ${Ve===e.path?`reviewing`:``}`,"data-testid":`review-file-row`,"data-change-kind":e.kind,"data-file-path":e.path,children:[(0,F.jsxs)(`header`,{className:`review-file-change-header`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`review-file-select`,onClick:()=>kt(e.path),children:[(0,F.jsx)(`span`,{className:`review-file-status`,children:t.changeLabel}),(0,F.jsxs)(`span`,{className:`review-file-paths`,children:[(0,F.jsx)(`span`,{className:`review-file-name`,children:e.path}),e.previousPath?(0,F.jsx)(`span`,{className:`review-file-previous-path`,title:`Previous path: ${e.previousPath}`,children:e.previousPath}):null]}),(0,F.jsx)(et,{file:e,maxChangeSize:Ct}),(0,F.jsx)(tt,{file:e})]}),(0,F.jsx)($e,{action:t.action,pending:t.pending,reviewed:t.reviewed,reviewedLabel:t.reviewedLabel,onToggle:()=>{t.action&&Et(e.path,t.action.nextReviewed)}}),(0,F.jsx)(`button`,{type:`button`,className:`review-file-expand`,"aria-label":t.expanded?`Collapse file diff`:`Expand file diff`,onClick:()=>kt(e.path),children:t.expanded?(0,F.jsx)(u,{}):(0,F.jsx)(o,{})})]}),t.expanded?(0,F.jsxs)(`section`,{className:`review-inline-diff ${gt} ${Y.fitToScreen?`fit-to-screen`:``}`,"aria-label":`Diff for ${e.path}`,children:[r.length?(0,F.jsx)(`div`,{className:`review-outdated-comments`,children:r.map(e=>(0,F.jsx)(mt,{comment:e,disabled:Tt,onDelete:()=>$({id:e.id,type:`delete-comment`}),onStatusChange:t=>Lt(e,t)},e.id))}):null,(0,F.jsxs)(`div`,{className:`review-diff-columns`,children:[(0,F.jsx)(`span`,{children:`File`}),gt===`split`?(0,F.jsx)(`span`,{children:`File`}):null]}),t.diffStatus!==`loaded`||t.diffLoadPending||t.diffLoadError?(0,F.jsx)(ft,{row:t}):(0,F.jsx)(F.Fragment,{children:(0,F.jsx)(`div`,{className:`review-diff-code`,style:{fontSize:`${Y.fontSize}px`,tabSize:Y.tabSize,minWidth:Y.fitToScreen?void 0:`${Math.round(Y.lineLength*Y.fontSize*.62)}px`},onClick:e=>{let t=window.getSelection();if(t&&!t.isCollapsed||!(e.target instanceof Element))return;let n=e.target.closest(`code[data-review-line][data-review-side]`);if(!n)return;let r=Number(n.dataset.reviewLine),a=n.dataset.reviewSide;!Number.isFinite(r)||a!==`left`&&a!==`right`&&a!==`unified`||Ft(i(a),r,a)},onMouseUp:e=>{let t=_t(e.currentTarget);t&&Ft(i(t.side),t.line,t.side,t.range)},children:(0,F.jsx)(dt,{contextKeyPrefix:`${G}:${K}`,contextGapExpansions:Ze,file:e,mode:gt,preferences:Y,renderAttachment:(e,t)=>{let r=Z&&Z.path===i(Z.side)&&Z.line===e&&t.includes(Z.side)?Z:null,a=n.filter(n=>n.status!==`outdated`&&n.line===e&&t.includes(n.side)&&n.path===i(n.side));return!r&&a.length===0?null:(0,F.jsxs)(`div`,{className:`review-line-attachment`,"data-review-comment-line":e,children:[r?(0,F.jsx)(pt,{disabled:Tt,draft:bt,target:r,onCancel:()=>$({type:`cancel-comment`}),onDraftChange:e=>$({body:e,type:`update-comment-draft`}),onSave:It}):null,a.map(e=>(0,F.jsx)(mt,{comment:e,disabled:Tt,onDelete:()=>$({id:e.id,type:`delete-comment`}),onStatusChange:t=>Lt(e,t)},e.id))]})},onExpandContext:(t,n,r)=>Pt(e,t,n,r),onExpandSkippedContext:(t,n,r)=>Nt(e.path,r)})})})]}):null]},e.path)})]})]}),Ne?(0,F.jsx)(`div`,{className:`review-preferences-backdrop`,role:`presentation`,onMouseDown:()=>M(!1),children:(0,F.jsxs)(`section`,{className:`review-preferences`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`review-preferences-title`,onMouseDown:e=>e.stopPropagation(),children:[(0,F.jsx)(`header`,{children:(0,F.jsx)(`h2`,{id:`review-preferences-title`,children:`Diff Preferences`})}),(0,F.jsxs)(`div`,{className:`review-preferences-form`,children:[(0,F.jsxs)(`label`,{children:[`Context`,(0,F.jsxs)(`select`,{"aria-label":`Context`,value:A.context,onChange:e=>j(t=>({...t,context:Number(e.target.value)})),children:[(0,F.jsx)(`option`,{value:3,children:`3 lines`}),(0,F.jsx)(`option`,{value:10,children:`10 lines`}),(0,F.jsx)(`option`,{value:25,children:`25 lines`}),(0,F.jsx)(`option`,{value:100,children:`100 lines`})]})]}),(0,F.jsxs)(`label`,{className:`checkbox-row`,children:[`Fit to screen`,(0,F.jsx)(`input`,{"aria-label":`Fit to screen`,type:`checkbox`,checked:A.fitToScreen,onChange:e=>j(t=>({...t,fitToScreen:e.target.checked}))})]}),(0,F.jsxs)(`label`,{children:[`Diff width`,(0,F.jsx)(`input`,{"aria-label":`Diff width`,type:`number`,autoComplete:`off`,"data-form-type":`other`,min:40,max:240,value:A.lineLength,onChange:e=>j(t=>({...t,lineLength:Number(e.target.value)||t.lineLength}))})]}),(0,F.jsxs)(`label`,{children:[`Tab width`,(0,F.jsx)(`input`,{"aria-label":`Tab width`,type:`number`,autoComplete:`off`,"data-form-type":`other`,min:2,max:16,value:A.tabSize,onChange:e=>j(t=>({...t,tabSize:Number(e.target.value)||t.tabSize}))})]}),(0,F.jsxs)(`label`,{children:[`Font size`,(0,F.jsx)(`input`,{"aria-label":`Font size`,type:`number`,autoComplete:`off`,"data-form-type":`other`,min:10,max:20,value:A.fontSize,onChange:e=>j(t=>({...t,fontSize:Number(e.target.value)||t.fontSize}))})]}),(0,F.jsxs)(`label`,{className:`checkbox-row`,children:[`Intraline differences`,(0,F.jsx)(`input`,{"aria-label":`Intraline differences`,type:`checkbox`,checked:A.intralineDifference,onChange:e=>j(t=>({...t,intralineDifference:e.target.checked}))})]}),(0,F.jsxs)(`label`,{className:`checkbox-row`,children:[`Show tabs`,(0,F.jsx)(`input`,{"aria-label":`Show tabs`,type:`checkbox`,checked:A.showTabs,onChange:e=>j(t=>({...t,showTabs:e.target.checked}))})]}),(0,F.jsxs)(`label`,{className:`checkbox-row`,children:[`Show trailing whitespace`,(0,F.jsx)(`input`,{"aria-label":`Show trailing whitespace`,type:`checkbox`,checked:A.showTrailingWhitespace,onChange:e=>j(t=>({...t,showTrailingWhitespace:e.target.checked}))})]}),(0,F.jsxs)(`label`,{className:`checkbox-row`,children:[`Syntax highlighting`,(0,F.jsx)(`input`,{"aria-label":`Syntax highlighting`,type:`checkbox`,checked:A.syntaxHighlighting,onChange:e=>j(t=>({...t,syntaxHighlighting:e.target.checked}))})]}),(0,F.jsxs)(`label`,{children:[`Ignore Whitespace`,(0,F.jsxs)(`select`,{"aria-label":`Ignore Whitespace`,value:A.ignoreWhitespace,onChange:e=>j(t=>({...t,ignoreWhitespace:e.target.value})),children:[(0,F.jsx)(`option`,{value:`NONE`,children:`None`}),(0,F.jsx)(`option`,{value:`TRAILING`,children:`Trailing`}),(0,F.jsx)(`option`,{value:`LEADING_AND_TRAILING`,children:`Leading + trailing`}),(0,F.jsx)(`option`,{value:`ALL`,children:`All`})]})]})]}),(0,F.jsxs)(`footer`,{children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>M(!1),children:`CANCEL`}),(0,F.jsx)(`button`,{type:`button`,onClick:jt,children:`SAVE`})]})]})}):null]})}export{Y as ReviewPage,nt as diffLanguageForPath};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
body.code-mode[data-appearance=dark]{--code-dark-bg:#0d1117;--code-dark-bg-soft:#11161d;--code-dark-bg-panel:#161b22;--code-dark-bg-elevated:#1c2129;--code-dark-bg-hover:#252b35;--code-dark-bg-active:#2b323d;--code-dark-border:#30363d;--code-dark-border-soft:#242b33;--code-dark-text:#e6edf3;--code-dark-text-soft:#c9d1d9;--code-dark-text-muted:#8b949e;--code-dark-accent:#58a6ff;--code-dark-accent-soft:#58a6ff2e;--code-dark-success:#3fb950;--code-dark-warning:#d29922;--code-dark-danger:#f85149;--code-dark-shadow:#01040975;background:var(--code-dark-bg);color:var(--code-dark-text);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body.code-mode[data-appearance=dark] #root,body.code-mode[data-appearance=dark] .code-app-shell,body.code-mode[data-appearance=dark] .code-workspace,body.code-mode[data-appearance=dark] .code-main,body.code-mode[data-appearance=dark] .code-terminal-grid{background:var(--code-dark-bg);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] ::selection{color:#fff;background:#58a6ff57}body.code-mode[data-appearance=dark] .code-sidebar{background:var(--code-dark-bg-soft);color:var(--code-dark-text);border-right-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-project-row,body.code-mode[data-appearance=dark] .code-pinned-section,body.code-mode[data-appearance=dark] .code-pinned-title{background:var(--code-dark-bg-soft);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-sidebar-resizer{background:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-sidebar-resizer:hover,body.code-resizing-sidebar[data-appearance=dark] .code-sidebar-resizer{background:var(--code-dark-accent)}body.code-mode[data-appearance=dark] .code-sidebar-toggle,body.code-mode[data-appearance=dark] .code-sidebar-focus-toggle,body.code-mode[data-appearance=dark] .code-sidebar-search-toggle,body.code-mode[data-appearance=dark] .code-sidebar-options,body.code-mode[data-appearance=dark] .code-nav-item,body.code-mode[data-appearance=dark] .code-agent-rail-button,body.code-mode[data-appearance=dark] .code-project-agent-compact,body.code-mode[data-appearance=dark] .code-project-title,body.code-mode[data-appearance=dark] .code-project-title-action,body.code-mode[data-appearance=dark] .code-agent-row,body.code-mode[data-appearance=dark] .code-session-show-more,body.code-mode[data-appearance=dark] .code-open-editor-main,body.code-mode[data-appearance=dark] .code-file-row,body.code-mode[data-appearance=dark] .code-file-editor-action,body.code-mode[data-appearance=dark] .code-file-editor-breadcrumb,body.code-mode[data-appearance=dark] .code-composer-add,body.code-mode[data-appearance=dark] .code-composer-mic,body.code-mode[data-appearance=dark] .code-composer-approval,body.code-mode[data-appearance=dark] .code-composer-context-window,body.code-mode[data-appearance=dark] .code-composer-model-picker,body.code-mode[data-appearance=dark] .code-composer-mode-chip,body.code-mode[data-appearance=dark] .code-nav-icon{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-sidebar-toggle,body.code-mode[data-appearance=dark] .code-sidebar-focus-toggle,body.code-mode[data-appearance=dark] .code-sidebar-search-toggle,body.code-mode[data-appearance=dark] .code-sidebar-history-toggle,body.code-mode[data-appearance=dark] .code-sidebar-options{color:var(--code-dark-text-muted);background:#161b22a8}body.code-mode[data-appearance=dark] .code-nav-item:hover,body.code-mode[data-appearance=dark] .code-nav-item.active,body.code-mode[data-appearance=dark] .code-agent-rail-button:hover,body.code-mode[data-appearance=dark] .code-agent-rail-button:focus-visible,body.code-mode[data-appearance=dark] .code-agent-rail-button.active,body.code-mode[data-appearance=dark] .code-project-agent-compact:hover,body.code-mode[data-appearance=dark] .code-project-agent-compact:focus-visible,body.code-mode[data-appearance=dark] .code-project-agent-compact.active,body.code-mode[data-appearance=dark] .code-agent-row:hover,body.code-mode[data-appearance=dark] .code-agent-row.active,body.code-mode[data-appearance=dark] .code-agent-row.search-selected,body.code-mode[data-appearance=dark] .code-project-row:hover .code-project-title,body.code-mode[data-appearance=dark] .code-project-title:hover,body.code-mode[data-appearance=dark] .code-pinned-title:hover,body.code-mode[data-appearance=dark] .code-pinned-title:focus-visible,body.code-mode[data-appearance=dark] .code-open-editor-main:hover,body.code-mode[data-appearance=dark] .code-open-editor-main:focus-visible,body.code-mode[data-appearance=dark] .code-file-row:hover,body.code-mode[data-appearance=dark] .code-file-row.focused,body.code-mode[data-appearance=dark] .code-file-row.selected,body.code-mode[data-appearance=dark] .code-file-row.active,body.code-mode[data-appearance=dark] .code-sidebar-toggle:hover,body.code-mode[data-appearance=dark] .code-sidebar-toggle:focus-visible,body.code-mode[data-appearance=dark] .code-sidebar-focus-toggle:hover,body.code-mode[data-appearance=dark] .code-sidebar-focus-toggle:focus-visible,body.code-mode[data-appearance=dark] .code-sidebar-focus-toggle.active,body.code-mode[data-appearance=dark] .code-sidebar-search-toggle:hover,body.code-mode[data-appearance=dark] .code-sidebar-search-toggle:focus-visible,body.code-mode[data-appearance=dark] .code-sidebar-search-toggle.active,body.code-mode[data-appearance=dark] .code-sidebar-history-toggle:hover,body.code-mode[data-appearance=dark] .code-sidebar-history-toggle:focus-visible,body.code-mode[data-appearance=dark] .code-sidebar-history-toggle.active,body.code-mode[data-appearance=dark] .code-sidebar-options:hover,body.code-mode[data-appearance=dark] .code-sidebar-options:focus-visible,body.code-mode[data-appearance=dark] .code-file-editor-action:hover:not(:disabled),body.code-mode[data-appearance=dark] .code-file-editor-action.active,body.code-mode[data-appearance=dark] .code-file-editor-breadcrumb:hover,body.code-mode[data-appearance=dark] .code-file-editor-breadcrumb:focus-visible,body.code-mode[data-appearance=dark] .code-composer-add:hover,body.code-mode[data-appearance=dark] .code-composer-mic:hover,body.code-mode[data-appearance=dark] .code-composer-approval:hover,body.code-mode[data-appearance=dark] .code-composer-context-window:hover,body.code-mode[data-appearance=dark] .code-composer-model-picker:hover,body.code-mode[data-appearance=dark] .code-composer-mode-chip:hover{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-agent-row-action{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-agent-row-action:hover,body.code-mode[data-appearance=dark] .code-agent-row-action:focus-visible{color:var(--code-dark-text);background:#ffffff1a}body.code-mode[data-appearance=dark] .code-composer-dictation-hint{border-color:var(--code-dark-border);color:var(--code-dark-text-soft);background:#1c1f22e6;box-shadow:0 10px 24px #00000042}body.code-mode[data-appearance=dark] .code-agent-row-action.pin.active{color:#d7c66f}body.code-mode[data-appearance=dark] .code-agent-row-actions{--code-agent-row-action-surface:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-agent-row:hover .code-agent-row-actions,body.code-mode[data-appearance=dark] .code-agent-row.active .code-agent-row-actions,body.code-mode[data-appearance=dark] .code-agent-row.search-selected .code-agent-row-actions{--code-agent-row-action-surface:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .code-project-title-action{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-project-title-action:hover,body.code-mode[data-appearance=dark] .code-project-title-action:focus-visible{color:var(--code-dark-text);background:#ffffff1a}body.code-mode[data-appearance=dark] .code-file-search-box,body.code-mode[data-appearance=dark] .workspace-input input,body.code-mode[data-appearance=dark] .workspace-input select.workflow-select,body.code-mode[data-appearance=dark] .workspace-input textarea.task-input,body.code-mode[data-appearance=dark] .settings-input,body.code-mode[data-appearance=dark] .settings-select,body.code-mode[data-appearance=dark] .code-file-operation-dialog input{background:var(--code-dark-bg-panel);border-color:var(--code-dark-border);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-search-box input,body.code-mode[data-appearance=dark] .code-composer textarea,body.code-mode[data-appearance=dark] .code-composer-mobile-input{color:var(--code-dark-text);caret-color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-search-box input::placeholder,body.code-mode[data-appearance=dark] .code-composer textarea::placeholder,body.code-mode[data-appearance=dark] .code-composer-mobile-input:empty:before,body.code-mode[data-appearance=dark] .workspace-input input::placeholder,body.code-mode[data-appearance=dark] .workspace-input textarea.task-input::placeholder{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-project-list::-webkit-scrollbar-thumb{background:#8b949e52}body.code-mode[data-appearance=dark] .code-file-tree::-webkit-scrollbar-thumb{background:#8b949e52}body.code-mode[data-appearance=dark] .code-terminal-grid::-webkit-scrollbar-thumb{background:#8b949e52}body.code-mode[data-appearance=dark] .code-file-search-results::-webkit-scrollbar-thumb{background:#8b949e52}body.code-mode[data-appearance=dark] .code-file-editor-tabs::-webkit-scrollbar-thumb{background:#8b949e52}body.code-mode[data-appearance=dark] .code-project-list::-webkit-scrollbar-track{background:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-file-tree::-webkit-scrollbar-track{background:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-terminal-grid::-webkit-scrollbar-track{background:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-file-search-results::-webkit-scrollbar-track{background:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-file-editor-tabs::-webkit-scrollbar-track{background:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-file-search-results{border-color:var(--code-dark-border);background:#161b22fa;box-shadow:0 16px 36px #0000006b}body.code-mode[data-appearance=dark] .code-agent-hover-preview{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22fa;box-shadow:0 16px 36px #0000005c}body.code-mode[data-appearance=dark] .code-agent-hover-preview-header span,body.code-mode[data-appearance=dark] .code-agent-hover-preview-icon{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-agent-hover-preview-line,body.code-mode[data-appearance=dark] .code-file-search-result{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-search-result.active,body.code-mode[data-appearance=dark] .code-file-search-result:hover,body.code-mode[data-appearance=dark] .code-file-search-result:focus-visible{background:#8b949e29}body.code-mode[data-appearance=dark] .code-file-search-ignored-action{color:#79c0ff;background:#58a6ff29}body.code-mode[data-appearance=dark] .code-file-search-ignored-action:hover,body.code-mode[data-appearance=dark] .code-file-search-ignored-action:focus-visible{background:#58a6ff42}body.code-mode[data-appearance=dark] .code-file-search-name{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-search-directory,body.code-mode[data-appearance=dark] .code-file-search-kind,body.code-mode[data-appearance=dark] .code-file-search-line{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-side-view-panel{background:var(--code-dark-bg);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-agent-dot.running{background:var(--code-dark-success)}body.code-mode[data-appearance=dark] .code-agent-dot.turn-active{border-color:#3fb9503d;border-top-color:var(--code-dark-success);background:0 0}@media (prefers-reduced-motion:reduce){body.code-mode[data-appearance=dark] .code-agent-dot.turn-active{background:var(--code-dark-success);border:0}}body.code-mode[data-appearance=dark] .code-agent-dot.pending:not(.turn-active){background:var(--code-dark-warning)}body.code-mode[data-appearance=dark] .code-agent-dot.stopped{background:#6e7681}body.code-mode[data-appearance=dark] .code-agent-dot.dead{background:var(--code-dark-danger)}body.code-mode[data-appearance=dark] .code-agent-unread{background:#58a6ff}body.code-mode[data-appearance=dark] .code-project-agent-compact-unread{border-color:var(--code-dark-bg-soft);background:#58a6ff}body.code-mode[data-appearance=dark] .code-project-worktree{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-project-worktree:hover,body.code-mode[data-appearance=dark] .code-project-worktree:focus-visible{color:var(--code-dark-text);background:#8b949e1f}body.code-mode[data-appearance=dark] .code-worktree-popover{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22fa}body.code-mode[data-appearance=dark] .code-worktree-popover-header{border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-worktree-row-heading strong{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-worktree-row:hover,body.code-mode[data-appearance=dark] .code-worktree-row:focus-visible,body.code-mode[data-appearance=dark] .code-worktree-row.current{background:#58a6ff1f}body.code-mode[data-appearance=dark] .code-agent-name,body.code-mode[data-appearance=dark] .code-file-name,body.code-mode[data-appearance=dark] .code-open-editor-name,body.code-mode[data-appearance=dark] .code-project-title-name,body.code-mode[data-appearance=dark] .code-product-mark-main,body.code-mode[data-appearance=dark] .code-usage-row strong,body.code-mode[data-appearance=dark] .code-terminal-title,body.code-mode[data-appearance=dark] .code-empty-workspace h2,body.code-mode[data-appearance=dark] .code-search-panel-header h2,body.code-mode[data-appearance=dark] .code-search-result-copy strong,body.code-mode[data-appearance=dark] .code-history-panel-header h2,body.code-mode[data-appearance=dark] .code-history-card h3{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-agent-meta,body.code-mode[data-appearance=dark] .code-agent-age,body.code-mode[data-appearance=dark] .code-agent-fork-new-worktree,body.code-mode[data-appearance=dark] .code-open-editor-path,body.code-mode[data-appearance=dark] .code-file-search-preview,body.code-mode[data-appearance=dark] .code-file-status,body.code-mode[data-appearance=dark] .code-product-mark-meta,body.code-mode[data-appearance=dark] .code-product-mark-badge,body.code-mode[data-appearance=dark] .code-usage-panel,body.code-mode[data-appearance=dark] .code-usage-header,body.code-mode[data-appearance=dark] .code-usage-subrow,body.code-mode[data-appearance=dark] .code-composer-model-picker-muted,body.code-mode[data-appearance=dark] .code-slash-menu-header,body.code-mode[data-appearance=dark] .code-approval-menu-header,body.code-mode[data-appearance=dark] .code-model-menu-header,body.code-mode[data-appearance=dark] .code-empty-workspace,body.code-mode[data-appearance=dark] .code-search-panel-header span,body.code-mode[data-appearance=dark] .code-search-result-group h3,body.code-mode[data-appearance=dark] .code-search-result-copy span,body.code-mode[data-appearance=dark] .code-history-card p,body.code-mode[data-appearance=dark] .code-history-actions span,body.code-mode[data-appearance=dark] .code-search-panel .code-empty-workspace h2{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-usage-heatmap-cell{background:#58a6ff14}body.code-mode[data-appearance=dark] .code-usage-heatmap-cell[data-level="1"]{background:#58a6ff3d}body.code-mode[data-appearance=dark] .code-usage-heatmap-cell[data-level="2"]{background:#58a6ff6b}body.code-mode[data-appearance=dark] .code-usage-heatmap-cell[data-level="3"]{background:#58a6ffa3}body.code-mode[data-appearance=dark] .code-usage-heatmap-cell[data-level="4"]{background:#58a6ffb8}body.code-mode[data-appearance=dark] .code-usage-heatmap-cell[data-level="5"]{background:#58a6fff0}body.code-mode[data-appearance=dark] .code-usage-heatmap-cell:hover{outline-color:#79baffb3}body.code-mode[data-appearance=dark] .code-usage-activity-heading,body.code-mode[data-appearance=dark] .code-usage-activity-readout{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-search-result{background:var(--code-dark-bg-panel);border-color:var(--code-dark-border);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-search-panel-input{border-color:var(--code-dark-border);color:var(--code-dark-text-muted);background:#161b22c7}body.code-mode[data-appearance=dark] .code-search-panel-input input{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-search-panel-input input::placeholder{color:#6e7681}body.code-mode[data-appearance=dark] .code-search-panel-input button{color:var(--code-dark-text-muted);background:#8b949e1f}body.code-mode[data-appearance=dark] .code-search-result:hover,body.code-mode[data-appearance=dark] .code-search-result.active{background:var(--code-dark-bg-hover);border-color:#58a6ff6b}body.code-mode[data-appearance=dark] .code-history-card{color:var(--code-dark-text);background:0 0;border-color:#0000}body.code-mode[data-appearance=dark] .code-history-card:hover,body.code-mode[data-appearance=dark] .code-history-card.archived:hover{background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .code-history-card:focus-visible{outline-color:#58a6ff57}body.code-mode[data-appearance=dark] .code-history-actions button{color:var(--code-dark-text-muted);background:0 0;border-color:#0000}body.code-mode[data-appearance=dark] .code-history-actions button:hover{background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .code-agents-section,body.code-mode[data-appearance=dark] .code-open-editors,body.code-mode[data-appearance=dark] .code-files-section,body.code-mode[data-appearance=dark] .code-open-editors-header,body.code-mode[data-appearance=dark] .code-files-header,body.code-mode[data-appearance=dark] .code-file-sticky-shell,body.code-mode[data-appearance=dark] .code-file-sticky-stack,body.code-mode[data-appearance=dark] .code-file-row.code-file-sticky-row{background:var(--code-dark-bg-soft);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-open-editors-header,body.code-mode[data-appearance=dark] .code-files-header,body.code-mode[data-appearance=dark] .code-usage-panel,body.code-mode[data-appearance=dark] .code-usage-provider{border-color:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-files-title,body.code-mode[data-appearance=dark] .code-open-editors-title{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-files-refresh{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-files-refresh:hover,body.code-mode[data-appearance=dark] .code-files-refresh:focus-visible{background:var(--code-dark-bg-hover);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-files-refresh[data-refresh-status=success]{color:var(--code-dark-success);background:#3fb95024}body.code-mode[data-appearance=dark] .code-files-refresh[data-refresh-status=error]{color:var(--code-dark-danger);background:#f851491f}body.code-mode[data-appearance=dark] .code-file-type-icon,body.code-mode[data-appearance=dark] .code-file-chevron,body.code-mode[data-appearance=dark] .code-file-section-chevron,body.code-mode[data-appearance=dark] .code-folder-icon,body.code-mode[data-appearance=dark] .code-file-search-icon{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-row.ignored,body.code-mode[data-appearance=dark] .code-file-row.ignored .code-file-name,body.code-mode[data-appearance=dark] .code-file-row.ignored .code-file-chevron{color:#6e7681}body.code-mode[data-appearance=dark] .code-file-row.editor-dirty .code-file-name{color:var(--code-dark-warning)}body.code-mode[data-appearance=dark] .code-file-row.editor-external-changed .code-file-name{color:var(--code-dark-accent)}body.code-mode[data-appearance=dark] .code-file-row.git-status .code-file-name{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-row.git-deleted .code-file-name,body.code-mode[data-appearance=dark] .code-file-row.git-conflicted .code-file-name,body.code-mode[data-appearance=dark] .code-file-row.git-conflicted .code-file-name{color:#ff7b72}body.code-mode[data-appearance=dark] .code-file-row.selected:not(.active){background:var(--code-dark-accent-soft)}body.code-mode[data-appearance=dark] .code-file-tree-viewport:focus-within .code-file-row.located.selected{color:#ffd8cc;background:#d977573d;box-shadow:inset 3px 0 #e58a6be0}body.code-mode[data-appearance=dark] .code-file-row.active{background:var(--code-dark-bg-active)}body.code-mode[data-appearance=dark] .code-file-row.active:after{background:var(--code-dark-accent)}body.code-mode[data-appearance=dark] .code-file-changed{background:var(--code-dark-warning)}body.code-mode[data-appearance=dark] .code-file-changed.external{background:var(--code-dark-accent)}body.code-mode[data-appearance=dark] .code-file-descendant-status.dirty,body.code-mode[data-appearance=dark] .code-file-descendant-status.modified{background:var(--code-dark-warning)}body.code-mode[data-appearance=dark] .code-file-descendant-status.external{background:var(--code-dark-accent)}body.code-mode[data-appearance=dark] .code-file-descendant-status.added{background:var(--code-dark-success)}body.code-mode[data-appearance=dark] .code-file-descendant-status.renamed{background:#a371f7}body.code-mode[data-appearance=dark] .code-file-descendant-status.deleted,body.code-mode[data-appearance=dark] .code-file-descendant-status.conflicted{background:var(--code-dark-danger)}body.code-mode[data-appearance=dark] .code-file-git-status.modified,body.code-mode[data-appearance=dark] .code-file-change-status.modified{color:var(--code-dark-warning)}body.code-mode[data-appearance=dark] .code-file-git-status.added,body.code-mode[data-appearance=dark] .code-file-change-status.added{color:var(--code-dark-success)}body.code-mode[data-appearance=dark] .code-file-git-status.renamed,body.code-mode[data-appearance=dark] .code-file-change-status.renamed{color:#a371f7}body.code-mode[data-appearance=dark] .code-file-git-status.deleted,body.code-mode[data-appearance=dark] .code-file-git-status.conflicted,body.code-mode[data-appearance=dark] .code-file-change-status.deleted,body.code-mode[data-appearance=dark] .code-file-change-status.conflicted{color:var(--code-dark-danger)}body.code-mode[data-appearance=dark] .code-file-change-row.active{background:var(--code-dark-bg-active)}body.code-mode[data-appearance=dark] .code-file-open-spinner{border-color:#8b949e47;border-top-color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-file-change-main,body.code-mode[data-appearance=dark] .code-file-change-status,body.code-mode[data-appearance=dark] .code-file-change-status.modified,body.code-mode[data-appearance=dark] .code-file-change-group-toggle{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-git-history-section{--code-git-history-node-bg:var(--code-dark-bg);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-git-history-header,body.code-mode[data-appearance=dark] .code-git-history-subject,body.code-mode[data-appearance=dark] .code-git-history-change,body.code-mode[data-appearance=dark] .code-git-history-parent-select select{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-git-history-header{background:var(--code-dark-bg)}body.code-mode[data-appearance=dark] .code-git-history-entry.selected,body.code-mode[data-appearance=dark] .code-git-history-commit:hover,body.code-mode[data-appearance=dark] .code-git-history-commit:focus-visible,body.code-mode[data-appearance=dark] button.code-git-history-change:hover,body.code-mode[data-appearance=dark] button.code-git-history-change:focus-visible,body.code-mode[data-appearance=dark] .code-git-history-refresh:hover,body.code-mode[data-appearance=dark] .code-git-history-refresh:focus-visible{background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .code-git-history-meta,body.code-mode[data-appearance=dark] .code-git-history-change-previous,body.code-mode[data-appearance=dark] .code-git-history-change-summary,body.code-mode[data-appearance=dark] .code-git-history-root-label,body.code-mode[data-appearance=dark] .code-git-history-status,body.code-mode[data-appearance=dark] .code-git-history-reference-more{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-git-history-parent-select select{border-color:var(--code-dark-border);background:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-git-history-scope:hover,body.code-mode[data-appearance=dark] .code-git-history-scope:focus-visible,body.code-mode[data-appearance=dark] .code-git-history-scope[aria-expanded=true]{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-git-history-scope-menu{border-color:var(--code-dark-border);color:var(--code-dark-text-soft);background:#161b22fa}body.code-mode[data-appearance=dark] .code-git-history-scope-menu button:hover,body.code-mode[data-appearance=dark] .code-git-history-scope-menu button:focus-visible{background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .code-git-history-message{border-left-color:var(--code-dark-border-strong);background:var(--code-dark-bg-soft)}body.code-mode[data-appearance=dark] .code-git-history-message-label{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-git-history-message-body{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-git-history-reference,body.code-mode[data-appearance=dark] .code-git-history-branch,body.code-mode[data-appearance=dark] .code-git-history-scope{color:#8faed8}body.code-mode[data-appearance=dark] .code-git-history-reference.tag{color:#d2b47c}body.code-mode[data-appearance=dark] .code-git-history-reference.remote-branch{color:#69c5bd}body.code-mode[data-appearance=dark] .code-git-history-review,body.code-mode[data-appearance=dark] .code-git-history-load-more{color:#8faed8}body.code-mode[data-appearance=dark] .code-git-history-review:hover,body.code-mode[data-appearance=dark] .code-git-history-review:focus-visible{background:var(--code-dark-bg-hover);color:#b7cff0}body.code-mode[data-appearance=dark] .code-git-history-status.error{color:var(--code-dark-danger)}body.code-mode[data-appearance=dark] .code-file-change-review{color:#8faed8}body.code-mode[data-appearance=dark] .code-file-change-review:hover,body.code-mode[data-appearance=dark] .code-file-change-review:focus-visible{color:#b7cff0}body.code-mode[data-appearance=dark] .code-file-change-path,body.code-mode[data-appearance=dark] .code-file-change-group-toggle>span:last-child,body.code-mode[data-appearance=dark] .code-file-changes-count{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-change-main:hover,body.code-mode[data-appearance=dark] .code-file-change-main:focus-visible,body.code-mode[data-appearance=dark] .code-file-change-group-toggle:hover,body.code-mode[data-appearance=dark] .code-file-change-group-toggle:focus-visible{background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .code-product-mark{color:var(--code-dark-text-soft);background:0 0}body.code-mode[data-appearance=dark] .code-product-mark:hover,body.code-mode[data-appearance=dark] .code-product-mark:focus-visible{background:0 0}body.code-mode[data-appearance=dark] .code-product-mark-badge{color:var(--code-dark-text-muted);background:0 0;border-color:#0000}body.code-mode[data-appearance=dark] .code-product-mark:hover .code-product-mark-badge,body.code-mode[data-appearance=dark] .code-product-mark:focus-visible .code-product-mark-badge{color:var(--code-dark-text-soft);background:0 0;border-color:#0000}body.code-mode[data-appearance=dark] .code-share-button{color:var(--code-dark-text-muted);background:#161b22a8}:is(body.code-mode[data-appearance=dark] .code-share-button:hover,body.code-mode[data-appearance=dark] .code-share-button:focus-visible,body.code-mode[data-appearance=dark] .code-share-root:has(.code-share-popover) .code-share-button){background:var(--code-dark-bg-hover);color:var(--code-dark-text);box-shadow:inset 0 0 0 1px var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-share-popover{border-color:var(--code-dark-border);color:var(--code-dark-text);box-shadow:0 18px 54px var(--code-dark-shadow);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:#1c2129fa}body.code-mode[data-appearance=dark] .code-share-qr-frame{border-color:var(--code-dark-border);background:linear-gradient(#fffffff2,#fbfaf2f2),#fbfaf2}body.code-mode[data-appearance=dark] .code-share-copy-action{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-share-countdown{color:#9b7a35}body.code-mode[data-appearance=dark] .code-share-copy-token{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22b8}body.code-mode[data-appearance=dark] .code-share-copy-token:hover,body.code-mode[data-appearance=dark] .code-share-copy-token:focus-visible{background:var(--code-dark-bg-hover);border-color:#58a6ff3d}body.code-mode[data-appearance=dark] .code-share-token{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-share-qr-loading,body.code-mode[data-appearance=dark] .code-share-copy-action{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-share-refresh{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22e6}body.code-mode[data-appearance=dark] .code-share-error{color:var(--code-dark-danger)}body.code-mode[data-appearance=dark] .code-mobile-share-backdrop{background:#0104098a}body.code-mode[data-appearance=dark] .code-mobile-share-sheet{border-color:var(--code-dark-border);color:var(--code-dark-text);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:#161b22f7;box-shadow:0 20px 56px #0104097a}body.code-mode[data-appearance=dark] .code-mobile-share-header button,body.code-mode[data-appearance=dark] .code-mobile-share-choice-copy p,body.code-mode[data-appearance=dark] .code-mobile-share-link,body.code-mode[data-appearance=dark] .code-mobile-share-status,body.code-mode[data-appearance=dark] .code-mobile-install-hint,body.code-mode[data-appearance=dark] .code-mobile-install-complete,body.code-mode[data-appearance=dark] .code-mobile-install-step small{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-mobile-share-choice+.code-mobile-share-choice{border-color:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-mobile-share-link-row{background:#f0f6fc0e}body.code-mode[data-appearance=dark] .code-mobile-share-link-row button{color:var(--code-dark-text);background:#f0f6fc17}body.code-mode[data-appearance=dark] .code-mobile-install-step{color:var(--code-dark-text);background:#f0f6fc0e}body.code-mode[data-appearance=dark] .code-mobile-install-control{color:var(--code-dark-text);background:#f0f6fc17}body.code-mode[data-appearance=dark] .code-brand-backdrop{background:#01040994}body.code-mode[data-appearance=dark] .code-brand-dialog{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22fa;box-shadow:0 24px 68px #01040985}body.code-mode[data-appearance=dark] .code-brand-close,body.code-mode[data-appearance=dark] .code-brand-heading span,body.code-mode[data-appearance=dark] .code-brand-story{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-brand-close:hover,body.code-mode[data-appearance=dark] .code-brand-close:focus-visible{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-brand-github{color:#8cbcff}body.code-mode[data-appearance=dark].code-mobile-touch .code-options-menu,body.code-mode[data-appearance=dark].code-mobile-touch .code-options-menu button,body.code-mode[data-appearance=dark].code-mobile-touch .code-options-menu button:focus,body.code-mode[data-appearance=dark].code-mobile-touch .code-options-menu button:focus-visible{color:var(--code-dark-text)}body.code-mode[data-appearance=dark].code-mobile-touch .code-options-menu{background:#161b22f0}body.code-mode[data-appearance=dark] .code-terminal-pane,body.code-mode[data-appearance=dark] .code-terminal-container,body.code-mode[data-appearance=dark] .terminal-session-host,body.code-mode[data-appearance=dark] .terminal-session-host .xterm,body.code-mode[data-appearance=dark] .terminal-session-host .xterm-screen,body.code-mode[data-appearance=dark] .terminal-session-host .xterm-viewport{color:var(--code-dark-text);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:var(--code-dark-bg)!important}body.code-mode[data-appearance=dark] .code-terminal-pane{border-color:#0000}body.code-mode[data-appearance=dark] .terminal-session-host .xterm .xterm-selection div{background-color:#58a6ff52!important}body.code-mode[data-appearance=dark] .terminal-session-host .xterm .xterm-rows ::selection{background:#58a6ff52}body.code-mode[data-appearance=dark] .terminal-session-host .xterm-viewport{scrollbar-color:#8b949e2e transparent}body.code-mode[data-appearance=dark] .terminal-session-host .xterm-viewport::-webkit-scrollbar{width:6px;background:0 0!important}body.code-mode[data-appearance=dark] .terminal-session-host .xterm-viewport::-webkit-scrollbar-thumb{background-color:#8b949e2e!important;border-color:#0000!important}body.code-mode[data-appearance=dark] .terminal-session-host .xterm-viewport::-webkit-scrollbar-track{background:0 0!important}body.code-mode[data-appearance=dark] .terminal-session-host .xterm-viewport::-webkit-scrollbar-thumb:hover{background-color:#8b949e4d!important}body.code-mode[data-appearance=dark] .code-terminal-jump-bottom{color:#ffffffeb;box-shadow:none;-webkit-backdrop-filter:blur(12px);background:#ffffff0e;border-color:#f0f6fc21}body.code-mode[data-appearance=dark] .code-terminal-jump-bottom:hover{color:#fff;background:#ffffff16;border-color:#f0f6fc33}body.code-mode[data-appearance=dark] .code-terminal-search{border-color:var(--code-dark-border);color:var(--code-dark-text);box-shadow:0 12px 32px var(--code-dark-shadow);background:#161b22f5}body.code-mode[data-appearance=dark] .code-terminal-search input:focus{background:#21262df2;box-shadow:inset 0 0 0 1px #58a6ff80}body.code-mode[data-appearance=dark] .code-terminal-search-status{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-terminal-search-status.empty{color:#ff7b72}body.code-mode[data-appearance=dark] .code-terminal-search-button{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-terminal-search-button:hover,body.code-mode[data-appearance=dark] .code-terminal-search-button:focus-visible{color:var(--code-dark-text);background:#8b949e29}body.code-mode[data-appearance=dark] .code-terminal-search-button.option.active{color:var(--code-dark-accent);background:#58a6ff29}body.code-mode[data-appearance=dark] .code-terminal-status-card{border-color:var(--code-dark-border);color:var(--code-dark-text-soft);box-shadow:0 12px 32px var(--code-dark-shadow);background:#161b22f5}body.code-mode[data-appearance=dark] .code-terminal-status-card button{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#21262df2}body.code-mode[data-appearance=dark] .code-terminal-status-card button:hover,body.code-mode[data-appearance=dark] .code-terminal-status-card button:focus-visible{background:#30363df2}body.code-mode[data-appearance=dark] .code-terminal-mode-toggle{background:#161b2266;border-color:#8b949e14;box-shadow:0 8px 22px #01040933}body.code-mode[data-appearance=dark] .code-terminal-mode-toggle:hover,body.code-mode[data-appearance=dark] .code-terminal-mode-toggle:focus-within{background:#161b22d1;border-color:#8b949e33;box-shadow:0 10px 26px #01040952}body.code-mode[data-appearance=dark] .code-terminal-mode-toggle button{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-terminal-mode-toggle button:hover,body.code-mode[data-appearance=dark] .code-terminal-mode-toggle button:focus-visible{color:var(--code-dark-text);background:#8b949e29}body.code-mode[data-appearance=dark] .code-terminal-mode-toggle button.active{color:var(--code-dark-text);background:#8b949e24}body.code-mode[data-appearance=dark] .code-permission-switching{color:var(--code-dark-text-soft);background:#0d1117b8}body.code-mode[data-appearance=dark] .code-permission-switching-spinner{border-color:#c9d1d93d;border-top-color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-codex-transcript,body.code-mode[data-appearance=dark] .code-acp-transcript{background:var(--code-dark-bg);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-acp-user-text{color:var(--code-dark-text);background:#8b949e29;border:1px solid #8b949e1f}body.code-mode[data-appearance=dark] .code-acp-message.assistant{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-acp-message.assistant.notification,body.code-mode[data-appearance=dark] .code-acp-activity,body.code-mode[data-appearance=dark] .code-acp-working,body.code-mode[data-appearance=dark] .code-acp-load-earlier{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-acp-activity>summary:hover,body.code-mode[data-appearance=dark] .code-acp-activity>summary:focus-visible,body.code-mode[data-appearance=dark] .code-acp-activity-group>summary:hover,body.code-mode[data-appearance=dark] .code-acp-activity-group>summary:focus-visible{background:#8b949e1a}body.code-mode[data-appearance=dark] .code-acp-activity-group{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-acp-activity-count{color:var(--code-dark-text-muted);background:#8b949e1f}body.code-mode[data-appearance=dark] .code-acp-activity-detail{border-color:var(--code-dark-border);color:var(--code-dark-text-soft);background:#161b22cc}body.code-mode[data-appearance=dark] .code-acp-jump-bottom{border-color:var(--code-dark-border);color:var(--code-dark-text-soft);background:#161b22f0}body.code-mode[data-appearance=dark] .code-codex-transcript-scroll{scrollbar-color:#8b949e2e transparent}body.code-mode[data-appearance=dark] .code-codex-transcript-scroll::-webkit-scrollbar-thumb{background:#8b949e2e}body.code-mode[data-appearance=dark] .code-codex-goal-bar{box-shadow:0 10px 30px var(--code-dark-shadow);background:#161b22c2;border-color:#8b949e3d}body.code-mode[data-appearance=dark] .code-codex-goal-input{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-goal-input::placeholder,body.code-mode[data-appearance=dark] .code-codex-goal-icon-button{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-codex-goal-icon-button:hover,body.code-mode[data-appearance=dark] .code-codex-goal-icon-button:focus-visible{color:var(--code-dark-text);background:#8b949e29}body.code-mode[data-appearance=dark] .code-codex-goal-icon-button.danger,body.code-mode[data-appearance=dark] .code-codex-goal-error{color:#ff7b72}body.code-mode[data-appearance=dark] .code-codex-transcript-user{color:var(--code-dark-text);background:#8b949e29;border:1px solid #8b949e1f}body.code-mode[data-appearance=dark] .code-codex-transcript-user-images img,body.code-mode[data-appearance=dark] .code-codex-transcript-process-images img,body.code-mode[data-appearance=dark] .code-codex-transcript-result-images img{border-color:var(--code-dark-border);background:var(--code-dark-bg-panel)}body.code-mode[data-appearance=dark] .code-codex-transcript-user-file{border-color:var(--code-dark-border);background:#8b949e1f}body.code-mode[data-appearance=dark] .code-codex-transcript-resource-link>a,body.code-mode[data-appearance=dark] .code-codex-transcript-resource-link>span:not(.code-codex-transcript-user-file-meta),body.code-mode[data-appearance=dark] .code-codex-transcript-subagent-turn .user{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-transcript-terminal,body.code-mode[data-appearance=dark] .code-codex-transcript-subagent,body.code-mode[data-appearance=dark] .code-codex-transcript-subagent-dialog{border-color:var(--code-dark-border);background:var(--code-dark-bg-panel)}body.code-mode[data-appearance=dark] .code-codex-transcript-terminal>header,body.code-mode[data-appearance=dark] .code-codex-transcript-terminal-meta,body.code-mode[data-appearance=dark] .code-codex-transcript-subagent>header,body.code-mode[data-appearance=dark] .code-codex-transcript-subagent-dialog>header,body.code-mode[data-appearance=dark] .code-codex-transcript-subagent-turn{border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-codex-transcript-terminal-copy:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-terminal-copy:focus-visible,body.code-mode[data-appearance=dark] .code-codex-transcript-subagent-control:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-subagent-control:focus-visible{background:#8b949e29}body.code-mode[data-appearance=dark] .code-codex-transcript-subagent-error{color:#ff7b72;background:#f851491a;border-color:#f8514957}body.code-mode[data-appearance=dark] .code-codex-transcript-user-file-name{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-transcript-user-file-meta{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-codex-transcript-user-file pre,body.code-mode[data-appearance=dark] .code-codex-transcript-user-file-error{border-top-color:var(--code-dark-border);background:var(--code-dark-bg-panel)}body.code-mode[data-appearance=dark] .code-codex-transcript-process{border-bottom-color:var(--code-dark-border);color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-acp-progress-update{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-transcript-process-title,body.code-mode[data-appearance=dark] .code-codex-transcript-process-group{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-codex-transcript-process-group-summary:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-process-group-summary:focus-visible,body.code-mode[data-appearance=dark] .code-codex-transcript-process-title-toggle:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-process-title-toggle:focus-visible{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-codex-transcript-process-dot{background:#8b949eb8}body.code-mode[data-appearance=dark] .code-codex-transcript-process-status{color:var(--code-dark-text-muted);background:#8b949e24}body.code-mode[data-appearance=dark] .code-codex-transcript-copy{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-codex-transcript-copy:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-copy.copied,body.code-mode[data-appearance=dark] .code-codex-transcript-copy:focus-visible{color:var(--code-dark-text);background:#8b949e29}body.code-mode[data-appearance=dark] .code-codex-transcript-copy:after,body.code-mode[data-appearance=dark] .code-codex-transcript-answer-action:after{border-color:var(--code-dark-border-soft);color:var(--code-dark-text);background:#161b22fa;box-shadow:0 8px 24px #01040973}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item pre{border:1px solid var(--code-dark-border-soft);color:var(--code-dark-text-muted);background:#0d1117d1}body.code-mode[data-appearance=dark] .code-codex-transcript-process-detail,body.code-mode[data-appearance=dark] .code-codex-transcript-answer-action{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-codex-transcript-answer-action:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-answer-action.copied,body.code-mode[data-appearance=dark] .code-codex-transcript-answer-action:focus-visible{color:var(--code-dark-text);background:#8b949e29}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview,body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview strong{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview code,body.code-mode[data-appearance=dark] .code-codex-transcript-file-link{color:var(--code-dark-accent);background:#58a6ff24}body.code-mode[data-appearance=dark] .code-codex-transcript-file-link:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-file-link:focus-visible{color:var(--code-dark-accent);background:#58a6ff2e}body.code-mode[data-appearance=dark] .code-codex-transcript-markdown-file-link{color:var(--code-dark-accent)}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview blockquote{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview blockquote:after{background:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview pre{border-color:var(--code-dark-border);background:#0d1117d1}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview hr{border-top-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview th{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview th,body.code-mode[data-appearance=dark] .code-codex-transcript-assistant.code-markdown-preview td{border-bottom-color:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-codex-transcript-plan-list li{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-codex-transcript-plan-marker{border-color:#8b949e80}body.code-mode[data-appearance=dark] .code-codex-transcript-plan-list li.completed .code-codex-transcript-plan-marker{background:#3fb950;border-color:#3fb950}body.code-mode[data-appearance=dark] .code-codex-transcript-plan-list li.running .code-codex-transcript-plan-marker{border-color:var(--code-dark-text-muted);border-top-color:#0000}body.code-mode[data-appearance=dark] .code-codex-transcript-result-summary{border-color:var(--code-dark-border);color:var(--code-dark-text-muted);background:#161b22b8;box-shadow:0 1px #ffffff08}body.code-mode[data-appearance=dark] .code-codex-transcript-result-summary .added{color:#3fb950}body.code-mode[data-appearance=dark] .code-codex-transcript-result-summary .removed{color:#ff7b72}body.code-mode[data-appearance=dark] button.code-codex-transcript-result-summary:hover,body.code-mode[data-appearance=dark] button.code-codex-transcript-result-summary:focus-visible{color:var(--code-dark-text);background:#8b949e2e}body.code-mode[data-appearance=dark] .code-codex-transcript-result-details{border-color:var(--code-dark-border);background:#161b22f5;box-shadow:0 8px 28px #00000047}body.code-mode[data-appearance=dark] .code-codex-transcript-result-file+.code-codex-transcript-result-file,body.code-mode[data-appearance=dark] .code-codex-transcript-result-diff,body.code-mode[data-appearance=dark] .code-codex-transcript-result-loading,body.code-mode[data-appearance=dark] .code-codex-transcript-result-error{border-color:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-codex-transcript-result-file>summary{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-codex-transcript-result-file>summary:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-result-review:hover,body.code-mode[data-appearance=dark] .code-codex-transcript-result-review:focus-visible{background:#8b949e24}body.code-mode[data-appearance=dark] .code-codex-transcript-result-diff{color:var(--code-dark-text-muted);background:#0d1117}body.code-mode[data-appearance=dark] .code-codex-transcript-result-review{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22e6}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.command .code-codex-transcript-process-dot{background:#3fb950}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.patch .code-codex-transcript-process-dot{background:#a371f7}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.mcp .code-codex-transcript-process-dot,body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.tool .code-codex-transcript-process-dot,body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.tool-output .code-codex-transcript-process-dot{background:#58a6ff}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.reasoning .code-codex-transcript-process-dot,body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.plan .code-codex-transcript-process-dot{background:#d29922}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.web-search .code-codex-transcript-process-dot{background:#39c5cf}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.status-running .code-codex-transcript-process-dot,body.code-mode[data-appearance=dark] .code-codex-transcript-process-group.running>.code-codex-transcript-process-group-summary>.code-codex-transcript-process-dot{border-color:var(--code-dark-text-muted);background:0 0;border-top-color:#0000}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.status-failed .code-codex-transcript-process-dot,body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.error .code-codex-transcript-process-dot{background:#ff7b72}body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.status-warning .code-codex-transcript-process-dot,body.code-mode[data-appearance=dark] .code-codex-transcript-process-item.warning .code-codex-transcript-process-dot{background:#d29922}body.code-mode[data-appearance=dark] .code-codex-transcript-state,body.code-mode[data-appearance=dark] .code-codex-transcript-placeholder,body.code-mode[data-appearance=dark] .code-codex-transcript-state.error{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-codex-transcript-jump-bottom{color:#ffffffeb;box-shadow:none;-webkit-backdrop-filter:blur(12px);background:#ffffff0e;border-color:#f0f6fc21}body.code-mode[data-appearance=dark] .code-codex-transcript-jump-bottom:hover{color:#fff;background:#ffffff16;border-color:#f0f6fc33}body.code-mode[data-appearance=dark] .code-file-editor{background:var(--code-dark-bg);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-editor-header,body.code-mode[data-appearance=dark] .code-file-editor-bar,body.code-mode[data-appearance=dark] .code-file-editor-statusbar{background:var(--code-dark-bg-panel);border-color:var(--code-dark-border);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-file-editor-tab-strip{background:var(--code-dark-bg-soft);border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-file-editor-navigation{border-color:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-file-editor-navigation-divider{background:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-file-editor-tab{border-color:var(--code-dark-border-soft);color:var(--code-dark-text-soft);background:0 0}body.code-mode[data-appearance=dark] .code-file-editor-tab.active{background:var(--code-dark-bg);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-editor-tab:hover:not(.active){background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .code-file-editor-close,body.code-mode[data-appearance=dark] .code-open-editor-close{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-editor-close:hover,body.code-mode[data-appearance=dark] .code-open-editor-close:hover{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-editor-fallback-textarea,body.code-mode[data-appearance=dark] .code-file-monaco,body.code-mode[data-appearance=dark] .code-file-editor-split,body.code-mode[data-appearance=dark] .code-file-editor-source-region,body.code-mode[data-appearance=dark] .code-file-diff-view,body.code-mode[data-appearance=dark] .code-file-diff-monaco,body.code-mode[data-appearance=dark] .code-file-preview-panel{background:var(--code-dark-bg);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-editor-split.markdown .code-file-monaco,body.code-mode[data-appearance=dark] .code-file-editor-source-region.markdown-split .code-file-monaco{border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-file-diff-header,body.code-mode[data-appearance=dark] .code-file-diff-state{background:var(--code-dark-bg-panel);border-color:var(--code-dark-border);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-file-diff-title{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-diff-title span,body.code-mode[data-appearance=dark] .code-file-diff-close{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-diff-close:hover,body.code-mode[data-appearance=dark] .code-file-diff-close:focus-visible{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-diff-state.error{color:#ff7b72}body.code-mode[data-appearance=dark] .code-file-preview-panel.metadata{background:linear-gradient(#161b22e0,#0d1117f5)}body.code-mode[data-appearance=dark] .code-markdown-preview,body.code-mode[data-appearance=dark] .code-markdown-preview h1,body.code-mode[data-appearance=dark] .code-markdown-preview h2,body.code-mode[data-appearance=dark] .code-markdown-preview h3,body.code-mode[data-appearance=dark] .code-markdown-preview h4,body.code-mode[data-appearance=dark] .code-markdown-preview h5,body.code-mode[data-appearance=dark] .code-markdown-preview h6{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-markdown-preview h1,body.code-mode[data-appearance=dark] .code-markdown-preview h2{border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-markdown-preview a{color:#79c0ff}body.code-mode[data-appearance=dark] .code-markdown-heading-anchor{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-markdown-preview blockquote{color:var(--code-dark-text-muted);border-color:#30363d}body.code-mode[data-appearance=dark] .code-markdown-preview code{color:var(--code-dark-text);background:#6e768152}body.code-mode[data-appearance=dark] .code-markdown-preview pre,body.code-mode[data-appearance=dark] .code-markdown-preview th{background:#161b22}body.code-mode[data-appearance=dark] .code-markdown-preview pre[data-language]:before{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-markdown-preview .katex{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-comment,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-quote{color:#8b949e}body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-keyword,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-selector-tag,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-subst{color:#ff7b72}body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-literal,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-number,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-tag .hljs-attr,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-template-variable,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-variable{color:#79c0ff}body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-doctag,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-string{color:#a5d6ff}body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-section,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-selector-id,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-title{color:#d2a8ff}body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-attr,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-attribute,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-name,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-selector-class,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-selector-pseudo,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-tag{color:#7ee787}body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-built_in,body.code-mode[data-appearance=dark] .code-markdown-preview .hljs-symbol{color:#ffa657}body.code-mode[data-appearance=dark] .code-markdown-preview .code-markdown-frontmatter,body.code-mode[data-appearance=dark] .code-markdown-preview .code-markdown-frontmatter th,body.code-mode[data-appearance=dark] .code-markdown-preview .code-markdown-frontmatter td{border-color:#30363d}body.code-mode[data-appearance=dark] .code-markdown-preview .code-markdown-frontmatter th{color:var(--code-dark-text-muted);background:#161b22}body.code-mode[data-appearance=dark] .code-markdown-preview .code-markdown-frontmatter.error{color:#ff7b72;background:#161b22e6;border-color:#f851496b}body.code-mode[data-appearance=dark] .code-markdown-mermaid{background:#0d1117;border-color:#30363d}body.code-mode[data-appearance=dark] .code-markdown-mermaid-toolbar{background:#161b22eb;border-color:#30363d;box-shadow:0 8px 24px #01040952}body.code-mode[data-appearance=dark] .code-markdown-mermaid-toolbar button{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-markdown-mermaid-toolbar button:hover:not(:disabled),body.code-mode[data-appearance=dark] .code-markdown-mermaid-toolbar button:focus-visible{color:var(--code-dark-text);background:#6e76813d}body.code-mode[data-appearance=dark] .code-markdown-mermaid-toolbar button[aria-pressed=true]{color:#58a6ff;background:#388bfd33}body.code-mode[data-appearance=dark] .code-markdown-mermaid-loading{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-markdown-mermaid.error{background:#161b22e6;border-color:#f851496b}body.code-mode[data-appearance=dark] .code-markdown-mermaid-error-title{color:#ff7b72}body.code-mode[data-appearance=dark] .code-markdown-mermaid-error-message{color:var(--code-dark-text-muted);background:#0d1117c2;border-color:#f8514947}body.code-mode[data-appearance=dark] .code-markdown-preview th,body.code-mode[data-appearance=dark] .code-markdown-preview td{border-color:#30363d}body.code-mode[data-appearance=dark] .code-markdown-preview tr:nth-child(2n){background:#161b22c2}body.code-mode[data-appearance=dark] .code-markdown-preview hr{background:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-file-inline-blame{color:var(--code-dark-text-soft);background:#58a6ff38}body.code-mode[data-appearance=dark] .code-file-inline-blame:hover,body.code-mode[data-appearance=dark] .code-file-inline-blame:focus-visible{color:var(--code-dark-text);background:#58a6ff52}body.code-mode[data-appearance=dark] .code-file-inline-blame.uncommitted{color:#f0c674;background:#d2992238}body.code-mode[data-appearance=dark] .code-file-blame-toast{border-color:var(--code-dark-border);color:var(--code-dark-text-soft);box-shadow:0 12px 32px var(--code-dark-shadow);background:#1c2129f5}body.code-mode[data-appearance=dark] .code-file-blame-toast.error{color:#ff7b72;border-color:#f851495c}body.code-mode[data-appearance=dark] .code-file-blame-detail{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22f5;box-shadow:inset 0 1px #ffffff0a}body.code-mode[data-appearance=dark] .code-file-blame-detail-title code,body.code-mode[data-appearance=dark] .code-file-blame-detail-subtitle,body.code-mode[data-appearance=dark] .code-file-blame-detail-row span{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-blame-detail-row strong,body.code-mode[data-appearance=dark] .code-file-blame-detail-row a{color:var(--code-dark-accent)}body.code-mode[data-appearance=dark] .code-file-blame-detail-close{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-blame-detail-close:hover,body.code-mode[data-appearance=dark] .code-file-blame-detail-close:focus-visible{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-file-line-changes-panel{border-color:var(--code-dark-border);color:var(--code-dark-text);background:#161b22f5;box-shadow:inset 0 1px #ffffff0a}body.code-mode[data-appearance=dark] .code-file-line-changes-title code,body.code-mode[data-appearance=dark] .code-file-line-changes-subtitle,body.code-mode[data-appearance=dark] .code-file-line-changes-state{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-line-changes-state.error{color:#ff7b72}body.code-mode[data-appearance=dark] .code-file-line-changes-patch{border-color:var(--code-dark-border);background:#0d1117ad}body.code-mode[data-appearance=dark] .code-file-line-changes-line.meta{color:#8b949e;background:#7986cb24}body.code-mode[data-appearance=dark] .code-file-line-changes-line.added{color:#7ee787;background:#2ea0432e}body.code-mode[data-appearance=dark] .code-file-line-changes-line.deleted{color:#ff7b72;background:#f8514929}body.code-mode[data-appearance=dark] .code-file-line-changes-close{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-file-line-changes-close:hover,body.code-mode[data-appearance=dark] .code-file-line-changes-close:focus-visible{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-composer{color:var(--code-dark-text);-webkit-backdrop-filter:blur(20px)saturate(1.12);background:#161b22d1;border-color:#f0f6fc1a;box-shadow:0 12px 30px #01040933,inset 0 0 0 1px #f0f6fc0f}body.code-mode[data-appearance=dark] .code-composer-collapse,body.code-mode[data-appearance=dark] .code-composer-restore{border-color:var(--code-dark-border);color:var(--code-dark-text-muted);background:#161b22db;box-shadow:0 12px 30px #01040947}body.code-mode[data-appearance=dark] .code-composer-collapse:hover,body.code-mode[data-appearance=dark] .code-composer-collapse:focus-visible,body.code-mode[data-appearance=dark] .code-composer-restore:hover,body.code-mode[data-appearance=dark] .code-composer-restore:focus-visible{background:var(--code-dark-bg-hover);color:var(--code-dark-text);border-color:#8b949e57}body.code-mode[data-appearance=dark] .code-composer.menu-open{border-color:#58a6ff6b}body.code-mode[data-appearance=dark] .code-composer-send{background:var(--code-dark-text-soft);color:var(--code-dark-bg)}body.code-mode[data-appearance=dark] .code-composer-send:disabled{color:#f0f6fc61;background:#f0f6fc1f}body.code-mode[data-appearance=dark] .code-composer-send:not(:disabled):hover{background:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-composer-send.interrupt{background:var(--code-dark-danger);color:#fff}body.code-mode[data-appearance=dark] .code-context-window-ring{background:conic-gradient(var(--code-dark-text-soft) calc(var(--context-percent) * 1%), #8b949e57 0)}body.code-mode[data-appearance=dark] .code-context-window-ring:after{background:var(--code-dark-bg-panel)}body.code-mode[data-appearance=dark] .code-composer-context-window[data-level=warning] .code-context-window-ring{background:conic-gradient(#d29922 calc(var(--context-percent) * 1%), #d2992240 0)}body.code-mode[data-appearance=dark] .code-composer-context-window[data-level=critical] .code-context-window-ring{background:conic-gradient(#f85149 calc(var(--context-percent) * 1%), #f8514940 0)}body.code-mode[data-appearance=dark] .code-context-window-popover{background:var(--code-dark-bg-elevated);border-color:var(--code-dark-border);color:var(--code-dark-text);box-shadow:0 16px 36px #0104096b}body.code-mode[data-appearance=dark] .code-context-window-popover span{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-composer-attachment,body.code-mode[data-appearance=dark] .code-composer-mode-chip{background:var(--code-dark-bg-elevated);border-color:var(--code-dark-border);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-composer-attachment-preview{background:var(--code-dark-bg);border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-composer-attachment-name,body.code-mode[data-appearance=dark] .code-composer-attachment-fallback{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-composer-attachment-status{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-composer-attachment.image .code-composer-attachment-status{background:#161b22db}body.code-mode[data-appearance=dark] .code-composer-attachment.image .code-composer-attachment-remove{border-color:var(--code-dark-bg);color:#111;background:#f0f3f6}body.code-mode[data-appearance=dark] .code-composer-attachment.image .code-composer-attachment-remove:hover,body.code-mode[data-appearance=dark] .code-composer-attachment.image .code-composer-attachment-remove:focus-visible{color:#111;background:#fff}body.code-mode[data-appearance=dark] .code-pending-followup{background:var(--code-dark-bg-elevated);border-color:var(--code-dark-border);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-pending-followup-icon,body.code-mode[data-appearance=dark] .code-pending-followup-actions button{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-pending-followup-row p{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-pending-followup-actions button:hover,body.code-mode[data-appearance=dark] .code-pending-followup-actions button:focus-visible{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-app-server-request{border-color:var(--code-dark-border);background:var(--code-dark-bg-elevated);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-app-server-notice{background:#4b3d1ad1;border-color:#806c2f}body.code-mode[data-appearance=dark] .code-app-server-request header strong,body.code-mode[data-appearance=dark] .code-app-server-request-questions label>span,body.code-mode[data-appearance=dark] .code-app-server-request input{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-app-server-request p,body.code-mode[data-appearance=dark] .code-app-server-request small,body.code-mode[data-appearance=dark] .code-app-server-request header span{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-app-server-request-command code,body.code-mode[data-appearance=dark] .code-app-server-request input,body.code-mode[data-appearance=dark] .code-app-server-request-options button,body.code-mode[data-appearance=dark] .code-app-server-request-actions button{border-color:var(--code-dark-border);background:var(--code-dark-bg);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-app-server-request-options button.active,body.code-mode[data-appearance=dark] .code-app-server-request-actions button.approve{color:#fff;background:#6f816b;border-color:#6f816b}body.code-mode[data-appearance=dark] .code-copy-toast,body.code-mode[data-appearance=dark] .app-toast{border-color:var(--code-dark-border);color:var(--code-dark-text);box-shadow:0 12px 32px var(--code-dark-shadow);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:#1c2129fa}body.code-mode[data-appearance=dark] .code-copy-toast.error,body.code-mode[data-appearance=dark] .app-toast.error{color:#ff7b72;border-color:#f851495c}body.code-mode[data-appearance=dark] .code-context-menu,body.code-mode[data-appearance=dark] .code-options-menu,body.code-mode[data-appearance=dark] .code-composer-menu,body.code-mode[data-appearance=dark] .code-model-submenu,body.code-mode[data-appearance=dark] .code-speed-submenu,body.code-mode[data-appearance=dark] .code-agent-launch-submenu-panel,body.code-mode[data-appearance=dark] .code-editor-context-menu,body.code-mode[data-appearance=dark] .terminal-context-menu,body.code-mode[data-appearance=dark] .terminal-context-menu-pooled,body.code-mode[data-appearance=dark] .code-file-context-menu{background:var(--code-dark-bg-elevated);border-color:var(--code-dark-border);color:var(--code-dark-text);box-shadow:0 18px 48px var(--code-dark-shadow)}body.code-mode[data-appearance=dark] .code-project-context-menu,body.code-mode[data-appearance=dark] .code-project-launch-menu{-webkit-backdrop-filter:blur(18px)saturate(1.06);background:#161b22eb;border-color:#8b949e2e;box-shadow:0 18px 48px #0104096b,inset 0 1px #f0f6fc0d}body.code-mode[data-appearance=dark] .code-project-context-menu button,body.code-mode[data-appearance=dark] .code-project-launch-menu button{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-context-menu button,body.code-mode[data-appearance=dark] .code-options-menu button,body.code-mode[data-appearance=dark] .code-composer-menu button,body.code-mode[data-appearance=dark] .code-editor-context-menu button,body.code-mode[data-appearance=dark] .terminal-context-menu-item,body.code-mode[data-appearance=dark] .terminal-context-menu-pooled .terminal-context-menu-item,body.code-mode[data-appearance=dark] .code-file-context-menu button,body.code-mode[data-appearance=dark] .code-approval-option,body.code-mode[data-appearance=dark] .code-model-option,body.code-mode[data-appearance=dark] .code-model-nested-trigger,body.code-mode[data-appearance=dark] .code-plus-menu button,body.code-mode[data-appearance=dark] .code-slash-command{color:var(--code-dark-text);background:0 0}body.code-mode[data-appearance=dark] .code-context-menu button:hover,body.code-mode[data-appearance=dark] .code-context-menu button:focus-visible,body.code-mode[data-appearance=dark] .code-options-menu button:hover,body.code-mode[data-appearance=dark] .code-options-menu button:focus-visible,body.code-mode[data-appearance=dark] .code-composer-menu button:hover,body.code-mode[data-appearance=dark] .code-composer-menu button:focus-visible,body.code-mode[data-appearance=dark] .code-editor-context-menu button:hover:not(:disabled),body.code-mode[data-appearance=dark] .code-editor-context-menu button:focus-visible,body.code-mode[data-appearance=dark] .terminal-context-menu-item:hover:not(:disabled),body.code-mode[data-appearance=dark] .terminal-context-menu-item:focus-visible,body.code-mode[data-appearance=dark] .code-file-context-menu button:hover,body.code-mode[data-appearance=dark] .code-file-context-menu button:focus-visible,body.code-mode[data-appearance=dark] .code-approval-option:hover,body.code-mode[data-appearance=dark] .code-approval-option:focus-visible,body.code-mode[data-appearance=dark] .code-model-option:hover,body.code-mode[data-appearance=dark] .code-model-option:focus-visible,body.code-mode[data-appearance=dark] .code-model-nested-trigger:hover,body.code-mode[data-appearance=dark] .code-model-nested-trigger:focus-visible,body.code-mode[data-appearance=dark] .code-model-nested-trigger.selected,body.code-mode[data-appearance=dark] .code-plus-menu button:hover,body.code-mode[data-appearance=dark] .code-plus-menu button:focus-visible,body.code-mode[data-appearance=dark] .code-slash-command:hover,body.code-mode[data-appearance=dark] .code-slash-command:focus-visible,body.code-mode[data-appearance=dark] .code-slash-command.active{background:var(--code-dark-bg-hover);color:var(--code-dark-text);outline:0}body.code-mode[data-appearance=dark] .code-editor-context-menu button:disabled{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-editor-context-separator,body.code-mode[data-appearance=dark] .code-context-menu-separator{background:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .code-context-menu-icon,body.code-mode[data-appearance=dark] .code-agent-launch-submenu-arrow{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-options-menu button.checked,body.code-mode[data-appearance=dark] .code-model-option.selected,body.code-mode[data-appearance=dark] .code-approval-option.selected{background:var(--code-dark-accent-soft)}body.code-mode[data-appearance=dark] .code-options-menu-check,body.code-mode[data-appearance=dark] .code-menu-check,body.code-mode[data-appearance=dark] .code-file-search-highlight,body.code-mode[data-appearance=dark] .code-model-option-copy span,body.code-mode[data-appearance=dark] .code-approval-option-copy span,body.code-mode[data-appearance=dark] .code-slash-command-copy code,body.code-mode[data-appearance=dark] .code-slash-command-copy strong,body.code-mode[data-appearance=dark] .code-speed-option-icon{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-model-matrix-stage{box-shadow:none;background:0 0;border-color:#0000}body.code-mode[data-appearance=dark] .code-model-matrix-shell[data-advanced=open] .code-model-matrix-stage{background:0 0;border-color:#0000}body.code-mode[data-appearance=dark] .code-model-matrix-head,body.code-mode[data-appearance=dark] .code-model-matrix-labels span,body.code-mode[data-appearance=dark] .code-model-matrix-current,body.code-mode[data-appearance=dark] .code-model-matrix-rocker{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-model-matrix-surface{background:radial-gradient(circle at 2px 2px,#ffffff0b 0 .7px,#0000 .9px) 0 0/7px 7px,linear-gradient(145deg,#ffffff09,#0000 42%),#34373a;border-color:#ffffff0a;box-shadow:inset 0 1px 2px #0000006b,inset 0 -1px #ffffff0a}body.code-mode[data-appearance=dark] .code-model-matrix-cells button:before{background:#70757a}body.code-mode[data-appearance=dark] .code-model-matrix-rocker-control{background:radial-gradient(circle at 2px 2px,#ffffff14 0 1px,#0000 1.2px) 0 0/6px 6px,#242628;border-color:#ffffff14;box-shadow:inset 0 0 0 1px #ffffff14}body.code-mode[data-appearance=dark] .code-model-matrix-rocker-button:focus-visible .code-model-matrix-rocker-control{box-shadow:inset 0 0 0 1px #282a2c, 0 0 0 2px #111315, 0 0 0 4px var(--rocker-accent)}body.code-mode[data-appearance=dark] .code-model-matrix-fast:not(.is-active){color:var(--code-dark-text-muted);background:#ffffff0e;border-color:#ffffff17;box-shadow:inset 0 1px #ffffff0d}body.code-mode[data-appearance=dark] .code-model-matrix-fast.is-active{color:#674400;background:linear-gradient(145deg,#ffe783,#ffc126);border-color:#ffc72d7a;box-shadow:inset 0 1px #ffffff8a,0 0 10px #ffbe1940}body.code-mode[data-appearance=dark] .code-model-matrix-fast.is-active small{color:#744d00}body.code-mode[data-appearance=dark] .code-model-matrix-fast.is-disabled{background:#ffffff0a}body.code-mode[data-appearance=dark] .code-model-matrix-advanced-toggle{color:var(--code-dark-text-muted);background:#ffffff0f}body.code-mode[data-appearance=dark] .code-model-matrix-advanced-toggle:hover,body.code-mode[data-appearance=dark] .code-model-matrix-advanced-toggle:focus-visible{color:var(--code-dark-text);background:#ffffff1a}body.code-mode[data-appearance=dark] .code-model-option-copy small,body.code-mode[data-appearance=dark] .code-approval-option-copy small,body.code-mode[data-appearance=dark] .code-plus-menu small,body.code-mode[data-appearance=dark] .code-slash-command-copy small,body.code-mode[data-appearance=dark] .code-slash-command-source,body.code-mode[data-appearance=dark] .code-model-nested-trigger span:last-child{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .dialog-overlay{background:#010409b8}body.code-mode[data-appearance=dark] .code-rename-backdrop,body.code-mode[data-appearance=dark] .code-file-save-confirm-backdrop{background:#010409a3}body.code-mode[data-appearance=dark] .input-dialog,body.code-mode[data-appearance=dark] .settings-dialog,body.code-mode[data-appearance=dark] .code-rename-dialog,body.code-mode[data-appearance=dark] .code-file-save-confirm-dialog,body.code-mode[data-appearance=dark] .workspace-history,body.code-mode[data-appearance=dark] .workspace-path-suggestions,body.code-mode[data-appearance=dark] .agent-list,body.code-mode[data-appearance=dark] .agent-item,body.code-mode[data-appearance=dark] .agent-list-status,body.code-mode[data-appearance=dark] .main-agent-resume-option,body.code-mode[data-appearance=dark] .theme-option,body.code-mode[data-appearance=dark] .settings-field,body.code-mode[data-appearance=dark] .settings-checkbox,body.code-mode[data-appearance=dark] .code-file-operation-dialog{background:var(--code-dark-bg-elevated);border-color:var(--code-dark-border);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .dialog-header,body.code-mode[data-appearance=dark] .input-dialog .dialog-header{background:var(--code-dark-bg-panel);border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .dialog-header-title,body.code-mode[data-appearance=dark] .group-label,body.code-mode[data-appearance=dark] .workspace-field-copy,body.code-mode[data-appearance=dark] .workspace-selected-agent strong,body.code-mode[data-appearance=dark] .section-title,body.code-mode[data-appearance=dark] .settings-field label,body.code-mode[data-appearance=dark] .settings-checkbox span,body.code-mode[data-appearance=dark] .agent-item-name,body.code-mode[data-appearance=dark] .theme-name,body.code-mode[data-appearance=dark] .main-agent-resume-title,body.code-mode[data-appearance=dark] .code-rename-dialog label,body.code-mode[data-appearance=dark] .code-kill-dialog h2,body.code-mode[data-appearance=dark] .code-file-save-confirm-dialog h2{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .agent-item-desc,body.code-mode[data-appearance=dark] .theme-desc,body.code-mode[data-appearance=dark] .settings-hint,body.code-mode[data-appearance=dark] .settings-field .settings-hint,body.code-mode[data-appearance=dark] .settings-checkbox .settings-checkbox-hint,body.code-mode[data-appearance=dark] .main-agent-resume-detail,body.code-mode[data-appearance=dark] .workspace-selected-agent,body.code-mode[data-appearance=dark] .workspace-history-header .hint,body.code-mode[data-appearance=dark] .workspace-history-index,body.code-mode[data-appearance=dark] .workspace-path-suggestion-path,body.code-mode[data-appearance=dark] .code-kill-dialog p,body.code-mode[data-appearance=dark] .code-file-save-confirm-dialog p{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .agent-launch-icon,body.code-mode[data-appearance=dark] .code-project-launch-menu .agent-launch-icon,body.code-mode[data-appearance=dark] .code-agent-launch-submenu-panel .agent-launch-icon{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .agent-launch-icon-monochrome image{filter:grayscale()invert()brightness(1.25)}body.code-mode[data-appearance=dark] .agent-launch-icon-theme-light{display:none}body.code-mode[data-appearance=dark] .agent-launch-icon-theme-dark{display:block}body.code-mode[data-appearance=dark] .workspace-input select.workflow-select:focus,body.code-mode[data-appearance=dark] .workspace-input textarea.task-input:focus,body.code-mode[data-appearance=dark] .workspace-input input:focus,body.code-mode[data-appearance=dark] .settings-input:focus,body.code-mode[data-appearance=dark] .settings-select:focus{border-color:#58a6ff94;box-shadow:0 0 0 3px #58a6ff29}body.code-mode[data-appearance=dark] .code-rename-dialog input{background:var(--code-dark-bg-panel);border-color:var(--code-dark-border);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .code-rename-dialog input:focus{border-color:#58a6ff94;box-shadow:0 0 0 3px #58a6ff29}body.code-mode[data-appearance=dark] .workspace-input select.workflow-select option{background:var(--code-dark-bg-panel);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-home-trigger,body.code-mode[data-appearance=dark] .workspace-home-menu,body.code-mode[data-appearance=dark] .workspace-runtime-options{border-color:var(--code-dark-border);background:var(--code-dark-bg-panel);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-home-trigger:focus-visible{border-color:#58a6ff94;box-shadow:0 0 0 3px #58a6ff29}body.code-mode[data-appearance=dark] .workspace-home-trigger-copy strong,body.code-mode[data-appearance=dark] .workspace-home-option-copy strong{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-home-trigger-copy span,body.code-mode[data-appearance=dark] .workspace-home-option-copy span,body.code-mode[data-appearance=dark] .workspace-home-trigger svg{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .workspace-home-menu{box-shadow:0 12px 28px #0104096b}body.code-mode[data-appearance=dark] .workspace-home-option{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-home-option:hover,body.code-mode[data-appearance=dark] .workspace-home-option:focus-visible,body.code-mode[data-appearance=dark] .workspace-home-option.selected{background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .workspace-home-option.selected .workspace-home-option-check{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-runtime-options button{border-left-color:var(--code-dark-border);color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .workspace-runtime-options button:hover,body.code-mode[data-appearance=dark] .workspace-runtime-options button:focus-visible,body.code-mode[data-appearance=dark] .workspace-runtime-options button.active{background:var(--code-dark-bg-hover);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-runtime-options button span{color:var(--code-dark-warning)}body.code-mode[data-appearance=dark] .workspace-history-header{border-bottom-color:var(--code-dark-border-soft);color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .input-dialog .workspace-actions{background:var(--code-dark-bg-elevated);border-top-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .workspace-history-list::-webkit-scrollbar-thumb{background:#8b949e52}body.code-mode[data-appearance=dark] .workspace-history-list::-webkit-scrollbar-track{background:var(--code-dark-bg-elevated)}body.code-mode[data-appearance=dark] .workspace-history-item,body.code-mode[data-appearance=dark] .workspace-path-suggestion{color:var(--code-dark-text-soft);box-shadow:none;background:0 0;border-color:#0000}body.code-mode[data-appearance=dark] .workspace-history-item{border-top-color:var(--code-dark-border-soft)}body.code-mode[data-appearance=dark] .workspace-history-item:first-child{border-top-color:#0000}body.code-mode[data-appearance=dark] .workspace-history-path,body.code-mode[data-appearance=dark] .workspace-path-suggestion-name{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .agent-item:hover,body.code-mode[data-appearance=dark] .agent-item:focus-visible,body.code-mode[data-appearance=dark] .theme-option:hover,body.code-mode[data-appearance=dark] .theme-option.active,body.code-mode[data-appearance=dark] .workspace-history-item:hover,body.code-mode[data-appearance=dark] .workspace-history-item.active,body.code-mode[data-appearance=dark] .workspace-path-suggestion:hover,body.code-mode[data-appearance=dark] .workspace-path-suggestion.active{background:var(--code-dark-bg-hover);border-color:var(--code-dark-border);color:var(--code-dark-text);box-shadow:none}body.code-mode[data-appearance=dark] .workspace-history-item:hover .workspace-history-path,body.code-mode[data-appearance=dark] .workspace-history-item.active .workspace-history-path,body.code-mode[data-appearance=dark] .workspace-path-suggestion:hover .workspace-path-suggestion-name,body.code-mode[data-appearance=dark] .workspace-path-suggestion.active .workspace-path-suggestion-name{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-history-badge{background:var(--code-dark-accent-soft);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .workspace-directory-prompt{border-color:var(--code-dark-border);background:var(--code-dark-bg-panel);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-directory-prompt.error{background:#f8514914;border-color:#f851496b}body.code-mode[data-appearance=dark] .workspace-directory-prompt-icon{background:var(--code-dark-bg-hover);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .workspace-directory-prompt.error .workspace-directory-prompt-icon{color:var(--code-dark-danger);background:#f8514926}body.code-mode[data-appearance=dark] .workspace-directory-prompt-copy h4{color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-directory-prompt-copy p{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .workspace-directory-prompt-copy code{border-color:var(--code-dark-border);background:var(--code-dark-bg-elevated);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .workspace-directory-prompt-actions button{border-color:var(--code-dark-accent);background:var(--code-dark-accent);color:#fff}body.code-mode[data-appearance=dark] .workspace-directory-prompt-actions button:hover:not(:disabled){background:#79b8ff;border-color:#79b8ff}body.code-mode[data-appearance=dark] .workspace-directory-prompt-actions button.secondary{border-color:var(--code-dark-border);background:var(--code-dark-bg-elevated);color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .workspace-directory-prompt-actions button.secondary:hover:not(:disabled){background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .workspace-input input:disabled{border-color:var(--code-dark-border);background:var(--code-dark-bg-panel);color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .workspace-directory-prompt-actions button:focus-visible{box-shadow:0 0 0 3px #58a6ff38}body.code-mode[data-appearance=dark] .workspace-actions button,body.code-mode[data-appearance=dark] .close-btn,body.code-mode[data-appearance=dark] .kill-btn,body.code-mode[data-appearance=dark] .code-rename-actions button,body.code-mode[data-appearance=dark] .code-file-save-confirm-actions button,body.code-mode[data-appearance=dark] .code-file-operation-dialog .code-rename-actions button{background:var(--code-dark-bg-panel);border-color:var(--code-dark-border);color:var(--code-dark-text)}body.code-mode[data-appearance=dark] .workspace-actions button:hover,body.code-mode[data-appearance=dark] .close-btn:hover,body.code-mode[data-appearance=dark] .code-rename-actions button:hover:not(:disabled),body.code-mode[data-appearance=dark] .code-file-save-confirm-actions button:hover:not(:disabled),body.code-mode[data-appearance=dark] .code-file-operation-dialog .code-rename-actions button:hover{background:var(--code-dark-bg-hover)}body.code-mode[data-appearance=dark] .kill-btn,body.code-mode[data-appearance=dark] .code-rename-actions button.primary,body.code-mode[data-appearance=dark] .code-file-save-confirm-actions button.primary,body.code-mode[data-appearance=dark] .code-file-operation-dialog .code-rename-actions button.primary{background:var(--code-dark-accent);border-color:var(--code-dark-accent);color:#fff}body.code-mode[data-appearance=dark] .kill-btn,body.code-mode[data-appearance=dark] .code-rename-actions button.danger{background:var(--code-dark-danger);border-color:var(--code-dark-danger);color:#fff}body.code-mode[data-appearance=dark] .code-mobile-topbar{background:var(--code-dark-bg-soft);border-color:var(--code-dark-border);color:var(--code-dark-text)}body.code-mode[data-appearance=dark].code-mobile-markdown-reading .code-mobile-topbar{background:0 0;border-color:#0000}body.code-mode[data-appearance=dark].code-mobile-touch{background:var(--code-dark-bg)}body.code-mode[data-appearance=dark].code-mobile-touch #root,body.code-mode[data-appearance=dark].code-mobile-touch .app-container,body.code-mode[data-appearance=dark].code-mobile-touch .code-app-shell,body.code-mode[data-appearance=dark].code-mobile-touch .code-workspace,body.code-mode[data-appearance=dark].code-mobile-touch .code-main,body.code-mode[data-appearance=dark].code-mobile-touch .code-terminal-grid,body.code-mode[data-appearance=dark].code-mobile-touch .code-agent-work-pane,body.code-mode[data-appearance=dark].code-mobile-touch .code-terminal-pane,body.code-mode[data-appearance=dark].code-mobile-touch .code-terminal-container,body.code-mode[data-appearance=dark].code-mobile-touch .terminal-session-host,body.code-mode[data-appearance=dark].code-mobile-touch .terminal-session-host .xterm,body.code-mode[data-appearance=dark].code-mobile-touch .terminal-session-host .xterm-screen,body.code-mode[data-appearance=dark].code-mobile-touch .terminal-session-host .xterm-viewport,body.code-mode[data-appearance=dark].code-mobile-touch .code-codex-transcript-scroll{color:var(--code-dark-text);background:var(--code-dark-bg)!important}body.code-mode[data-appearance=dark].code-mobile-touch .code-mobile-topbar-title,body.code-mode[data-appearance=dark].code-mobile-touch .code-mobile-topbar-title strong{color:var(--code-dark-text)}body.code-mode[data-appearance=dark].code-mobile-touch .code-mobile-topbar-title span{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark].code-mobile-touch .code-composer{color:var(--code-dark-text);background:#161b22c7!important;border-color:#f0f6fc14!important;box-shadow:0 16px 42px #01040938,inset 0 0 0 1px #f0f6fc0b!important}body.code-mode[data-appearance=dark].code-mobile-touch .code-composer:focus-within,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer.menu-open{background:#161b22db!important;border-color:#f0f6fc1a!important;box-shadow:0 14px 38px #0104093d,inset 0 0 0 1px #f0f6fc0e!important}body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-mobile-input,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer textarea{color:#f0f6fceb;caret-color:#f0f6fcf5}body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-mobile-input:empty:before,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer textarea::placeholder{color:#f0f6fc75}body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-add,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-mic,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-approval,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-context-window,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-model-picker,body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-mode-chip{color:#f0f6fcbd}body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-send{color:#0d1117;background:#f0f6fceb}body.code-mode[data-appearance=dark].code-mobile-touch .code-composer-send:disabled{color:#f0f6fc61;background:#f0f6fc1f}body.code-mode[data-appearance=dark].code-mobile-markdown-reading .code-mobile-topbar-button,body.code-mode[data-appearance=dark].code-mobile-touch .code-mobile-topbar-button,body.code-mode[data-appearance=dark].code-mobile-touch .code-file-editor.markdown-reading .code-file-editor-action.source-preview{color:#f0f6fcd6;-webkit-backdrop-filter:blur(18px)saturate(1.12);background:#161b22bd;box-shadow:0 10px 24px #01040947}body.code-mode[data-appearance=dark].code-mobile-touch .code-file-editor.markdown-reading .code-file-editor-action.source-preview,body.code-mode[data-appearance=dark].code-mobile-touch .code-file-editor.markdown-reading .code-file-editor-action.source-preview.active{color:#f0f6fcd1;box-shadow:none;background:0 0}body.code-mode[data-appearance=dark].code-mobile-touch .code-file-editor.markdown-reading .code-file-editor-action.source-preview:hover:not(:disabled),body.code-mode[data-appearance=dark].code-mobile-touch .code-file-editor.markdown-reading .code-file-editor-action.source-preview:focus-visible{background:#f0f6fc17}body.code-mode[data-appearance=dark] .code-mobile-sidebar-backdrop{background:#010409a3}body.code-mode[data-appearance=dark] .connection-status{background:var(--code-dark-bg-elevated);border-color:var(--code-dark-border);color:var(--code-dark-warning);box-shadow:0 12px 34px var(--code-dark-shadow)}body.code-mode[data-appearance=dark] .connection-status.lost,body.code-mode[data-appearance=dark] .connection-status.stale{color:#ff7b72;border-color:#f8514975}body.code-mode[data-appearance=dark] .code-settings-panel{color:#d8dee9;background:#171a1f;border-left-color:#30363d}body.code-mode[data-appearance=dark] .code-settings-panel-header,body.code-mode[data-appearance=dark] .code-agent-home-provider-header{border-color:#30363d}body.code-mode[data-appearance=dark] .code-settings-panel-header h2,body.code-mode[data-appearance=dark] .code-settings-section h3,body.code-mode[data-appearance=dark] .code-agent-home-id,body.code-mode[data-appearance=dark] .code-agent-home-provider-header strong{color:#f0f3f6}body.code-mode[data-appearance=dark] .code-settings-panel-header p,body.code-mode[data-appearance=dark] .code-settings-section-heading p,body.code-mode[data-appearance=dark] .code-settings-status,body.code-mode[data-appearance=dark] .code-agent-home-path,body.code-mode[data-appearance=dark] .code-agent-home-form p,body.code-mode[data-appearance=dark] .code-agent-home-empty{color:#8b949e}body.code-mode[data-appearance=dark] .code-settings-row-copy strong,body.code-mode[data-appearance=dark] .code-settings-update-url>span{color:var(--code-dark-text-soft)}body.code-mode[data-appearance=dark] .code-settings-row-copy small,body.code-mode[data-appearance=dark] .code-settings-search-timeout-row output,body.code-mode[data-appearance=dark] .code-settings-update-status dt,body.code-mode[data-appearance=dark] .code-settings-update-summary,body.code-mode[data-appearance=dark] .code-agent-home-provider-title span,body.code-mode[data-appearance=dark] .code-settings-inline-choice>svg,body.code-mode[data-appearance=dark] .code-settings-segmented button{color:var(--code-dark-text-muted)}body.code-mode[data-appearance=dark] .code-settings-section+.code-settings-section,body.code-mode[data-appearance=dark] .code-settings-language-choice,body.code-mode[data-appearance=dark] .code-settings-card>.code-settings-choice-row+.code-settings-choice-row{border-color:var(--code-dark-border)}body.code-mode[data-appearance=dark] .code-settings-choice-row,body.code-mode[data-appearance=dark] .code-agent-home-provider,body.code-mode[data-appearance=dark] .code-agent-home-form{background:#1d2229;border-color:#30363d}body.code-mode[data-appearance=dark] .code-settings-segmented,body.code-mode[data-appearance=dark] .code-agent-home-provider-header button,body.code-mode[data-appearance=dark] .code-agent-home-actions button,body.code-mode[data-appearance=dark] .code-agent-home-form-actions button,body.code-mode[data-appearance=dark] .code-agent-home-form input,body.code-mode[data-appearance=dark] .code-settings-panel-close{border-color:#30363d}body.code-mode[data-appearance=dark] .code-agent-home-form input,body.code-mode[data-appearance=dark] .code-settings-search-timeout-card input[type=range]{color:#d8dee9;background:#11151a}body.code-mode[data-appearance=dark] .code-settings-segmented button.active,body.code-mode[data-appearance=dark] .code-settings-segmented button:hover,body.code-mode[data-appearance=dark] .code-settings-segmented button:focus-visible,body.code-mode[data-appearance=dark] .code-agent-home-provider-header button:hover,body.code-mode[data-appearance=dark] .code-agent-home-provider-header button:focus-visible,body.code-mode[data-appearance=dark] .code-agent-home-actions button:hover,body.code-mode[data-appearance=dark] .code-agent-home-actions button:focus-visible,body.code-mode[data-appearance=dark] .code-agent-home-form-actions button:hover,body.code-mode[data-appearance=dark] .code-agent-home-form-actions button:focus-visible,body.code-mode[data-appearance=dark] .code-settings-panel-close:hover,body.code-mode[data-appearance=dark] .code-settings-panel-close:focus-visible{color:#f0f3f6;background:#30363d}body.code-mode[data-appearance=dark] .code-agent-home-form-actions .primary{color:#171a1f;background:#f0f3f6}body.code-mode[data-appearance=dark] .code-settings-panel-overlay{background:#0104096b}body.code-mode[data-appearance=dark] .code-settings-panel-header{background:#171a1f}body.code-mode[data-appearance=dark] .code-settings-segmented{background:#11151a}body.code-mode[data-appearance=dark] .code-settings-segmented button.active{color:#f0f3f6;box-shadow:none;background:#30363d}body.code-mode[data-appearance=dark] .code-settings-error{color:#ff7b72;background:#f8514914;border-color:#f8514952}
|