@xopcai/xopc 0.0.193 → 0.0.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DmNq0t2n.js → agent-avatar-dicebear-4ln7j-oZ.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-BOo1rVn9.js → agents-C1Z-rurI.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B3xStqSX.js → app-management-settings-panel-B0IMpHk8.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DglyenDq.js → appearance-settings-BG6ZGIUf.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DC9qPFTx.js → apps-page-CwsZENTk.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-DvtcrBss.js → archive-plugin-BNpjG4FR.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CALdq4xM.js → attachment-load-BK25C_hA.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BIGGKb0T.js → automations-page-BedezAfO.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-GaVuvrDI.js → binary-plugins-fbFe6Jqc.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-C2KrMYa_.js → block-editor-SQHwWg1e.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-CPW_E-xj.js → browser-settings-page-CC0_TfTy.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-FfEEjhIS.js → browser-workflow-inputs-DuUQ_Ycz.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-DFP9_UQk.js → browser-workflows-page-B8I2FmrM.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CsD8aGHU.js → capabilities-settings-panel-ditT6VRs.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-settings-panel-NCeyWH6Z.js → capability-presets-settings-panel-bNVds1ta.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-CknzwxNC.js → channels-settings-DhsWSbJ2.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-vaSrhPF8.js → connectors-api-Ne8mQrYN.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-DEGE7xp_.js → connectors-page-hZA9M1z_.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-expression-BjFuXlGY.js → cron-expression-DtWb3YAh.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DOdkHdPv.js → dependency-picker-3vjdusik.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Dz-Yf8Uu.js → desktop-pet-NmW7VWdO.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-C8EHFEtd.js → desktop-pet-settings-DrdSI9lX.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DKbfmZlZ.js → directory-picker-path-field-CG5XR1UD.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-Dq0xsr_e.js → extension-debug-page-RjIezQyy.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-IgSLUyWP.js → extension-page-D9Elz9mr.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-VC-8Pjn2.js → extension-settings-page-BvVjqFvm.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-CH2R7yqo.js → gateway-config-api-C-rYVz-n.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DLQJWaBQ.js → gateway-settings-CLS25-gm.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-43loWoGb.js → heartbeat-settings-DSgDxtwJ.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-DqvpI6LC.js → home-page-CDpUUelT.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BpkdvHH0.js → index-Cb9y6tVR.js} +8 -8
- package/dist/gateway/static/root/assets/index-DtEVsSU1.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DJDZes_8.js → keyboard-shortcuts-settings-RcHmSHYI.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CvNQM6qm.js → local-app-workbench-page-DvzXo7dx.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-C2ajOn1D.js → local-apps-page-s7PKLTvO.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BLm5yWqQ.js → logs-page-CNm5fu3L.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings--_eXnFVr.js → management-settings-CWUHBXje.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-iL2oi-x2.js → markdown-split-B-IuPr4L.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BIbkLVpQ.js → media-plugins-CiejHVt4.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-xFxaZ6gT.js → notes-page-BSJAwHqy.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-workbench-PAftxL3V.js → notes-workbench-DTWRQ_EU.js} +2 -2
- package/dist/gateway/static/root/assets/{page-tabs-CROi9zm1.js → page-tabs-D6YJ6_l_.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BwYcPjOM.js → preview-open-alternatives-Tw_G-6jb.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BezeuVFd.js → product-open-page-BlB3QjTV.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-CCdfZcw-.js → project-detail-page-DT7aWLWT.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-DOG9zm5e.js → projects-page-B-i3U2fU.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DQBFgveI.js → remote-access-hub-v-kXavTc.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Bs6tpSyX.js → runtime-tools-settings-panel-D59bftC7.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-CWoSjz9s.js → schema-form-DyXqGA71.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-Db6L6M2H.js → sessions-page-tEfg1Pru.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-tbguNxVJ.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BJaMEHsX.js → settings-form-section-DZUGXwFO.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-sn4k17x7.js → settings-loading-skeleton-Lz1ec5lN.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-D2hfeFPX.js → settings-page-DLofKC7q.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CLtUsWsu.js → settings-page-layout-BdkN2U81.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-UmQC_uZ1.js → setup-status-panel-DQgoV7gj.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BJ58AluH.js → share-preview-page-DrZVv8tB.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BZKn6Fdc.js → shares-settings-I2bBkyDb.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-Cx3i24w_.js → skill-reload-api-gFdcImEc.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-DjUllGtk.js → skills-page-zOD__-H5.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-CZYIuE26.js → skills-page.utils-ZDcx95iD.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DUrgdQMk.js → system-settings-panel-BJhat70L.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BGG2cFe9.js → task-detail-page-DoyREaFj.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-CRNMvvFX.js → typed-models-lib-B1p3wMFK.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-Dle3-zdQ.js → use-autosave-Frcfbncl.js} +1 -1
- package/dist/gateway/static/root/assets/{user-context-page-BLLmw5S1.js → user-context-page-DniWcH92.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-BrWH0dCl.js → voice-api-key-field-CSNOUNF4.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BZ1l9CFM.js → work-discovery-overlay-DTJGssPz.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-Bt2-fzHu.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BK6e9yzK.js → workflow-run-setup-panel-D3uCmyag.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-Bp5JxQJa.js → workflows-page-Ba5fVQWY.js} +1 -1
- package/dist/gateway/static/root/index.html +2 -2
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +1 -1
- package/dist/src/agent/memory/create-memory-manager.js +1 -1
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/hono/routes/local-apps.js +1 -1
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service.js +6 -6
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/work-discovery/analyzer.js +1 -2
- package/package.json +4 -4
- package/dist/gateway/static/root/assets/index-CFVjH-EK.css +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CcO2bd6q.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BnPF2vx7.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,t as n}from"./vendor-react-BOUWij0V.js";import{f as r,l as i}from"./chunk-KS7C4IRE-BMhrPKJC.js";import{t as a}from"./check-DUBLcKHA.js";import{t as o}from"./cn-JdwAhgNB.js";import{t as s}from"./messages-DQ5X6cXp.js";import{n as ee}from"./locale-store-Bjvw7jtg.js";import{Ba as te,Da as c,Dt as ne,Ga as re,Ha as ie,Ja as l,Ka as ae,Qs as u,Ra as d,Tl as oe,Ua as f,Va as se,Wa as ce,Wl as le,Xa as ue,Ya as p,_s as m,bs as h,hl as de,iu as g,jt as fe,ou as pe,qa as me,vs as he,yl as _,za as ge,zc as v}from"./index-BpkdvHH0.js";var y=e(t(),1),b=new Set([`completed`,`failed`,`canceled`]);function x(){return new Promise(e=>window.setTimeout(e,1200))}async function _e(e,t){let n=[],r=t.wait??x;for(let i=0;i<e.length&&!t.shouldStop?.();i+=1){let a=e[i];if(a)try{await t.grantDirectory(a.rootPath);let o=await t.startRun(a.rootPath);for(t.onRun(o,i,e.length);!b.has(o.status)&&!t.shouldStop?.();)await r(),o=await t.fetchRun(o.id),t.onRun(o,i,e.length);if(n.push(o),o.status===`canceled`||t.shouldStop?.())break}catch(e){if(t.onError?.(e,a,i),t.shouldStop?.())break}}return n}var S=n(),C=[`folder_structure`,`recent_progress`,`next_steps`];function w(e){return e instanceof Error?e.message:String(e)}function T({embedded:e=!1,onRequestClose:t}={}){let n=ee(e=>e.language),b=s(n).onboarding.workDiscovery,x=s(n).chat.workingDirectory,T=i(),[ve]=r(),E=e||ve.get(`new`)===`1`,[D,O]=(0,y.useState)(`loading`),[k,A]=(0,y.useState)(null),[j,M]=(0,y.useState)(null),[N,P]=(0,y.useState)(!1),[F,I]=(0,y.useState)(null),[ye,L]=(0,y.useState)(!1),[R,z]=(0,y.useState)(``),[be,xe]=(0,y.useState)(!1),[Se,B]=(0,y.useState)(()=>new Set),[V,Ce]=(0,y.useState)([]),[H,we]=(0,y.useState)(()=>new Set),[Te,U]=(0,y.useState)([]),[Ee,De]=(0,y.useState)(!1),[W,G]=(0,y.useState)({current:0,total:0}),[Oe,ke]=(0,y.useState)([]),[K,Ae]=(0,y.useState)(()=>new Set),q=(0,y.useRef)(!1),je=e=>{Ae(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};(0,y.useEffect)(()=>{let e=!1;return window.electronAPI?.understandingSources?.catalog().then(t=>{e||ke(t)}),()=>{e=!0}},[]);let J=(0,y.useCallback)(e=>{d.getState().updateDirectoryRun(e),M(e),e.status===`completed`?(B(new Set(e.result?.profileCandidates?.filter(e=>e.status===`pending`).map(e=>e.id)??[])),O(e.feedback?.recognitionDecision===`confirmed`?`recommendation`:`recognition`)):e.status===`failed`||e.status===`canceled`?O(`error`):O(`running`)},[]),Me=async()=>{P(!0),I(null);try{let e=await te();if(!e.length){I(b.noCandidates);return}Ce(e),we(new Set([e[0].rootPath])),O(`candidates`)}catch(e){I(w(e))}finally{P(!1)}},Ne=e=>{we(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Pe=(0,y.useCallback)((e,t,n)=>{d.getState().updateDirectoryRun(e),M(e),G({current:t+1,total:n}),U(n=>{let r=[...n];return r[t]=e,r}),O(`running`)},[]),Fe=(0,y.useCallback)(e=>{U(t=>t.map(t=>t?.id===e.id?e:t))},[]),Ie=async()=>{let e=V.filter(e=>H.has(e.rootPath));if(!e.length)return;P(!0),I(null),U([]),G({current:1,total:e.length}),De(!0),q.current=!1;let t=!1;try{let n=await _e(e,{grantDirectory:ce,startRun:l,fetchRun:f,shouldStop:()=>q.current,onRun:(e,n,r)=>{Pe(e,n,r),t||(t=!0,d.getState().collectSources(e.id,[...K]))},onError:(t,n,r)=>{G({current:r+1,total:e.length}),I(b.folderAnalysisFailed.replace(`{{folder}}`,n.displayName).replace(`{{error}}`,w(t)))}});if(q.current)return;let r=n.find(e=>e.status===`completed`)??n.at(-1);r?J(r):O(`candidates`)}catch(e){I(w(e)),O(`candidates`)}finally{De(!1),P(!1)}},Y=fe({onPicked:(0,y.useCallback)(async e=>{P(!0),I(null);try{A(await re(e)),O(`consent`)}catch(e){I(w(e)),O(`intro`)}finally{P(!1)}},[])});(0,y.useEffect)(()=>{let e=!1;return ie().then(async({enabled:n,state:r})=>{if(!e){if(!n){t?t():T(`/chat`,{replace:!0});return}if(!E&&r.activeRunId)try{let t=await f(r.activeRunId);e||J(t);return}catch{}e||O(`intro`)}}).catch(t=>{e||(I(w(t)),O(`intro`))}),()=>{e=!0}},[J,T,t,E]),(0,y.useEffect)(()=>{if(!j||D!==`running`||Ee)return;let e=!1,t=async()=>{try{let t=await f(j.id);e||J(t)}catch{}},n=window.setInterval(()=>void t(),1200),r=e=>{let n=e.detail;(!n?.runId||n.runId===j.id)&&t()};for(let e of[`work-discovery-progress`,`work-discovery-completed`,`work-discovery-failed`,`work-discovery-canceled`])window.addEventListener(e,r);return()=>{e=!0,window.clearInterval(n);for(let e of[`work-discovery-progress`,`work-discovery-completed`,`work-discovery-failed`,`work-discovery-canceled`])window.removeEventListener(e,r)}},[J,Ee,D,j]);let Le=async()=>{P(!0);try{await se()}finally{t?t():T(`/chat`,{replace:!0})}},Re=async()=>{if(k){P(!0),I(null),U([]),G({current:0,total:0});try{await ce(k.canonicalRootPath);let e=await l(k.canonicalRootPath);J(e),d.getState().collectSources(e.id,[...K])}catch(e){I(w(e)),O(`consent`)}finally{P(!1)}}},X=(e,t)=>{let n=t?`?draft=${encodeURIComponent(t)}`:``;T(`/chat/${encodeURIComponent(e)}${n}`)},ze=e=>{M(e),L(!1),xe(!1),B(new Set(e.result?.profileCandidates?.filter(e=>e.status===`pending`).map(e=>e.id)??[])),e.status===`completed`?O(e.feedback?.recognitionDecision===`confirmed`?`recommendation`:`recognition`):e.status===`failed`||e.status===`canceled`?O(`error`):O(`running`)},Be=async()=>{j&&(q.current=!0,J(await ge(j.id)))},Z=async(e,t)=>{if(!j)return;await me(j.id,e.id).catch(()=>{});let r=t?`${n===`zh`?`先帮我评估这个方向,不要修改文件:`:`First assess this direction without changing files:`}\n\n${e.actionPrompt}`:e.actionPrompt;X(j.sessionKey,r)},Ve=async()=>{if(j){P(!0),I(null);try{let e=j.result?.profileCandidates??[],t=await p((e.length>0?await ue(j.id,e.map(e=>({id:e.id,status:Se.has(e.id)?`accepted`:`rejected`}))):j).id,`confirmed`);M(t),Fe(t),O(`recommendation`)}catch(e){I(w(e))}finally{P(!1)}}},Q=async e=>{if(!(!j||!R.trim())){P(!0),I(null);try{let t=await p(j.id,e,R.trim());M(t),X(t.sessionKey,R.trim())}catch(e){I(w(e)),P(!1)}}},He=async()=>{if(j){P(!0);try{X((await p(j.id,`dismissed`)).sessionKey)}catch(e){I(w(e)),P(!1)}}},$=j?.result?.suggestions.find(e=>e.id===j.result?.primarySuggestionId)??j?.result?.suggestions[0],Ue=j?.result?.suggestions.filter(e=>e.id!==$?.id)??[],We=e=>e===`command`?b.riskCommand:e===`file_write`?b.riskFileWrite:b.riskAnalysis,Ge=Te.filter(e=>e?.status===`completed`),Ke=e&&D===`candidates`,qe=Ge.length>1?(0,S.jsxs)(`div`,{className:`mt-6 rounded-xl border border-edge bg-surface-panel p-2`,children:[(0,S.jsx)(`p`,{className:`px-2 pb-2 text-xs font-medium text-fg-muted`,children:b.analysisResults}),(0,S.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:Ge.map(e=>{let t=V.find(t=>t.rootPath===e.rootPath)?.displayName??e.rootPath.split(/[\\/]/).filter(Boolean).at(-1)??e.rootPath;return(0,S.jsx)(`button`,{type:`button`,className:`rounded-lg px-3 py-2 text-sm font-medium transition ${e.id===j?.id?`bg-accent text-white`:`bg-surface-muted text-fg hover:bg-surface-hover`}`,onClick:()=>ze(e),children:t},e.id)})})]}):null;return(0,S.jsxs)(`div`,{className:e?`flex h-full min-h-0 flex-1 flex-col overflow-hidden bg-surface-base`:`flex min-h-full flex-1 flex-col bg-surface-base`,children:[(0,S.jsxs)(`main`,{className:e?`mx-auto flex h-full min-h-0 w-full max-w-[40rem] flex-1 flex-col px-5 py-7 sm:px-8 sm:py-9 ${Ke?`overflow-hidden`:`overflow-y-auto [scrollbar-gutter:stable]`}`:`mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-5 py-10 sm:px-8 sm:py-16`,children:[e?null:(0,S.jsx)(`div`,{className:`mb-10 flex items-center justify-center`,children:(0,S.jsx)(he,{className:`size-11`})}),D===`loading`?(0,S.jsxs)(`div`,{className:`mx-auto flex min-h-[26rem] w-full max-w-md flex-col items-center`,"aria-busy":!0,children:[(0,S.jsx)(c,{className:`h-8 w-64 max-w-full`}),(0,S.jsx)(c,{className:`mt-4 h-4 w-full max-w-sm`}),(0,S.jsx)(c,{className:`mt-2 h-4 w-4/5 max-w-xs`}),(0,S.jsx)(c,{className:`mt-10 h-12 w-full rounded-xl`}),(0,S.jsx)(c,{className:`mt-3 h-11 w-full rounded-xl`}),(0,S.jsx)(c,{className:`mt-5 h-4 w-3/5 max-w-56`})]}):null,D===`intro`?(0,S.jsxs)(`section`,{className:`flex flex-1 flex-col text-center`,"aria-labelledby":`work-discovery-title`,children:[(0,S.jsxs)(`div`,{className:`mx-auto max-w-[36rem]`,children:[(0,S.jsx)(`h1`,{id:`work-discovery-title`,className:`text-2xl font-semibold tracking-tight text-fg`,children:b.title}),(0,S.jsx)(`p`,{className:`mx-auto mt-3 max-w-[34rem] text-[0.95rem] leading-7 text-fg-muted`,children:b.subtitle})]}),(0,S.jsxs)(`div`,{className:`mx-auto mt-9 w-full max-w-md`,children:[Oe.length?(0,S.jsxs)(`div`,{className:`mb-5 rounded-xl border border-edge bg-surface-panel p-3 text-left`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:b.localSourcesTitle}),(0,S.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:b.localSourcesSubtitle}),(0,S.jsx)(`div`,{className:`mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3`,children:Oe.map(e=>{let t=K.has(e.id);return(0,S.jsxs)(`button`,{type:`button`,className:o(`flex min-h-16 flex-col items-center justify-center gap-1 rounded-lg border px-2 py-2 text-xs font-medium transition-colors`,t?`border-accent/40 bg-accent-soft text-accent-fg`:`border-edge bg-surface-base text-fg-muted hover:bg-surface-hover hover:text-fg`),"aria-pressed":t,onClick:()=>je(e.id),children:[(0,S.jsx)(`span`,{className:o(`flex size-4 items-center justify-center rounded-full border`,t?`border-accent bg-accent text-white`:`border-edge`),children:t?(0,S.jsx)(a,{className:`size-3`,"aria-hidden":!0}):null}),e.displayName]},e.id)})})]}):null,(0,S.jsxs)(m,{type:`button`,className:`h-12 w-full gap-2 bg-accent text-white hover:bg-accent-hover`,onClick:()=>void Me(),disabled:N||Y.picking,children:[N?(0,S.jsx)(v,{className:`size-4 animate-spin`}):(0,S.jsx)(u,{className:`size-4`}),b.quickScan]}),(0,S.jsxs)(m,{type:`button`,variant:`secondary`,className:`mt-3 h-11 w-full gap-2`,onClick:Y.pick,disabled:N||Y.picking,children:[Y.picking?(0,S.jsx)(v,{className:`size-4 animate-spin`}):(0,S.jsx)(_,{className:`size-4`}),b.chooseFolderManually]}),(0,S.jsxs)(`div`,{className:`mt-4 flex items-start justify-center gap-2 text-xs leading-5 text-fg-muted`,children:[(0,S.jsx)(u,{className:`mt-0.5 size-4 shrink-0 text-accent-fg`}),(0,S.jsx)(`span`,{children:b.quickScanNote})]}),(0,S.jsx)(`button`,{type:`button`,className:`mt-4 text-sm font-medium text-accent-fg hover:underline`,onClick:()=>T(`/connectors?understanding=1&returnTo=%2Fonboarding%2Fworkspace`),children:b.connectCloudSource}),F?(0,S.jsx)(`p`,{className:`mt-4 text-sm text-danger`,role:`alert`,children:F}):null]}),(0,S.jsx)(`button`,{type:`button`,className:`mx-auto mt-auto pt-10 text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>void Le(),disabled:N,children:b.skip})]}):null,D===`candidates`?(0,S.jsxs)(`section`,{className:e?`flex h-full min-h-0 flex-col`:void 0,"aria-labelledby":`work-discovery-candidates-title`,children:[(0,S.jsxs)(`div`,{className:e?`shrink-0 text-center`:`text-center`,children:[(0,S.jsx)(`h1`,{id:`work-discovery-candidates-title`,className:`text-2xl font-semibold tracking-tight text-fg`,children:b.candidatesTitle}),(0,S.jsx)(`p`,{className:`mt-3 text-[0.95rem] leading-7 text-fg-muted`,children:b.candidatesSubtitle})]}),(0,S.jsx)(`div`,{className:e?`mt-5 min-h-0 flex-1 space-y-2 overflow-y-auto overscroll-contain pr-1 [scrollbar-gutter:stable]`:`mt-7 space-y-2`,children:V.map((e,t)=>{let n=H.has(e.rootPath);return(0,S.jsxs)(`button`,{type:`button`,"aria-pressed":n,className:`flex w-full items-start gap-3 rounded-xl border p-4 text-left transition ${n?`border-accent bg-accent-soft/45`:`border-edge bg-surface-panel hover:border-edge-strong`}`,onClick:()=>Ne(e.rootPath),children:[(0,S.jsx)(`span`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-md border ${n?`border-accent bg-accent text-white`:`border-edge bg-surface-base text-transparent`}`,children:(0,S.jsx)(a,{className:`size-3.5`})}),(0,S.jsx)(_,{className:`mt-0.5 size-5 shrink-0 text-accent-fg`}),(0,S.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,S.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,S.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.displayName}),t===0?(0,S.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2 py-0.5 text-[0.7rem] font-medium text-accent-fg`,children:b.recommendedCandidate}):null]}),(0,S.jsx)(`span`,{className:`mt-1 block truncate font-mono text-xs text-fg-muted`,children:e.rootPath}),(0,S.jsxs)(`span`,{className:`mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs text-fg-muted`,children:[(0,S.jsx)(`span`,{children:e.projectKind===`coding`?b.codingProject:e.projectKind===`general`?b.generalProject:b.unknownProject}),e.branch?(0,S.jsx)(`span`,{children:b.branchValue.replace(`{{branch}}`,e.branch)}):null,e.changedFileCount>0?(0,S.jsx)(`span`,{children:b.changedFiles.replace(`{{count}}`,String(e.changedFileCount))}):null]})]})]},e.id)})}),(0,S.jsxs)(`div`,{className:e?`shrink-0 border-t border-edge-subtle pt-4`:void 0,children:[(0,S.jsxs)(`div`,{className:`${e?``:`mt-5 `}flex items-start gap-2 rounded-xl border border-edge-subtle bg-surface-panel px-4 py-3 text-xs leading-5 text-fg-muted`,children:[(0,S.jsx)(u,{className:`mt-0.5 size-4 shrink-0 text-accent-fg`}),(0,S.jsx)(`span`,{children:b.multiFolderPrivacyNote})]}),F?(0,S.jsx)(`p`,{className:`mt-3 text-sm text-danger`,role:`alert`,children:F}):null,(0,S.jsxs)(`div`,{className:`${e?`mt-4`:`mt-7`} flex flex-col gap-3 sm:flex-row-reverse`,children:[(0,S.jsxs)(m,{type:`button`,className:`h-11 flex-1 bg-accent text-white hover:bg-accent-hover`,disabled:N||H.size===0,onClick:()=>void Ie(),children:[N?(0,S.jsx)(v,{className:`mr-2 size-4 animate-spin`}):null,b.analyzeSelected.replace(`{{count}}`,String(H.size))]}),(0,S.jsx)(m,{type:`button`,variant:`secondary`,className:`h-11 flex-1`,disabled:N,onClick:Y.pick,children:b.chooseFolderManually})]}),(0,S.jsx)(`button`,{type:`button`,className:`${e?`mt-3`:`mt-6`} mx-auto block text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>O(`intro`),children:b.back})]})]}):null,D===`consent`&&k?(0,S.jsxs)(`section`,{"aria-labelledby":`work-discovery-consent-title`,children:[(0,S.jsxs)(`div`,{className:`text-center`,children:[(0,S.jsx)(`h1`,{id:`work-discovery-consent-title`,className:`text-2xl font-semibold tracking-tight text-fg`,children:b.selectedTitle}),(0,S.jsx)(`p`,{className:`mt-3 text-[0.95rem] leading-7 text-fg-muted`,children:b.selectedSubtitle})]}),(0,S.jsxs)(`div`,{className:`mt-8 overflow-hidden rounded-xl border border-edge bg-surface-panel`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-edge-subtle px-4 py-3.5`,children:[(0,S.jsx)(_,{className:`size-5 shrink-0 text-accent-fg`}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,S.jsx)(`p`,{className:`truncate text-sm font-medium text-fg`,children:k.displayName}),(0,S.jsx)(`p`,{className:`truncate font-mono text-xs text-fg-muted`,children:k.canonicalRootPath})]}),(0,S.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2.5 py-1 text-xs font-medium text-accent-fg`,children:k.projectKind===`coding`?b.codingProject:k.projectKind===`general`?b.generalProject:b.unknownProject})]}),(0,S.jsxs)(`div`,{className:`grid gap-3 border-b border-edge-subtle bg-surface-base/60 p-4 sm:grid-cols-2`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:b.localFingerprint}),(0,S.jsx)(`p`,{className:`mt-1 text-sm text-fg`,children:k.fingerprint.branch?b.branchValue.replace(`{{branch}}`,k.fingerprint.branch):b.noGitBranch})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:b.recentActivity}),(0,S.jsx)(`p`,{className:`mt-1 text-sm text-fg`,children:b.changedFiles.replace(`{{count}}`,String(k.fingerprint.changedFileCount))})]}),k.fingerprint.recentAreas.length>0?(0,S.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,S.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:b.recentAreas}),(0,S.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:k.fingerprint.recentAreas.map(e=>(0,S.jsx)(`code`,{className:`rounded-md bg-surface-muted px-2 py-1 text-xs text-fg`,children:e},e))})]}):null]}),(0,S.jsxs)(`div`,{className:`divide-y divide-edge-subtle px-4`,children:[(0,S.jsxs)(`div`,{className:`flex gap-3 py-4`,children:[(0,S.jsx)(oe,{className:`mt-0.5 size-4 shrink-0 text-fg-muted`}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:b.willRead}),(0,S.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:b.willReadValue})]})]}),(0,S.jsxs)(`div`,{className:`flex gap-3 py-4`,children:[(0,S.jsx)(h,{className:`mt-0.5 size-4 shrink-0 text-fg-muted`}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:b.willIgnore}),(0,S.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:b.willIgnoreValue})]})]}),(0,S.jsxs)(`div`,{className:`flex gap-3 py-4`,children:[(0,S.jsx)(u,{className:`mt-0.5 size-4 shrink-0 text-accent-fg`}),(0,S.jsx)(`p`,{className:`text-sm leading-6 text-fg-muted`,children:k.remoteModel?b.providerDisclosure.replace(`{{provider}}`,k.provider):b.localDisclosure})]})]})]}),F?(0,S.jsx)(`p`,{className:`mt-4 text-sm text-danger`,role:`alert`,children:F}):null,(0,S.jsxs)(`div`,{className:`mt-7 flex flex-col gap-3 sm:flex-row-reverse`,children:[(0,S.jsxs)(m,{type:`button`,className:`h-11 flex-1 bg-accent text-white hover:bg-accent-hover`,disabled:N,onClick:()=>void Re(),children:[N?(0,S.jsx)(v,{className:`mr-2 size-4 animate-spin`}):null,b.startAnalysis]}),(0,S.jsx)(m,{type:`button`,variant:`secondary`,className:`h-11 flex-1`,disabled:N,onClick:Y.pick,children:b.changeFolder})]}),(0,S.jsx)(`button`,{type:`button`,className:`mx-auto mt-6 block text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>void Le(),children:b.skip})]}):null,D===`running`&&j?(0,S.jsxs)(`section`,{"aria-labelledby":`work-discovery-running-title`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`text-center`,children:[(0,S.jsx)(`h1`,{id:`work-discovery-running-title`,className:`text-2xl font-semibold tracking-tight text-fg`,children:b.analyzingTitle}),(0,S.jsx)(`p`,{className:`mt-3 text-[0.95rem] leading-7 text-fg-muted`,children:b.analyzingSubtitle}),W.total>1?(0,S.jsx)(`p`,{className:`mt-2 text-sm font-medium text-accent-fg`,children:b.analyzingFolderProgress.replace(`{{current}}`,String(W.current)).replace(`{{total}}`,String(W.total))}):null]}),(0,S.jsx)(`div`,{className:`mt-9 rounded-xl border border-edge bg-surface-panel px-5 py-2`,children:C.map((e,t)=>{let n=Math.max(0,C.indexOf(j.stage??`folder_structure`)),r=t<n,i=t===n;return(0,S.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-edge-subtle py-4 last:border-b-0`,children:[(0,S.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-full ${r?`bg-accent text-white`:i?`bg-accent-soft text-accent-fg`:`bg-surface-muted text-fg-subtle`}`,children:r?(0,S.jsx)(a,{className:`size-4`}):i?(0,S.jsx)(v,{className:`size-4 animate-spin motion-reduce:animate-none`}):(0,S.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`})}),(0,S.jsx)(`span`,{className:i||r?`text-sm font-medium text-fg`:`text-sm text-fg-muted`,children:b.stages[e]})]},e)})}),(0,S.jsx)(`p`,{className:`mt-4 truncate text-center font-mono text-xs text-fg-muted`,children:j.rootPath}),(0,S.jsxs)(`div`,{className:`mx-auto mt-7 flex max-w-md flex-col gap-3`,children:[(0,S.jsx)(m,{type:`button`,variant:`secondary`,className:`h-11 w-full`,onClick:()=>T(`/chat`),children:b.continueInBackground}),(0,S.jsx)(`button`,{type:`button`,className:`mx-auto text-sm text-fg-muted hover:text-danger hover:underline`,onClick:()=>void Be(),children:b.cancelAnalysis})]})]}):null,D===`recognition`&&j?.result?(0,S.jsxs)(`section`,{"aria-labelledby":`work-discovery-recognition-title`,children:[(0,S.jsxs)(`div`,{className:`text-center`,children:[(0,S.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-accent-fg`,children:b.recognitionEyebrow}),(0,S.jsx)(`h1`,{id:`work-discovery-recognition-title`,className:`mt-2 text-2xl font-semibold tracking-tight text-fg`,children:j.result.lowConfidence?b.lowConfidenceTitle:b.recognitionTitle})]}),qe,(0,S.jsxs)(`div`,{className:`mt-7 rounded-2xl border border-accent/25 bg-gradient-to-br from-accent-soft/45 via-surface-panel to-surface-panel p-5 sm:p-6`,children:[(0,S.jsx)(`p`,{className:`text-base font-medium leading-7 text-fg`,children:j.result.projectSummary}),(0,S.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-fg-muted`,children:j.result.currentState}),!j.result.lowConfidence&&$?.evidence.length?(0,S.jsx)(`ul`,{className:`mt-5 space-y-2 border-t border-edge-subtle pt-4`,children:$.evidence.slice(0,3).map((e,t)=>(0,S.jsxs)(`li`,{className:`flex gap-2 text-xs leading-5 text-fg-muted`,children:[(0,S.jsx)(de,{className:`mt-0.5 size-3.5 shrink-0 text-accent-fg`}),(0,S.jsxs)(`span`,{children:[e.path?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`code`,{className:`font-mono text-fg`,children:e.path}),`: `]}):null,e.observation]})]},`${$.id}-recognition-${t}`))}):null]}),j.result.workThreads?.length?(0,S.jsxs)(`div`,{className:`mt-5 rounded-xl border border-edge bg-surface-panel p-4`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:b.workThreadsTitle}),(0,S.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:b.workThreadsSubtitle}),(0,S.jsx)(`div`,{className:`mt-3 divide-y divide-edge-subtle`,children:j.result.workThreads.map(e=>(0,S.jsxs)(`div`,{className:`py-3 first:pt-0 last:pb-0`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2 py-0.5 text-[0.7rem] font-medium text-accent-fg`,children:e.horizon===`current`?b.workThreadCurrent:e.horizon===`ongoing`?b.workThreadOngoing:b.workThreadLongTerm}),(0,S.jsx)(`span`,{className:`text-sm font-medium text-fg`,children:e.title})]}),(0,S.jsx)(`p`,{className:`mt-1.5 text-xs leading-5 text-fg-muted`,children:e.summary})]},e.id))})]}):null,j.result.profileCandidates?.length?(0,S.jsxs)(`div`,{className:`mt-5 rounded-xl border border-edge bg-surface-panel p-4`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:b.profileCandidatesTitle}),(0,S.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:b.profileCandidatesSubtitle}),(0,S.jsx)(`div`,{className:`mt-3 space-y-2`,children:j.result.profileCandidates.map(e=>(0,S.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 rounded-lg px-2 py-2 hover:bg-surface-muted`,children:[(0,S.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 size-4 rounded border-edge accent-accent`,checked:Se.has(e.id),onChange:()=>B(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n})}),(0,S.jsx)(`span`,{className:`text-sm leading-5 text-fg`,children:e.statement})]},e.id))})]}):null,j.result.lowConfidence?(0,S.jsxs)(`div`,{className:`mt-5`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium leading-6 text-fg`,children:j.result.contextQuestion}),(0,S.jsx)(`textarea`,{value:R,onChange:e=>z(e.target.value),placeholder:b.correctionPlaceholder,className:`mt-3 min-h-24 w-full resize-y rounded-xl border border-edge bg-surface-panel px-3 py-2.5 text-sm text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:ring-2 focus:ring-accent/15`}),(0,S.jsx)(m,{className:`mt-3 w-full bg-accent text-white hover:bg-accent-hover`,disabled:N||!R.trim(),onClick:()=>void Q(`different_goal`),children:b.continueWithCorrection})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3 sm:flex-row-reverse`,children:[(0,S.jsxs)(m,{className:`h-11 flex-1 bg-accent text-white hover:bg-accent-hover`,disabled:N,onClick:()=>void Ve(),children:[N?(0,S.jsx)(v,{className:`size-4 animate-spin`}):(0,S.jsx)(a,{className:`size-4`}),b.confirmUnderstanding]}),(0,S.jsx)(m,{variant:`secondary`,className:`h-11 flex-1`,disabled:N,onClick:()=>L(e=>!e),children:b.notQuiteRight})]}),ye?(0,S.jsxs)(`div`,{className:`mt-4 rounded-xl border border-edge bg-surface-panel p-4`,children:[(0,S.jsx)(`label`,{className:`text-sm font-medium text-fg`,htmlFor:`work-discovery-correction`,children:b.correctionLabel}),(0,S.jsx)(`textarea`,{id:`work-discovery-correction`,value:R,onChange:e=>z(e.target.value),placeholder:b.correctionPlaceholder,className:`mt-2 min-h-24 w-full resize-y rounded-lg border border-edge bg-surface-base px-3 py-2.5 text-sm text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:ring-2 focus:ring-accent/15`}),(0,S.jsxs)(`div`,{className:`mt-3 flex flex-wrap justify-end gap-2`,children:[(0,S.jsx)(m,{variant:`ghost`,disabled:N||!R.trim(),onClick:()=>void Q(`different_goal`),children:b.differentGoal}),(0,S.jsx)(m,{variant:`primary`,disabled:N||!R.trim(),onClick:()=>void Q(`corrected`),children:b.useCorrection})]})]}):null]}),F?(0,S.jsx)(`p`,{className:`mt-4 text-sm text-danger`,role:`alert`,children:F}):null,(0,S.jsx)(`button`,{type:`button`,disabled:N,className:`mx-auto mt-6 block text-sm text-fg-muted hover:text-fg hover:underline disabled:opacity-60`,onClick:()=>void He(),children:b.openConversation})]}):null,D===`recommendation`&&j?.result&&$?(0,S.jsxs)(`section`,{"aria-labelledby":`work-discovery-recommendation-title`,children:[(0,S.jsxs)(`div`,{className:`text-center`,children:[(0,S.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-accent-fg`,children:b.understandingConfirmed}),(0,S.jsx)(`h1`,{id:`work-discovery-recommendation-title`,className:`mt-2 text-2xl font-semibold tracking-tight text-fg`,children:b.primaryRecommendationTitle})]}),qe,(0,S.jsx)(`article`,{className:`mt-7 rounded-2xl border border-accent/30 bg-surface-panel p-5 sm:p-6`,children:(0,S.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,S.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-xl bg-accent-soft text-accent-fg`,children:(0,S.jsx)(g,{className:`size-5`})}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,S.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:$.title}),(0,S.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:$.rationale}),(0,S.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2 text-xs`,children:[(0,S.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-surface-muted px-2.5 py-1 text-fg-muted`,children:[(0,S.jsx)(le,{className:`size-3.5`}),b.estimatedMinutes.replace(`{{count}}`,String($.estimatedMinutes))]}),(0,S.jsx)(`span`,{className:`rounded-full bg-surface-muted px-2.5 py-1 text-fg-muted`,children:We($.risk)})]}),(0,S.jsxs)(`div`,{className:`mt-4 rounded-xl bg-surface-base px-4 py-3`,children:[(0,S.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:b.expectedTask}),(0,S.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg`,children:$.expectedTask})]}),(0,S.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[(0,S.jsx)(m,{className:`h-10 bg-accent px-4 text-white hover:bg-accent-hover`,onClick:()=>void Z($,!1),children:b.startRecommendedAction}),(0,S.jsx)(m,{className:`h-10 px-4`,variant:`secondary`,onClick:()=>void Z($,!0),children:b.explainFirst})]})]})]})}),Ue.length>0?(0,S.jsxs)(`div`,{className:`mt-5 border-t border-edge-subtle pt-4`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between py-2 text-sm font-medium text-fg-muted hover:text-fg`,onClick:()=>xe(e=>!e),children:[b.otherDirections,(0,S.jsx)(pe,{className:`size-4 transition-transform ${be?`rotate-180`:``}`})]}),be?(0,S.jsx)(`div`,{className:`mt-2 divide-y divide-edge-subtle rounded-xl border border-edge bg-surface-panel px-4`,children:Ue.map(e=>(0,S.jsxs)(`button`,{type:`button`,className:`flex w-full items-start gap-3 py-4 text-left`,onClick:()=>void Z(e,!0),children:[(0,S.jsx)(g,{className:`mt-0.5 size-4 shrink-0 text-fg-subtle`}),(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:e.title}),(0,S.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:e.expectedTask})]})]},e.id))}):null]}):null,(0,S.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-x-5 gap-y-3`,children:[(0,S.jsx)(`button`,{type:`button`,className:`text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>X(j.sessionKey),children:b.doSomethingElse}),(0,S.jsx)(`button`,{type:`button`,className:`text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>{L(!0),O(`recognition`)},children:b.correctUnderstanding})]})]}):null,D===`error`&&j?(0,S.jsxs)(`section`,{className:`text-center`,"aria-labelledby":`work-discovery-error-title`,children:[(0,S.jsx)(`div`,{className:`mx-auto flex size-11 items-center justify-center rounded-xl bg-danger-soft text-danger`,children:(0,S.jsx)(h,{className:`size-5`})}),(0,S.jsx)(`h1`,{id:`work-discovery-error-title`,className:`mt-5 text-2xl font-semibold tracking-tight text-fg`,children:b.errorTitle}),(0,S.jsx)(`p`,{className:`mx-auto mt-3 max-w-lg text-sm leading-6 text-fg-muted`,children:j.errorMessage}),(0,S.jsxs)(`div`,{className:`mx-auto mt-7 flex max-w-md flex-col gap-3 sm:flex-row-reverse`,children:[(0,S.jsx)(m,{className:`h-11 flex-1 bg-accent text-white hover:bg-accent-hover`,onClick:()=>void ae(j.id).then(J),children:b.retry}),(0,S.jsx)(m,{variant:`secondary`,className:`h-11 flex-1`,onClick:()=>{M(null),A(null),O(`intro`)},children:b.chooseDifferent})]}),(0,S.jsx)(`button`,{type:`button`,className:`mt-6 text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>X(j.sessionKey),children:b.openConversation})]}):null]}),Y.hasNativePicker?null:(0,S.jsx)(ne,{open:Y.modalOpen,onOpenChange:Y.setModalOpen,initialAbsolutePath:k?.canonicalRootPath,onConfirm:Y.confirmPick,wd:x})]})}export{T as WorkDiscoveryPage};
|