@runfusion/fusion 0.77.0-beta.8 → 0.77.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/bin.js +8697 -4843
  2. package/dist/child-process-worker.js +8099 -4942
  3. package/dist/client/.vite/manifest.json +252 -252
  4. package/dist/client/assets/{AgentDetailView-DsMRc-aH.js → AgentDetailView-DLzgMG5W.js} +1 -1
  5. package/dist/client/assets/{AgentPermissionPolicyEditor-BXJ52YpO.js → AgentPermissionPolicyEditor-CHoQs5wt.js} +1 -1
  6. package/dist/client/assets/{AgentsView-DO-25nlB.js → AgentsView-LDH9ih8-.js} +3 -3
  7. package/dist/client/assets/{CommandCenter-BMXMg_I2.js → CommandCenter-DQ2Wjfo6.js} +1 -1
  8. package/dist/client/assets/{DevServerView-DAeL5TYz.js → DevServerView-NunavHb5.js} +1 -1
  9. package/dist/client/assets/{DirectoryPicker-Cw-XRjAa.js → DirectoryPicker-FymMYoLf.js} +1 -1
  10. package/dist/client/assets/{DocumentsView-CusClN9u.js → DocumentsView-By9SHDrK.js} +1 -1
  11. package/dist/client/assets/{EvalsView-gNdeUDww.js → EvalsView-KHDm_jIP.js} +1 -1
  12. package/dist/client/assets/{ExperimentalAgentOnboardingModal-Bmzbqzhs.js → ExperimentalAgentOnboardingModal-CXZXL44D.js} +1 -1
  13. package/dist/client/assets/{GoalsView-J8JMsoLn.js → GoalsView-CXJQllGu.js} +1 -1
  14. package/dist/client/assets/{InsightsView-BVbv56K0.js → InsightsView-PSlbun5-.js} +1 -1
  15. package/dist/client/assets/{MemoryView-DNvJFoDu.js → MemoryView-Bj31SvJV.js} +1 -1
  16. package/dist/client/assets/{PiExtensionsManager-BPMexS34.js → PiExtensionsManager-CbEnWrEb.js} +1 -1
  17. package/dist/client/assets/{PluginManager-DGEv-ptu.js → PluginManager-Ncr6jySY.js} +1 -1
  18. package/dist/client/assets/{PullRequestView-CF7fx-Uo.js → PullRequestView-3cR6DptH.js} +1 -1
  19. package/dist/client/assets/{ReportModal-B8S5BFgn.js → ReportModal-0cDRUWOi.js} +1 -1
  20. package/dist/client/assets/{ResearchView-CBeXsevy.js → ResearchView-rnrVF79-.js} +1 -1
  21. package/dist/client/assets/{SecretsView-Dmi9wZkv.js → SecretsView-kF17RkhO.js} +1 -1
  22. package/dist/client/assets/{SettingsModal-DSW3xnGk.js → SettingsModal-BQdO_hEg.js} +1 -1
  23. package/dist/client/assets/SettingsModal-DZdXfRcf.css +1 -0
  24. package/dist/client/assets/SettingsModal-DsA3Vg3y.js +21 -0
  25. package/dist/client/assets/{SettingsTextareaRow-CLab4Vcd.js → SettingsTextareaRow-BmxrECAt.js} +1 -1
  26. package/dist/client/assets/{SetupWizardModal-Ct6juX9x.js → SetupWizardModal-Dlgtw7CJ.js} +2 -2
  27. package/dist/client/assets/{SkillsView-Dn0bwT6i.js → SkillsView-D6BmZdru.js} +1 -1
  28. package/dist/client/assets/{WorkflowNodeEditor-cvReMlG-.js → WorkflowNodeEditor-CVHHMqvn.js} +1 -1
  29. package/dist/client/assets/{agent-import-generation-C8_ewVzC.js → agent-import-generation-CnrRwmdq.js} +1 -1
  30. package/dist/client/assets/{agentsOrgChartLayout-p1i6XROQ.js → agentsOrgChartLayout-purG_-3A.js} +1 -1
  31. package/dist/client/assets/app-BE1XE5i8.js +5 -0
  32. package/dist/client/assets/app-BZBG5TsV.js +5 -0
  33. package/dist/client/assets/app-BZk9L8ul.js +13 -0
  34. package/dist/client/assets/app-CSFGL3vj.js +13 -0
  35. package/dist/client/assets/app-CfwwdZoX.js +13 -0
  36. package/dist/client/assets/app-CtSn_Ct1.js +13 -0
  37. package/dist/client/assets/app-CyJ_qBtM.js +13 -0
  38. package/dist/client/assets/{architectureDiagram-3BPJPVTR-CzCk1QdH.js → architectureDiagram-3BPJPVTR-D_oUETkg.js} +1 -1
  39. package/dist/client/assets/{blockDiagram-GPEHLZMM-74Rj-5ov.js → blockDiagram-GPEHLZMM-SeVvCFBr.js} +1 -1
  40. package/dist/client/assets/{c4Diagram-AAUBKEIU-B570qYH-.js → c4Diagram-AAUBKEIU-C-bOAkwQ.js} +1 -1
  41. package/dist/client/assets/channel-CxElf6wV.js +1 -0
  42. package/dist/client/assets/{chunk-2J33WTMH-DejJkxt6.js → chunk-2J33WTMH-Dfy3ok0u.js} +1 -1
  43. package/dist/client/assets/{chunk-4BX2VUAB-DlgxkBuE.js → chunk-4BX2VUAB-CJhw204d.js} +1 -1
  44. package/dist/client/assets/{chunk-55IACEB6-XCfE8PwC.js → chunk-55IACEB6-Sgt6UphC.js} +1 -1
  45. package/dist/client/assets/{chunk-727SXJPM-D-nDw0Bi.js → chunk-727SXJPM-BvQJpRvs.js} +1 -1
  46. package/dist/client/assets/{chunk-AQP2D5EJ-C4KySao0.js → chunk-AQP2D5EJ-Cthfrcwy.js} +1 -1
  47. package/dist/client/assets/{chunk-FMBD7UC4-CXKdLygA.js → chunk-FMBD7UC4-Cz3x993o.js} +1 -1
  48. package/dist/client/assets/{chunk-ND2GUHAM-bNYWWGVJ.js → chunk-ND2GUHAM-PNcjW0Zw.js} +1 -1
  49. package/dist/client/assets/{chunk-QZHKN3VN-cfBQJ-MX.js → chunk-QZHKN3VN-4nKyNxvF.js} +1 -1
  50. package/dist/client/assets/classDiagram-4FO5ZUOK-CtVaR4ZF.js +1 -0
  51. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CtVaR4ZF.js +1 -0
  52. package/dist/client/assets/{cose-bilkent-S5V4N54A-CiZrg3mQ.js → cose-bilkent-S5V4N54A-Ceay49Yk.js} +1 -1
  53. package/dist/client/assets/{dagre-BM42HDAG-Bckph2U4.js → dagre-BM42HDAG-D9VGvuIj.js} +1 -1
  54. package/dist/client/assets/{dashboard-view-DDRKwfFs.js → dashboard-view-BBWCZOq1.js} +1 -1
  55. package/dist/client/assets/{dashboard-view-IuPjDVGa.js → dashboard-view-RQ4TPddv.js} +1 -1
  56. package/dist/client/assets/{dashboard-view-CVYHQZwx.js → dashboard-view-ZGUl38Cw.js} +1 -1
  57. package/dist/client/assets/{dashboard-view-CN_fkDM1.js → dashboard-view-gpkvNzBo.js} +1 -1
  58. package/dist/client/assets/{diagram-2AECGRRQ-Bnaurex7.js → diagram-2AECGRRQ-Q5XXKnnv.js} +1 -1
  59. package/dist/client/assets/{diagram-5GNKFQAL-BKz1omVN.js → diagram-5GNKFQAL-ByGKtZN7.js} +1 -1
  60. package/dist/client/assets/{diagram-KO2AKTUF-C51lEZwo.js → diagram-KO2AKTUF-B5wCSTUz.js} +1 -1
  61. package/dist/client/assets/{diagram-LMA3HP47-BYm5gql7.js → diagram-LMA3HP47-C4eGtq1N.js} +1 -1
  62. package/dist/client/assets/{diagram-OG6HWLK6-B9CFA4ha.js → diagram-OG6HWLK6-BxTb4tZr.js} +1 -1
  63. package/dist/client/assets/{erDiagram-TEJ5UH35-BLyCSssl.js → erDiagram-TEJ5UH35-CWt1TSp9.js} +1 -1
  64. package/dist/client/assets/{flowDiagram-I6XJVG4X-yDVmpkro.js → flowDiagram-I6XJVG4X-DUAfL604.js} +1 -1
  65. package/dist/client/assets/{folder-open-Cf2NA9nV.js → folder-open-CihApyzT.js} +1 -1
  66. package/dist/client/assets/{ganttDiagram-6RSMTGT7-mC9YPFcx.js → ganttDiagram-6RSMTGT7-DBS31zRY.js} +1 -1
  67. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-DS0bEccv.js → gitGraphDiagram-PVQCEYII-BmYxNXvm.js} +1 -1
  68. package/dist/client/assets/index-BN0mudGK.js +2898 -0
  69. package/dist/client/assets/index-Bi6-k7Mt.css +1 -0
  70. package/dist/client/assets/{infoDiagram-5YYISTIA-CuuNZITP.js → infoDiagram-5YYISTIA-oeqISHuE.js} +1 -1
  71. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-MBSaC94m.js → ishikawaDiagram-YF4QCWOH-De7HSTs3.js} +1 -1
  72. package/dist/client/assets/{journeyDiagram-JHISSGLW-DkaAow9E.js → journeyDiagram-JHISSGLW-CnOQgak6.js} +1 -1
  73. package/dist/client/assets/{kanban-definition-UN3LZRKU-DSf5OLtq.js → kanban-definition-UN3LZRKU-DkkSXQc1.js} +1 -1
  74. package/dist/client/assets/{mermaid.core-HmTn21MF.js → mermaid.core-DPtpszZ3.js} +4 -4
  75. package/dist/client/assets/{mindmap-definition-RKZ34NQL-sv0Dl8aI.js → mindmap-definition-RKZ34NQL-CTVye-HX.js} +1 -1
  76. package/dist/client/assets/{pieDiagram-4H26LBE5-BDK2IQNq.js → pieDiagram-4H26LBE5-Dls6obgy.js} +1 -1
  77. package/dist/client/assets/{puzzle-D00mP67o.js → puzzle-o6sQbTzB.js} +1 -1
  78. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-CiWAhwf1.js → quadrantDiagram-W4KKPZXB-BPHggPTG.js} +1 -1
  79. package/dist/client/assets/{requirementDiagram-4Y6WPE33-DwC99D35.js → requirementDiagram-4Y6WPE33-Cdtv6VSz.js} +1 -1
  80. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-CQn8z721.js → sankeyDiagram-5OEKKPKP-CgQ4VG36.js} +1 -1
  81. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-B0CT8-vw.js → sequenceDiagram-3UESZ5HK-DllpS820.js} +1 -1
  82. package/dist/client/assets/{standing-instructions-template-BIBO_Prr.js → standing-instructions-template-BpjTC7lE.js} +1 -1
  83. package/dist/client/assets/{stateDiagram-AJRCARHV-BYAB_dFF.js → stateDiagram-AJRCARHV-BjDL2xGC.js} +1 -1
  84. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-Cd19uJBk.js → stateDiagram-v2-BHNVJYJU-CvKLFCGR.js} +1 -1
  85. package/dist/client/assets/{timeline-definition-PNZ67QCA-DQLh8XkY.js → timeline-definition-PNZ67QCA-BHlmiUIC.js} +1 -1
  86. package/dist/client/assets/{upload-D4pkNOz2.js → upload-Bn7DjmMR.js} +1 -1
  87. package/dist/client/assets/{users-COgviS_S.js → users-CAwUf5mJ.js} +1 -1
  88. package/dist/client/assets/{vennDiagram-CIIHVFJN-BmwG1Wud.js → vennDiagram-CIIHVFJN-_pYBvG2q.js} +1 -1
  89. package/dist/client/assets/{wardley-L42UT6IY-BiO7jkmj.js → wardley-L42UT6IY-Cnu65RLv.js} +1 -1
  90. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Dq0IPg5H.js → wardleyDiagram-YWT4CUSO-DQC_N8jk.js} +1 -1
  91. package/dist/client/assets/{xychartDiagram-2RQKCTM6-BlMOlSBc.js → xychartDiagram-2RQKCTM6-CMaINq7s.js} +1 -1
  92. package/dist/client/index.html +2 -2
  93. package/dist/client/version.json +1 -1
  94. package/dist/droid-cli/package.json +1 -1
  95. package/dist/extension.js +7907 -4576
  96. package/dist/migrations/0066_chat_session_memory_focus.sql +20 -0
  97. package/dist/migrations/0067_fn_179_session_contention_wait_state.sql +3 -0
  98. package/dist/pi-claude-cli/package.json +1 -1
  99. package/dist/plugin-sdk/index.d.ts +53 -3
  100. package/dist/plugin-sdk/index.js +319 -2
  101. package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +337 -20
  102. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  103. package/dist/plugins/fusion-plugin-claude-runtime/bundled.js +332 -15
  104. package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
  105. package/dist/plugins/fusion-plugin-cli-printing-press/bundled.js +319 -2
  106. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  107. package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +319 -2
  108. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  109. package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +319 -2
  110. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  111. package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +319 -2
  112. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  113. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +319 -2
  114. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  115. package/dist/plugins/fusion-plugin-grok-runtime/bundled.js +332 -15
  116. package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
  117. package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +319 -2
  118. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  119. package/dist/plugins/fusion-plugin-linear-import/bundled.js +319 -2
  120. package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
  121. package/dist/plugins/fusion-plugin-omp-runtime/bundled.js +332 -15
  122. package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
  123. package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +319 -2
  124. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  125. package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +319 -2
  126. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  127. package/dist/plugins/fusion-plugin-quality/bundled.js +319 -2
  128. package/dist/plugins/fusion-plugin-quality/package.json +1 -1
  129. package/dist/plugins/fusion-plugin-reports/bundled.js +319 -2
  130. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  131. package/dist/plugins/fusion-plugin-roadmap/bundled.js +319 -2
  132. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  133. package/dist/plugins/fusion-plugin-todos/bundled.js +319 -2
  134. package/dist/plugins/fusion-plugin-todos/package.json +1 -1
  135. package/dist/plugins/fusion-plugin-whatsapp-chat/bundled.js +422 -6468
  136. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  137. package/package.json +1 -1
  138. package/dist/client/assets/SettingsModal-D2kXP7Um.js +0 -21
  139. package/dist/client/assets/SettingsModal-Ds0Yj47X.css +0 -1
  140. package/dist/client/assets/app-BOvA34XN.js +0 -13
  141. package/dist/client/assets/app-Bic4iWXQ.js +0 -13
  142. package/dist/client/assets/app-BlbH7Tir.js +0 -5
  143. package/dist/client/assets/app-C6TctczU.js +0 -13
  144. package/dist/client/assets/app-D3qZmEIu.js +0 -13
  145. package/dist/client/assets/app-DLnMkUt5.js +0 -5
  146. package/dist/client/assets/app-mNy0DeDM.js +0 -13
  147. package/dist/client/assets/channel-DWAK5y-J.js +0 -1
  148. package/dist/client/assets/classDiagram-4FO5ZUOK-WTkXRkfm.js +0 -1
  149. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-WTkXRkfm.js +0 -1
  150. package/dist/client/assets/index-BjM7LxzY.js +0 -2805
  151. package/dist/client/assets/index-DcKIzuMk.css +0 -1
@@ -1,2 +1,2 @@
1
- import{r as c,j as e}from"./vendor-react-SZ_qB27O.js";import{ab as Q,ac as ue,ad as he,cy as me,cN as Se,ah as ce,cO as _e,b5 as je,cP as Y,aK as we,cQ as ke,cR as Ne,cS as Ce,cT as Ee,cU as Ae,cV as Te,cW as Pe,cC as Le,cX as Fe,cY as Ie,cZ as Me,c_ as De,aL as He,a1 as qe,V as Ue,au as pe,L as Oe,av as Ve}from"./index-BjM7LxzY.js";import{u as fe}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";const $e="builtin",X={pageFetch:!0,github:!1,localDocs:!0,llmSynthesis:!0};function ie(a){const n=a?.researchGlobalDefaults,l=a?.researchSettings;return{enabled:l?.enabled??a?.researchEnabled??a?.researchGlobalEnabled??!0,searchProvider:l?.searchProvider??n?.searchProvider??a?.researchGlobalWebSearchProvider??$e,synthesisProvider:l?.synthesisProvider??n?.synthesisProvider,synthesisModelId:l?.synthesisModelId??n?.synthesisModelId,enabledSources:{webSearch:!0,pageFetch:l?.enabledSources?.pageFetch??n?.enabledSources?.pageFetch??X.pageFetch,github:l?.enabledSources?.github??n?.enabledSources?.github??X.github,localDocs:l?.enabledSources?.localDocs??n?.enabledSources?.localDocs??X.localDocs,llmSynthesis:l?.enabledSources?.llmSynthesis??n?.enabledSources?.llmSynthesis??X.llmSynthesis},limits:{maxConcurrentRuns:l?.limits?.maxConcurrentRuns??a?.researchMaxConcurrentRuns??a?.researchGlobalMaxConcurrentRuns??3,maxSourcesPerRun:l?.limits?.maxSourcesPerRun??n?.maxSourcesPerRun??a?.researchMaxSourcesPerRun??a?.researchGlobalMaxSourcesPerRun??20,maxDurationMs:l?.limits?.maxDurationMs??a?.researchDefaultTimeout??a?.researchGlobalDefaultTimeout??3e5,requestTimeoutMs:l?.limits?.requestTimeoutMs??a?.researchGlobalFetchTimeoutMs??3e4},defaultExportFormat:n?.defaultExportFormat??"markdown"}}function be(a){const n=typeof a.id=="string"?a.id.trim():"";if(n)return n;const l=f=>f.trim().replace(/\s+/g," ").toLowerCase(),m=[l(a.heading??""),l(a.content??""),...[...a.sources??[]].map(l).filter(Boolean).sort()].join(`
1
+ import{r as c,j as e}from"./vendor-react-SZ_qB27O.js";import{ab as Q,ac as ue,ad as he,cy as me,cN as Se,ah as ce,cO as _e,b5 as je,cP as Y,aK as we,cQ as ke,cR as Ne,cS as Ce,cT as Ee,cU as Ae,cV as Te,cW as Pe,cC as Le,cX as Fe,cY as Ie,cZ as Me,c_ as De,aL as He,a1 as qe,V as Ue,au as pe,L as Oe,av as Ve}from"./index-BN0mudGK.js";import{u as fe}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";const $e="builtin",X={pageFetch:!0,github:!1,localDocs:!0,llmSynthesis:!0};function ie(a){const n=a?.researchGlobalDefaults,l=a?.researchSettings;return{enabled:l?.enabled??a?.researchEnabled??a?.researchGlobalEnabled??!0,searchProvider:l?.searchProvider??n?.searchProvider??a?.researchGlobalWebSearchProvider??$e,synthesisProvider:l?.synthesisProvider??n?.synthesisProvider,synthesisModelId:l?.synthesisModelId??n?.synthesisModelId,enabledSources:{webSearch:!0,pageFetch:l?.enabledSources?.pageFetch??n?.enabledSources?.pageFetch??X.pageFetch,github:l?.enabledSources?.github??n?.enabledSources?.github??X.github,localDocs:l?.enabledSources?.localDocs??n?.enabledSources?.localDocs??X.localDocs,llmSynthesis:l?.enabledSources?.llmSynthesis??n?.enabledSources?.llmSynthesis??X.llmSynthesis},limits:{maxConcurrentRuns:l?.limits?.maxConcurrentRuns??a?.researchMaxConcurrentRuns??a?.researchGlobalMaxConcurrentRuns??3,maxSourcesPerRun:l?.limits?.maxSourcesPerRun??n?.maxSourcesPerRun??a?.researchMaxSourcesPerRun??a?.researchGlobalMaxSourcesPerRun??20,maxDurationMs:l?.limits?.maxDurationMs??a?.researchDefaultTimeout??a?.researchGlobalDefaultTimeout??3e5,requestTimeoutMs:l?.limits?.requestTimeoutMs??a?.researchGlobalFetchTimeoutMs??3e4},defaultExportFormat:n?.defaultExportFormat??"markdown"}}function be(a){const n=typeof a.id=="string"?a.id.trim():"";if(n)return n;const l=f=>f.trim().replace(/\s+/g," ").toLowerCase(),m=[l(a.heading??""),l(a.content??""),...[...a.sources??[]].map(l).filter(Boolean).sort()].join(`
2
2
  `);let s=2166136261;for(let f=0;f<m.length;f+=1)s^=m.charCodeAt(f),s=Math.imul(s,16777619);return`finding-${(s>>>0).toString(16).padStart(8,"0")}`}const Ge=300,Be=4e3,We=["queued","running","cancelling","retry_waiting"];function le(a,n){if(a instanceof Le){const l=a;return{message:a.message,status:a.status,code:l.researchCode??"INTERNAL_ERROR",setupHint:l.setupHint,retryable:l.retryable}}return a instanceof Error?{message:a.message,code:"INTERNAL_ERROR"}:{message:n,code:"INTERNAL_ERROR"}}function ze(a){if(!a)return{cancelable:!1,retryable:!1,isTransitioning:!1,blockingReason:"No run selected"};const n=We.includes(a.status),l=a.status==="queued"||a.status==="running",m=a.lifecycle?.retryable,s=a.status==="failed"||a.status==="timed_out",f=!!(s&&m);let x;return!l&&n?x="Run is already transitioning":!l&&a.status==="completed"?x="Completed runs cannot be cancelled":!l&&a.status==="cancelled"?x="Run is already cancelled":!l&&a.status==="retry_exhausted"?x="Retry attempts exhausted":!l&&a.status==="failed"?x="Failed runs cannot be cancelled":!l&&a.status==="timed_out"&&(x="Timed out runs cannot be cancelled"),!f&&s&&m===!1&&(x=a.lifecycle?.errorCode==="RETRY_EXHAUSTED"?"Retry attempts exhausted":"Run is not retryable"),{cancelable:l,retryable:f,isTransitioning:n,blockingReason:x}}function Ke(a){const n=a?.projectId,l=n??"",m=`${he.RESEARCH_RUNS_PREFIX}${l}`,s=`${he.RESEARCH_SELECTED_ID_PREFIX}${l}`,f=Q(m,{maxAgeMs:ue}),x=Q(s,{maxAgeMs:me}),r=c.useRef(Array.isArray(f)&&f.length>0),[D,M]=c.useState(()=>Array.isArray(f)?f:[]),[h,A]=c.useState(x??null),[P,w]=c.useState(null),[O,H]=c.useState({available:!0}),[V,L]=c.useState(!(Array.isArray(f)&&f.length>0)),[G,q]=c.useState(null),[B,k]=c.useState(null),[N,F]=c.useState(""),_=c.useRef(0),R=c.useRef(0),C=c.useRef(n);c.useEffect(()=>{C.current!==n&&(C.current=n,R.current++);const o=Q(m,{maxAgeMs:ue}),d=Q(s,{maxAgeMs:me}),p=Array.isArray(o)&&o.length>0;M(Array.isArray(o)?o:[]),A(d??null),w(null),L(!p),r.current=p},[n,m,s]);const S=c.useCallback(async(o=N)=>{const d=++_.current,p=n;r.current||L(!0),q(null),k(null);try{const y=await Se({q:o||void 0,limit:100},p);if(d!==_.current||p!==n)return;M(y.runs),ce(m,y.runs,{maxBytes:5e5}),r.current=!0,H(y.availability),h&&!y.runs.some(g=>g.id===h)&&(A(null),ce(s,null,{maxBytes:5e5}),w(null))}catch(y){if(d!==_.current||p!==n)return;const g=le(y,"Failed to load research runs");q(g.message),k(g)}finally{d===_.current&&L(!1)}},[n,m,N,s,h]),i=c.useCallback(async o=>{const d=await _e(o,n);return w(d.run),H(d.availability),d.run},[n]);c.useEffect(()=>{r.current||L(!0);const o=window.setTimeout(()=>{S(N)},Ge);return()=>window.clearTimeout(o)},[S,N]),c.useEffect(()=>{if(!h){w(null);return}i(h)},[i,h]),c.useEffect(()=>{const o=R.current,d=()=>R.current!==o,p=n?`?projectId=${encodeURIComponent(n)}`:"";let y=!0;const g=()=>{!y||d()||(S(),h&&i(h))},j=`/api/events${p}`,$=je(j,{events:{"research:run:created":g,"research:run:updated":g,"research:run:completed":g,"research:run:failed":g,"research:run:cancelled":g},onReconnect:()=>{Y({view:"useResearch",trigger:"sse-reconnect",projectId:n,replayAttempted:!1,sseChannel:j}),g()}});return Y({view:"useResearch",trigger:"sse-open",projectId:n,replayAttempted:!1,sseChannel:j}),()=>{y=!1,$()}},[n,S,h,i]);const E=c.useCallback(()=>{S(),h&&i(h)},[S,h,i]);we(E,Be);const T=c.useCallback(o=>{A(o),ce(s,o,{maxBytes:5e5})},[s]);return{runs:D,selectedRun:P,selectedRunId:h,setSelectedRunId:T,availability:O,loading:V,error:G,searchQuery:N,setSearchQuery:F,refresh:S,createRun:o=>Pe(o,n),cancelRun:async o=>{try{k(null);const d=await Te(o,n);return h===o&&w(d.run),await S(),d}catch(d){const p=le(d,"Failed to cancel run");throw k(p),p}},retryRun:async o=>{try{k(null);const d=await Ae(o,n);return h===o&&w(d.run),await S(),d}catch(d){const p=le(d,"Failed to retry run");throw k(p),p}},exportRun:(o,d)=>Ee(o,d,n),createTaskFromRun:(o,d,p,y,g,j)=>Ce(o,{title:d,findingId:p,description:y,priority:g,attachExport:j},n),attachRunToTask:(o,d,p,y)=>Ne(o,{taskId:d,findingId:p,attachExport:y},n),promoteFinding:(o,d)=>ke(o,d,n),uiError:B,runActionState:ze(P),statusCounts:D.reduce((o,d)=>(o[d.status]+=1,o),{queued:0,running:0,cancelling:0,retry_waiting:0,completed:0,failed:0,cancelled:0,timed_out:0,retry_exhausted:0})}}function Qe({open:a,mode:n,run:l,finding:m,projectId:s,onClose:f,onConfirm:x}){const{t:r}=fe("app");Fe(a);const[D,M]=c.useState(!1),[h,A]=c.useState(""),[P,w]=c.useState(""),[O,H]=c.useState("normal"),[V,L]=c.useState(""),[G,q]=c.useState([]),[B,k]=c.useState(!1),[N,F]=c.useState(!1),{boardWorkflows:_}=Ie({projectId:s}),R=c.useMemo(()=>{const i=new Map;for(const E of _?.workflows??[])for(const T of E.columns)i.has(T.id)||i.set(T.id,T.flags);return E=>Me(i.get(E),E)},[_]),C=c.useMemo(()=>{const i=(m.content??"").split(/(?<=[.!?])\s+/)[0]??"";return`${m.heading||r("research.defaultFindingHeading","Research finding")} — ${i}`.trim()},[m.content,m.heading,r]);c.useEffect(()=>{a&&(M(!1),A(`Research: ${m.heading||l.title}`),w(C),H("normal"),L(""))},[a,n,m.heading,C,l.title]),c.useEffect(()=>{if(!a||n!=="enrich")return;let i=!1;return q([]),k(!0),De(50,0,s).then(E=>{i||q(E.filter(T=>!R(T.column)))}).finally(()=>{i||k(!1)}),()=>{i=!0}},[a,n,s,R]);const S=V.trim();return a?e.jsx("div",{className:"modal-overlay open",role:"presentation",onClick:f,children:e.jsxs("div",{className:"modal modal-lg research-task-action-modal",role:"dialog","aria-modal":"true",onClick:i=>i.stopPropagation(),children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h3",{children:n==="create"?r("research.createTaskTitle","Create task from finding"):r("research.enrichTaskTitle","Enrich existing task")}),e.jsx("button",{className:"modal-close",type:"button","aria-label":r("actions.close","Close"),onClick:f,children:"×"})]}),e.jsxs("div",{className:"research-task-action-modal__body",children:[e.jsxs("div",{className:"card research-task-action-modal__preview",children:[e.jsxs("p",{children:[e.jsxs("strong",{children:[r("research.runLabel","Run:")," "]})," ",l.id]}),e.jsxs("p",{children:[e.jsxs("strong",{children:[r("research.findingLabel","Finding:")," "]})," ",m.id,m.heading?` — ${m.heading}`:""]}),e.jsx("p",{children:C||r("research.noPreview","No preview available.")})]}),n==="create"?e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"research-task-action-modal__field",children:[r("research.titleLabel","Title"),e.jsx("input",{className:"input",value:h,onChange:i=>A(i.target.value)})]}),e.jsxs("label",{className:"research-task-action-modal__field",children:[r("research.descriptionLabel","Description"),e.jsx("textarea",{className:"input research-task-action-modal__textarea",value:P,onChange:i=>w(i.target.value)})]}),e.jsxs("label",{className:"research-task-action-modal__field",children:[r("research.priorityLabel","Priority"),e.jsxs("select",{className:"select",value:O,onChange:i=>H(i.target.value),children:[e.jsx("option",{value:"low",children:r("research.priorityLow","Low")}),e.jsx("option",{value:"normal",children:r("research.priorityNormal","Normal")}),e.jsx("option",{value:"high",children:r("research.priorityHigh","High")}),e.jsx("option",{value:"urgent",children:r("research.priorityUrgent","Urgent")})]})]})]}):e.jsxs("label",{className:"research-task-action-modal__field",children:[r("research.targetTaskLabel","Target task"),e.jsx("input",{className:"input",list:"research-task-action-task-list",value:V,placeholder:B?r("research.loadingTasks","Loading tasks…"):r("research.enterTaskId","Enter task ID"),onChange:i=>L(i.target.value)}),e.jsx("datalist",{id:"research-task-action-task-list",children:G.map(i=>e.jsx("option",{value:i.id,children:i.title},i.id))})]}),e.jsxs("label",{className:"checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:D,onChange:i=>M(i.target.checked)}),e.jsx("span",{children:r("research.attachExport","Attach markdown export artifact")})]})]}),e.jsxs("div",{className:"modal-actions",children:[e.jsx("button",{className:"btn",type:"button",onClick:f,children:r("actions.cancel","Cancel")}),e.jsx("button",{className:"btn btn-primary",type:"button",disabled:N||n==="enrich"&&!S,onClick:()=>{F(!0),x({taskId:n==="enrich"?S:void 0,title:n==="create"?h.trim():void 0,description:n==="create"?P.trim():void 0,priority:n==="create"?O:void 0,attachExport:D}).finally(()=>F(!1))},children:n==="create"?r("research.createTaskButton","Create Task"):r("research.enrichTaskButton","Enrich Task")})]})]})}):null}const Xe=["web-search","page-fetch","github","local-docs","llm-synthesis"],Ye={"web-search":"webSearch","page-fetch":"pageFetch",github:"github","local-docs":"localDocs","llm-synthesis":"llmSynthesis"};function Je(a){return{"web-search":a("research.providerWebSearch","Web Search"),"page-fetch":a("research.providerPageFetch","Page Fetch"),github:a("research.providerGitHub","GitHub"),"local-docs":a("research.providerLocalDocs","Local Docs"),"llm-synthesis":a("research.providerLlmSynthesis","LLM Synthesis")}}let oe=!1;function cs({projectId:a,addToast:n,onOpenSettings:l,readinessVersion:m=0}){const{t:s}=fe("app"),f=Je(s);c.useEffect(()=>(Y({view:"ResearchView",trigger:oe?"route-active":"remount",projectId:a,replayAttempted:!1}),oe=!1,()=>{oe=!0,Y({view:"ResearchView",trigger:"route-inactive",projectId:a,replayAttempted:!1})}),[a]);const{runs:x,selectedRun:r,selectedRunId:D,setSelectedRunId:M,availability:h,loading:A,error:P,searchQuery:w,setSearchQuery:O,createRun:H,cancelRun:V,retryRun:L,exportRun:G,createTaskFromRun:q,attachRunToTask:B,promoteFinding:k,statusCounts:N,refresh:F,uiError:_,runActionState:R}=Ke({projectId:a}),[C,S]=c.useState(""),[i,E]=c.useState(()=>ie(void 0)),[T,o]=c.useState([]),[d,p]=c.useState(!1),[y,g]=c.useState([]),[j,$]=c.useState(null),[U,K]=c.useState(null),[J,ve]=c.useState(""),Z=h.supportedProviders??Xe,ee=i.searchProvider,se=t=>t==="web-search"?!0:i.enabledSources[Ye[t]];c.useEffect(()=>{const t=Z.filter(u=>se(u));g(u=>{const b=u.filter(v=>t.includes(v));return b.length>0?b:t})},[i.enabledSources,Z]),c.useEffect(()=>{let t=!1;return Promise.all([He(a),qe().catch(()=>({providers:[]}))]).then(([u,b])=>{t||(E(ie(u)),o(b.providers.filter(v=>v.type==="api_key").map(v=>({id:v.id,authenticated:v.authenticated}))))}).catch(()=>{t||E(ie(void 0))}),()=>{t=!0}},[a,m]);const xe=c.useMemo(()=>r?r.status:s("research.noRunSelected","No run selected"),[r,s]),ye=c.useMemo(()=>r?r.status==="queued"||r.status==="retry_waiting"?"status-dot status-dot--pending":r.status==="running"?"status-dot status-dot--connecting":r.status==="completed"?"status-dot status-dot--online":r.status==="failed"||r.status==="cancelled"?"status-dot status-dot--error":"status-dot":"status-dot",[r]),re=h.supportedExportFormats??["markdown","json","html"],te=c.useMemo(()=>new Map(T.map(t=>[t.id,t.authenticated])),[T]),ae=c.useMemo(()=>{const t=new Set;return i.enabledSources.webSearch&&ee&&t.add(ee),i.enabledSources.llmSynthesis&&i.synthesisProvider&&t.add(i.synthesisProvider),[...t].filter(u=>te.has(u))},[i.enabledSources.llmSynthesis,i.enabledSources.webSearch,i.synthesisProvider,ee,te]).find(t=>te.get(t)!==!0),W=c.useMemo(()=>h.available?i.enabled?ae?{reason:s("research.missingApiKey","Missing API key for {{provider}}.",{provider:ae}),details:s("research.addCredentialsHint","Add provider credentials in Authentication settings."),settingsSection:"authentication"}:null:{reason:s("research.disabled","Research is disabled for this project."),details:s("research.enableResearchHint","Enable project research settings to create runs."),settingsSection:"research-project"}:{reason:h.reason??s("research.unavailable","Research is unavailable for this project."),details:h.setupInstructions,settingsSection:"research-project"},[h.available,h.reason,h.setupInstructions,i.enabled,ae,s]),z=async(t,u,b)=>{$(t);try{await u(),n?.(b,"success"),await F()}catch(v){n?.(v instanceof Error?v.message:s("research.actionFailed","Action failed"),"error")}finally{$(null)}},ne=async t=>{if(r){$(`export-${t}`);try{const u=await G(r.id,t),b=new Blob([u.content],{type:"text/plain;charset=utf-8"}),v=URL.createObjectURL(b),I=document.createElement("a");I.href=v,I.download=u.filename,document.body.appendChild(I),I.click(),I.remove(),URL.revokeObjectURL(v),n?.(s("research.exportedFile","Exported {{filename}}",{filename:u.filename}),"success")}catch(u){n?.(u instanceof Error?u.message:s("research.exportFailed","Export failed"),"error")}finally{$(null)}}},ge=async()=>{if(C.trim()){p(!0);try{const t=y.filter(b=>se(b));if(t.length===0){p(!1),n?.(s("research.noSourcesAvailable","No enabled research sources are available for this project."),"error");return}const u=await H({query:C.trim(),providers:t});M(u.run.id),S(""),n?.(s("research.runCreated","Research run created"),"success"),await F()}catch(t){n?.(t instanceof Error?t.message:s("research.createRunFailed","Failed to create run"),"error")}finally{p(!1)}}};return e.jsxs("section",{className:"research-view","aria-label":s("research.viewLabel","Research view"),children:[e.jsx(Ue,{icon:pe,title:s("research.title","Research"),actions:e.jsx("button",{className:"btn",type:"button",onClick:()=>void F(),children:s("actions.refresh","Refresh")})}),e.jsx("p",{className:"research-view__subtitle",children:s("research.subtitle","Cited search and synthesis runs: gather sources, fetch content, and synthesize findings.")}),W?e.jsxs("div",{className:"research-view__state research-view__state--error card","data-testid":"research-state-unavailable",children:[e.jsx("p",{children:W.reason}),W.details&&e.jsx("p",{children:W.details}),e.jsx("p",{children:s("research.currentDefaults","Current defaults: provider {{provider}}, max sources {{maxSources}}",{provider:i.searchProvider??s("research.notSet","(not set)"),maxSources:i.limits.maxSourcesPerRun})}),e.jsxs("div",{className:"research-view__actions",children:[e.jsx("button",{className:"btn",type:"button",onClick:()=>void F(),children:s("actions.refresh","Refresh")}),e.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>l?.(W.settingsSection),children:s("actions.openSettings","Open Settings")})]})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"research-view__layout",children:[e.jsx("aside",{className:"research-view__sidebar card",children:e.jsxs("div",{className:"research-view__sidebar-content",children:[e.jsxs("div",{className:"research-view__form",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"research-query",children:s("research.queryLabel","Query")}),e.jsx("textarea",{id:"research-query",className:"input research-view__textarea",value:C,onChange:t=>S(t.target.value)})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:s("research.providersLabel","Providers")}),e.jsx("div",{className:"research-view__providers",children:Z.map(t=>{const u=se(t),b=t==="web-search";return e.jsxs("label",{className:"checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:b||y.includes(t),disabled:b||!u,onChange:()=>{b||!u||g(v=>v.includes(t)?v.filter(I=>I!==t):[...v,t])}}),e.jsxs("span",{children:[f[t]??t,b?e.jsx("span",{className:"research-view__provider-lock",children:s("research.alwaysOn","Always on")}):null]})]},t)})})]}),e.jsxs("button",{className:"btn btn-primary",type:"button",disabled:!C.trim()||d,onClick:()=>void ge(),children:[d?e.jsx(Oe,{className:"animate-spin",size:14}):null,s("research.createRun","Create Run")]})]}),e.jsxs("div",{className:"research-view__history-header form-group",children:[e.jsx("label",{htmlFor:"research-run-search",children:s("actions.search","Search")}),e.jsxs("div",{className:"research-view__history-search-row",children:[e.jsx(pe,{size:14}),e.jsx("input",{id:"research-run-search",className:"input",placeholder:s("research.searchRunsPlaceholder","Search runs"),value:w,onChange:t=>O(t.target.value)})]})]}),e.jsx("div",{className:"research-view__history","data-testid":"research-state-running",children:x.map(t=>e.jsxs("button",{type:"button",className:`research-view__history-item card${D===t.id?" research-view__history-item--active":""}`,onClick:()=>M(t.id),children:[e.jsx("span",{className:"card-id",children:t.id}),e.jsx("span",{children:t.title})]},t.id))})]})}),e.jsxs("div",{className:"research-view__reader card",children:[A&&e.jsx("p",{"data-testid":"research-state-loading",children:e.jsx(Ve,{label:s("research.loadingRuns","Loading research runs…")})}),!A&&P&&e.jsx("p",{"data-testid":"research-state-error",children:P}),!A&&!P&&x.length===0&&e.jsx("p",{"data-testid":"research-state-empty",children:s("research.noRunsYet","No research runs yet")}),e.jsxs("div",{className:"research-view__reader-content",children:[r&&e.jsxs("div",{className:"research-view__run-detail",children:[e.jsxs("div",{className:"research-view__status-row",children:[e.jsx("span",{className:ye}),e.jsx("strong",{children:xe})]}),e.jsx("h3",{className:"research-view__run-title",children:r.title}),e.jsx("p",{className:"research-view__run-query",children:r.query}),e.jsx("p",{className:"research-view__run-summary","data-testid":"research-state-results",children:r.results?.summary??s("research.noSummaryYet","No summary yet.")}),e.jsxs("div",{className:"research-view__actions",children:[e.jsx("button",{className:"btn",type:"button",title:R.cancelable?void 0:R.blockingReason,disabled:j==="cancel"||j==="retry"||!R.cancelable,onClick:()=>void z("cancel",()=>V(r.id),s("research.runCancelled","Run cancelled")),children:s("actions.cancel","Cancel")}),e.jsx("button",{className:"btn",type:"button",title:R.retryable?void 0:R.blockingReason,disabled:j==="cancel"||j==="retry"||!R.retryable,onClick:()=>void z("retry",()=>L(r.id),s("research.runRetried","Run retried")),children:s("actions.retry","Retry")}),re.includes("markdown")&&e.jsx("button",{className:"btn",type:"button",disabled:j==="export-markdown",onClick:()=>void ne("markdown"),children:s("research.exportMd","Export MD")}),re.includes("json")&&e.jsx("button",{className:"btn",type:"button",disabled:j==="export-json",onClick:()=>void ne("json"),children:s("research.exportJson","Export JSON")}),re.includes("html")&&e.jsx("button",{className:"btn",type:"button",disabled:j==="export-html",onClick:()=>void ne("html"),children:s("research.exportHtml","Export HTML")})]}),r.error&&e.jsx("p",{className:"research-view__error",children:r.error}),_&&e.jsxs("div",{className:"form-error",role:"alert",children:[e.jsx("p",{children:_.message}),_.setupHint&&e.jsx("p",{children:_.setupHint}),_.code==="MISSING_CREDENTIALS"&&e.jsx("button",{className:"btn btn-sm",type:"button",onClick:()=>l?.("authentication"),children:s("research.openAuthSettings","Open Authentication Settings")}),_.code==="FEATURE_DISABLED"&&e.jsx("button",{className:"btn btn-sm",type:"button",onClick:()=>l?.("research-project"),children:s("research.openResearchSettings","Open Research Settings")})]}),R.blockingReason&&e.jsx("p",{className:"research-view__run-query",children:R.blockingReason}),Array.isArray(r.results?.findings)&&r.results.findings.length>0&&e.jsx("div",{className:"research-view__findings",children:r.results.findings.map(t=>{const u=be(t);return e.jsxs("article",{className:"research-view__finding card",children:[e.jsx("h4",{children:t.heading}),e.jsx("p",{children:t.content}),e.jsxs("div",{className:"research-view__actions research-view__finding-actions",children:[e.jsx("button",{className:"btn btn-primary btn-sm",type:"button",onClick:()=>K({mode:"create",findingId:u}),children:s("research.createTask","Create Task")}),e.jsx("button",{className:"btn btn-sm",type:"button",onClick:()=>K({mode:"enrich",findingId:u}),children:s("research.enrichTask","Enrich Task")}),e.jsx("input",{className:"input","aria-label":s("research.destinationSlice","Destination slice ID"),value:J,onChange:b=>ve(b.target.value),placeholder:s("research.destinationSlice","Destination slice ID")}),e.jsx("button",{className:"btn btn-sm",type:"button",disabled:r.status!=="completed"||!J.trim()||j===`promote-${u}`,onClick:()=>void z(`promote-${u}`,()=>k(r.id,{findingId:u,sliceId:J.trim()}),s("research.findingPromoted","Finding promoted to roadmap")),children:s("research.promoteFinding","Promote to roadmap")})]})]},u)})}),Array.isArray(r.results?.citations)&&r.results.citations.length>0&&e.jsx("ul",{className:"research-view__citations",children:r.results.citations.map(t=>e.jsx("li",{children:e.jsx("a",{href:t,target:"_blank",rel:"noreferrer",children:t})},t))}),r.events.length>0&&e.jsxs("details",{children:[e.jsx("summary",{children:s("research.runHistory","Run history")}),e.jsx("ul",{className:"research-view__events",children:r.events.map(t=>e.jsx("li",{children:t.message},t.id))})]})]}),!r&&x.length>0&&e.jsx("p",{children:s("research.selectRunToViewDetails","Select a run to view details.")}),e.jsxs("div",{className:"research-view__stats",children:[e.jsxs("div",{className:"research-view__stat-card",children:[e.jsx("div",{className:"research-view__stat-label",children:s("research.statRunning","Running")}),e.jsx("div",{className:"research-view__stat-value",children:N.running})]}),e.jsxs("div",{className:"research-view__stat-card",children:[e.jsx("div",{className:"research-view__stat-label",children:s("research.statCompleted","Completed")}),e.jsx("div",{className:"research-view__stat-value",children:N.completed})]}),e.jsxs("div",{className:"research-view__stat-card",children:[e.jsx("div",{className:"research-view__stat-label",children:s("research.statFailed","Failed")}),e.jsx("div",{className:"research-view__stat-value",children:N.failed})]})]})]})]})]})}),r&&U&&(()=>{const t=r.results?.findings?.findIndex(b=>be(b)===U.findingId)??-1,u=t>=0?r.results.findings[t]:null;return u?e.jsx(Qe,{open:!0,mode:U.mode,run:r,finding:{id:U.findingId,heading:u.heading,content:u.content},projectId:a,onClose:()=>K(null),onConfirm:async({taskId:b,title:v,description:I,priority:Re,attachExport:de})=>{U.mode==="create"?await z("create-task",()=>q(r.id,v,U.findingId,I,Re,de),s("research.taskCreatedFromResearch","Task created from research")):b&&await z("attach-task",()=>B(r.id,b,U.findingId,de),s("research.taskEnrichedFromResearch","Task enriched from research")),K(null)}}):null})()]})}export{cs as ResearchView};
@@ -1 +1 @@
1
- import{r as t,j as e}from"./vendor-react-SZ_qB27O.js";import{w as A,V as we,o as ke,R as ce,P as Re,E as ne,p as le,q as Le,u as Te,v as Ae,x as Me,C as qe,g as De,y as Ve}from"./index-BjM7LxzY.js";import{u as Ke}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";const Oe="__sync_passphrase__",Y={key:"",value:"",description:"",scope:"project",accessPolicy:"prompt",envExportable:!1,envExportKey:""},d={className:"secrets-action-icon","aria-hidden":!0,style:{width:"1em",height:"1em"}},Fe={...d,className:"secrets-action-icon spin"},Ye=({addToast:p,projectId:l})=>{const{t:a}=Ke("app"),[z,G]=t.useState([]),[oe,U]=t.useState(),[Q,W]=t.useState(!0),[X,M]=t.useState(null),[ie,q]=t.useState(),[Z,b]=t.useState(null),[h,D]=t.useState(null),[de,x]=t.useState(!1),[ue,C]=t.useState(null),[c,i]=t.useState(Y),[V,E]=t.useState(!1),[ee,f]=t.useState({}),[pe,K]=t.useState(null),[m,se]=t.useState(!1),[he,ae]=t.useState(),[me,O]=t.useState(!1),[w,F]=t.useState(""),[_,B]=t.useState(""),[ye,$]=t.useState(!1),[H,xe]=t.useState(!1),v=t.useRef(new Map),I=t.useRef(new Map),j=t.useRef(0),k=t.useRef(0),o=t.useRef(l);o.current!==l&&(o.current=l,j.current+=1,k.current+=1);const y=t.useCallback(s=>A(s,l),[l]),u=t.useCallback(async(s,r)=>{const n=await fetch(s,{...r,headers:{"Content-Type":"application/json",...r?.headers??{}}});if(!n.ok){const g=await n.json().catch(()=>({error:"Request failed"}));throw new Error(String(g?.error??"Request failed"))}if(n.status!==204)return n.json()},[]),S=t.useCallback(async()=>{const s=l;if(o.current!==s)return;const r=++j.current;W(!0),M(null),q(void 0);try{const n=await u(y("/api/secrets"));r===j.current&&o.current===s&&(G(n.secrets),U(s))}catch(n){r===j.current&&o.current===s&&(M(n instanceof Error?n.message:String(n)),q(s))}finally{r===j.current&&o.current===s&&W(!1)}},[l,y,u]),R=t.useCallback(async()=>{const s=l;if(o.current!==s)return;const r=++k.current;try{const n=await u(y("/api/secrets/sync-passphrase"));r===k.current&&o.current===s&&(se(!!n.configured),ae(s))}catch(n){r===k.current&&o.current===s&&p?.(a("secrets.errorLoadSyncStatus","Failed to load sync passphrase status: {{error}}",{error:n instanceof Error?n.message:String(n)}),"error")}},[p,l,y,u,a]);t.useEffect(()=>(G([]),U(void 0),f({}),K(null),se(!1),ae(void 0),M(null),q(void 0),b(null),D(null),x(!1),E(!1),C(null),O(!1),F(""),B(""),$(!1),S(),R(),()=>{v.current.forEach(s=>clearTimeout(s)),I.current.forEach(s=>clearTimeout(s))}),[S,R,l]);const J=()=>{O(!1),F(""),B("")},ve=async(s,r)=>{await u(A("/api/secrets/sync-passphrase",r),{method:"PUT",body:JSON.stringify({passphrase:s})})},be=async()=>{const s=l;$(!0);try{if(await ve(w,s),o.current!==s)return;p?.(m?a("secrets.syncPassphraseRotated","Sync passphrase rotated"):a("secrets.syncPassphraseSet","Sync passphrase set"),"success"),J(),await R()}catch(r){o.current===s&&p?.(a("secrets.errorSaveSyncPassphrase","Failed to save sync passphrase: {{error}}",{error:r instanceof Error?r.message:String(r)}),"error")}finally{o.current===s&&$(!1)}},fe=async()=>{if(!window.confirm(a("secrets.confirmClearSyncPassphrase","Clear the cross-node sync passphrase? Existing sync pairs will stop working until you set a new passphrase.")))return;const r=l;try{if(await u(A("/api/secrets/sync-passphrase",r),{method:"DELETE"}),o.current!==r)return;p?.(a("secrets.syncPassphraseCleared","Sync passphrase cleared"),"success"),await R()}catch(n){o.current===r&&p?.(a("secrets.errorClearSyncPassphrase","Failed to clear sync passphrase: {{error}}",{error:n instanceof Error?n.message:String(n)}),"error")}},je=()=>{D(null),i(Y),x(!0),E(!1),b(null)},Se=s=>{D(s),i({key:s.key,value:"",description:s.description??"",scope:s.scope,accessPolicy:s.accessPolicy,envExportable:s.envExportable,envExportKey:s.envExportKey??""}),x(!0),E(!1),b(null)},ge=async()=>{const s=l;b(null);try{if(h){const r={key:c.key,description:c.description||null,accessPolicy:c.accessPolicy,envExportable:c.envExportable,envExportKey:c.envExportable&&c.envExportKey||null};c.value&&(r.value=c.value),await u(y(`/api/secrets/${h.scope}/${h.id}`),{method:"PATCH",body:JSON.stringify(r)})}else await u(y("/api/secrets"),{method:"POST",body:JSON.stringify({scope:c.scope,key:c.key,value:c.value,description:c.description||null,accessPolicy:c.accessPolicy,envExportable:c.envExportable,envExportKey:c.envExportable&&c.envExportKey||null})});if(o.current!==s)return;x(!1),i(Y),await S()}catch(r){o.current===s&&b(r instanceof Error?r.message:String(r))}},Ne=s=>{const r=v.current.get(s.id);r&&(clearTimeout(r),v.current.delete(s.id)),f(n=>({...n,[s.id]:null}))},Pe=async s=>{const r=l,n=await u(y(`/api/secrets/${s.scope}/${s.id}/reveal`),{method:"POST"});if(o.current!==r)return;f(P=>({...P,[s.id]:n.value})),p?.(a("secrets.revealed","Revealed"),"success");const g=setTimeout(()=>{f(P=>({...P,[s.id]:null})),v.current.delete(s.id)},3e4),N=v.current.get(s.id);N&&clearTimeout(N),v.current.set(s.id,g)},Ce=async s=>{const r=ee[s.id];if(!r)return;if(!await Ve(r)){p?.(a("secrets.copyFailed","Failed to copy secret"),"error");return}K(s.id),p?.(a("secrets.copied","Copied"),"success");const g=setTimeout(()=>{K(null),f(P=>({...P,[s.id]:null}))},1500),N=I.current.get(s.id);N&&clearTimeout(N),I.current.set(s.id,g)},Ee=async s=>{const r=l;await u(A(`/api/secrets/${s.scope}/${s.id}`,r),{method:"DELETE"}),o.current===r&&(C(null),await S())},L=oe===l,T=he===l,re=t.useMemo(()=>[...L?z:[]].filter(s=>!(s.scope==="global"&&s.key===Oe)).sort((s,r)=>s.key.localeCompare(r.key)),[z,L]),te=w.length>0&&w===_;return e.jsxs("section",{className:"secrets-view",children:[e.jsx(we,{icon:ke,title:a("secrets.title","Secrets"),actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"btn btn-sm",onClick:()=>void S(),children:[e.jsx(ce,{...d})," ",a("secrets.refresh","Refresh")]}),e.jsxs("button",{className:"btn btn-primary btn-sm",onClick:je,children:[e.jsx(Re,{...d})," ",a("secrets.addSecret","Add Secret")]})]})}),X&&ie===l?e.jsx("div",{className:"form-error",children:X}):null,Q||!L?e.jsxs("div",{className:"secrets-loading",children:[e.jsx(ce,{...Fe})," ",a("secrets.loading","Loading…")]}):null,!Q&&L&&re.length===0?e.jsx("div",{className:"secrets-empty",children:a("secrets.empty","No secrets found.")}):null,e.jsx("div",{className:"secrets-list",children:re.map(s=>{const r=ee[s.id];return e.jsxs("article",{className:"card secrets-row",children:[e.jsxs("div",{className:"secrets-row-main",children:[e.jsx("div",{className:"secrets-row-key",children:s.key}),e.jsxs("div",{className:"secrets-row-meta",children:[e.jsx("span",{className:"secrets-chip",children:s.scope}),e.jsx("span",{className:"secrets-chip",children:s.accessPolicy}),s.envExportable?e.jsx("span",{className:"secrets-chip",children:a("secrets.envExportableChip","env exportable")}):null]}),r?e.jsx("pre",{className:"secrets-revealed",children:r}):null]}),e.jsxs("div",{className:"secrets-row-side",children:[e.jsx("span",{className:"secrets-row-read",children:s.lastReadAt?new Date(s.lastReadAt).toLocaleString():a("secrets.neverRead","Never read")}),e.jsxs("div",{className:"secrets-row-actions",children:[e.jsx("button",{type:"button",className:"btn btn-icon secrets-visibility-toggle",onClick:()=>{if(r){Ne(s);return}Pe(s)},"aria-label":r?a("secrets.hideAriaLabel","Hide"):a("secrets.revealAriaLabel","Reveal"),children:r?e.jsx(ne,{...d}):e.jsx(le,{...d})}),e.jsx("button",{className:"btn btn-icon",onClick:()=>void Ce(s),"aria-label":a("secrets.copyAriaLabel","Copy"),disabled:!r,children:pe===s.id?e.jsx(Le,{...d}):e.jsx(Te,{...d})}),e.jsx("button",{className:"btn btn-icon",onClick:()=>Se(s),"aria-label":a("secrets.editAriaLabel","Edit"),children:e.jsx(Ae,{...d})}),e.jsx("button",{className:"btn btn-icon btn-danger",onClick:()=>C(s.id),"aria-label":a("secrets.deleteAriaLabel","Delete"),children:e.jsx(Me,{...d})})]}),ue===s.id?e.jsxs("div",{className:"secrets-confirm",children:[e.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>void Ee(s),children:a("secrets.confirmDelete","Confirm")}),e.jsx("button",{className:"btn btn-sm",onClick:()=>C(null),children:a("secrets.cancelDelete","Cancel")})]}):null]})]},s.id)})}),e.jsxs("article",{className:"card secrets-sync-card secrets-sync-disclosure",children:[e.jsxs("button",{type:"button",className:"secrets-sync-disclosure-toggle","data-testid":"secrets-passphrase-disclosure","aria-expanded":H,"aria-controls":"secrets-sync-disclosure-panel",onClick:()=>xe(s=>!s),children:[H?e.jsx(qe,{size:16,"aria-hidden":"true"}):e.jsx(De,{size:16,"aria-hidden":"true"}),e.jsx("span",{children:a("secrets.syncPassphraseTitle","Cross-Node Sync Passphrase")})]}),H?e.jsxs("div",{id:"secrets-sync-disclosure-panel",className:"secrets-sync-disclosure-panel",children:[e.jsxs("div",{className:"secrets-sync-header",children:[e.jsxs("p",{className:"secrets-sync-status",children:[e.jsx("span",{className:`status-dot ${T&&m?"status-dot--online":"status-dot--pending"}`,"aria-hidden":"true"})," ",T&&m?a("secrets.syncConfigured","Configured"):a("secrets.syncNotConfigured","Not configured")]}),e.jsxs("div",{className:"secrets-sync-actions",children:[e.jsx("button",{className:"btn",onClick:()=>O(!0),children:T&&m?a("secrets.rotateSyncPassphrase","Rotate"):a("secrets.setPassphrase","Set passphrase")}),T&&m?e.jsx("button",{className:"btn btn-danger",onClick:()=>void fe(),children:a("secrets.clearSyncPassphrase","Clear")}):null]})]}),e.jsx("p",{className:"secrets-sync-copy",children:a("secrets.syncPassphraseDescription","Shared passphrase used to wrap cross-node secret bundles. Both nodes in a sync pair must share the same value. Stored locally only; never transmitted.")})]}):null]}),me?e.jsx("div",{className:"modal-overlay open",role:"presentation",children:e.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-label":m?a("secrets.rotateSyncPassphraseModalTitle","Rotate sync passphrase"):a("secrets.setSyncPassphraseModalTitle","Set sync passphrase"),children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h3",{children:m?a("secrets.rotateSyncPassphraseModalTitle","Rotate sync passphrase"):a("secrets.setSyncPassphraseModalTitle","Set sync passphrase")}),e.jsx("button",{className:"modal-close",onClick:J,"aria-label":a("secrets.closeAriaLabel","Close"),children:"×"})]}),e.jsxs("div",{className:"secrets-modal-body",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.passphraseLabel","Passphrase")}),e.jsx("input",{"aria-label":a("secrets.passphraseLabel","Passphrase"),className:"input",type:"password",autoComplete:"new-password",value:w,onChange:s=>F(s.target.value)})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.confirmPassphraseLabel","Confirm passphrase")}),e.jsx("input",{"aria-label":a("secrets.confirmPassphraseLabel","Confirm passphrase"),className:"input",type:"password",autoComplete:"new-password",value:_,onChange:s=>B(s.target.value)})]}),!te&&_.length>0?e.jsx("div",{className:"form-error",children:a("secrets.passphraseMustMatch","Passphrases must match.")}):null]}),e.jsx("div",{className:"modal-actions",children:e.jsxs("div",{className:"modal-actions-right",children:[e.jsx("button",{className:"btn",onClick:J,children:a("secrets.cancelBtn","Cancel")}),e.jsx("button",{className:"btn btn-primary",onClick:()=>void be(),disabled:!te||ye,children:m?a("secrets.rotateSyncPassphrase","Rotate"):a("secrets.setPassphrase","Set passphrase")})]})})]})}):null,de?e.jsx("div",{className:"modal-overlay open",role:"presentation",children:e.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-label":h?a("secrets.editSecretModalTitle","Edit secret"):a("secrets.addSecretModalTitle","Add secret"),children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h3",{children:h?a("secrets.editSecretModalTitle","Edit secret"):a("secrets.addSecretModalTitle","Add secret")}),e.jsx("button",{className:"modal-close",onClick:()=>x(!1),"aria-label":a("secrets.closeAriaLabel","Close"),children:"×"})]}),e.jsxs("div",{className:"secrets-modal-body",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.keyLabel","Key")}),e.jsx("input",{className:"input",value:c.key,onChange:s=>i(r=>({...r,key:s.target.value}))})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.valueLabel","Value")}),e.jsxs("div",{className:"secrets-value-row",children:[e.jsx("input",{className:"input",type:V?"text":"password",autoComplete:"off",spellCheck:!1,value:c.value,onChange:s=>i(r=>({...r,value:s.target.value}))}),e.jsx("button",{type:"button",className:"btn btn-icon secrets-visibility-toggle",onClick:()=>E(s=>!s),"aria-label":V?a("secrets.hideValueAriaLabel","Hide value"):a("secrets.showValueAriaLabel","Show value"),children:V?e.jsx(ne,{...d}):e.jsx(le,{...d})})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.descriptionLabel","Description")}),e.jsx("textarea",{className:"input",value:c.description,onChange:s=>i(r=>({...r,description:s.target.value}))})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.scopeLabel","Scope")}),e.jsxs("div",{className:"secrets-radio-row",children:[e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:c.scope==="project",onChange:()=>i(s=>({...s,scope:"project"})),disabled:!!h})," ",a("secrets.scopeProject","Project")]}),e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:c.scope==="global",onChange:()=>i(s=>({...s,scope:"global"})),disabled:!!h})," ",a("secrets.scopeGlobal","Global")]})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.accessPolicyLabel","Access policy")}),e.jsxs("select",{className:"select",value:c.accessPolicy,onChange:s=>i(r=>({...r,accessPolicy:s.target.value})),children:[e.jsx("option",{value:"auto",children:a("secrets.accessPolicyAuto","auto")}),e.jsx("option",{value:"prompt",children:a("secrets.accessPolicyPrompt","prompt")}),e.jsx("option",{value:"deny",children:a("secrets.accessPolicyDeny","deny")})]})]}),e.jsx("div",{className:"form-group",children:e.jsxs("label",{className:"checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:c.envExportable,onChange:s=>i(r=>({...r,envExportable:s.target.checked}))})," ",a("secrets.exportToEnvLabel","Export to env")]})}),c.envExportable?e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.envKeyLabel","Env key")}),e.jsx("input",{className:"input",value:c.envExportKey,onChange:s=>i(r=>({...r,envExportKey:s.target.value}))})]}):null,Z?e.jsx("div",{className:"form-error",children:Z}):null]}),e.jsx("div",{className:"modal-actions",children:e.jsxs("div",{className:"modal-actions-right",children:[e.jsx("button",{className:"btn",onClick:()=>x(!1),children:a("secrets.cancelBtn","Cancel")}),e.jsx("button",{className:"btn btn-primary",onClick:()=>void ge(),children:h?a("secrets.saveBtn","Save"):a("secrets.createBtn","Create")})]})})]})}):null]})};export{Ye as SecretsView};
1
+ import{r as t,j as e}from"./vendor-react-SZ_qB27O.js";import{w as A,V as we,o as ke,R as ce,P as Re,E as ne,p as le,q as Le,u as Te,v as Ae,x as Me,C as qe,g as De,y as Ve}from"./index-BN0mudGK.js";import{u as Ke}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";const Oe="__sync_passphrase__",Y={key:"",value:"",description:"",scope:"project",accessPolicy:"prompt",envExportable:!1,envExportKey:""},d={className:"secrets-action-icon","aria-hidden":!0,style:{width:"1em",height:"1em"}},Fe={...d,className:"secrets-action-icon spin"},Ye=({addToast:p,projectId:l})=>{const{t:a}=Ke("app"),[z,G]=t.useState([]),[oe,U]=t.useState(),[Q,W]=t.useState(!0),[X,M]=t.useState(null),[ie,q]=t.useState(),[Z,b]=t.useState(null),[h,D]=t.useState(null),[de,x]=t.useState(!1),[ue,C]=t.useState(null),[c,i]=t.useState(Y),[V,E]=t.useState(!1),[ee,f]=t.useState({}),[pe,K]=t.useState(null),[m,se]=t.useState(!1),[he,ae]=t.useState(),[me,O]=t.useState(!1),[w,F]=t.useState(""),[_,B]=t.useState(""),[ye,$]=t.useState(!1),[H,xe]=t.useState(!1),v=t.useRef(new Map),I=t.useRef(new Map),j=t.useRef(0),k=t.useRef(0),o=t.useRef(l);o.current!==l&&(o.current=l,j.current+=1,k.current+=1);const y=t.useCallback(s=>A(s,l),[l]),u=t.useCallback(async(s,r)=>{const n=await fetch(s,{...r,headers:{"Content-Type":"application/json",...r?.headers??{}}});if(!n.ok){const g=await n.json().catch(()=>({error:"Request failed"}));throw new Error(String(g?.error??"Request failed"))}if(n.status!==204)return n.json()},[]),S=t.useCallback(async()=>{const s=l;if(o.current!==s)return;const r=++j.current;W(!0),M(null),q(void 0);try{const n=await u(y("/api/secrets"));r===j.current&&o.current===s&&(G(n.secrets),U(s))}catch(n){r===j.current&&o.current===s&&(M(n instanceof Error?n.message:String(n)),q(s))}finally{r===j.current&&o.current===s&&W(!1)}},[l,y,u]),R=t.useCallback(async()=>{const s=l;if(o.current!==s)return;const r=++k.current;try{const n=await u(y("/api/secrets/sync-passphrase"));r===k.current&&o.current===s&&(se(!!n.configured),ae(s))}catch(n){r===k.current&&o.current===s&&p?.(a("secrets.errorLoadSyncStatus","Failed to load sync passphrase status: {{error}}",{error:n instanceof Error?n.message:String(n)}),"error")}},[p,l,y,u,a]);t.useEffect(()=>(G([]),U(void 0),f({}),K(null),se(!1),ae(void 0),M(null),q(void 0),b(null),D(null),x(!1),E(!1),C(null),O(!1),F(""),B(""),$(!1),S(),R(),()=>{v.current.forEach(s=>clearTimeout(s)),I.current.forEach(s=>clearTimeout(s))}),[S,R,l]);const J=()=>{O(!1),F(""),B("")},ve=async(s,r)=>{await u(A("/api/secrets/sync-passphrase",r),{method:"PUT",body:JSON.stringify({passphrase:s})})},be=async()=>{const s=l;$(!0);try{if(await ve(w,s),o.current!==s)return;p?.(m?a("secrets.syncPassphraseRotated","Sync passphrase rotated"):a("secrets.syncPassphraseSet","Sync passphrase set"),"success"),J(),await R()}catch(r){o.current===s&&p?.(a("secrets.errorSaveSyncPassphrase","Failed to save sync passphrase: {{error}}",{error:r instanceof Error?r.message:String(r)}),"error")}finally{o.current===s&&$(!1)}},fe=async()=>{if(!window.confirm(a("secrets.confirmClearSyncPassphrase","Clear the cross-node sync passphrase? Existing sync pairs will stop working until you set a new passphrase.")))return;const r=l;try{if(await u(A("/api/secrets/sync-passphrase",r),{method:"DELETE"}),o.current!==r)return;p?.(a("secrets.syncPassphraseCleared","Sync passphrase cleared"),"success"),await R()}catch(n){o.current===r&&p?.(a("secrets.errorClearSyncPassphrase","Failed to clear sync passphrase: {{error}}",{error:n instanceof Error?n.message:String(n)}),"error")}},je=()=>{D(null),i(Y),x(!0),E(!1),b(null)},Se=s=>{D(s),i({key:s.key,value:"",description:s.description??"",scope:s.scope,accessPolicy:s.accessPolicy,envExportable:s.envExportable,envExportKey:s.envExportKey??""}),x(!0),E(!1),b(null)},ge=async()=>{const s=l;b(null);try{if(h){const r={key:c.key,description:c.description||null,accessPolicy:c.accessPolicy,envExportable:c.envExportable,envExportKey:c.envExportable&&c.envExportKey||null};c.value&&(r.value=c.value),await u(y(`/api/secrets/${h.scope}/${h.id}`),{method:"PATCH",body:JSON.stringify(r)})}else await u(y("/api/secrets"),{method:"POST",body:JSON.stringify({scope:c.scope,key:c.key,value:c.value,description:c.description||null,accessPolicy:c.accessPolicy,envExportable:c.envExportable,envExportKey:c.envExportable&&c.envExportKey||null})});if(o.current!==s)return;x(!1),i(Y),await S()}catch(r){o.current===s&&b(r instanceof Error?r.message:String(r))}},Ne=s=>{const r=v.current.get(s.id);r&&(clearTimeout(r),v.current.delete(s.id)),f(n=>({...n,[s.id]:null}))},Pe=async s=>{const r=l,n=await u(y(`/api/secrets/${s.scope}/${s.id}/reveal`),{method:"POST"});if(o.current!==r)return;f(P=>({...P,[s.id]:n.value})),p?.(a("secrets.revealed","Revealed"),"success");const g=setTimeout(()=>{f(P=>({...P,[s.id]:null})),v.current.delete(s.id)},3e4),N=v.current.get(s.id);N&&clearTimeout(N),v.current.set(s.id,g)},Ce=async s=>{const r=ee[s.id];if(!r)return;if(!await Ve(r)){p?.(a("secrets.copyFailed","Failed to copy secret"),"error");return}K(s.id),p?.(a("secrets.copied","Copied"),"success");const g=setTimeout(()=>{K(null),f(P=>({...P,[s.id]:null}))},1500),N=I.current.get(s.id);N&&clearTimeout(N),I.current.set(s.id,g)},Ee=async s=>{const r=l;await u(A(`/api/secrets/${s.scope}/${s.id}`,r),{method:"DELETE"}),o.current===r&&(C(null),await S())},L=oe===l,T=he===l,re=t.useMemo(()=>[...L?z:[]].filter(s=>!(s.scope==="global"&&s.key===Oe)).sort((s,r)=>s.key.localeCompare(r.key)),[z,L]),te=w.length>0&&w===_;return e.jsxs("section",{className:"secrets-view",children:[e.jsx(we,{icon:ke,title:a("secrets.title","Secrets"),actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"btn btn-sm",onClick:()=>void S(),children:[e.jsx(ce,{...d})," ",a("secrets.refresh","Refresh")]}),e.jsxs("button",{className:"btn btn-primary btn-sm",onClick:je,children:[e.jsx(Re,{...d})," ",a("secrets.addSecret","Add Secret")]})]})}),X&&ie===l?e.jsx("div",{className:"form-error",children:X}):null,Q||!L?e.jsxs("div",{className:"secrets-loading",children:[e.jsx(ce,{...Fe})," ",a("secrets.loading","Loading…")]}):null,!Q&&L&&re.length===0?e.jsx("div",{className:"secrets-empty",children:a("secrets.empty","No secrets found.")}):null,e.jsx("div",{className:"secrets-list",children:re.map(s=>{const r=ee[s.id];return e.jsxs("article",{className:"card secrets-row",children:[e.jsxs("div",{className:"secrets-row-main",children:[e.jsx("div",{className:"secrets-row-key",children:s.key}),e.jsxs("div",{className:"secrets-row-meta",children:[e.jsx("span",{className:"secrets-chip",children:s.scope}),e.jsx("span",{className:"secrets-chip",children:s.accessPolicy}),s.envExportable?e.jsx("span",{className:"secrets-chip",children:a("secrets.envExportableChip","env exportable")}):null]}),r?e.jsx("pre",{className:"secrets-revealed",children:r}):null]}),e.jsxs("div",{className:"secrets-row-side",children:[e.jsx("span",{className:"secrets-row-read",children:s.lastReadAt?new Date(s.lastReadAt).toLocaleString():a("secrets.neverRead","Never read")}),e.jsxs("div",{className:"secrets-row-actions",children:[e.jsx("button",{type:"button",className:"btn btn-icon secrets-visibility-toggle",onClick:()=>{if(r){Ne(s);return}Pe(s)},"aria-label":r?a("secrets.hideAriaLabel","Hide"):a("secrets.revealAriaLabel","Reveal"),children:r?e.jsx(ne,{...d}):e.jsx(le,{...d})}),e.jsx("button",{className:"btn btn-icon",onClick:()=>void Ce(s),"aria-label":a("secrets.copyAriaLabel","Copy"),disabled:!r,children:pe===s.id?e.jsx(Le,{...d}):e.jsx(Te,{...d})}),e.jsx("button",{className:"btn btn-icon",onClick:()=>Se(s),"aria-label":a("secrets.editAriaLabel","Edit"),children:e.jsx(Ae,{...d})}),e.jsx("button",{className:"btn btn-icon btn-danger",onClick:()=>C(s.id),"aria-label":a("secrets.deleteAriaLabel","Delete"),children:e.jsx(Me,{...d})})]}),ue===s.id?e.jsxs("div",{className:"secrets-confirm",children:[e.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>void Ee(s),children:a("secrets.confirmDelete","Confirm")}),e.jsx("button",{className:"btn btn-sm",onClick:()=>C(null),children:a("secrets.cancelDelete","Cancel")})]}):null]})]},s.id)})}),e.jsxs("article",{className:"card secrets-sync-card secrets-sync-disclosure",children:[e.jsxs("button",{type:"button",className:"secrets-sync-disclosure-toggle","data-testid":"secrets-passphrase-disclosure","aria-expanded":H,"aria-controls":"secrets-sync-disclosure-panel",onClick:()=>xe(s=>!s),children:[H?e.jsx(qe,{size:16,"aria-hidden":"true"}):e.jsx(De,{size:16,"aria-hidden":"true"}),e.jsx("span",{children:a("secrets.syncPassphraseTitle","Cross-Node Sync Passphrase")})]}),H?e.jsxs("div",{id:"secrets-sync-disclosure-panel",className:"secrets-sync-disclosure-panel",children:[e.jsxs("div",{className:"secrets-sync-header",children:[e.jsxs("p",{className:"secrets-sync-status",children:[e.jsx("span",{className:`status-dot ${T&&m?"status-dot--online":"status-dot--pending"}`,"aria-hidden":"true"})," ",T&&m?a("secrets.syncConfigured","Configured"):a("secrets.syncNotConfigured","Not configured")]}),e.jsxs("div",{className:"secrets-sync-actions",children:[e.jsx("button",{className:"btn",onClick:()=>O(!0),children:T&&m?a("secrets.rotateSyncPassphrase","Rotate"):a("secrets.setPassphrase","Set passphrase")}),T&&m?e.jsx("button",{className:"btn btn-danger",onClick:()=>void fe(),children:a("secrets.clearSyncPassphrase","Clear")}):null]})]}),e.jsx("p",{className:"secrets-sync-copy",children:a("secrets.syncPassphraseDescription","Shared passphrase used to wrap cross-node secret bundles. Both nodes in a sync pair must share the same value. Stored locally only; never transmitted.")})]}):null]}),me?e.jsx("div",{className:"modal-overlay open",role:"presentation",children:e.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-label":m?a("secrets.rotateSyncPassphraseModalTitle","Rotate sync passphrase"):a("secrets.setSyncPassphraseModalTitle","Set sync passphrase"),children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h3",{children:m?a("secrets.rotateSyncPassphraseModalTitle","Rotate sync passphrase"):a("secrets.setSyncPassphraseModalTitle","Set sync passphrase")}),e.jsx("button",{className:"modal-close",onClick:J,"aria-label":a("secrets.closeAriaLabel","Close"),children:"×"})]}),e.jsxs("div",{className:"secrets-modal-body",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.passphraseLabel","Passphrase")}),e.jsx("input",{"aria-label":a("secrets.passphraseLabel","Passphrase"),className:"input",type:"password",autoComplete:"new-password",value:w,onChange:s=>F(s.target.value)})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.confirmPassphraseLabel","Confirm passphrase")}),e.jsx("input",{"aria-label":a("secrets.confirmPassphraseLabel","Confirm passphrase"),className:"input",type:"password",autoComplete:"new-password",value:_,onChange:s=>B(s.target.value)})]}),!te&&_.length>0?e.jsx("div",{className:"form-error",children:a("secrets.passphraseMustMatch","Passphrases must match.")}):null]}),e.jsx("div",{className:"modal-actions",children:e.jsxs("div",{className:"modal-actions-right",children:[e.jsx("button",{className:"btn",onClick:J,children:a("secrets.cancelBtn","Cancel")}),e.jsx("button",{className:"btn btn-primary",onClick:()=>void be(),disabled:!te||ye,children:m?a("secrets.rotateSyncPassphrase","Rotate"):a("secrets.setPassphrase","Set passphrase")})]})})]})}):null,de?e.jsx("div",{className:"modal-overlay open",role:"presentation",children:e.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-label":h?a("secrets.editSecretModalTitle","Edit secret"):a("secrets.addSecretModalTitle","Add secret"),children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h3",{children:h?a("secrets.editSecretModalTitle","Edit secret"):a("secrets.addSecretModalTitle","Add secret")}),e.jsx("button",{className:"modal-close",onClick:()=>x(!1),"aria-label":a("secrets.closeAriaLabel","Close"),children:"×"})]}),e.jsxs("div",{className:"secrets-modal-body",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.keyLabel","Key")}),e.jsx("input",{className:"input",value:c.key,onChange:s=>i(r=>({...r,key:s.target.value}))})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.valueLabel","Value")}),e.jsxs("div",{className:"secrets-value-row",children:[e.jsx("input",{className:"input",type:V?"text":"password",autoComplete:"off",spellCheck:!1,value:c.value,onChange:s=>i(r=>({...r,value:s.target.value}))}),e.jsx("button",{type:"button",className:"btn btn-icon secrets-visibility-toggle",onClick:()=>E(s=>!s),"aria-label":V?a("secrets.hideValueAriaLabel","Hide value"):a("secrets.showValueAriaLabel","Show value"),children:V?e.jsx(ne,{...d}):e.jsx(le,{...d})})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.descriptionLabel","Description")}),e.jsx("textarea",{className:"input",value:c.description,onChange:s=>i(r=>({...r,description:s.target.value}))})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.scopeLabel","Scope")}),e.jsxs("div",{className:"secrets-radio-row",children:[e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:c.scope==="project",onChange:()=>i(s=>({...s,scope:"project"})),disabled:!!h})," ",a("secrets.scopeProject","Project")]}),e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:c.scope==="global",onChange:()=>i(s=>({...s,scope:"global"})),disabled:!!h})," ",a("secrets.scopeGlobal","Global")]})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.accessPolicyLabel","Access policy")}),e.jsxs("select",{className:"select",value:c.accessPolicy,onChange:s=>i(r=>({...r,accessPolicy:s.target.value})),children:[e.jsx("option",{value:"auto",children:a("secrets.accessPolicyAuto","auto")}),e.jsx("option",{value:"prompt",children:a("secrets.accessPolicyPrompt","prompt")}),e.jsx("option",{value:"deny",children:a("secrets.accessPolicyDeny","deny")})]})]}),e.jsx("div",{className:"form-group",children:e.jsxs("label",{className:"checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:c.envExportable,onChange:s=>i(r=>({...r,envExportable:s.target.checked}))})," ",a("secrets.exportToEnvLabel","Export to env")]})}),c.envExportable?e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("secrets.envKeyLabel","Env key")}),e.jsx("input",{className:"input",value:c.envExportKey,onChange:s=>i(r=>({...r,envExportKey:s.target.value}))})]}):null,Z?e.jsx("div",{className:"form-error",children:Z}):null]}),e.jsx("div",{className:"modal-actions",children:e.jsxs("div",{className:"modal-actions-right",children:[e.jsx("button",{className:"btn",onClick:()=>x(!1),children:a("secrets.cancelBtn","Cancel")}),e.jsx("button",{className:"btn btn-primary",onClick:()=>void ge(),children:h?a("secrets.saveBtn","Save"):a("secrets.createBtn","Create")})]})})]})}):null]})};export{Ye as SecretsView};
@@ -1 +1 @@
1
- import{r}from"./vendor-react-SZ_qB27O.js";import{a as n,w as s}from"./index-BjM7LxzY.js";function x(e){return n(s("/memory/files",e))}function C(e,t){const c=`path=${encodeURIComponent(e)}`;return n(s(`/memory/file?${c}`,t))}function F(e,t,c){return n(s("/memory/file",c),{method:"PUT",body:JSON.stringify({path:e,content:t})})}function J(e,t){return n(s("/memory/compact",t),{method:"POST",body:JSON.stringify(e?{path:e}:{})})}function N(e){return n(s("/memory/dream",e),{method:"POST"})}function W(e){return n(s("/memory/insights",e))}function j(e,t){return n(s("/memory/insights",t),{method:"PUT",body:JSON.stringify({content:e})})}function q(e){return n(s("/memory/extract",e),{method:"POST"})}function D(e){return n(s("/memory/audit",e))}function B(e){return n(s("/memory/backend",e))}function L(e){return n(s("/memory/install-qmd",e),{method:"POST"})}function $(e,t){return n(s("/memory/test",t),{method:"POST",body:JSON.stringify({query:e})})}function Q(e={}){const{projectId:t,pollInterval:c=6e4,autoRefresh:p=!1,enabled:a=!0}=e,[S,y]=r.useState(null),[g,m]=r.useState(a),[M,d]=r.useState(null),[k,v]=r.useState(null),o=r.useRef(null),u=r.useRef(null),l=r.useRef(!0),i=r.useCallback(async()=>{if(!a){m(!1),d(null),y(null);return}o.current&&o.current.abort(),o.current=new AbortController,m(!0),d(null),y(null);try{const f=await B(t);if(!l.current)return;y(f),d(null),v(new Date),m(!1)}catch(f){if(f instanceof Error&&f.name==="AbortError"||!l.current)return;const w=f instanceof Error?f.message:"Failed to fetch memory backend status";d(w),m(!1)}},[a,t]);r.useEffect(()=>(l.current=!0,a?(i(),()=>{l.current=!1}):(o.current&&o.current.abort(),y(null),d(null),m(!1),()=>{l.current=!1})),[a,i]),r.useEffect(()=>{if(!(!a||!p))return u.current=setInterval(()=>{i()},c),()=>{u.current&&(clearInterval(u.current),u.current=null)}},[a,p,c,i]),r.useEffect(()=>()=>{l.current=!1,o.current&&o.current.abort(),u.current&&(clearInterval(u.current),u.current=null)},[]);const I=r.useCallback(()=>i(),[i]),b=g?null:S,R=b?.currentBackend??null,h=b?.capabilities??null,E=b?.availableBackends??[],O=h?.readable??!1,P=h?.writable??!1,T=h?.supportsAtomicWrite??!1;return{status:b,currentBackend:R,capabilities:h,availableBackends:E,isReadable:O,isWritable:P,supportsAtomicWrite:T,loading:g,error:M,lastUpdated:k,refresh:I}}export{x as a,D as b,W as c,j as d,q as e,C as f,N as g,J as h,L as i,F as s,$ as t,Q as u};
1
+ import{r}from"./vendor-react-SZ_qB27O.js";import{a as n,w as s}from"./index-BN0mudGK.js";function x(e){return n(s("/memory/files",e))}function C(e,t){const c=`path=${encodeURIComponent(e)}`;return n(s(`/memory/file?${c}`,t))}function F(e,t,c){return n(s("/memory/file",c),{method:"PUT",body:JSON.stringify({path:e,content:t})})}function J(e,t){return n(s("/memory/compact",t),{method:"POST",body:JSON.stringify(e?{path:e}:{})})}function N(e){return n(s("/memory/dream",e),{method:"POST"})}function W(e){return n(s("/memory/insights",e))}function j(e,t){return n(s("/memory/insights",t),{method:"PUT",body:JSON.stringify({content:e})})}function q(e){return n(s("/memory/extract",e),{method:"POST"})}function D(e){return n(s("/memory/audit",e))}function B(e){return n(s("/memory/backend",e))}function L(e){return n(s("/memory/install-qmd",e),{method:"POST"})}function $(e,t){return n(s("/memory/test",t),{method:"POST",body:JSON.stringify({query:e})})}function Q(e={}){const{projectId:t,pollInterval:c=6e4,autoRefresh:p=!1,enabled:a=!0}=e,[S,y]=r.useState(null),[g,m]=r.useState(a),[M,d]=r.useState(null),[k,v]=r.useState(null),o=r.useRef(null),u=r.useRef(null),l=r.useRef(!0),i=r.useCallback(async()=>{if(!a){m(!1),d(null),y(null);return}o.current&&o.current.abort(),o.current=new AbortController,m(!0),d(null),y(null);try{const f=await B(t);if(!l.current)return;y(f),d(null),v(new Date),m(!1)}catch(f){if(f instanceof Error&&f.name==="AbortError"||!l.current)return;const w=f instanceof Error?f.message:"Failed to fetch memory backend status";d(w),m(!1)}},[a,t]);r.useEffect(()=>(l.current=!0,a?(i(),()=>{l.current=!1}):(o.current&&o.current.abort(),y(null),d(null),m(!1),()=>{l.current=!1})),[a,i]),r.useEffect(()=>{if(!(!a||!p))return u.current=setInterval(()=>{i()},c),()=>{u.current&&(clearInterval(u.current),u.current=null)}},[a,p,c,i]),r.useEffect(()=>()=>{l.current=!1,o.current&&o.current.abort(),u.current&&(clearInterval(u.current),u.current=null)},[]);const I=r.useCallback(()=>i(),[i]),b=g?null:S,R=b?.currentBackend??null,h=b?.capabilities??null,E=b?.availableBackends??[],O=h?.readable??!1,P=h?.writable??!1,T=h?.supportsAtomicWrite??!1;return{status:b,currentBackend:R,capabilities:h,availableBackends:E,isReadable:O,isWritable:P,supportsAtomicWrite:T,loading:g,error:M,lastUpdated:k,refresh:I}}export{x as a,D as b,W as c,j as d,q as e,C as f,N as g,J as h,L as i,F as s,$ as t,Q as u};
@@ -0,0 +1 @@
1
+ .settings-header-actions{--settings-header-action-height: calc(var(--space-md) * 2 + var(--space-xs) / 2);display:flex;align-items:stretch;gap:var(--space-xs);margin-left:auto;margin-right:var(--space-sm)}.settings-header-actions>.settings-github-star-btn,.settings-header-actions>.settings-header-discord-btn{height:var(--settings-header-action-height);box-sizing:border-box}.settings-header-discord-btn,.settings-footer-help-btn{display:inline-flex;align-items:center;text-decoration:none}@media(max-width:768px){.settings-modal .modal-header{flex-wrap:nowrap;align-items:center;column-gap:var(--space-sm)}.settings-modal-heading{flex:1 1 0;min-width:0}.settings-header-actions{margin-left:auto;margin-right:var(--space-sm)}.settings-header-actions .settings-github-star-btn__action,.settings-header-actions .settings-header-discord-btn{width:40px;min-width:40px;padding:0;justify-content:center;font-size:0}.settings-header-actions .settings-github-star-btn__action{gap:0}}.settings-github-star-btn{display:inline-flex;align-items:stretch;border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-pill);background:var(--card);color:var(--text);font-size:var(--font-size-xs);font-weight:500;text-decoration:none;overflow:hidden;transition:border-color var(--transition-fast),background var(--transition-fast)}.settings-github-star-btn:hover{border-color:var(--text-muted);background:var(--card-hover)}.settings-github-star-btn:focus-visible{outline:none;box-shadow:var(--focus-ring-strong);border-color:var(--todo)}.settings-github-star-btn__action{display:inline-flex;align-items:center;gap:var(--space-xs);padding:var(--space-xs) calc(var(--space-sm) + var(--space-xs) / 2)}.settings-github-star-btn__count{display:inline-flex;align-items:center;padding:var(--space-xs) calc(var(--space-sm) + var(--space-xs) / 4);border-left:var(--btn-border-width) solid var(--border);background:color-mix(in srgb,var(--surface) 60%,var(--card));color:var(--text-muted);font-variant-numeric:tabular-nums}.settings-modal{width:min(95vw,1100px);max-width:95vw;min-width:520px;height:80vh;min-height:480px;max-height:calc(100dvh - var(--overlay-padding-top, 10vh) - 16px);overflow:hidden}.settings-embedded.right-dock-embedded-view{display:flex;flex:1;width:100%;height:100%;min-height:0;padding:0;overflow:hidden}.settings-embedded .settings-modal--embedded{flex:1;width:100%;max-width:none;min-width:0;height:100%;min-height:0;max-height:none;resize:none;box-shadow:none;border:none;border-radius:0;background:transparent;position:static}.settings-modal--embedded .modal-header--embedded{box-sizing:border-box;display:flex;align-items:center;gap:var(--space-sm);min-height:var(--view-header-min-height);padding:var(--space-lg) var(--space-xl);background:var(--surface);border-bottom:none;flex-shrink:0}.settings-modal--embedded .modal-header--embedded .settings-header-actions{margin-left:auto}.settings-modal--embedded .modal-header--embedded .settings-modal-heading h3{display:flex;align-items:center;gap:var(--space-sm);font-size:var(--font-size-md);font-weight:600;color:var(--text);letter-spacing:normal}.settings-modal--embedded .modal-header--embedded .settings-modal-heading svg{color:var(--todo);flex-shrink:0}.settings-modal--embedded .modal-actions{background:transparent;flex-shrink:0;padding-bottom:var(--space-sm)}@media(max-width:768px){.modal-overlay.settings-modal-overlay,.modal-overlay:has(.settings-modal:not(.settings-modal--embedded)){padding:0;inset:0;align-items:stretch;justify-content:stretch}.modal.settings-modal:not(.settings-modal--embedded){width:100vw;min-width:0;max-width:100vw;height:100dvh;min-height:100dvh;max-height:100dvh;margin:0;border:none;border-radius:0;resize:none;flex:1 1 auto}.modal.settings-modal:not(.settings-modal--embedded)[style*=--keyboard-overlap]{height:var(--vv-height, 100dvh);min-height:var(--vv-height, 100dvh);max-height:var(--vv-height, 100dvh);transform:translateY(var(--vv-offset-top, 0px));will-change:transform}.settings-embedded.right-dock-embedded-view{padding:var(--space-sm)}.settings-embedded .settings-modal--embedded{width:100%;height:100%}.settings-modal .modal-header{padding-block:var(--space-sm);padding-inline:var(--space-md)}.settings-modal .modal-actions{padding-block:var(--space-xs);padding-inline:var(--space-md)}.settings-modal--embedded .modal-header--embedded{min-height:0}.settings-modal--embedded .modal-header--embedded .settings-embedded-mobile-close{--settings-embedded-mobile-close-touch-target: calc(var(--space-lg) + var(--space-lg) + var(--space-xs));flex-shrink:0;margin-left:var(--space-xs);min-height:var(--settings-embedded-mobile-close-touch-target);min-width:var(--settings-embedded-mobile-close-touch-target)}}.settings-modal-heading{display:flex;flex-direction:column;gap:var(--space-xs)}.settings-modal-heading h3{margin:0}.settings-modal-version{margin:0;font-size:var(--font-size-sm);color:var(--text-muted);font-weight:500}.settings-modal-footer-version{display:flex;align-items:center;gap:var(--space-xs);margin-right:var(--space-sm);min-width:0}.settings-update-check{display:flex;align-items:center;gap:var(--space-sm);min-width:0}.settings-modal .modal-actions{flex-wrap:wrap;align-items:center;row-gap:var(--space-xs);min-width:0}@media(max-width:768px),(max-height:480px){.settings-modal .modal-actions{flex-wrap:nowrap;align-items:center;justify-content:center;justify-content:safe center;gap:var(--space-sm);overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;min-width:0;max-width:100%}.settings-modal .modal-actions *{touch-action:pan-x pan-y}.settings-modal .modal-actions-left{align-items:center;flex-shrink:0;gap:var(--space-xs);margin-right:0;max-width:none}.settings-modal .modal-actions-right{align-items:center;flex-shrink:0;gap:var(--space-xs);margin-left:0;max-width:none}.settings-modal .settings-modal-footer-version{align-items:center;align-self:center;flex:0 0 auto;margin-right:0;min-width:max-content;max-width:none}.settings-modal .settings-update-check{align-items:center;flex-wrap:wrap;row-gap:var(--space-xs)}.settings-modal .settings-update-result{align-self:center;flex:0 1 auto;line-height:normal;white-space:normal}.settings-modal .settings-modal-footer-update-row{display:flex;flex-shrink:0;justify-content:center;text-align:center;padding:var(--space-sm) var(--modal-padding) 0;border-top:1px solid var(--border);background:color-mix(in srgb,var(--text) 5%,transparent)}.settings-modal .settings-modal-footer-update-row+.modal-actions{border-top:none}.settings-modal .settings-modal-footer-update-row .settings-update-result{justify-content:center;white-space:normal}.settings-modal .settings-footer-help-btn{align-items:center;flex-shrink:0}.settings-modal .settings-version-check-btn{align-items:center;flex-shrink:0;line-height:1;white-space:nowrap}.settings-modal .settings-modal-version{align-items:center;display:inline-flex;flex-shrink:0;line-height:1;white-space:nowrap}.settings-modal .modal-actions-left .btn-sm,.settings-modal .modal-actions-right .btn-sm,.settings-modal .settings-footer-help-btn{min-height:36px}}.settings-version-check-btn{--settings-inline-touch-target: calc(var(--space-lg) + var(--space-lg) + var(--space-xs));display:inline-flex;align-items:center;gap:var(--space-xs);margin:0;min-height:var(--settings-inline-touch-target);padding:var(--space-xs) var(--space-sm);border:none;background:transparent;color:var(--text-muted);cursor:pointer;transition:opacity var(--transition-fast),box-shadow var(--transition-fast)}.settings-version-check-btn:hover:not(:disabled){opacity:.85}.settings-version-check-btn:focus-visible{outline:none;box-shadow:var(--focus-ring-strong);border-radius:var(--radius-sm)}.settings-version-check-btn:disabled{cursor:default;opacity:.7}.settings-version-check-btn svg{color:var(--text-muted)}.settings-version-check-btn svg.spinning{animation:settings-update-spin 1s linear infinite}.settings-update-result{display:inline-flex;align-items:center;flex-wrap:wrap;gap:var(--space-xs);font-size:var(--font-size-sm);font-weight:500}.settings-update-result--up-to-date{color:var(--color-success)}.settings-update-result--available{color:var(--color-info)}.settings-update-result--error{color:var(--color-error)}.settings-update-result-link{color:var(--color-info);text-decoration:underline;transition:color var(--transition-fast),box-shadow var(--transition-fast)}.settings-update-result-link:hover{color:color-mix(in srgb,var(--color-info) 80%,var(--text))}.settings-update-result-link:focus-visible{outline:none;box-shadow:var(--focus-ring-strong);border-radius:var(--radius-sm)}.settings-update-now-btn{display:inline-flex;align-items:center;gap:var(--space-xs);min-height:calc(var(--space-lg) + var(--space-sm));color:var(--text)}.settings-update-now-btn:disabled{color:var(--color-warning)}.settings-update-now-btn svg.spinning{animation:settings-update-spin 1s linear infinite}.settings-update-install-succeeded{display:inline-flex;align-items:center;flex-wrap:wrap;gap:var(--space-xs)}.settings-update-install-status{color:var(--text-muted)}.settings-update-install-status--success{color:var(--color-success)}.settings-update-install-status--error{color:var(--color-error)}@keyframes settings-update-spin{to{transform:rotate(360deg)}}.backup-stats{display:flex;align-items:center;gap:var(--space-lg);padding:var(--space-sm) var(--space-md);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:color-mix(in srgb,var(--surface) 85%,transparent)}.backup-stat{display:flex;flex:1 1 0;flex-direction:column;align-items:center;gap:var(--space-xs);min-width:0}.backup-stat-value{color:var(--text);font-size:var(--font-size-base);font-weight:600;font-variant-numeric:tabular-nums}.backup-stat-label{color:var(--text-muted);font-size:var(--font-size-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.backup-list{margin-top:var(--space-sm)}.backup-list summary{padding:var(--space-sm) 0;color:var(--text-muted);cursor:pointer;transition:color var(--transition-fast)}.backup-list summary:hover{color:var(--text)}.backup-list summary:focus-visible{outline:none;border-radius:var(--radius-sm);box-shadow:var(--focus-ring-strong)}.backup-list ul{display:flex;flex-direction:column;gap:var(--space-xs);margin:0;margin-top:var(--space-sm);padding:0;list-style:none}.backup-list li{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);padding:var(--space-sm) 0;border-top:var(--btn-border-width) solid color-mix(in srgb,var(--border) 80%,transparent)}.backup-list li code{min-width:0;color:var(--text);font-family:var(--font-mono);font-size:var(--font-size-xs);white-space:nowrap;overflow-x:auto}.backup-size{color:var(--text-muted);font-family:var(--font-mono);font-size:var(--font-size-xs);text-align:right;white-space:nowrap}@media(max-width:768px){.backup-stats{flex-direction:column;align-items:stretch;gap:var(--space-sm)}.backup-stat{align-items:flex-start}.backup-list ul{max-height:calc(var(--space-xl) * 9 + var(--space-md));overflow-y:auto;-webkit-overflow-scrolling:touch}.backup-list li code{white-space:normal;overflow-wrap:anywhere;word-break:normal}}.settings-layout{display:flex;flex:1;flex-direction:row;min-height:0;overflow:hidden}.settings-navigation{--settings-nav-width: calc(var(--space-xl) * 10 + var(--space-sm));width:var(--settings-nav-width);min-width:var(--settings-nav-width);display:flex;flex-direction:column;min-height:0;background:var(--surface)}.settings-navigation .settings-sidebar{background:transparent}.settings-nav-resize-handle{flex:0 0 var(--space-xs);margin-inline:calc(var(--space-xs) * -.5);cursor:col-resize;background:transparent;border:0;outline:none;position:relative;z-index:1}.settings-nav-resize-handle:before{content:"";position:absolute;inset-block:var(--space-sm);inset-inline:calc(50% - (var(--btn-border-width) / 2));width:var(--btn-border-width);border-radius:var(--radius-pill);background:transparent;transition:background var(--transition-fast)}.settings-nav-resize-handle:hover:before,.settings-nav-resize-handle:focus-visible:before{background:var(--border)}.settings-nav-resize-handle:focus-visible{box-shadow:var(--focus-ring-strong)}.settings-search{display:flex;flex-direction:column;gap:var(--space-xs);padding:var(--space-sm);border-bottom:var(--btn-border-width) solid var(--border)}.settings-advanced-toggle{display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-sm);border-bottom:var(--btn-border-width) solid var(--border);color:var(--text);font-size:var(--font-size-xs);font-weight:600;cursor:pointer}.settings-advanced-toggle input{margin:0;cursor:pointer}.settings-search-row{display:flex;flex-direction:column;gap:var(--space-xs)}.settings-search-toggle{display:none}.settings-search-label{color:var(--text-muted);font-size:var(--font-size-xs);font-weight:700;text-transform:uppercase;letter-spacing:.05em}.settings-search-input-wrap{display:flex;align-items:center;gap:var(--space-xs);min-width:0}.settings-search-input{min-width:0;width:100%}.settings-search-clear{flex-shrink:0}.settings-search-results,.settings-search-empty-hint{color:var(--text-muted);font-size:var(--font-size-xs);margin:0}.settings-search-hits{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px;max-height:calc(var(--space-2xl) * 6);overflow-y:auto}.settings-search-hit{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;padding:var(--space-xs) var(--space-sm);background:none;border:none;border-radius:var(--radius-sm);text-align:left;cursor:pointer;color:var(--text)}.settings-search-hit:hover,.settings-search-hit:focus-visible{background:var(--bg)}.settings-search-hit-label{font-size:var(--font-size-xs);line-height:var(--line-height-tight)}.settings-search-hit-section{font-size:var(--font-size-2xs);color:var(--text-muted)}.settings-search-hits-more{padding:var(--space-xs) var(--space-sm);font-size:var(--font-size-2xs);color:var(--text-muted)}.settings-search-empty{display:flex;flex-direction:column;gap:var(--space-sm);padding:var(--space-md);color:var(--text-muted)}.settings-search-empty p,.settings-search-content-empty p{margin:0}.settings-search-content-empty{gap:var(--space-md)}.settings-mobile-section-picker{display:none}.settings-sidebar{display:flex;flex:1;flex-direction:column;min-height:0;overflow-y:auto;padding:var(--space-sm) var(--space-sm);gap:calc(var(--space-xs) / 2);scrollbar-color:var(--border) transparent;scrollbar-width:thin}.settings-sidebar::-webkit-scrollbar{width:6px}.settings-sidebar::-webkit-scrollbar-track{background:transparent}.settings-sidebar::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm)}.settings-sidebar::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.settings-research-source-locked{cursor:default;color:var(--text-muted)!important}.settings-research-source-locked input[type=checkbox]{cursor:not-allowed}.settings-research-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-sm);min-width:0}.settings-research-source-grid>*{min-width:0}.settings-research-source-option{display:flex;flex-direction:column;gap:calc(var(--space-xs) / 2);min-width:0}.settings-research-limits-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-sm);min-width:0}.settings-research-limits-grid>*{min-width:0}.settings-research-limit-field{display:flex;flex-direction:column;gap:var(--space-xs);min-width:0}.settings-research-limits-error{grid-column:1 / -1}@media(max-width:768px){.settings-research-source-grid,.settings-research-limits-grid{grid-template-columns:1fr}}.settings-nav-item{display:block;width:100%;padding:var(--space-sm) var(--space-md);font-size:var(--font-size-sm);font-weight:500;color:var(--text-muted);background:none;border:none;border-left:3px solid transparent;border-radius:0 var(--radius-md) var(--radius-md) 0;cursor:pointer;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background var(--transition-fast),color var(--transition-fast),border-color var(--transition-fast)}.settings-sidebar{padding-block:var(--space-md)}.settings-nav-item{min-height:36px;display:flex;align-items:center;gap:var(--space-xs);line-height:1.25}.settings-content{padding:var(--space-lg) calc(var(--space-xl) + var(--space-sm)) calc(var(--space-xl) + var(--space-md))}.settings-content>.settings-gitlab-disclosure{margin-inline:0}.settings-content .settings-section-heading{padding-inline:0;color:var(--text);line-height:1.3;text-wrap:balance}.settings-content h4.settings-section-heading{font-size:var(--font-size-base);margin-bottom:var(--space-md)}.settings-content h5.settings-section-heading{font-size:var(--font-size-sm)}.settings-content .form-group{padding-inline:0;margin-top:0;padding-block:var(--space-sm)}.settings-content .form-group label:not(.checkbox-label){font-size:var(--font-size-sm);font-weight:500;line-height:var(--line-height-tight);color:var(--text);text-transform:none;letter-spacing:normal;margin-bottom:var(--space-xs)}.settings-content .form-group small,.settings-content .form-group .form-text{font-size:var(--font-size-xs);line-height:1.5;color:var(--text-muted)}.settings-field-label-row{display:flex;align-items:center;gap:var(--space-xs);flex-wrap:wrap}.settings-content .form-group .settings-field-label-row label{display:inline-flex;align-items:center;margin-bottom:0}.settings-content .checkbox-label{min-height:32px;line-height:1.35}.settings-modal input[type=checkbox]{width:16px;height:16px;flex-shrink:0;padding:0;margin:0;accent-color:var(--todo);cursor:pointer;border-radius:var(--radius-sm);transition:box-shadow var(--transition-fast)}.settings-modal input[type=checkbox]:focus-visible{box-shadow:var(--focus-ring-strong);outline:none}.settings-modal input[type=checkbox]:disabled{cursor:default}.settings-content .form-group :is(input:not([type=checkbox]),select,textarea),.settings-content :is(.input,.select,.form-input){min-height:38px;box-sizing:border-box;padding:6px 10px;font-size:13px}.settings-content :is(.form-group small,.settings-description,.settings-section-description){max-width:78ch;line-height:1.5;text-wrap:pretty}.settings-nav-item:hover{background:var(--bg);color:var(--text);border-left-color:var(--border)}.settings-nav-item:focus-visible{box-shadow:var(--focus-ring-strong);outline:none}.settings-nav-item.active{background:var(--bg);color:var(--todo);font-weight:600;border-left-color:var(--todo)}.settings-group-header{font-size:var(--font-size-2xs);font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);padding:var(--space-md) var(--space-md) var(--space-xs);margin-top:var(--space-sm);user-select:none}.settings-group-header:first-child{margin-top:0}.settings-content{flex:1;overflow-x:hidden;overflow-y:auto;padding:var(--space-md) var(--space-xl) var(--space-lg);scrollbar-color:var(--border) transparent;scrollbar-width:thin}.settings-content[data-show-advanced=false] :is(.form-group:has(#globalGitlabApiBaseUrl),.form-group:has(#persistAgentToolOutput),.form-group:has(#persistAgentThinkingLogPermanent),.form-group:has(#fnBinaryCheckEnabled),.form-group:has(#updateCheckFrequency),.form-group:has(#taskDetailChatFirst),.form-group:has(#sessionBannersHidden),.form-group:has(#failureNotificationDelayMs),.form-group:has(#webhookFormat),.form-group:has(#allowAbsoluteFileBrowserPaths),.form-group:has(#operationalLogRetentionDays),.form-group:has(#chatRoomRecentVerbatimMessages),.form-group:has(#chatRoomCompactionFetchLimit),.form-group:has(#chatRoomSummaryMaxChars),.form-group:has(#capacityRiskTodoThresholdGeneral),.form-group:has(#githubTrackingDedupEnabled),.form-group:has(#gitlabApiBaseUrl),.form-group:has(#worktreeInitCommand),.form-group:has(#recycleWorktrees),.form-group:has(#showWorktreeGrouping),.form-group:has(#worktree-copy-files-list),.form-group:has(#executorAllowSiblingBranchRename),.form-group:has(#worktreeNaming),.form-group:has(#worktreesDir),.form-group:has(#worktreeRebaseRemote),.form-group:has(#worktreeRebaseLocalBase),.form-group:has(#worktrunkBinaryPath),.form-group:has(#worktrunkOnFailure),.form-group:has(#pollIntervalMs),.form-group:has(#heartbeatScopeDiscipline),.form-group:has(#taskStuckTimeoutMs),.form-group:has(#buildTimeoutMs),.form-group:has(#staleHighFanoutBlockerAgeThresholdMs),.form-group:has(#preserveProgressOnStuckRequeue),.form-group:has(#specStalenessEnabled),.form-group:has(#specStalenessMaxAgeMs),.form-group:has(#autoArchiveDoneAfterMs),.form-group:has(#archiveAgentLogMode),.form-group:has(#autoArchiveDuplicateTasksEnabled),.form-group:has(#maxStuckKills),.form-group:has(#ignoreHiddenOverlapPaths),.form-group:has(.settings-overlap-ignore-row),.form-group:has(#maxAutoMergeRetries),#legacy-automerge-stamp-cleanup-panel,.form-group:has(#mergerMaxReviewPasses),.form-group:has(#mergerAllowDirtyLocalCheckoutSync),.form-group:has(#testMode),.form-group:has(#directMergeCommitStrategy),.form-group:has(#mergeIntegrationWorktree),.form-group:has(#mergeAdvanceAutoSync),.form-group:has(#commitAuthorEnabled),.form-group:has(#commitAuthorName),.form-group:has(#commitAuthorEmail),.form-group:has(#autoResolveConflicts),.form-group:has(#smartConflictResolution),.form-group:has(#mergeConflictStrategy),.form-group:has(#mergeStrategyOverlapBehavior),.form-group:has(#postMergeAuditMode),.form-group:has(#pushAfterMerge),.form-group:has(#pushRemote),.form-group:has(#project-model-lane-title-summarizer-fallback),.form-group:has(#autoSelectModelPreset),.form-group:has(#autoSummarizeTitles),.form-group:has(#useAiMergeCommitSummary),.form-group:has(#prTitlePromptInstructions),.form-group:has(#prDescriptionPromptInstructions),.model-pricing-section,details:has(#openrouterAppAttributionReferer),.form-group:has(#openrouterModelSync),.form-group:has(#opencodeGoModelSync)){display:none}.settings-content::-webkit-scrollbar{width:6px}.settings-content::-webkit-scrollbar-track{background:transparent}.settings-content::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm)}.settings-content::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.settings-content>*{animation:settingsFadeIn var(--duration-normal) ease}@keyframes settingsFadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.settings-section-heading{font-size:var(--font-size-sm);font-weight:600;padding:var(--space-lg) 0 var(--space-md);margin:0 0 var(--space-md);color:var(--text)}.settings-content>.settings-section-heading:first-child,.settings-modal-section>.settings-section-heading:first-child{padding-top:var(--space-md)}.settings-section-heading--spaced{margin-top:var(--space-lg)}.settings-section-description{margin:0;margin-bottom:var(--space-sm);color:var(--text-muted);font-size:var(--font-size-sm);line-height:1.5}.settings-plugins-subsection-toggle{display:inline-flex;gap:var(--space-xs);margin:var(--space-md) 0}.settings-plugins-subsection-btn{display:inline-flex;align-items:center;justify-content:center;border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-pill);background:var(--surface);color:var(--text-muted);font-size:var(--font-size-sm);font-weight:600;padding:var(--space-xs) var(--space-md);cursor:pointer;transition:background var(--transition-fast),color var(--transition-fast),border-color var(--transition-fast),box-shadow var(--transition-fast)}.settings-plugins-subsection-btn:hover{background:var(--surface-hover, color-mix(in srgb, var(--text) 6%, transparent));color:var(--text)}.settings-plugins-subsection-btn:focus-visible{outline:none;box-shadow:var(--focus-ring-strong)}.settings-plugins-subsection-btn.active{background:color-mix(in srgb,var(--todo) 14%,transparent);border-color:color-mix(in srgb,var(--todo) 45%,var(--border));color:var(--todo)}.settings-plugins-subsection-panel{padding-bottom:var(--space-md)}.settings-scope-icon{inline-size:var(--space-md);block-size:var(--space-md);flex:0 0 var(--space-md);margin-right:var(--space-xs);color:var(--text-muted)}.settings-note{display:block;padding:0 var(--space-xl);margin-top:var(--space-xs);font-size:var(--font-size-xs);color:var(--text-muted)}.form-inline-group{display:flex;align-items:center;gap:var(--space-sm)}.form-inline-group .input{flex:1;min-width:0}.btn-link{background:none;border:none;padding:0;font-size:var(--font-size-xs);color:var(--accent, #4a90e2);cursor:pointer;text-decoration:underline;white-space:nowrap}.btn-link:hover{text-decoration:none}.settings-overlap-ignore-group code{font-family:var(--font-mono);font-size:var(--font-size-sm)}.settings-button-row{display:flex;flex-wrap:wrap;gap:var(--space-sm);margin-top:var(--space-sm)}.settings-raw-output{margin:var(--space-sm) 0 0;padding:var(--space-sm);border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text-muted);max-height:calc(var(--space-2xl) * 7);overflow:auto;font-family:var(--font-mono);font-size:var(--font-size-xs)}.settings-url-output{display:block;margin-top:var(--space-xs);padding:var(--space-sm);border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text-muted);font-family:var(--font-mono);font-size:var(--font-size-xs);overflow-wrap:anywhere;word-break:break-word;overflow-x:auto;max-width:100%}.settings-qr-preview{margin-top:var(--space-sm);display:flex;flex-direction:column;gap:var(--space-sm)}.settings-qr-preview-label{margin:0;font-size:var(--font-size-xs);color:var(--text-muted)}.settings-qr-preview-image-wrap{width:fit-content;max-width:100%;padding:var(--space-sm);border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--card)}.settings-qr-preview-image{display:block;width:min(calc(var(--space-2xl) * 6),100%);height:auto;aspect-ratio:1 / 1}.remote-provider-selector{display:flex;gap:var(--space-xs);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);padding:var(--space-xs);background:var(--surface)}.remote-provider-option{position:relative;flex:1;cursor:pointer}.remote-provider-option input{position:absolute;opacity:0;width:0;height:0}.remote-provider-option span{display:block;padding:var(--space-sm) var(--space-md);text-align:center;border-radius:var(--radius-sm);border:var(--btn-border-width) solid transparent;color:var(--text-muted);transition:background var(--transition-fast),color var(--transition-fast),border-color var(--transition-fast)}.remote-provider-option-content{display:inline-flex;align-items:center;gap:var(--space-xs)}.remote-provider-option input:checked+span{background:var(--card);color:var(--text);border-color:var(--border)}.remote-provider-option input:focus-visible+span{box-shadow:var(--focus-ring-strong)}.remote-status-bar{--status-color: var(--text-muted);display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-sm) var(--space-md);border-radius:var(--radius-md);margin:0 var(--space-xl) var(--space-md);background:color-mix(in srgb,var(--status-color) 10%,transparent)}.remote-status-bar--running{--status-color: var(--color-success)}.remote-status-bar--starting{--status-color: var(--color-warning)}.remote-status-bar--error{--status-color: var(--color-error)}.remote-status-bar--stopped{--status-color: var(--text-muted)}.remote-share-block{display:flex;flex-direction:column;gap:var(--space-sm);margin:0 var(--space-xl) var(--space-md);padding:var(--space-sm) var(--space-md);border:1px solid var(--border);border-radius:var(--radius-md);background:color-mix(in srgb,var(--text-muted) 5%,transparent)}.remote-share-row{display:flex;flex-direction:column;gap:var(--space-xs)}.remote-share-row .settings-qr-preview-image{margin-top:var(--space-xs)}.remote-status-dot{width:var(--space-sm);height:var(--space-sm);border-radius:50%;display:inline-block;flex-shrink:0}.remote-status-dot--running{background:var(--color-success)}.remote-status-dot--starting{background:var(--color-warning)}.remote-status-dot--error{background:var(--color-error)}.remote-status-dot--stopped{background:var(--text-muted)}.remote-status-url{margin-left:auto;font-family:var(--font-mono);overflow-wrap:anywhere;word-break:break-word;user-select:all}.remote-provider-settings{display:flex;flex-direction:column;gap:var(--space-sm)}.remote-cli-detection{display:flex;align-items:flex-start;gap:var(--space-sm);margin:0 var(--space-xl) var(--space-md);padding:var(--space-sm) var(--space-md);border-radius:var(--radius-sm)}.remote-cli-detection--available{background:color-mix(in srgb,var(--color-success) 10%,transparent);color:var(--color-success)}.remote-cli-detection--missing{background:color-mix(in srgb,var(--color-warning) 10%,transparent);color:var(--color-warning)}.remote-cli-detection-content{display:flex;flex-direction:column;gap:var(--space-xs);color:var(--text)}.remote-cli-detection .btn{align-self:flex-start}.remote-cli-install-error{color:var(--color-error)}.remote-cli-manual{color:var(--text-dim)}.remote-external-tunnel-panel{display:flex;flex-direction:column;gap:var(--space-sm);margin:0 var(--space-xl) var(--space-md);padding:var(--space-sm) var(--space-md);border:1px solid var(--border);border-radius:var(--radius-md);background:color-mix(in srgb,var(--color-info) 10%,transparent)}.remote-external-tunnel-header{display:flex;align-items:center;gap:var(--space-sm);color:var(--color-info)}.remote-external-tunnel-qr{display:flex;flex-direction:column;gap:var(--space-xs)}.remote-external-tunnel-actions{display:flex;flex-direction:column;gap:var(--space-sm)}.remote-advanced-details{margin:var(--space-lg) var(--space-xl) 0;border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);padding:var(--space-md);background:var(--surface)}.remote-advanced-details>summary{cursor:pointer;color:var(--text-muted);font-size:var(--font-size-xs);list-style:none}.remote-advanced-details>summary::-webkit-details-marker{display:none}.remote-advanced-details>summary:before{content:"▸";margin-right:var(--space-xs)}.remote-advanced-details[open]>summary:before{content:"▾"}.settings-option-details{margin-top:var(--space-xs)}.settings-research-provider-group{display:flex;flex-direction:column;gap:var(--space-sm);min-width:0}.settings-research-provider-advanced-details{min-width:0;padding-inline-start:var(--space-md)}.settings-research-provider-advanced-body{display:flex;flex-direction:column;gap:var(--space-sm);min-width:0;padding-top:var(--space-sm)}.settings-research-provider-advanced-body>.form-group{margin-top:0;padding:0;min-width:0}.settings-research-provider-advanced-body .input{width:100%;min-width:0}.settings-research-empty-state{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-sm);min-width:0}@media(max-width:768px){.settings-research-provider-advanced-details{padding-inline-start:0}}.settings-option-details>summary{cursor:pointer;color:var(--text-muted);font-size:var(--font-size-xs);list-style:none}.settings-option-details>summary::-webkit-details-marker{display:none}.settings-option-details>summary:before{content:"▸";margin-right:var(--space-xs)}.settings-option-details[open]>summary:before{content:"▾"}.settings-gitlab-disclosure{display:flex;flex-direction:column;gap:var(--space-sm);margin:var(--space-md) var(--space-xl) 0;padding:var(--space-md);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:var(--surface-secondary)}.settings-gitlab-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);cursor:pointer;list-style:none;color:var(--text-primary)}.settings-gitlab-disclosure>summary::-webkit-details-marker{display:none}.settings-gitlab-disclosure>summary:before{content:"▸";color:var(--text-muted)}.settings-gitlab-disclosure[open]>summary:before{content:"▾"}.settings-gitlab-disclosure__title{flex:1 1 auto;font-weight:var(--font-weight-semibold);min-width:0}.settings-gitlab-disclosure__toggle{flex:0 0 auto}.settings-gitlab-disclosure__body{display:flex;flex-direction:column;gap:var(--space-sm);margin-top:var(--space-sm);min-width:0}.settings-gitlab-disclosure__body>.form-group{margin-top:0;padding:0}@media(max-width:768px){.settings-gitlab-disclosure{margin-inline:var(--space-sm);padding:var(--space-sm)}.settings-gitlab-disclosure>summary{align-items:flex-start;flex-wrap:wrap;gap:var(--space-sm)}.settings-gitlab-disclosure__toggle{flex-basis:100%}}.remote-cf-advanced-details{margin-top:var(--space-xs)}.remote-cf-advanced-details>summary{cursor:pointer;color:var(--text-muted);font-size:var(--font-size-xs);list-style:none}.remote-cf-advanced-details>summary::-webkit-details-marker{display:none}.remote-cf-advanced-details>summary:before{content:"▸";margin-right:var(--space-xs)}.remote-cf-advanced-details[open]>summary:before{content:"▾"}.remote-cf-advanced-fields{display:flex;flex-direction:column;gap:var(--space-sm);margin-top:var(--space-sm)}.remote-tunnel-actions{margin-top:var(--space-md)}.remote-tunnel-actions .btn{width:100%}.settings-overlap-ignore-list{display:flex;flex-direction:column;gap:var(--space-sm);margin:var(--space-sm) 0}.settings-overlap-ignore-row,.settings-overlap-ignore-path-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-sm);align-items:center}.settings-overlap-path-picker-modal{max-width:min(960px,calc(100vw - var(--space-2xl)))}.settings-overlap-path-picker-body{display:flex;flex-direction:column;gap:var(--space-sm);max-height:min(70vh,720px)}.settings-overlap-path-picker-note{margin:0;font-size:var(--font-size-xs);color:var(--text-muted)}.settings-section-divider{border-top:1px solid var(--border);margin:var(--space-lg) var(--space-xl)}.settings-reset-dialog__choice{display:flex;flex-direction:column;gap:var(--space-xs);margin-block-end:var(--space-md)}.settings-reset-dialog__choice-btn{align-self:flex-start;width:100%}.settings-reset-dialog__ineligible-reason{color:var(--text-muted)}@media(max-width:768px){.settings-reset-dialog{max-width:calc(100vw - var(--space-md))}.settings-reset-dialog__choice-btn{width:100%}}@media(max-width:768px){.settings-note{padding:0 var(--space-sm)}.settings-overlap-ignore-row,.settings-overlap-ignore-path-controls{grid-template-columns:minmax(0,1fr)}.settings-overlap-ignore-row>.btn{justify-self:start}.settings-overlap-path-picker-modal{max-width:calc(100vw - var(--space-md))}.remote-provider-selector{flex-direction:column}.remote-status-bar{flex-wrap:wrap;margin:0 var(--space-sm) var(--space-sm)}.remote-share-block{margin:0 var(--space-sm) var(--space-sm)}.remote-status-url{width:100%;margin-left:0;font-size:var(--font-size-xs)}.remote-provider-option,.remote-tunnel-actions .btn{min-height:36px}.remote-cli-detection,.remote-external-tunnel-panel{margin:0 var(--space-sm) var(--space-sm)}}.ntfy-advanced-disclosure{margin-top:var(--space-md);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:var(--surface)}.ntfy-advanced-disclosure>summary{cursor:pointer;list-style:none;padding:var(--space-sm) var(--space-md);font-size:var(--font-size-xs);font-weight:600;color:var(--text)}.ntfy-advanced-disclosure>summary::-webkit-details-marker{display:none}.ntfy-advanced-content{padding:0 var(--space-md) var(--space-md);display:flex;flex-direction:column;gap:var(--space-sm)}.settings-inline-link{color:var(--todo);text-decoration:none;transition:text-decoration var(--transition-fast)}.settings-inline-link:hover{text-decoration:underline}.settings-inline-link:focus-visible{outline:none;box-shadow:var(--focus-ring-strong);border-radius:var(--radius-sm)}.notification-provider-card{border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-lg);background:var(--surface);margin:0 var(--space-xl) var(--space-lg);overflow:hidden}.notification-provider-header{display:flex;align-items:center;justify-content:space-between;padding:var(--space-md) var(--space-lg);border-bottom:var(--btn-border-width) solid var(--border)}.notification-provider-body{padding:var(--space-lg);display:flex;flex-direction:column;gap:var(--space-lg)}.notification-provider-actions{display:flex;flex-wrap:wrap;gap:var(--space-sm);padding-top:var(--space-md);border-top:var(--btn-border-width) solid var(--border);margin-top:var(--space-md)}.notification-test-feedback{display:flex;flex-direction:column;gap:var(--space-xs);margin-top:var(--space-sm)}.notification-test-feedback-item{border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-sm);padding:var(--space-xs) var(--space-sm)}.notification-test-feedback-item--success{border-color:color-mix(in srgb,var(--color-success) 45%,var(--border));background:color-mix(in srgb,var(--color-success) 8%,transparent);color:var(--color-success)}.notification-test-feedback-item--error{border-color:color-mix(in srgb,var(--color-error) 45%,var(--border));background:color-mix(in srgb,var(--color-error) 8%,transparent);color:var(--color-error)}@media(max-width:768px){.notification-provider-actions{flex-direction:column}.notification-provider-actions .btn{width:100%}}.memory-status-message{display:flex;gap:var(--space-md);align-items:center;justify-content:space-between;margin-bottom:var(--space-md)}.memory-status-message span{min-width:0}.memory-retrieval-test{margin-top:var(--space-lg)}.memory-test-result{margin:0 var(--space-xl) var(--space-lg);padding:var(--space-md);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:var(--card)}.memory-test-result strong,.memory-test-result span{color:var(--text);font-size:var(--font-size-xs)}.memory-test-result small{display:block;margin-top:var(--space-xs);color:var(--text-muted);font-size:var(--font-size-xs)}.memory-test-result ul{margin:var(--space-md) 0 0;padding:0;list-style:none}.memory-test-result li{padding-top:var(--space-sm);border-top:var(--btn-border-width) solid var(--border)}.memory-test-result li+li{margin-top:var(--space-sm)}.memory-test-result p{margin:var(--space-xs) 0 0;color:var(--text-muted);font-size:var(--font-size-xs);line-height:1.5;overflow-wrap:anywhere}.memory-editor-section{margin-top:var(--space-lg);display:flex;flex:1 1 auto;flex-direction:column;min-height:0}.memory-editor-form-group{display:flex;flex:1 1 auto;flex-direction:column;min-height:0}.memory-file-summary{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--space-xs) var(--space-md);align-items:center;margin:0 var(--space-xl) var(--space-md);padding:var(--space-md);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:var(--card)}.memory-file-summary span{display:inline-flex;align-items:center;justify-content:center;padding:var(--space-xs) var(--space-sm);border-radius:var(--radius-pill);color:var(--color-info);background:color-mix(in srgb,var(--color-info) 12%,transparent);font-size:var(--font-size-2xs);font-weight:600}.memory-file-summary strong{min-width:0;overflow-wrap:anywhere;color:var(--text);font-family:var(--font-mono);font-size:var(--font-size-xs)}.memory-file-summary small{grid-column:2;color:var(--text-muted);font-size:var(--font-size-xs)}.memory-editor-frame{min-height:50vh;border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);overflow:hidden;display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.auth-panel-body{padding-inline:var(--space-md)}.auth-section-hint{padding:var(--space-md) var(--space-lg);margin-bottom:var(--space-md);background:var(--bg-tertiary);border-radius:var(--radius-md);font-size:var(--font-size-sm);color:var(--text-muted);border-left:3px solid var(--text-muted)}.auth-provider-group{margin-bottom:calc(var(--space-sm) + var(--space-xs) / 2)}.auth-group-label{font-size:var(--font-size-2xs);font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);margin-bottom:var(--space-xs);padding:0 4px}.auth-provider-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);margin-bottom:var(--space-xs);overflow:hidden;transition:border-color var(--transition-fast),box-shadow var(--transition-fast)}.auth-provider-card:hover{border-color:var(--text-dim)}.auth-provider-card--authenticated{border-color:color-mix(in srgb,var(--color-success) 40%,var(--border));background:color-mix(in srgb,var(--color-success) 5%,var(--surface))}.auth-provider-card--authenticated:hover{border-color:color-mix(in srgb,var(--color-success) 60%,var(--border))}.auth-provider-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--space-sm) var(--space-md);gap:12px}.auth-provider-info{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:1;min-width:0}.auth-provider-info strong{font-weight:500;color:var(--text)}.auth-provider-icon-slot{display:inline-flex;align-items:center;justify-content:center;inline-size:calc(var(--space-md) + var(--space-xs) * 2);block-size:calc(var(--space-md) + var(--space-xs) * 2);flex-shrink:0}.auth-provider-icon-slot .provider-icon{display:inline-flex}.auth-hint{display:block;padding:12px 4px 0;font-size:var(--font-size-xs);color:var(--text-muted);border-top:1px solid var(--border);margin-top:8px}.auth-apikey-section{display:flex;flex-direction:column;gap:var(--space-xs);align-items:flex-end;flex-shrink:0}.auth-apikey-input-row{display:flex;gap:6px;align-items:center}.auth-apikey-input{background:var(--surface-1);border:1px solid var(--border);border-radius:6px;color:var(--text);padding:6px 10px;font-size:var(--font-size-sm);width:180px;font-family:monospace}.auth-apikey-input:focus{outline:none;border-color:var(--todo);box-shadow:var(--focus-ring)}.auth-apikey-input:disabled{opacity:.6}.auth-apikey-progress{font-size:var(--font-size-xs);color:var(--text-muted);padding-right:4px}.auth-apikey-error{font-size:var(--font-size-2xs);color:var(--color-error);padding-right:4px}.auth-provider-actions{display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-xs);min-width:0;max-width:100%;margin-left:auto}.auth-provider-actions-row{display:flex;width:100%;align-items:center;gap:var(--space-sm)}.auth-device-code-panel{width:100%;margin-top:var(--space-sm);padding:var(--space-sm);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:color-mix(in srgb,var(--surface) 85%,transparent);display:flex;flex-direction:column;gap:var(--space-sm)}.auth-device-code-pill{font-family:var(--font-mono);font-size:var(--font-size-sm);letter-spacing:var(--space-xs);padding:var(--space-sm) var(--space-md);border-radius:var(--radius-pill);border:var(--btn-border-width) solid var(--border);background:var(--card);color:var(--text);display:flex;align-self:stretch}.auth-key-hint{font-family:var(--font-mono);font-size:var(--font-size-xs);color:var(--text-muted);display:inline-block;margin-top:var(--space-xs);user-select:none}.settings-lane-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:10px;font-size:var(--font-size-2xs);font-weight:500;white-space:nowrap}.settings-lane-badge--override{background-color:color-mix(in srgb,var(--todo) 20%,transparent);color:var(--todo)}.settings-lane-badge--inherited{background-color:color-mix(in srgb,var(--text-muted) 15%,transparent);color:var(--text-muted)}.settings-scope-group{margin-top:var(--space-md)}.settings-scope-group-header{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-sm)}.settings-scope-group-header .settings-section-heading{padding-bottom:0;margin-bottom:0}.settings-scope-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:10px;font-size:var(--font-size-2xs);font-weight:500;white-space:nowrap}.settings-scope-badge--global{background-color:color-mix(in srgb,var(--accent, #4a90e2) 18%,transparent);color:var(--accent, #4a90e2)}.settings-scope-badge--project{background-color:color-mix(in srgb,var(--text-muted) 15%,transparent);color:var(--text-muted)}.settings-scope-caption{display:block;margin:var(--space-xs) 0 var(--space-md);color:var(--text-muted);font-size:var(--font-size-xs);line-height:1.4}.settings-description{font-size:var(--font-size-sm);color:var(--text-dim);padding-inline:var(--space-xl);margin-block:0 var(--space-md);line-height:1.5}.settings-token-cap-row{display:flex;align-items:center;gap:var(--space-sm)}.settings-model-lane-label-row{display:flex;align-items:center;gap:var(--space-sm);margin-bottom:var(--space-xs)}.settings-model-lane-control-row{display:flex;align-items:center;gap:var(--space-sm)}.settings-model-lane-control-main{flex:1}.settings-model-lane-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-sm);padding:var(--space-md) var(--space-xl) var(--space-lg);margin-block:var(--space-sm) var(--space-lg);border-bottom:var(--btn-border-width) solid var(--border)}.settings-error{color:var(--color-error)}.settings-summarization-actions{justify-content:flex-start}.settings-model-presets{display:flex;flex-direction:column;gap:var(--space-md)}.settings-preset-list{display:flex;flex-direction:column;gap:var(--space-sm)}.settings-preset-item{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-md);padding:var(--space-md);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:var(--card)}.settings-preset-item-meta{display:flex;flex-direction:column;gap:var(--space-xs);min-width:0}.settings-preset-item-meta strong{color:var(--text);overflow-wrap:anywhere}.settings-preset-summary{font-size:var(--font-size-xs);overflow-wrap:anywhere}.settings-preset-item-actions{display:flex;gap:var(--space-xs);flex-wrap:wrap;justify-content:flex-end}.settings-preset-actions{display:flex;justify-content:flex-start}.settings-preset-editor{display:flex;flex-direction:column;gap:var(--space-md);padding:var(--space-md);border:var(--btn-border-width) solid var(--border);border-radius:var(--radius-md);background:color-mix(in srgb,var(--surface) 85%,var(--card))}.settings-preset-editor-fields{display:flex;flex-direction:column;gap:var(--space-sm)}.settings-preset-editor .form-group{padding:0}.settings-preset-editor-actions{justify-content:flex-start;margin-top:0;padding:0}.settings-preset-auto-select{margin-top:var(--space-sm)}.settings-preset-size-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-sm)}.settings-preset-size-row{padding:0}@media(max-width:768px){.settings-layout{flex-direction:column;min-height:0}.settings-navigation{width:100%;min-width:0;flex:0 0 auto;border-right:none;border-bottom:var(--btn-border-width) solid var(--border);background:var(--surface)}.settings-nav-resize-handle{display:none}.settings-search{padding:var(--space-sm) var(--space-md) var(--space-sm)}.settings-advanced-toggle{padding:0 var(--space-md) var(--space-sm);border-bottom:none}.settings-search-toggle{--settings-search-toggle-touch-target: calc(var(--space-lg) + var(--space-lg) + var(--space-xs));display:inline-flex;align-items:center;justify-content:center;width:var(--settings-search-toggle-touch-target);height:var(--settings-search-toggle-touch-target);flex-shrink:0}.settings-search-row{margin-top:var(--space-xs)}.settings-search-input-wrap{align-items:stretch}.settings-search-input{font-size:16px}.settings-mobile-section-picker{display:flex;flex-direction:column;gap:var(--space-xs);padding:var(--space-sm) var(--space-md) var(--space-md);border-bottom:none;background:var(--surface)}.settings-mobile-section-picker-control-row{display:flex;align-items:center;gap:var(--space-xs);min-width:0}.settings-mobile-section-picker select,.settings-mobile-section-picker .settings-search-empty-hint{flex:1 1 auto;min-width:0;width:100%}.settings-mobile-section-picker select:focus-visible{outline:none;border-color:var(--todo);box-shadow:var(--focus-ring-strong)}.settings-sidebar{display:none}.settings-nav-item{display:flex;align-items:center;justify-content:center;gap:var(--space-xs);border-left:none;border-bottom:2px solid transparent;border-radius:var(--radius-md) var(--radius-md) 0 0;padding:calc(var(--space-xs) + var(--space-xs) / 2) var(--space-md);white-space:nowrap}.settings-nav-item:hover{border-left-color:transparent;border-bottom-color:var(--border)}.settings-nav-item.active{border-left-color:transparent;border-bottom-color:var(--todo)}.settings-group-header{display:none}.notification-provider-card{margin:0 var(--space-sm) var(--space-sm)}.notification-provider-header{padding:var(--space-sm) var(--space-md)}.notification-provider-body{padding:var(--space-md)}.settings-scope-icon{margin-right:0}.settings-content{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;padding:var(--space-md) var(--space-md) var(--space-lg)}.settings-content .form-group small{overflow-wrap:break-word;word-break:normal}.settings-content input,.settings-content select,.settings-content textarea{font-size:16px}.settings-section-heading{padding:var(--space-md) 0 var(--space-sm);margin:0 0 var(--space-sm)}.settings-plugins-subsection-toggle{display:flex;width:100%;padding:0 var(--space-sm)}.settings-plugins-subsection-btn{flex:1;min-height:36px}.settings-plugins-subsection-panel{padding-left:var(--space-sm);padding-right:var(--space-sm)}.form-group{padding:0}.memory-editor-frame{min-height:65vh}.memory-file-summary{grid-template-columns:1fr;margin:0 var(--space-sm) var(--space-sm);padding:var(--space-sm)}.memory-status-message{align-items:stretch;flex-direction:column}.memory-file-summary span{justify-content:flex-start}.memory-file-summary small{grid-column:auto}.settings-description{padding:0}.settings-empty-state{padding:var(--space-sm)}.theme-selector{padding:0 var(--space-sm) var(--space-sm)}.settings-model-lane-actions{align-items:stretch;flex-direction:column;margin-block:var(--space-xs) var(--space-md);padding:var(--space-sm) var(--space-sm) var(--space-md)}.settings-content .btn,.settings-preset-item-actions .btn{min-height:36px}.auth-provider-row{flex-wrap:wrap;padding:var(--space-sm);gap:var(--space-sm)}.auth-section-hint{margin:0 var(--space-sm) var(--space-sm);padding:var(--space-sm)}.auth-provider-group{margin-bottom:var(--space-sm)}.auth-group-label{padding:0 var(--space-sm)}.auth-provider-card{margin:0 var(--space-sm) var(--space-sm)}.auth-panel-body{padding-inline:0}.auth-panel-body .auth-section-hint{margin:0 0 var(--space-sm)}.auth-panel-body .auth-group-label{padding:0}.auth-panel-body .auth-provider-card{margin:0 0 var(--space-sm)}.auth-provider-header{flex-wrap:wrap;padding:var(--space-sm);gap:var(--space-sm)}.auth-provider-header>div:not(.auth-provider-info):not(.auth-apikey-section):not(.auth-provider-actions){margin-left:auto}.auth-provider-header>.auth-provider-actions{width:100%;flex-basis:100%;min-width:0;max-width:100%;align-items:flex-start;margin-left:0}.auth-provider-actions-row{width:100%;justify-content:flex-end}.auth-device-code-panel{width:100%}.auth-device-code-pill{max-width:100%;overflow-wrap:anywhere}.auth-provider-info{width:100%;flex-basis:100%}.auth-apikey-section{width:100%;flex-basis:100%;align-items:flex-end}.auth-apikey-input-row{width:100%;flex-wrap:wrap;justify-content:flex-end}.auth-apikey-input{flex:1;min-width:120px;width:auto}.auth-apikey-input-row .btn{flex-shrink:0;margin-left:auto}.auth-hint{padding:var(--space-sm) var(--space-sm) 0}.settings-model-presets{gap:var(--space-sm)}.settings-preset-item{flex-direction:column;align-items:stretch;padding:var(--space-sm)}.settings-preset-item-actions{justify-content:flex-start}.settings-preset-editor{padding:var(--space-sm)}.settings-preset-editor-actions{flex-wrap:wrap}.settings-preset-size-grid{grid-template-columns:1fr;gap:var(--space-xs)}.settings-node-routing-note{padding:var(--space-sm);font-size:var(--font-size-xs)}}.settings-node-routing-note{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-md) var(--space-lg);margin-top:var(--space-sm);color:var(--text-muted);font-size:var(--font-size-sm);line-height:1.5}.settings-node-status{display:inline-flex;align-items:center;gap:var(--space-xs);margin-top:var(--space-sm);font-size:var(--font-size-xs);color:var(--text-muted)}.auth-advanced-disclosure{margin-top:var(--space-md);border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}.auth-advanced-disclosure>summary{cursor:pointer;padding:var(--space-sm) var(--space-md)}.auth-advanced-content{display:flex;flex-direction:column;gap:var(--space-sm);padding:0 var(--space-md) var(--space-md)}.auth-custom-provider-item{display:flex;justify-content:space-between;align-items:center;gap:var(--space-sm)}.auth-custom-provider-actions{display:flex;gap:var(--space-sm)}.settings-warning-banner{margin-top:var(--space-sm);padding:var(--space-sm) var(--space-md);border:1px solid var(--color-warning);border-radius:var(--radius-md);background:color-mix(in srgb,var(--color-warning) 12%,transparent);color:var(--text);font-size:var(--font-size-sm);line-height:1.4}.settings-warning-banner strong{color:var(--color-warning);margin-right:var(--space-xs)}.settings-sync-workflow-note{margin-top:var(--space-md);font-size:var(--font-size-sm);color:var(--text-muted)}@media(max-width:768px){.auth-custom-provider-item{flex-direction:column;align-items:flex-start}.settings-warning-banner{padding:var(--space-sm)}}.shortcut-category{margin-top:var(--space-lg)}.shortcut-category:first-of-type{margin-top:0}.shortcut-row{display:flex;flex-direction:column;gap:var(--space-xs);padding:var(--space-sm) 0;border-bottom:1px solid var(--color-border)}.shortcut-row:last-child{border-bottom:0}.shortcut-capture{display:flex;align-items:center;gap:var(--space-sm);flex-wrap:wrap}.shortcut-capture__input{flex:1 1 auto;min-width:0}.shortcut-capture__input--invalid{border-color:var(--color-error)}.shortcut-capture__record,.shortcut-capture__clear{flex-shrink:0;white-space:nowrap}.shortcut-capture__record--active{color:var(--color-warning)}.shortcut-conflict-banner{color:var(--color-error)}@media(max-width:768px){.shortcut-capture{flex-direction:column;align-items:stretch}.shortcut-capture__input{width:100%}}