openpond 0.0.30 → 0.0.32
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/chunks/{app-layer-FIGCNZJX.js → app-layer-CUQQUVJS.js} +20 -3
- package/dist/chunks/{apps-4RMNCKXS.js → apps-TAYMUCWX.js} +3 -3
- package/dist/chunks/{chunk-57P2GCW5.js → chunk-3UOLQG6N.js} +1 -1
- package/dist/chunks/{chunk-MFS3SYUH.js → chunk-3ZJIEA5F.js} +1 -1
- package/dist/chunks/{chunk-4S3XGFGL.js → chunk-4HQURM3N.js} +1 -1
- package/dist/chunks/{chunk-BNVHGSI7.js → chunk-4M4WAORL.js} +874 -798
- package/dist/chunks/{chunk-DANRS43D.js → chunk-5RHZKQRK.js} +14 -76
- package/dist/chunks/{chunk-BNPFMGZD.js → chunk-D264OHTR.js} +4 -5
- package/dist/chunks/{chunk-BBEVMP6O.js → chunk-DCNAXREU.js} +179 -160
- package/dist/chunks/chunk-E5RVRUJB.js +1222 -0
- package/dist/chunks/{chunk-RJXX6TJA.js → chunk-EONKWOLU.js} +2 -2
- package/dist/chunks/{chunk-VQX33YAG.js → chunk-FQW3AQVJ.js} +689 -121
- package/dist/chunks/{chunk-GGKA4HLQ.js → chunk-GYZYZGKS.js} +238 -69
- package/dist/chunks/{chunk-KMSMK7PI.js → chunk-OXQG773T.js} +33 -33
- package/dist/chunks/{chunk-BX4XSB2J.js → chunk-PJXJ2HRT.js} +1816 -1113
- package/dist/chunks/chunk-Q5MZCRJA.js +70 -0
- package/dist/chunks/{chunk-OV3KAFWB.js → chunk-W2DJR3FA.js} +1 -1
- package/dist/chunks/{chunk-KEDXE4BA.js → chunk-XADW35CL.js} +3 -3
- package/dist/chunks/{chunk-IUTUUNAX.js → chunk-Y4F4XD5V.js} +1 -1
- package/dist/chunks/{cli-2L4NB7HD.js → cli-WW5BVN5Z.js} +4 -3
- package/dist/chunks/{cli-5RL7B2Z3.js → cli-ZOCP7X5M.js} +6 -6
- package/dist/chunks/{core-commands-AZJZGTZS.js → core-commands-SYGK7K57.js} +4 -4
- package/dist/chunks/{extend-6IWYZI37.js → extend-Q5HZ7TMA.js} +11 -11
- package/dist/chunks/fileFromPath-DHCRY3BD.js +2151 -0
- package/dist/chunks/{harness-SSNXDSKM.js → harness-ZPBPQVAS.js} +3 -3
- package/dist/chunks/{help-MUJJMI3Q.js → help-3V3TRQNX.js} +1 -1
- package/dist/chunks/{opchat-RW4CFAQB.js → opchat-OUPMEFE5.js} +5 -5
- package/dist/chunks/{organizations-V7DTNLSI.js → organizations-5CSLBDAW.js} +4 -4
- package/dist/chunks/{profile-WDBKJ7YW.js → profile-OQYSXHOG.js} +206 -166
- package/dist/chunks/{project-agent-3TZ3BPYN.js → project-agent-TBTWOUJF.js} +6 -7
- package/dist/chunks/{sandbox-command-HOYHF4NC.js → sandbox-command-HCHPY7KW.js} +4 -4
- package/dist/chunks/{sandbox-template-IYGB4CZU.js → sandbox-template-PNTOZ6W3.js} +5 -6
- package/dist/chunks/{src-CBPRIWG5.js → src-C6MXLDYQ.js} +22 -6
- package/dist/chunks/{src-ZRQKSQTD.js → src-GZT4UX6I.js} +80887 -52945
- package/dist/chunks/{teams-bot-UWGCFL6C.js → teams-bot-CQ76XI6T.js} +3 -3
- package/dist/chunks/workspaces-DHVVOTVR.js +93 -0
- package/dist/cli.js +10 -10
- package/dist/config.d.ts +0 -2
- package/dist/index.js +273 -69
- package/dist/profile/local-profile-types.d.ts +8 -2
- package/dist/profile/local-profile.d.ts +3 -1
- package/dist/sandbox/types/org-project-agent.d.ts +1 -2
- package/dist/web/assets/{AppsView-Bu-Nc3Ew.js → AppsView-CF2g-7FH.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-CCguQ-DR.js → BrowserSidebar-lUsLUl20.js} +1 -1
- package/dist/web/assets/CloudWorkView-BnfGW4OV.js +1 -0
- package/dist/web/assets/{CommandMenu-CnodJFHD.js → CommandMenu-BsS4Bgb6.js} +1 -1
- package/dist/web/assets/{CommunityView-CIbjNUZr.js → CommunityView-C8qVOwlp.js} +1 -1
- package/dist/web/assets/ComposerCreateImproveStrip-C_LIpfSq.js +1 -0
- package/dist/web/assets/GetStartedView-Du533wOh.js +1 -0
- package/dist/web/assets/LabsRoute-CgKtVYTP.css +1 -0
- package/dist/web/assets/LabsRoute-yk8lNMQc.js +3 -0
- package/dist/web/assets/{NewProjectDialog-CaKiCoVS.js → NewProjectDialog-DH7wA1z9.js} +1 -1
- package/dist/web/assets/ProfileSettingsSection-CqnfjiCl.css +1 -0
- package/dist/web/assets/ProfileSettingsSection-D7JvMZdW.js +1 -0
- package/dist/web/assets/SettingsView-C9TgCaWG.js +63 -0
- package/dist/web/assets/TeamChatView-D_CE7br9.js +3 -0
- package/dist/web/assets/{TerminalOverlay-C1iP4OS1.js → TerminalOverlay-CC-VDSlp.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-NFCoaBUI.js +1 -0
- package/dist/web/assets/TrainingDraftPanel-BWEmVFjM.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-SlLlGZM1.js +14 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-B8JJbwIz.js → WorkspaceEnvironmentMenu-BAoMBTVD.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-B4sp9BGn.js → WorkspaceGitDialogs-CVIFrzyl.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BBqimG5X.js → WorkspaceMonacoEditor-0trp0-TI.js} +3 -3
- package/dist/web/assets/{boxes-DAaDUabq.js → boxes-CFihgX2z.js} +1 -1
- package/dist/web/assets/create-pipeline-request-AJWLMTyw.js +4 -0
- package/dist/web/assets/{cssMode-CBF1mieJ.js → cssMode-HvqfCFyP.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CAickXpN.js → git-commit-horizontal-C5mUmACv.js} +1 -1
- package/dist/web/assets/{htmlMode-2u8OHtWO.js → htmlMode-C8btgUt-.js} +1 -1
- package/dist/web/assets/index-8H-GDlM5.css +1 -0
- package/dist/web/assets/index-D7Vr3zcV.js +192 -0
- package/dist/web/assets/index-DUqAiF57.js +1 -0
- package/dist/web/assets/{info-CQNTh78o.js → info-D0xuy5IB.js} +1 -1
- package/dist/web/assets/{jsonMode-C4CWXViX.js → jsonMode-5zVz9G0X.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CBs_BOlB.js → lspLanguageFeatures-DxlSSL7c.js} +1 -1
- package/dist/web/assets/{monaco.contribution-lOXpG2xQ.js → monaco.contribution-B1pWWwqT.js} +2 -2
- package/dist/web/assets/{monaco.contribution-sd3cFkcN.js → monaco.contribution-BKpVvKK9.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C1LUxAKf.js → monaco.contribution-BXdXsSWI.js} +2 -2
- package/dist/web/assets/{monaco.contribution-Cpf6dWsh.js → monaco.contribution-CIjjzpUR.js} +2 -2
- package/dist/web/assets/{monitor-DsIswrMV.js → monitor-B4-9Shtp.js} +1 -1
- package/dist/web/assets/{play-CeRw21NV.js → play-BJdhBqQE.js} +1 -1
- package/dist/web/assets/{python-CXYq3BUl.js → python-CEK8J4w_.js} +1 -1
- package/dist/web/assets/{refresh-cw-N5b_6AP5.js → refresh-cw-DE0u_nmZ.js} +1 -1
- package/dist/web/assets/{reply-BSKjZrJg.js → reply-2MfLJ93n.js} +1 -1
- package/dist/web/assets/{save-D0oHH1a3.js → save-CBIVKaf8.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-DRjlcwes.js → toggleHighContrast-CC73mtvA.js} +1 -1
- package/dist/web/assets/training-BY8siNUK.css +1 -0
- package/dist/web/assets/training-model-data-BXUCzS0p.js +1 -0
- package/dist/web/assets/{tsMode-x-1A7ZcB.js → tsMode-Bhn9wr_1.js} +1 -1
- package/dist/web/assets/{wifi-off-Dt52ofzh.js → wifi-off-BKTqnqj0.js} +1 -1
- package/dist/web/assets/{workers-Ciff6Dzi.js → workers-C_adgrEg.js} +1 -1
- package/dist/web/assets/{yaml-CB67Kxnz.js → yaml-DDRAcADU.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunks/chunk-OG75GMVO.js +0 -1
- package/dist/web/assets/CloudWorkView-Dr3xqLE5.js +0 -1
- package/dist/web/assets/GetStartedView-C8nyH_PT.js +0 -1
- package/dist/web/assets/LabsExtensions-GtJzxDnK.js +0 -1
- package/dist/web/assets/LabsProfile-DG7rWYur.js +0 -1
- package/dist/web/assets/LabsRoute-D6MDHBzq.js +0 -2
- package/dist/web/assets/LabsRoute-TEt9j1vB.css +0 -1
- package/dist/web/assets/LabsSignals-BfsDN86w.js +0 -1
- package/dist/web/assets/LabsSignals-D6iA6Ryl.css +0 -1
- package/dist/web/assets/ProfileSettingsSection-DTQS2DVL.css +0 -1
- package/dist/web/assets/ProfileSettingsSection-DxEzoF3K.js +0 -1
- package/dist/web/assets/ProfileView-CEscW7Ru.js +0 -1
- package/dist/web/assets/SettingsView-JIRR_FO4.js +0 -63
- package/dist/web/assets/TeamChatView-B5M1ThhJ.js +0 -3
- package/dist/web/assets/TrainingSettingsSection-BDYvI2te.js +0 -1
- package/dist/web/assets/TrainingView-CoCFK6W3.js +0 -5
- package/dist/web/assets/WorkspaceDiffPanel-CMxKQeo7.js +0 -14
- package/dist/web/assets/index-BdY6A-YN.css +0 -1
- package/dist/web/assets/index-CU2qhUYV.js +0 -195
- package/dist/web/assets/index-Dz2B3-4C.js +0 -1
- package/dist/web/assets/settings-lists-BEg6LMcy.css +0 -1
- package/dist/web/assets/training-model-data-BPrc68VG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,
|
|
1
|
+
import{r,b4 as b,m as L,j as e,S as I,aT as k,X as P,b5 as E,R as F,E as U,b6 as T,b7 as R}from"./index-D7Vr3zcV.js";const D=["For agents","Featured","Productivity","Developer tools"],M=new Set(["slack","google","github","mcp"]);function J({account:s,connection:n,defaultTeamId:a,onToast:o}){const[c,f]=r.useState(null),[p,v]=r.useState(""),[i,y]=r.useState("For agents"),[u,h]=r.useState(()=>b()),[g,d]=r.useState("idle"),[w,x]=r.useState(null),S=s?.baseUrl??s?.activeProfile?.baseUrl??null,C=O(a,w),N=r.useMemo(()=>u.filter(t=>z(t,i)).filter(t=>q(t,p)),[i,p,u]);r.useEffect(()=>{let t=!0;return n?(d("loading"),L.connectedAppStatus(n,{status:"all"}).then(l=>{t&&(h(l.apps),x(l.teamId?.trim()||null),d("ready"))}).catch(l=>{t&&(console.warn("Unable to load connected app status.",l),h(b()),x(null),d("error"))}),()=>{t=!1}):(h(b()),d("idle"),x(null),()=>{t=!1})},[n]);function A(t){const l=T({appId:t.id,baseUrl:S,teamId:C});V(l).catch(j=>{o?.(j instanceof Error?j.message:String(j),"error")})}return e.jsxs("section",{className:"connected-apps-view","aria-label":"Apps",children:[e.jsxs("div",{className:"connected-apps-header",children:[e.jsxs("div",{children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{children:"Connect apps that agents can use for chat, knowledge, files, and workflow actions."})]}),e.jsxs("label",{className:"connected-apps-search",children:[e.jsx(I,{size:15}),e.jsx("input",{"aria-label":"Search apps",onChange:t=>v(t.target.value),placeholder:"Search apps",type:"search",value:p})]})]}),e.jsxs("div",{className:`connected-apps-status-strip ${g}`,children:[e.jsx("span",{children:W(g)}),e.jsxs("span",{children:[X(u)," connected"]})]}),e.jsxs("section",{className:"connected-apps-hero","aria-label":"App context",children:[e.jsxs("div",{className:"connected-apps-hero-copy",children:[e.jsx("span",{className:"connected-apps-hero-icon",children:e.jsx(m,{appId:"github"})}),e.jsx("h2",{children:"Work with your apps"}),e.jsx("p",{children:"Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond."})]}),e.jsxs("div",{className:"connected-apps-context-card","aria-hidden":"true",children:[e.jsx("strong",{children:"Agent context"}),e.jsxs("div",{children:[e.jsx("span",{className:"files",children:"Files"}),e.jsx("span",{className:"chat",children:"Chat"}),e.jsx("span",{className:"oauth",children:"OAuth"}),e.jsx("span",{className:"mcp",children:"MCP"})]})]})]}),e.jsx("div",{className:"connected-apps-filters",role:"tablist","aria-label":"App categories",children:D.map(t=>e.jsx("button",{"aria-selected":i===t,className:i===t?"active":"",onClick:()=>y(t),role:"tab",type:"button",children:t},t))}),e.jsxs("div",{className:"connected-apps-list",children:[N.map(t=>e.jsx(_,{app:t,onSelect:()=>f(t)},t.id)),N.length===0?e.jsx("div",{className:"connected-apps-empty",children:"No apps match the current search."}):null]}),c?e.jsx($,{app:c,onClose:()=>f(null),onInstall:()=>A(c)}):null]})}function O(s,n){const a=s?.trim();return a||n?.trim()||null}function _({app:s,onSelect:n}){return e.jsxs("button",{className:"connected-app-row",onClick:n,type:"button",children:[e.jsxs("span",{className:"connected-app-row-main",children:[e.jsx(m,{appId:s.id}),e.jsxs("span",{className:"connected-app-copy",children:[e.jsxs("span",{className:"connected-app-title",children:[e.jsx("strong",{children:s.label}),e.jsxs("span",{children:[s.shortLabel!==s.label?s.shortLabel:s.category," / ",s.setupSurfaceLabel]})]}),e.jsx("span",{children:s.description}),e.jsxs("span",{className:"connected-app-capability-row",children:[s.capabilityLabels.slice(0,2).map(a=>e.jsx("span",{children:a},a)),s.capabilityLabels.length>2?e.jsxs("span",{children:["+",s.capabilityLabels.length-2]}):null]})]})]}),e.jsx("span",{className:`connected-app-status-pill ${s.status}`,children:s.statusLabel}),e.jsx(k,{size:16})]})}function $({app:s,onClose:n,onInstall:a}){const o=s.connections.filter(c=>c.status==="active");return e.jsx("div",{className:"connected-app-dialog-backdrop",role:"presentation",onMouseDown:c=>{c.target===c.currentTarget&&n()},children:e.jsxs("section",{className:"connected-app-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"connected-app-dialog-title",children:[e.jsx("button",{className:"connected-app-dialog-close",type:"button","aria-label":"Close app details",onClick:n,children:e.jsx(P,{size:17})}),e.jsxs("div",{className:"connected-app-dialog-identity",children:[e.jsx("span",{className:"openpond-mark",children:e.jsx("img",{alt:"",src:E})}),e.jsxs("span",{className:"connection-dots","aria-hidden":"true",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]}),e.jsx(m,{appId:s.id})]}),e.jsxs("h2",{id:"connected-app-dialog-title",children:["Connect ",s.label]}),e.jsxs("div",{className:"connected-app-approval",children:[e.jsx(F,{size:16}),e.jsx("span",{children:s.statusLabel})]}),e.jsxs("div",{className:"connected-app-dialog-body",children:[e.jsxs("section",{children:[e.jsx("h3",{children:s.setupSurfaceLabel}),e.jsx("p",{children:"The web flow shows the provider account, workspace, and requested access before anything is connected."})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Connected account"}),e.jsx("p",{children:G(o)})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Available capabilities"}),e.jsx("div",{className:"connected-app-dialog-capabilities",children:s.capabilities.map(c=>e.jsx("span",{children:c.label},c.id))})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Sandbox lease policy"}),e.jsx("p",{children:s.leasePolicy.leaseable?`Leaseable for ${s.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:"Managed as setup or tool discovery; no OAuth lease is required."})]})]}),e.jsxs("button",{className:"connected-app-dialog-primary",type:"button",onClick:a,children:[e.jsx("span",{children:s.installLabel}),e.jsx(U,{size:15})]})]})})}function m({appId:s}){return e.jsx("span",{className:`connected-app-icon app-${s}`,children:e.jsx("img",{alt:"",src:B(s)})})}function z(s,n){return n==="For agents"?!0:n==="Featured"?M.has(s.id):n==="Productivity"?s.category==="Productivity"||s.category==="Chat":s.category==="Developer tools"||s.id==="mcp"}function q(s,n){const a=n.trim().toLowerCase();return a?[s.id,s.label,s.shortLabel,s.category,s.description,s.providerFamily,s.setupSurface].some(o=>o.toLowerCase().includes(a)):!0}function B(s){return R(s)}async function V(s){const n=window.openpond?.browser;if(n){const a=await n.openExternal({conversationId:"connected-apps",url:s});if(!a.ok)throw new Error(a.error??"Unable to open app setup.");return}window.open(s,"_blank","noopener,noreferrer")}function W(s){return s==="loading"?"Checking connections":s==="ready"?"Connection status current":s==="error"?"Connection status unavailable":"Connection status pending"}function X(s){return s.filter(n=>n.connected).length}function G(s){return s.length===0?"No active OAuth connection for this setup surface.":s.map(n=>{const a=n.accountLabel??"Connected account";return n.workspaceLabel?`${a} / ${n.workspaceLabel}`:a}).join(", ")}export{J as AppsView,_ as ConnectedAppRow,O as connectedAppSetupTeamId};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,
|
|
1
|
+
import{r as c,bi as v,j as a,aM as f,X as k,h as j,U as C,aJ as g,aq as B,E as N,aN as y}from"./index-D7Vr3zcV.js";import{R as T}from"./refresh-cw-DE0u_nmZ.js";const x=[];function P(r){const e=window.openpond?.browser,[b,l]=c.useState(()=>({conversationId:r,activeTabId:null,tabs:x}));c.useEffect(()=>{if(l({conversationId:r,activeTabId:null,tabs:x}),!e)return;let s=!1;e.getState({conversationId:r}).then(o=>{s||l(o)});const i=e.onState(o=>{o.conversationId===r&&l(o)});return()=>{s=!0,i()}},[e,r]);const u=c.useMemo(()=>b.tabs.find(s=>s.id===b.activeTabId)??null,[b.activeTabId,b.tabs]),t=c.useCallback(async(s,i={})=>{if(!e)return!1;const o=v(s,{explicitFile:i.explicitFile});return o?(i.newTab?await e.newTab({conversationId:r,url:o,explicitFile:i.explicitFile}):await e.open({conversationId:r,url:o,explicitFile:i.explicitFile}),!0):!1},[e,r]),n=u?{conversationId:r,tabId:u.id}:null;return{activeTab:u,available:!!e,bridge:e,state:b,back:()=>e&&n?e.back(n):Promise.resolve({ok:!1}),clearData:()=>e?e.clearData({conversationId:r}):Promise.resolve({ok:!1}),closeTab:s=>e?e.closeTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),forward:()=>e&&n?e.forward(n):Promise.resolve({ok:!1}),newTab:s=>e?e.newTab({conversationId:r,url:s}):Promise.resolve({ok:!1}),open:t,openExternal:()=>e&&n?e.openExternal(n):Promise.resolve({ok:!1}),reload:()=>e&&n?e.reload(n):Promise.resolve({ok:!1}),snapshot:(s={})=>e?e.snapshot({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),moveCursor:s=>e?e.moveCursor({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),click:s=>e?e.click({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),typeText:s=>e?e.typeText({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),key:s=>e?e.key({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),scroll:s=>e?e.scroll({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),selectTab:s=>e?e.selectTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),setBounds:s=>e?e.setBounds({conversationId:r,bounds:s}):Promise.resolve({ok:!1}),stop:()=>e&&n?e.stop(n):Promise.resolve({ok:!1})}}function E({activeTabId:r,tabs:e,onCloseTab:b,onNewTab:l,onSelectTab:u}){return a.jsxs("div",{className:"browser-tabs",role:"tablist","aria-label":"Browser tabs",children:[e.map(t=>a.jsxs("div",{className:`browser-tab ${t.id===r?"active":""}`,children:[a.jsx("span",{className:"browser-tab-favicon","aria-hidden":"true",children:t.faviconUrl?a.jsx("img",{alt:"",referrerPolicy:"no-referrer",src:t.faviconUrl}):a.jsx(f,{size:13})}),a.jsx("button",{type:"button",className:"browser-tab-main",role:"tab","aria-selected":t.id===r,title:t.url,onClick:()=>u(t.id),children:R(t)}),a.jsx("button",{type:"button",className:"browser-tab-close",title:"Close tab","aria-label":"Close tab",onClick:()=>b(t.id),children:a.jsx(k,{size:12})})]},t.id)),a.jsx("button",{type:"button",className:"browser-tab-add",title:"New tab","aria-label":"New tab",onClick:l,children:a.jsx(j,{size:14})})]})}function R(r){if(r.title?.trim())return r.title.trim();try{return new URL(r.url).host||r.url}catch{return r.url||"New tab"}}function z({activeTab:r,available:e,onBack:b,onClearData:l,onForward:u,onNavigate:t,onOpenExternal:n,onReload:s,onStop:i}){const[o,d]=c.useState(""),[p,m]=c.useState(!1);c.useEffect(()=>{d(r?.url??"")},[r?.url]);function h(w){w.preventDefault(),t(o)}return a.jsxs("div",{className:"browser-toolbar",children:[a.jsxs("div",{className:"browser-nav-actions",children:[a.jsx("button",{type:"button",title:"Back","aria-label":"Back",disabled:!r?.canGoBack,onClick:b,children:a.jsx(C,{size:15})}),a.jsx("button",{type:"button",title:"Forward","aria-label":"Forward",disabled:!r?.canGoForward,onClick:u,children:a.jsx(g,{size:15})}),a.jsx("button",{type:"button",title:r?.loading?"Stop":"Reload","aria-label":r?.loading?"Stop":"Reload",disabled:!r,onClick:r?.loading?i:s,children:r?.loading?a.jsx(B,{size:13}):a.jsx(T,{size:14})})]}),a.jsx("form",{className:"browser-address-form",onSubmit:h,children:a.jsx("input",{"aria-label":"Browser address",disabled:!e,placeholder:e?"Search or enter address":"Desktop browser unavailable",spellCheck:!1,value:o,onChange:w=>d(w.target.value)})}),a.jsxs("div",{className:"browser-panel-actions",children:[a.jsx("button",{type:"button",title:"Open external","aria-label":"Open external",disabled:!r,onClick:n,children:a.jsx(N,{size:14})}),a.jsxs("div",{className:"browser-menu-anchor",children:[a.jsx("button",{type:"button",title:"Browser actions","aria-label":"Browser actions",onClick:()=>m(w=>!w),children:a.jsx(y,{size:15})}),p&&a.jsx("div",{className:"browser-options-menu",role:"menu",children:a.jsx("button",{type:"button",role:"menuitem",onClick:()=>{m(!1),l()},children:"Clear Browser Data..."})})]})]})]})}function D({active:r,onBounds:e}){const b=c.useRef(null),l=c.useRef(null),u=c.useRef(null),t=c.useCallback(i=>{const o=i?`${i.x}:${i.y}:${i.width}:${i.height}`:"null";l.current!==o&&(l.current=o,e(i))},[e]),n=c.useCallback(()=>{const i=b.current;if(!r||!i){t(null);return}const o=i.getBoundingClientRect(),d=Math.max(0,Math.round(o.width)),p=Math.max(0,Math.round(o.height));if(d===0||p===0){t(null);return}t({x:Math.round(o.left),y:Math.round(o.top),width:d,height:p})},[r,t]),s=c.useCallback(()=>{u.current===null&&(u.current=window.requestAnimationFrame(()=>{u.current=null,n()}))},[n]);return c.useLayoutEffect(()=>{l.current=null,n();const i=b.current;if(!r||!i)return t(null),()=>t(null);const o=new ResizeObserver(s);return o.observe(i),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{u.current!==null&&(window.cancelAnimationFrame(u.current),u.current=null),o.disconnect(),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),t(null)}},[r,t,n,s]),a.jsx("div",{className:"browser-viewport",ref:b})}function L({conversationId:r,expanded:e,onResizeStart:b}){const l=P(r),u=c.useCallback(s=>{window.openpond?.browser?.setBounds({conversationId:r,bounds:s})},[r]),t=c.useCallback(s=>{l.open(s,{explicitFile:!0})},[l]),n=c.useCallback(()=>{window.confirm("Clear browser data for this conversation? Tabs, cookies, cache, and local storage for this conversation will be removed.")&&l.clearData()},[l]);return a.jsxs("aside",{className:`workspace-diff-panel browser-sidebar-panel ${e?"expanded":""}`,"aria-label":"Browser",children:[!e&&a.jsx("div",{className:"workspace-diff-resize-handle",role:"separator","aria-orientation":"vertical","aria-label":"Resize browser panel",onPointerDown:b}),a.jsx(E,{activeTabId:l.state.activeTabId,tabs:l.state.tabs,onCloseTab:s=>{l.closeTab(s)},onNewTab:()=>{l.newTab()},onSelectTab:s=>{l.selectTab(s)}}),a.jsx(z,{activeTab:l.activeTab,available:l.available,onBack:()=>{l.back()},onClearData:n,onForward:()=>{l.forward()},onNavigate:t,onOpenExternal:()=>{l.openExternal()},onReload:()=>{l.reload()},onStop:()=>{l.stop()}}),a.jsxs("div",{className:"browser-content",children:[l.available?l.state.tabs.length===0?a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Enter a URL to open a browser tab for this conversation."})]}):null:a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Desktop browser bridge unavailable."})]}),a.jsx(D,{active:l.available&&l.state.tabs.length>0,onBounds:u})]})]})}export{L as BrowserSidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,a9 as ye,j as e,U as Ne,b as B,aq as ee,h as D,bj as se,bk as ne,D as te,A as ke,bl as Se,S as Ae,K as ie,ay as H,aF as we,X as Re,bm as ae}from"./index-D7Vr3zcV.js";import{P as Pe}from"./play-BJdhBqQE.js";import{createPipelineAgentIdFromObjective as le,createPipelineSourceRootPathForAgent as Te}from"./create-pipeline-request-AJWLMTyw.js";function _e(s,t){return t==="archive"?!!s.archivedAt:t==="reviews"?s.status==="needs_review":!s.archivedAt}function ze(s){return s==="backlog"?"Task":s==="needs_review"?"Review":s.replace(/_/g," ")}function $e(s,t){const a=s.get(t);return a?.organizationName?`${a.organizationName} / ${a.name}`:a?.name??"Cloud Project"}function Me(s){const t=s.filter(a=>!ce(a));return t.find(a=>a.role==="user")??t[0]??null}function ce(s){return s.metadata.source==="openpond_app_cloud_create_improve_link"||s.metadata.hidden===!0}function Oe(s){return s.adapter.kind==="local"?"Local profile":s.adapter.kind==="promote_local_to_hosted"?"Local to hosted":"Hosted profile"}function Ee(s){return s?.plan?.checks?.length?s.plan.checks.map(t=>({name:t.name,command:t.command})):[{name:"inspect",command:"pnpm agent:inspect"},{name:"build",command:"pnpm build"},{name:"validate",command:"pnpm agent:validate"},{name:"eval",command:"pnpm agent:eval"}]}function Le(s){return s?.plan?.requirements?.map(t=>({name:t.name,detail:[t.kind.replace(/_/g," "),t.status,t.detail].filter(Boolean).join(" / ")}))??[]}function De(s){const t=s?.workflowCapture;return t?[{name:"Actions",values:t.profileActions},{name:"Providers",values:t.externalProviders},{name:"Side effects",values:t.sideEffects},{name:"Files",values:t.files},{name:"Artifacts",values:t.outputArtifacts},{name:"Traces",values:t.traceRefs},{name:"Channels",values:t.channelTargets}].flatMap(({name:a,values:u})=>u.length?[{name:a,detail:u.join(", ")}]:[]):[]}function He(s){if(s.plan?.sourcePlan?.length)return s.plan.sourcePlan;const t=s.operation==="improve"?"update":"create",a=s.target.kind==="agent"?s.target.id??le(s.objective):le(s.objective);return[{path:Te(a),operation:t,reason:s.objective},{path:"settings/profile.yaml",operation:"update",reason:"Expose the default chat action through the hosted profile catalog."}]}function qe({workItem:s,detail:t,actionBusy:a,localProjectName:u,onApplyLocalPatch:m,onShowFiles:c}){const d=Ve(s,t),h=s.status==="needs_review"&&!!(u&&m);return e.jsxs("article",{className:"cloud-work-boundary-strip",children:[e.jsxs("div",{children:[e.jsx("span",{children:Fe(s)}),e.jsx("small",{children:Ke(s)})]}),e.jsx("div",{className:"cloud-work-boundary-chips",children:d.map(j=>e.jsx("span",{children:j},j))}),s.status==="needs_review"?e.jsxs("button",{type:"button",onClick:()=>{m&&m()},disabled:a||!h,title:h?`Apply to ${u}`:"Link this Cloud Project to a local checkout before applying locally.",children:[e.jsx(ie,{size:13}),e.jsx("span",{children:h?"Apply locally":"No local checkout"})]}):null,c?e.jsxs("button",{type:"button",onClick:c,children:[e.jsx(H,{size:13}),e.jsx("span",{children:"Files"})]}):null]})}function Fe(s){return s.status==="needs_review"?"Cloud patch ready":s.status==="queued"||s.status==="running"?"Running in Cloud":s.status==="failed"?"Cloud task failed":"Cloud task"}function Ke(s){return s.status==="needs_review"?"Review files and apply locally only when ready.":s.status==="queued"||s.status==="running"?"The local checkout is unchanged while the sandbox works.":s.status==="failed"?"Open files/logs to inspect the remote run before retrying.":"Cloud changes stay remote until an explicit apply or pull action."}function Ve(s,t){const a=[s.status.replace(/_/g," ")];return s.sourceRef&&a.push(s.sourceRef),s.latestSandboxId&&a.push("sandbox"),s.latestTaskRunId&&a.push("task run"),t?.activity.length&&a.push(`${t.activity.length} log${t.activity.length===1?"":"s"}`),s.status==="needs_review"&&a.push("patch only"),a.push("local unchanged"),a}function Ue({run:s,actionBusy:t,onApprove:a,onEdit:u,onCancel:m}){const c=s.state,d=s.plan,h=Ee(s),j=Le(s),f=De(s),N=He(s),x=we(d?.metadata),k=s.scope.targetProject?.name??s.scope.targetProject?.id??"Profile source",S=!!d&&c==="awaiting_plan_approval"&&(d?.status==="draft"||d?.status==="pending_approval"),A=(c==="planning"||c==="awaiting_plan_approval")&&(d?.status==="draft"||d?.status==="pending_approval");return e.jsxs("article",{className:"cloud-create-plan-review",children:[e.jsxs("div",{className:"cloud-create-plan-heading",children:[e.jsx(H,{size:16}),e.jsxs("div",{children:[e.jsx("span",{children:"Agent plan review"}),e.jsxs("small",{children:[s.operation," / ",Oe(s)," / ",c.replace(/_/g," ")]})]})]}),e.jsxs("div",{className:"cloud-create-plan-copy",children:[e.jsxs("section",{children:[e.jsx("span",{children:"Objective"}),e.jsx("p",{children:s.objective})]}),e.jsxs("section",{children:[e.jsx("span",{children:"Target"}),e.jsx("p",{children:k})]}),d?.capturedContextSummary?e.jsxs("section",{children:[e.jsx("span",{children:"Captured context"}),e.jsx("p",{children:d.capturedContextSummary})]}):s.context.targetRepoAssumptions.length?e.jsxs("section",{children:[e.jsx("span",{children:"Captured context"}),e.jsx("p",{children:s.context.targetRepoAssumptions.join("; ")})]}):null,s.context.attachments.length?e.jsxs("section",{children:[e.jsx("span",{children:"Inputs"}),e.jsx("p",{children:s.context.attachments.map(l=>l.name).join(", ")})]}):null,s.context.apps.length?e.jsxs("section",{children:[e.jsx("span",{children:"Apps"}),e.jsx("p",{children:s.context.apps.map(l=>l.name).join(", ")})]}):null,s.context.tools.length?e.jsxs("section",{children:[e.jsx("span",{children:"Tools"}),e.jsx("p",{children:s.context.tools.map(l=>l.name).join(", ")})]}):null,x?e.jsxs("section",{children:[e.jsx("span",{children:"Action shape"}),e.jsxs("p",{children:[x.label,": ",x.detail]})]}):null]}),e.jsxs("div",{className:"cloud-create-plan-grid",children:[x?e.jsxs("section",{children:[e.jsx("span",{children:"Actions"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:x.defaultActionKey??"chat"}),e.jsx("small",{children:x.label})]}),x.directActionHint?e.jsxs("li",{children:[e.jsx("code",{children:"direct action"}),e.jsx("small",{children:x.directActionHint})]}):null]})]}):null,e.jsxs("section",{children:[e.jsx("span",{children:"Source plan"}),e.jsx("ul",{children:N.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.path}),e.jsx("small",{children:l.operation})]},`${l.operation}:${l.path}`))})]}),e.jsxs("section",{children:[e.jsx("span",{children:"Checks"}),e.jsx("ul",{children:h.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.command})]},`${l.name}:${l.command}`))})]}),j.length?e.jsxs("section",{children:[e.jsx("span",{children:"Requirements"}),e.jsx("ul",{children:j.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.detail})]},`${l.name}:${l.detail}`))})]}):null,f.length?e.jsxs("section",{children:[e.jsx("span",{children:"Workflow evidence"}),e.jsx("ul",{children:f.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.detail})]},`${l.name}:${l.detail}`))})]}):null]}),e.jsxs("div",{className:"cloud-create-plan-actions",children:[e.jsxs("button",{type:"button",onClick:a,disabled:t||!S,children:[e.jsx(ie,{size:14}),e.jsx("span",{children:"Confirm plan"})]}),e.jsxs("button",{type:"button",onClick:u,disabled:t||!A,children:[e.jsx(H,{size:14}),e.jsx("span",{children:"Edit plan"})]}),e.jsxs("button",{type:"button",onClick:m,disabled:t,children:[e.jsx(Re,{size:14}),e.jsx("span",{children:"Cancel"})]})]})]})}function Qe({projects:s,workItems:t,selectedWorkItem:a,detail:u,loading:m,actionBusy:c,connection:d,error:h,model:j,showToast:f,onBack:N,onModelChange:x,onSetupCloudProject:k,onCreateWork:S,onSelectWorkItem:A,onSendMessage:l,onHandleBackground:q,onCancelCreatePlan:oe,onCancelTask:F,localProjectName:re,onApplyLocalPatch:de,onShowFiles:w}){const[y,R]=r.useState(""),[b,g]=r.useState(""),K=r.useRef(null),P=r.useRef(null),[ue,V]=r.useState(0),[pe,T]=r.useState(0),[U,_]=r.useState(!1),[X,G]=r.useState(!1),[C,z]=r.useState("tasks"),[$,he]=r.useState(""),[J,xe]=r.useState(()=>s[0]?.id??""),M=r.useMemo(()=>new Map(s.map(n=>[n.id,n])),[s]),v=M.has(J)?J:s[0]?.id??"",me=ye("openpond",j),je=r.useMemo(()=>s.length?s.map(n=>({value:n.id,label:n.organizationName?`${n.organizationName} / ${n.name}`:n.name,shortLabel:n.name,description:n.sourceLabel??n.defaultBranch??void 0})):[{value:"",label:"No Cloud Project"}],[s]),Q=r.useMemo(()=>{const n=$.trim().toLowerCase();return t.filter(o=>_e(o,C)?n?o.title.toLowerCase().includes(n):!0:!1)},[$,C,t]);async function Y(){const n=y.trim();!n||!v||c||(await S({projectId:v,prompt:n}),R(""),_(!1))}async function Z(){const n=b.trim();!n||c||(await l(n),g(""))}async function ve(){const n=b.trim();await q(n||null),g(""),G(!1)}function O(n){V(n.selectionStart??n.value.length)}function E(n){T(n.selectionStart??n.value.length)}function fe(n){const o=K.current,p=ae(y,n,o?.selectionStart??ue);R(p.value),V(p.cursorIndex),window.requestAnimationFrame(()=>{o?.focus(),o?.setSelectionRange(p.cursorIndex,p.cursorIndex)})}function be(n){const o=P.current,p=ae(b,n,o?.selectionStart??pe);g(p.value),T(p.cursorIndex),window.requestAnimationFrame(()=>{o?.focus(),o?.setSelectionRange(p.cursorIndex,p.cursorIndex)})}function ge(){g(n=>n||"Revise plan: "),window.requestAnimationFrame(()=>{const n=P.current,o=n?.value.length??0;n?.focus(),n?.setSelectionRange(o,o),T(o)})}if(a){const n=u?.messages??[],o=u?.activity??[],p=u?.createImproveRun??a.createImproveRun??null,W=Me(n),L=W?.body??a.title,Ce=M.get(a.projectId)??null,I=a.status==="queued"||a.status==="running";return e.jsxs("section",{className:"cloud-work-view thread",children:[e.jsx("div",{className:"cloud-thread-body",children:e.jsxs("div",{className:"cloud-thread-timeline",children:[e.jsxs("div",{className:"cloud-thread-inline-nav",children:[e.jsxs("button",{type:"button",onClick:N,children:[e.jsx(Ne,{size:15}),e.jsx("span",{children:"All tasks"})]}),e.jsx("span",{children:Ce?.name??"Cloud Project"}),a.sourceRef?e.jsx("span",{children:a.sourceRef}):null,w?e.jsx("button",{type:"button",onClick:w,children:e.jsx("span",{children:"Files"})}):null]}),L&&e.jsx("article",{className:"cloud-message user",children:e.jsx("p",{children:L})}),e.jsxs("div",{className:"cloud-worked-line",children:[e.jsx("span",{children:ze(a.status)}),e.jsx("span",{children:B(a.updatedAt)}),I&&e.jsxs("button",{type:"button",onClick:()=>{F()},disabled:c,children:[e.jsx(ee,{size:12}),e.jsx("span",{children:"Stop task"})]})]}),e.jsx(qe,{workItem:a,detail:u,actionBusy:c,localProjectName:re,onApplyLocalPatch:de,onShowFiles:w}),p?e.jsx(Ue,{run:p,actionBusy:c,onApprove:()=>{q(null)},onEdit:ge,onCancel:()=>{oe()}}):null,n.filter(i=>i.id!==W?.id).filter(i=>!ce(i)).map(i=>e.jsx("article",{className:`cloud-message ${i.role}`,children:e.jsx("p",{children:i.body})},i.id)),o.map(i=>e.jsxs("article",{className:"cloud-activity",children:[e.jsx("span",{children:i.kind.replace(/_/g," ")}),e.jsx("p",{children:i.summary})]},i.id)),!m&&n.length===0&&o.length===0&&!L&&e.jsx("p",{className:"cloud-muted",children:"No messages yet."})]})}),e.jsxs("div",{className:"cloud-thread-composer",children:[e.jsx("button",{type:"button",className:`cloud-composer-plus ${X?"active":""}`,onClick:()=>G(i=>!i),title:"Cloud task options",children:e.jsx(D,{size:18})}),X&&e.jsxs("div",{className:"cloud-composer-options thread-options",children:[e.jsxs("button",{type:"button",onClick:()=>{ve()},disabled:c,children:[e.jsx(Pe,{size:14}),e.jsx("span",{children:"Handle in background"})]}),I&&e.jsxs("button",{type:"button",onClick:()=>{F()},disabled:c,children:[e.jsx(ee,{size:14}),e.jsx("span",{children:"Stop task"})]})]}),e.jsx("textarea",{ref:P,value:b,rows:1,placeholder:"Request changes or ask a question",onChange:i=>{g(i.target.value),E(i.currentTarget)},onClick:i=>E(i.currentTarget),onSelect:i=>E(i.currentTarget),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),Z())}}),e.jsx(se,{buttonClassName:"cloud-composer-mic-button",connection:d,disabled:c,iconSize:17,wrapperClassName:"cloud-composer-mic",showToast:f,onTranscript:be}),e.jsx("button",{type:"button",className:"cloud-composer-submit",disabled:!b.trim()||c,onClick:()=>{Z()},title:"Send",children:e.jsx(ne,{size:17})})]}),h&&e.jsx("div",{className:"cloud-error",children:h})]})}return e.jsx("section",{className:"cloud-work-view home",children:e.jsxs("div",{className:"cloud-home-shell",children:[e.jsx("h1",{children:"What should we change next?"}),e.jsxs("div",{className:"cloud-home-composer",children:[e.jsx("textarea",{ref:K,value:y,rows:2,placeholder:"Describe a task",onChange:n=>{R(n.target.value),O(n.currentTarget)},onClick:n=>O(n.currentTarget),onSelect:n=>O(n.currentTarget),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),Y())}}),e.jsxs("div",{className:"cloud-home-composer-actions",children:[e.jsx("button",{type:"button",className:`cloud-composer-plus ${U?"active":""}`,onClick:()=>_(n=>!n),title:"Cloud task options",children:e.jsx(D,{size:18})}),e.jsxs("div",{className:"cloud-composer-selects",children:[e.jsx(te,{compact:!0,className:"cloud-project-select",disabled:c||s.length===0,label:"Cloud Project",options:je,placement:"top",value:v,onChange:xe}),e.jsx(te,{compact:!0,className:"cloud-model-select",disabled:c,label:"Model",options:ke("openpond"),placement:"top",value:me,onChange:x})]}),e.jsx(se,{buttonClassName:"cloud-composer-mic-button",connection:d,disabled:c,iconSize:17,wrapperClassName:"cloud-composer-mic",showToast:f,onTranscript:fe}),e.jsx("button",{type:"button",className:"cloud-composer-submit",disabled:!y.trim()||!v||c,onClick:()=>{Y()},title:"Handle in background",children:e.jsx(ne,{size:17})})]}),U&&e.jsxs("div",{className:"cloud-composer-options",children:[e.jsxs("button",{type:"button",onClick:()=>_(!1),disabled:c,children:[e.jsx(D,{size:14}),e.jsx("span",{children:"New task"})]}),e.jsxs("button",{type:"button",onClick:()=>k(v),disabled:!v||c,children:[e.jsx(Se,{size:14}),e.jsx("span",{children:"Create environment"})]})]})]}),e.jsxs("div",{className:"cloud-task-list-toolbar",children:[e.jsxs("div",{className:"cloud-task-tabs",role:"tablist","aria-label":"Cloud tasks",children:[e.jsx("button",{type:"button",className:C==="tasks"?"active":"",onClick:()=>z("tasks"),children:"Tasks"}),e.jsx("button",{type:"button",className:C==="reviews"?"active":"",onClick:()=>z("reviews"),children:"Code reviews"}),e.jsx("button",{type:"button",className:C==="archive"?"active":"",onClick:()=>z("archive"),children:"Archive"})]}),e.jsxs("label",{className:"cloud-task-search",children:[e.jsx(Ae,{size:17}),e.jsx("input",{value:$,placeholder:"Search",onChange:n=>he(n.target.value)})]})]}),e.jsxs("div",{className:"cloud-task-list",children:[Q.map(n=>e.jsxs("button",{type:"button",className:"cloud-task-row",onClick:()=>A(n),children:[e.jsx("span",{children:n.title}),e.jsxs("small",{children:[B(n.updatedAt)," · ",$e(M,n.projectId)]})]},n.id)),!m&&Q.length===0&&e.jsx("p",{className:"cloud-empty",children:s.length?"No tasks yet":"Create or link a Cloud Project before starting a task"}),m&&e.jsx("p",{className:"cloud-empty",children:"Loading tasks..."})]}),h&&e.jsx("div",{className:"cloud-error",children:h})]})})}export{Qe as CloudWorkView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,j as e,S as g,a as b,i as f,C,F as P,P as k,M,b as v,c as S}from"./index-
|
|
1
|
+
import{r as j,j as e,S as g,a as b,i as f,C,F as P,P as k,M,b as v,c as S}from"./index-D7Vr3zcV.js";function E({open:a,query:r,projects:c,sessions:o,onQueryChange:n,onClose:d,onNewChat:x,onOpenProject:u,onOpenSession:p}){const t=r.trim().toLowerCase(),l=j.useMemo(()=>w(o,t,10),[t,o]),i=j.useMemo(()=>L(c,t,8),[t,c]);if(!a)return null;const N=()=>{const s=i[0];if(s){u(s);return}const m=l[0];m&&p(m)};return e.jsx("div",{className:"command-overlay",role:"presentation",onMouseDown:d,children:e.jsxs("section",{className:"command-menu",role:"dialog","aria-modal":"true","aria-label":"Search chats and projects",onMouseDown:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"command-input-row",children:[e.jsx(g,{size:17}),e.jsx("input",{autoFocus:!0,value:r,onChange:s=>n(s.target.value),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),N()),s.key==="Escape"&&(s.preventDefault(),d())},placeholder:"Search chats and projects"}),e.jsx("kbd",{children:"Esc"})]}),e.jsxs("div",{className:"command-results",children:[e.jsxs("button",{className:"command-result command-create",onClick:x,children:[e.jsx(b,{size:15}),e.jsx("span",{children:"New local task"}),e.jsx("small",{children:"General"})]}),e.jsxs(h,{label:"Projects",children:[i.map(s=>e.jsxs("button",{className:"command-result",onClick:()=>u(s),children:[f(s)?e.jsx(C,{size:15}):e.jsx(P,{size:15}),e.jsx("span",{children:s.project.name}),e.jsx("small",{children:z(s)})]},s.project.id)),i.length===0&&e.jsx("div",{className:"command-empty",children:"No projects found"})]}),e.jsxs(h,{label:"Chats",children:[l.map(s=>e.jsxs("button",{className:"command-result",onClick:()=>p(s),children:[s.pinned?e.jsx(k,{size:15}):e.jsx(M,{size:15}),e.jsx("span",{children:s.title}),e.jsx("small",{children:s.appName??v(s.updatedAt)})]},s.id)),l.length===0&&e.jsx("div",{className:"command-empty",children:"No chats found"})]})]})]})})}function w(a,r,c){const o=[];for(const n of a)if((!r||`${n.title} ${n.appName??""}`.toLowerCase().includes(r))&&(o.push(n),o.length>=c))break;return o}function L(a,r,c){const o=[];for(const n of a)if((!r||$(n).toLowerCase().includes(r))&&(o.push(n),o.length>=c))break;return o}function $(a){return S(a)?`${a.project.name} ${a.project.path} ${a.project.workspacePath}`:`${a.project.name} ${a.project.sourceLabel??""} ${a.project.organizationName??""}`}function z(a){return f(a)?a.project.organizationName??"Cloud Project":a.project.linkedOpenPondApp?"OpenPond project":a.project.source==="git"?"Local Git":"Local folder"}function h({label:a,children:r}){return e.jsxs("div",{className:"command-group",children:[e.jsx("div",{className:"command-group-label",children:a}),r]})}export{E as CommandMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e,X as Y,bl as Q,bm as Z,bn as ee,b9 as se,bo as ne,bp as te,a as ie,T as ae,aP as H,bq as q,J as le}from"./index-CU2qhUYV.js";import{S as re,W as oe,B as ce}from"./wifi-off-Dt52ofzh.js";import{R as O}from"./refresh-cw-N5b_6AP5.js";import{R as de}from"./reply-BSKjZrJg.js";const me=2e4,E=10,ue=12*1024*1024,he=new Set(["image/png","image/jpeg","image/webp","image/gif"]);function ye(s){const[n,m]=l.useState(""),[a,y]=l.useState(0),[c,u]=l.useState([]),[b,i]=l.useState(null),[f,h]=l.useState(!1),[p,C]=l.useState([]),[N,v]=l.useState(0),[M,r]=l.useState(null),k=l.useRef(null),R=l.useRef(null),I=l.useRef(c);I.current=c;const g=l.useMemo(()=>ge(n,a),[n,a]),S=g?`${g.start}:${g.end}:${g.query}`:null,L=g?.query??null,w=l.useMemo(()=>{if(!g)return[];const t=new Map;for(const d of[...s.members,...p])t.set(d.userId,d);const o=g.query.toLowerCase();return[...t.values()].filter(d=>`${d.handle??""} ${d.name??""}`.toLowerCase().includes(o)).slice(0,8)},[g,s.members,p]),D=!!(g&&S!==M&&w.length>0),T=!!(s.disabled||s.busy||f),B=!T&&(!!n.trim()||c.length>0);l.useEffect(()=>{if(L==null){C([]);return}let t=!0;const o=window.setTimeout(()=>{s.onSearchMembers(L).then(d=>{t&&C(d)},()=>{t&&C([])})},150);return()=>{t=!1,window.clearTimeout(o)}},[L,s.onSearchMembers]),l.useEffect(()=>{v(0)},[S]),l.useEffect(()=>()=>F(I.current),[]);async function U(t){if(t?.preventDefault(),!!B){i(null),h(!0);try{const o=await Promise.all(c.map(ne));if(!await s.onSend({body:n,mentionUserIds:xe(n,s.members),attachments:o,replyToMessageId:s.replyTo?.id??null}))return;F(c),m(""),y(0),u([]),s.onCancelReply()}catch(o){i(o instanceof Error?o.message:String(o))}finally{h(!1)}}}function X(t){if(D){if(t.key==="ArrowDown"){t.preventDefault(),v(o=>(o+1)%w.length);return}if(t.key==="ArrowUp"){t.preventDefault(),v(o=>(o-1+w.length)%w.length);return}if(t.key==="Enter"||t.key==="Tab"){t.preventDefault(),$(w[N]??w[0]);return}if(t.key==="Escape"){t.preventDefault(),r(S);return}}t.key!=="Enter"||t.shiftKey||t.nativeEvent.isComposing||(t.preventDefault(),U())}function V(t){if(!t)return;i(null);const o=Math.max(0,E-c.length);if(o===0){i(`You can attach up to ${E} images.`),A();return}const d=[...t],j=d.slice(0,o),z=j.find(x=>!he.has(x.type)),P=j.find(x=>x.size<=0||x.size>ue);if(z){i(`${z.name} is not a supported image type.`),A();return}if(P){i(`${P.name} must be smaller than 12 MB.`),A();return}const W=j.map(x=>({id:te(),file:x,name:x.name,mediaType:x.type,sizeBytes:x.size,kind:"image",previewUrl:URL.createObjectURL(x)}));u(x=>[...x,...W]),d.length>o&&i(`Only ${E} images can be attached to one message.`),A()}function G(t){u(o=>{const d=o.find(j=>j.id===t);return d?.previewUrl&&URL.revokeObjectURL(d.previewUrl),o.filter(j=>j.id!==t)})}function A(){k.current&&(k.current.value="")}function $(t){if(!g)return;const o=`@${J(t)} `,d=`${n.slice(0,g.start)}${o}${n.slice(g.end)}`,j=g.start+o.length;m(d),y(j),r(null),window.requestAnimationFrame(()=>R.current?.focusAtPromptIndex(j))}return e.jsxs("form",{className:`composer dock community-composer${c.length>0?" has-attachments":""}${b?" has-attachment-error":""}`,onSubmit:U,children:[s.replyTo?e.jsxs("div",{className:"community-composer-reply",children:[e.jsxs("span",{children:[e.jsx("strong",{children:"Replying to"}),s.replyTo.body.slice(0,100)||"message"]}),e.jsx("button",{type:"button","aria-label":"Cancel reply",onClick:s.onCancelReply,children:e.jsx(Y,{size:13})})]}):null,D?e.jsx("div",{className:"community-mention-menu",role:"listbox","aria-label":"Community members",children:w.map((t,o)=>e.jsxs("button",{type:"button",role:"option","aria-selected":o===N,onMouseDown:d=>d.preventDefault(),onClick:()=>$(t),children:[e.jsx("strong",{children:t.name??t.handle??"Community member"}),t.handle?e.jsxs("small",{children:["@",t.handle]}):null]},t.userId))}):null,e.jsxs("div",{className:"composer-input-shell",children:[c.length>0?e.jsx("div",{className:"composer-attachments","aria-label":"Selected attachments",children:c.map(t=>e.jsx(Q,{attachment:t,onRemove:()=>G(t.id)},t.id))}):null,b?e.jsx("div",{className:"composer-attachment-error",role:"status",children:b}):null,e.jsx("div",{className:"composer-textarea-frame",onClick:t=>{t.target===t.currentTarget&&R.current?.focusAtPromptIndex(a)},children:e.jsx(Z,{ref:R,disabled:T,onCursorChange:y,onKeyDown:X,onPromptChange:(t,o)=>{const d=t.slice(0,me);m(d),y(Math.min(o,d.length))},onTokenPositionChange:()=>{},placeholder:s.disabled?"Accept the community rules to post":"Message community",prompt:n,token:null})}),e.jsxs("div",{className:"composer-primary-controls team-chat-composer-controls",children:[e.jsx("input",{ref:k,className:"composer-file-input",hidden:!0,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",multiple:!0,onChange:t=>V(t.currentTarget.files)}),e.jsx("button",{type:"button",className:"composer-icon","aria-label":"Attach images",disabled:T||c.length>=E,onClick:()=>k.current?.click(),children:e.jsx(ee,{size:17})}),e.jsx("div",{className:"composer-spacer"}),e.jsx("button",{type:"submit",className:"send-button","aria-label":"Send message",disabled:!B,children:e.jsx(se,{size:17})})]})]})]})}function ge(s,n=s.length){const m=Math.max(0,Math.min(n,s.length)),a=/(?:^|\s)@([\w-]*)$/.exec(s.slice(0,m));return!a||a.index==null?null:{start:a.index+a[0].indexOf("@"),end:m,query:a[1]??""}}function xe(s,n){const m=new Set([...s.matchAll(/(?:^|\s)@([\w-]+)/g)].map(a=>a[1]?.toLowerCase()));return n.filter(a=>m.has(J(a).toLowerCase())).map(a=>a.userId)}function J(s){return s.handle??s.name?.replace(/[^\w-]/g,"")??s.userId}function F(s){for(const n of s)n.previewUrl&&URL.revokeObjectURL(n.previewUrl)}function be(s){const[n,m]=l.useState(!1),[a,y]=l.useState(s.message.body),c=s.message.refs.find(i=>i.refType==="message_reply"),u=c?s.messagesById.get(c.refId)??null:null,b=u?.authorUserId?s.membersById.get(u.authorUserId)??null:null;return e.jsxs("article",{className:`community-message${s.own?" own":""}`,id:`community-message-${s.message.id}`,children:[e.jsx("div",{className:"community-avatar",children:fe(s.author?.name??s.author?.handle??"?")}),e.jsxs("div",{className:"community-message-content",children:[e.jsxs("header",{children:[e.jsx("strong",{children:s.author?.name??s.author?.handle??"Community member"}),e.jsx("time",{dateTime:s.message.createdAt,children:je(s.message.createdAt)}),s.message.editedAt?e.jsx("span",{children:"edited"}):null,s.message.deletedAt?null:e.jsxs("div",{className:"community-message-actions",children:[e.jsx("button",{type:"button","aria-label":"Reply",onClick:()=>s.onReply(s.message),children:e.jsx(de,{size:13})}),s.own?e.jsx("button",{type:"button","aria-label":"Edit",onClick:()=>m(!0),children:e.jsx(ie,{size:13})}):null,s.own?e.jsx("button",{type:"button","aria-label":"Delete",onClick:()=>{s.onDelete(s.message.id)},children:e.jsx(ae,{size:13})}):null]})]}),c?e.jsxs("button",{type:"button",className:"community-reply-quote",onClick:()=>document.getElementById(`community-message-${c.refId}`)?.scrollIntoView({behavior:"smooth",block:"center"}),children:[e.jsx("strong",{children:b?.name??"Community member"}),e.jsx("span",{children:u?.deletedAt?"Message deleted":u?.body??String(c.preview.body??"Earlier message")})]}):null,n?e.jsxs("form",{className:"community-message-edit",onSubmit:i=>{i.preventDefault(),s.onEdit(s.message.id,a).then(f=>{f&&m(!1)})},children:[e.jsx("textarea",{autoFocus:!0,value:a,onChange:i=>y(i.currentTarget.value)}),e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>m(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!a.trim(),children:"Save"})]})]}):s.message.deletedAt?e.jsx("div",{className:"community-message-deleted",children:"Message deleted"}):e.jsx(H,{content:s.message.body}),!s.message.deletedAt&&s.message.attachments.length>0?e.jsx("div",{className:"community-message-attachments",children:s.message.attachments.map(i=>s.attachmentsAccessible?e.jsxs("button",{type:"button",onClick:()=>{s.onDownloadAttachment(i.id)},children:[e.jsx("span",{children:i.name}),e.jsx("small",{children:K(i.sizeBytes)})]},i.id):e.jsxs("div",{className:"community-attachment-placeholder",children:[e.jsx("span",{children:i.name}),e.jsxs("small",{children:["Join to view · ",K(i.sizeBytes)]})]},i.id))}):null]})]})}function fe(s){return s.split(/\s+/).slice(0,2).map(n=>n[0]?.toUpperCase()??"").join("")||"?"}function je(s){const n=new Date(s);return Number.isNaN(n.getTime())?"":n.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function K(s){return s<1024?`${s} B`:s<1024*1024?`${Math.round(s/1024)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function pe(s){const[n,m]=l.useState(!1),a=l.useRef(null),y=l.useRef(s.onClose);l.useEffect(()=>m(!1),[s.rules.id]),l.useEffect(()=>{y.current=s.onClose},[s.onClose]),l.useEffect(()=>{const u=document.activeElement instanceof HTMLElement?document.activeElement:null,b=a.current,i=()=>[...b?.querySelectorAll('button:not([disabled]), input:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')??[]];i()[0]?.focus();const f=h=>{if(h.key==="Escape"){h.preventDefault(),y.current();return}if(h.key!=="Tab")return;const p=i();if(p.length===0){h.preventDefault(),b?.focus();return}const C=p[0],N=p.at(-1);h.shiftKey&&document.activeElement===C?(h.preventDefault(),N.focus()):!h.shiftKey&&document.activeElement===N&&(h.preventDefault(),C.focus())};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),u?.focus()}},[]);const c=s.mode!=="review";return e.jsx("div",{className:"community-dialog-backdrop",role:"presentation",onMouseDown:s.onClose,children:e.jsxs("section",{ref:a,className:"community-rules-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"community-rules-title",tabIndex:-1,onMouseDown:u=>u.stopPropagation(),children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("small",{children:["Community rules · version ",s.rules.version]}),e.jsx("h2",{id:"community-rules-title",children:s.rules.title})]}),e.jsx("button",{type:"button","aria-label":"Close rules",onClick:s.onClose,children:e.jsx(Y,{size:16})})]}),e.jsx("div",{className:"community-rules-body",children:e.jsx(H,{content:s.rules.bodyMarkdown})}),s.error?e.jsx("div",{className:"community-state error",role:"alert",children:s.error}):null,e.jsxs("footer",{children:[c?e.jsxs("label",{className:"community-rules-acceptance",children:[e.jsx("input",{type:"checkbox",checked:n,onChange:u=>m(u.currentTarget.checked)}),e.jsx("span",{children:"I have read and agree to follow these rules."})]}):e.jsx("span",{}),e.jsxs("div",{children:[e.jsx("button",{type:"button",className:"secondary",onClick:s.onClose,children:"Cancel"}),c?e.jsx("button",{type:"button",disabled:!n||s.busy,onClick:()=>{s.onAccept().then(u=>{u&&s.onClose()})},children:s.busy?"Saving…":s.mode==="join"?"Agree and join":"Accept updated rules"}):null]})]})]})})}function ke({communities:s,chat:n,currentUserId:m}){const[a,y]=l.useState(null),[c,u]=l.useState(null),b=l.useRef(null),i=s.preview,f=i?.membership?.status==="active",h=!!i?.capabilities.requiresRulesAcceptance,p=l.useMemo(()=>new Map(n.members.map(r=>[r.userId,r])),[n.members]),C=l.useMemo(()=>new Map(n.messages.map(r=>[r.id,r])),[n.messages]),N=n.messages.at(-1)?.sequence??0;if(l.useEffect(()=>{const r=b.current;r&&(r.scrollTop=r.scrollHeight)},[n.selectedChannelId,N]),l.useEffect(()=>{u(null),h&&i?.currentRules&&y("reaccept")},[i?.currentRules,h]),!s.selectedSummary)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-discovery-card",children:[e.jsx(q,{size:30}),e.jsx("h1",{children:"Discover communities"}),e.jsx("p",{children:s.discoveryLoading&&s.items.length===0?"Finding communities…":"Preview public conversations and join after accepting each community's rules."}),s.discoveryError?e.jsx("div",{className:"community-state error",children:s.discoveryError}):null,s.items.length>0?e.jsx("div",{className:"community-discovery-list",children:s.items.map(r=>e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(r.id),children:[e.jsx(_,{name:r.displayName,imageUrl:r.imageUrl}),e.jsxs("span",{children:[e.jsx("strong",{children:r.displayName}),e.jsx("small",{children:r.description})]}),e.jsx("em",{children:r.membership?.status==="active"?"Joined":r.featuredAt?"Featured":`${r.memberCount.toLocaleString()} members`})]},r.id))}):s.discoveryLoading?null:e.jsx("div",{className:"community-state",children:"No public communities are available yet."}),e.jsxs("div",{className:"community-discovery-actions",children:[e.jsxs("button",{type:"button",onClick:()=>{s.refresh()},disabled:s.discoveryLoading,children:[e.jsx(O,{size:14})," Refresh"]}),s.nextCursor?e.jsx("button",{type:"button",className:"secondary",onClick:()=>{s.loadMore()},disabled:s.discoveryLoading,children:"Load more"}):null]})]})});if(!i&&s.previewLoading)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("span",{className:"community-spinner"})," Loading community…"]})});if(!i)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("h1",{children:s.selectedSummary.displayName}),e.jsx("div",{className:"community-state error",children:s.previewError??"This community preview is unavailable."}),e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(s.selectedSummary.id),children:[e.jsx(O,{size:14})," Retry preview"]})]})});const v=i.currentRules,M=s.membershipError?.message??null;return e.jsxs("section",{className:"community-view",children:[e.jsxs("header",{className:"community-header",children:[e.jsxs("div",{className:"community-heading",children:[e.jsx(_,{name:i.displayName,imageUrl:i.imageUrl}),e.jsxs("div",{children:[e.jsx("small",{children:i.displayName}),e.jsx("h1",{children:n.selectedChannel?`# ${n.selectedChannel.displayName}`:i.displayName}),e.jsx("p",{children:n.selectedChannel?.topic||i.description})]})]}),e.jsxs("div",{className:"community-header-actions",children:[e.jsxs("span",{className:"community-member-count",children:[e.jsx(q,{size:14})," ",i.memberCount.toLocaleString()]}),v?e.jsxs("button",{type:"button",className:"secondary",onClick:()=>y("review"),children:[e.jsx(re,{size:14})," Rules"]}):null,f?e.jsx(ve,{mode:i.membership?.notificationMode??"mentions",busy:s.membershipBusy,onMode:s.updateNotifications,onLeave:s.leave}):null]})]}),e.jsxs("div",{className:"community-chat-main conversation-surface-main",children:[e.jsxs("div",{className:"community-chat-notices",children:[f?h?e.jsxs("div",{className:"community-preview-banner warning",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"The rules have changed"}),e.jsx("span",{children:"Accept the current rules to continue reading live updates and posting."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("reaccept"),children:"Review updated rules"})]}):null:e.jsxs("div",{className:"community-preview-banner",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Previewing ",i.displayName]}),e.jsx("span",{children:"Read the public conversation, then accept the rules to join and post."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("join"),children:"Join community"})]}),n.realtimeError&&f&&!h?e.jsxs("div",{className:"community-realtime-state",children:[e.jsx(oe,{size:14}),e.jsx("span",{children:"Live updates are reconnecting. Loaded messages are still available."})]}):null,n.lostMembership?e.jsx("div",{className:"community-state error",children:"Your membership changed. Refresh the community before continuing."}):null,n.channelsError?e.jsxs("div",{className:"community-state error",children:["Channels: ",n.channelsError," ",e.jsx("button",{type:"button",onClick:()=>{n.loadChannels()},children:"Retry"})]}):null,M?e.jsx("div",{className:"community-state error",role:"alert",children:M}):null]}),e.jsxs("div",{className:"community-message-pane conversation-message-scroll",ref:b,role:"log","aria-live":"polite","aria-relevant":"additions text","aria-busy":n.messagesLoading,"aria-label":n.selectedChannel?`${i.displayName}, ${n.selectedChannel.displayName}`:i.displayName,tabIndex:0,children:[n.hasMoreBefore?e.jsx("button",{type:"button",className:"community-load-older",disabled:n.olderMessagesLoading,onClick:()=>{n.loadOlder()},children:n.olderMessagesLoading?"Loading…":"Load earlier messages"}):null,n.messagesLoading&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"Loading messages…"}):null,n.messagesError?e.jsxs("div",{className:"community-message-state error",children:["Could not load messages: ",n.messagesError," ",e.jsx("button",{type:"button",onClick:()=>{n.loadMessages()},children:"Retry"})]}):null,!n.messagesLoading&&!n.messagesError&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"No messages in this channel yet."}):null,n.messages.map(r=>e.jsx(be,{message:r,author:r.authorUserId?p.get(r.authorUserId)??null:null,own:r.authorUserId===m,attachmentsAccessible:!n.previewMode,membersById:p,messagesById:C,onReply:u,onEdit:n.editMessage,onDelete:n.deleteMessage,onDownloadAttachment:n.downloadAttachment},r.id))]}),f?e.jsxs("div",{className:"community-composer-wrap conversation-composer-shell",children:[n.actionError?e.jsx("div",{className:"community-composer-action-error",children:n.actionError}):null,n.failedSend?e.jsxs("div",{className:"community-failed-send",children:[e.jsxs("span",{children:["Message not sent. ",n.failedSend.message]}),e.jsx("button",{type:"button",disabled:n.sending,onClick:()=>{n.retrySend()},children:"Retry"}),e.jsx("button",{type:"button",onClick:n.dismissFailedSend,children:"Dismiss"})]}):null,e.jsx(ye,{members:n.members,replyTo:c,busy:n.sending,disabled:h||n.lostMembership||!n.selectedChannel||n.selectedChannel.postingPolicy==="admins"&&i.membership?.role==="member",onCancelReply:()=>u(null),onSearchMembers:n.searchMembers,onSend:n.sendMessage})]}):null]}),a&&v?e.jsx(pe,{rules:v,mode:a,busy:s.membershipBusy,error:M,onAccept:a==="join"?s.join:s.acceptRules,onClose:()=>y(null)}):null]})}function ve(s){const[n,m]=l.useState(!1);return e.jsxs("div",{className:"community-membership-menu",children:[e.jsxs("button",{type:"button",className:"secondary","aria-expanded":n,onClick:()=>m(a=>!a),children:[s.mode==="none"?e.jsx(le,{size:14}):e.jsx(ce,{size:14})," Joined"]}),n?e.jsxs("div",{className:"community-membership-popover",children:[e.jsx("strong",{children:"Notifications"}),["mentions","all","none"].map(a=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",name:"community-notifications",checked:s.mode===a,disabled:s.busy,onChange:()=>{s.onMode(a)}})," ",a==="mentions"?"Mentions":a==="all"?"All messages":"Nothing"]},a)),e.jsx("button",{type:"button",className:"danger",disabled:s.busy,onClick:()=>{window.confirm("Leave this community? You can join again later by accepting the current rules.")&&s.onLeave().then(a=>{a&&m(!1)})},children:"Leave community"})]}):null]})}function _({name:s,imageUrl:n}){return n?e.jsx("img",{className:"community-icon",src:n,alt:""}):e.jsx("span",{className:"community-icon fallback",children:s.slice(0,2).toUpperCase()})}export{ke as CommunityView};
|
|
1
|
+
import{r as l,j as e,X as H,bC as W,bD as Z,bE as ee,bk as se,bF as ne,bG as te,a as ie,T as ae,aQ as Y,bH as q,J as le}from"./index-D7Vr3zcV.js";import{S as re,W as oe,B as ce}from"./wifi-off-BKTqnqj0.js";import{R as O}from"./refresh-cw-DE0u_nmZ.js";import{R as de}from"./reply-2MfLJ93n.js";const me=2e4,A=10,ue=12*1024*1024,he=new Set(["image/png","image/jpeg","image/webp","image/gif"]);function ye(s){const[n,m]=l.useState(""),[a,y]=l.useState(0),[c,u]=l.useState([]),[b,i]=l.useState(null),[f,h]=l.useState(!1),[p,C]=l.useState([]),[N,v]=l.useState(0),[M,r]=l.useState(null),k=l.useRef(null),R=l.useRef(null),I=l.useRef(c);I.current=c;const g=l.useMemo(()=>ge(n,a),[n,a]),S=g?`${g.start}:${g.end}:${g.query}`:null,L=g?.query??null,w=l.useMemo(()=>{if(!g)return[];const t=new Map;for(const d of[...s.members,...p])t.set(d.userId,d);const o=g.query.toLowerCase();return[...t.values()].filter(d=>`${d.handle??""} ${d.name??""}`.toLowerCase().includes(o)).slice(0,8)},[g,s.members,p]),D=!!(g&&S!==M&&w.length>0),T=!!(s.disabled||s.busy||f),B=!T&&(!!n.trim()||c.length>0);l.useEffect(()=>{if(L==null){C([]);return}let t=!0;const o=window.setTimeout(()=>{s.onSearchMembers(L).then(d=>{t&&C(d)},()=>{t&&C([])})},150);return()=>{t=!1,window.clearTimeout(o)}},[L,s.onSearchMembers]),l.useEffect(()=>{v(0)},[S]),l.useEffect(()=>()=>F(I.current),[]);async function U(t){if(t?.preventDefault(),!!B){i(null),h(!0);try{const o=await Promise.all(c.map(ne));if(!await s.onSend({body:n,mentionUserIds:xe(n,s.members),attachments:o,replyToMessageId:s.replyTo?.id??null}))return;F(c),m(""),y(0),u([]),s.onCancelReply()}catch(o){i(o instanceof Error?o.message:String(o))}finally{h(!1)}}}function X(t){if(D){if(t.key==="ArrowDown"){t.preventDefault(),v(o=>(o+1)%w.length);return}if(t.key==="ArrowUp"){t.preventDefault(),v(o=>(o-1+w.length)%w.length);return}if(t.key==="Enter"||t.key==="Tab"){t.preventDefault(),$(w[N]??w[0]);return}if(t.key==="Escape"){t.preventDefault(),r(S);return}}t.key!=="Enter"||t.shiftKey||t.nativeEvent.isComposing||(t.preventDefault(),U())}function G(t){if(!t)return;i(null);const o=Math.max(0,A-c.length);if(o===0){i(`You can attach up to ${A} images.`),E();return}const d=[...t],j=d.slice(0,o),z=j.find(x=>!he.has(x.type)),P=j.find(x=>x.size<=0||x.size>ue);if(z){i(`${z.name} is not a supported image type.`),E();return}if(P){i(`${P.name} must be smaller than 12 MB.`),E();return}const Q=j.map(x=>({id:te(),file:x,name:x.name,mediaType:x.type,sizeBytes:x.size,kind:"image",previewUrl:URL.createObjectURL(x)}));u(x=>[...x,...Q]),d.length>o&&i(`Only ${A} images can be attached to one message.`),E()}function V(t){u(o=>{const d=o.find(j=>j.id===t);return d?.previewUrl&&URL.revokeObjectURL(d.previewUrl),o.filter(j=>j.id!==t)})}function E(){k.current&&(k.current.value="")}function $(t){if(!g)return;const o=`@${J(t)} `,d=`${n.slice(0,g.start)}${o}${n.slice(g.end)}`,j=g.start+o.length;m(d),y(j),r(null),window.requestAnimationFrame(()=>R.current?.focusAtPromptIndex(j))}return e.jsxs("form",{className:`composer dock community-composer${c.length>0?" has-attachments":""}${b?" has-attachment-error":""}`,onSubmit:U,children:[s.replyTo?e.jsxs("div",{className:"community-composer-reply",children:[e.jsxs("span",{children:[e.jsx("strong",{children:"Replying to"}),s.replyTo.body.slice(0,100)||"message"]}),e.jsx("button",{type:"button","aria-label":"Cancel reply",onClick:s.onCancelReply,children:e.jsx(H,{size:13})})]}):null,D?e.jsx("div",{className:"community-mention-menu",role:"listbox","aria-label":"Community members",children:w.map((t,o)=>e.jsxs("button",{type:"button",role:"option","aria-selected":o===N,onMouseDown:d=>d.preventDefault(),onClick:()=>$(t),children:[e.jsx("strong",{children:t.name??t.handle??"Community member"}),t.handle?e.jsxs("small",{children:["@",t.handle]}):null]},t.userId))}):null,e.jsxs("div",{className:"composer-input-shell",children:[c.length>0?e.jsx("div",{className:"composer-attachments","aria-label":"Selected attachments",children:c.map(t=>e.jsx(W,{attachment:t,onRemove:()=>V(t.id)},t.id))}):null,b?e.jsx("div",{className:"composer-attachment-error",role:"status",children:b}):null,e.jsx("div",{className:"composer-textarea-frame",onClick:t=>{t.target===t.currentTarget&&R.current?.focusAtPromptIndex(a)},children:e.jsx(Z,{ref:R,disabled:T,onCursorChange:y,onKeyDown:X,onPromptChange:(t,o)=>{const d=t.slice(0,me);m(d),y(Math.min(o,d.length))},onTokenPositionChange:()=>{},placeholder:s.disabled?"Accept the community rules to post":"Message community",prompt:n,token:null})}),e.jsxs("div",{className:"composer-primary-controls team-chat-composer-controls",children:[e.jsx("input",{ref:k,className:"composer-file-input",hidden:!0,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",multiple:!0,onChange:t=>G(t.currentTarget.files)}),e.jsx("button",{type:"button",className:"composer-icon","aria-label":"Attach images",disabled:T||c.length>=A,onClick:()=>k.current?.click(),children:e.jsx(ee,{size:17})}),e.jsx("div",{className:"composer-spacer"}),e.jsx("button",{type:"submit",className:"send-button","aria-label":"Send message",disabled:!B,children:e.jsx(se,{size:17})})]})]})]})}function ge(s,n=s.length){const m=Math.max(0,Math.min(n,s.length)),a=/(?:^|\s)@([\w-]*)$/.exec(s.slice(0,m));return!a||a.index==null?null:{start:a.index+a[0].indexOf("@"),end:m,query:a[1]??""}}function xe(s,n){const m=new Set([...s.matchAll(/(?:^|\s)@([\w-]+)/g)].map(a=>a[1]?.toLowerCase()));return n.filter(a=>m.has(J(a).toLowerCase())).map(a=>a.userId)}function J(s){return s.handle??s.name?.replace(/[^\w-]/g,"")??s.userId}function F(s){for(const n of s)n.previewUrl&&URL.revokeObjectURL(n.previewUrl)}function be(s){const[n,m]=l.useState(!1),[a,y]=l.useState(s.message.body),c=s.message.refs.find(i=>i.refType==="message_reply"),u=c?s.messagesById.get(c.refId)??null:null,b=u?.authorUserId?s.membersById.get(u.authorUserId)??null:null;return e.jsxs("article",{className:`community-message${s.own?" own":""}`,id:`community-message-${s.message.id}`,children:[e.jsx("div",{className:"community-avatar",children:fe(s.author?.name??s.author?.handle??"?")}),e.jsxs("div",{className:"community-message-content",children:[e.jsxs("header",{children:[e.jsx("strong",{children:s.author?.name??s.author?.handle??"Community member"}),e.jsx("time",{dateTime:s.message.createdAt,children:je(s.message.createdAt)}),s.message.editedAt?e.jsx("span",{children:"edited"}):null,s.message.deletedAt?null:e.jsxs("div",{className:"community-message-actions",children:[e.jsx("button",{type:"button","aria-label":"Reply",onClick:()=>s.onReply(s.message),children:e.jsx(de,{size:13})}),s.own?e.jsx("button",{type:"button","aria-label":"Edit",onClick:()=>m(!0),children:e.jsx(ie,{size:13})}):null,s.own?e.jsx("button",{type:"button","aria-label":"Delete",onClick:()=>{s.onDelete(s.message.id)},children:e.jsx(ae,{size:13})}):null]})]}),c?e.jsxs("button",{type:"button",className:"community-reply-quote",onClick:()=>document.getElementById(`community-message-${c.refId}`)?.scrollIntoView({behavior:"smooth",block:"center"}),children:[e.jsx("strong",{children:b?.name??"Community member"}),e.jsx("span",{children:u?.deletedAt?"Message deleted":u?.body??String(c.preview.body??"Earlier message")})]}):null,n?e.jsxs("form",{className:"community-message-edit",onSubmit:i=>{i.preventDefault(),s.onEdit(s.message.id,a).then(f=>{f&&m(!1)})},children:[e.jsx("textarea",{autoFocus:!0,value:a,onChange:i=>y(i.currentTarget.value)}),e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>m(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!a.trim(),children:"Save"})]})]}):s.message.deletedAt?e.jsx("div",{className:"community-message-deleted",children:"Message deleted"}):e.jsx(Y,{content:s.message.body}),!s.message.deletedAt&&s.message.attachments.length>0?e.jsx("div",{className:"community-message-attachments",children:s.message.attachments.map(i=>s.attachmentsAccessible?e.jsxs("button",{type:"button",onClick:()=>{s.onDownloadAttachment(i.id)},children:[e.jsx("span",{children:i.name}),e.jsx("small",{children:K(i.sizeBytes)})]},i.id):e.jsxs("div",{className:"community-attachment-placeholder",children:[e.jsx("span",{children:i.name}),e.jsxs("small",{children:["Join to view · ",K(i.sizeBytes)]})]},i.id))}):null]})]})}function fe(s){return s.split(/\s+/).slice(0,2).map(n=>n[0]?.toUpperCase()??"").join("")||"?"}function je(s){const n=new Date(s);return Number.isNaN(n.getTime())?"":n.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function K(s){return s<1024?`${s} B`:s<1024*1024?`${Math.round(s/1024)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function pe(s){const[n,m]=l.useState(!1),a=l.useRef(null),y=l.useRef(s.onClose);l.useEffect(()=>m(!1),[s.rules.id]),l.useEffect(()=>{y.current=s.onClose},[s.onClose]),l.useEffect(()=>{const u=document.activeElement instanceof HTMLElement?document.activeElement:null,b=a.current,i=()=>[...b?.querySelectorAll('button:not([disabled]), input:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')??[]];i()[0]?.focus();const f=h=>{if(h.key==="Escape"){h.preventDefault(),y.current();return}if(h.key!=="Tab")return;const p=i();if(p.length===0){h.preventDefault(),b?.focus();return}const C=p[0],N=p.at(-1);h.shiftKey&&document.activeElement===C?(h.preventDefault(),N.focus()):!h.shiftKey&&document.activeElement===N&&(h.preventDefault(),C.focus())};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),u?.focus()}},[]);const c=s.mode!=="review";return e.jsx("div",{className:"community-dialog-backdrop",role:"presentation",onMouseDown:s.onClose,children:e.jsxs("section",{ref:a,className:"community-rules-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"community-rules-title",tabIndex:-1,onMouseDown:u=>u.stopPropagation(),children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("small",{children:["Community rules · version ",s.rules.version]}),e.jsx("h2",{id:"community-rules-title",children:s.rules.title})]}),e.jsx("button",{type:"button","aria-label":"Close rules",onClick:s.onClose,children:e.jsx(H,{size:16})})]}),e.jsx("div",{className:"community-rules-body",children:e.jsx(Y,{content:s.rules.bodyMarkdown})}),s.error?e.jsx("div",{className:"community-state error",role:"alert",children:s.error}):null,e.jsxs("footer",{children:[c?e.jsxs("label",{className:"community-rules-acceptance",children:[e.jsx("input",{type:"checkbox",checked:n,onChange:u=>m(u.currentTarget.checked)}),e.jsx("span",{children:"I have read and agree to follow these rules."})]}):e.jsx("span",{}),e.jsxs("div",{children:[e.jsx("button",{type:"button",className:"secondary",onClick:s.onClose,children:"Cancel"}),c?e.jsx("button",{type:"button",disabled:!n||s.busy,onClick:()=>{s.onAccept().then(u=>{u&&s.onClose()})},children:s.busy?"Saving…":s.mode==="join"?"Agree and join":"Accept updated rules"}):null]})]})]})})}function ke({communities:s,chat:n,currentUserId:m}){const[a,y]=l.useState(null),[c,u]=l.useState(null),b=l.useRef(null),i=s.preview,f=i?.membership?.status==="active",h=!!i?.capabilities.requiresRulesAcceptance,p=l.useMemo(()=>new Map(n.members.map(r=>[r.userId,r])),[n.members]),C=l.useMemo(()=>new Map(n.messages.map(r=>[r.id,r])),[n.messages]),N=n.messages.at(-1)?.sequence??0;if(l.useEffect(()=>{const r=b.current;r&&(r.scrollTop=r.scrollHeight)},[n.selectedChannelId,N]),l.useEffect(()=>{u(null),h&&i?.currentRules&&y("reaccept")},[i?.currentRules,h]),!s.selectedSummary)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-discovery-card",children:[e.jsx(q,{size:30}),e.jsx("h1",{children:"Discover communities"}),e.jsx("p",{children:s.discoveryLoading&&s.items.length===0?"Finding communities…":"Preview public conversations and join after accepting each community's rules."}),s.discoveryError?e.jsx("div",{className:"community-state error",children:s.discoveryError}):null,s.items.length>0?e.jsx("div",{className:"community-discovery-list",children:s.items.map(r=>e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(r.id),children:[e.jsx(_,{name:r.displayName,imageUrl:r.imageUrl}),e.jsxs("span",{children:[e.jsx("strong",{children:r.displayName}),e.jsx("small",{children:r.description})]}),e.jsx("em",{children:r.membership?.status==="active"?"Joined":r.featuredAt?"Featured":`${r.memberCount.toLocaleString()} members`})]},r.id))}):s.discoveryLoading?null:e.jsx("div",{className:"community-state",children:"No public communities are available yet."}),e.jsxs("div",{className:"community-discovery-actions",children:[e.jsxs("button",{type:"button",onClick:()=>{s.refresh()},disabled:s.discoveryLoading,children:[e.jsx(O,{size:14})," Refresh"]}),s.nextCursor?e.jsx("button",{type:"button",className:"secondary",onClick:()=>{s.loadMore()},disabled:s.discoveryLoading,children:"Load more"}):null]})]})});if(!i&&s.previewLoading)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("span",{className:"community-spinner"})," Loading community…"]})});if(!i)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("h1",{children:s.selectedSummary.displayName}),e.jsx("div",{className:"community-state error",children:s.previewError??"This community preview is unavailable."}),e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(s.selectedSummary.id),children:[e.jsx(O,{size:14})," Retry preview"]})]})});const v=i.currentRules,M=s.membershipError?.message??null;return e.jsxs("section",{className:"community-view",children:[e.jsxs("header",{className:"community-header",children:[e.jsxs("div",{className:"community-heading",children:[e.jsx(_,{name:i.displayName,imageUrl:i.imageUrl}),e.jsxs("div",{children:[e.jsx("small",{children:i.displayName}),e.jsx("h1",{children:n.selectedChannel?`# ${n.selectedChannel.displayName}`:i.displayName}),e.jsx("p",{children:n.selectedChannel?.topic||i.description})]})]}),e.jsxs("div",{className:"community-header-actions",children:[e.jsxs("span",{className:"community-member-count",children:[e.jsx(q,{size:14})," ",i.memberCount.toLocaleString()]}),v?e.jsxs("button",{type:"button",className:"secondary",onClick:()=>y("review"),children:[e.jsx(re,{size:14})," Rules"]}):null,f?e.jsx(ve,{mode:i.membership?.notificationMode??"mentions",busy:s.membershipBusy,onMode:s.updateNotifications,onLeave:s.leave}):null]})]}),e.jsxs("div",{className:"community-chat-main conversation-surface-main",children:[e.jsxs("div",{className:"community-chat-notices",children:[f?h?e.jsxs("div",{className:"community-preview-banner warning",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"The rules have changed"}),e.jsx("span",{children:"Accept the current rules to continue reading live updates and posting."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("reaccept"),children:"Review updated rules"})]}):null:e.jsxs("div",{className:"community-preview-banner",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Previewing ",i.displayName]}),e.jsx("span",{children:"Read the public conversation, then accept the rules to join and post."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("join"),children:"Join community"})]}),n.realtimeError&&f&&!h?e.jsxs("div",{className:"community-realtime-state",children:[e.jsx(oe,{size:14}),e.jsx("span",{children:"Live updates are reconnecting. Loaded messages are still available."})]}):null,n.lostMembership?e.jsx("div",{className:"community-state error",children:"Your membership changed. Refresh the community before continuing."}):null,n.channelsError?e.jsxs("div",{className:"community-state error",children:["Channels: ",n.channelsError," ",e.jsx("button",{type:"button",onClick:()=>{n.loadChannels()},children:"Retry"})]}):null,M?e.jsx("div",{className:"community-state error",role:"alert",children:M}):null]}),e.jsxs("div",{className:"community-message-pane conversation-message-scroll",ref:b,role:"log","aria-live":"polite","aria-relevant":"additions text","aria-busy":n.messagesLoading,"aria-label":n.selectedChannel?`${i.displayName}, ${n.selectedChannel.displayName}`:i.displayName,tabIndex:0,children:[n.hasMoreBefore?e.jsx("button",{type:"button",className:"community-load-older",disabled:n.olderMessagesLoading,onClick:()=>{n.loadOlder()},children:n.olderMessagesLoading?"Loading…":"Load earlier messages"}):null,n.messagesLoading&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"Loading messages…"}):null,n.messagesError?e.jsxs("div",{className:"community-message-state error",children:["Could not load messages: ",n.messagesError," ",e.jsx("button",{type:"button",onClick:()=>{n.loadMessages()},children:"Retry"})]}):null,!n.messagesLoading&&!n.messagesError&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"No messages in this channel yet."}):null,n.messages.map(r=>e.jsx(be,{message:r,author:r.authorUserId?p.get(r.authorUserId)??null:null,own:r.authorUserId===m,attachmentsAccessible:!n.previewMode,membersById:p,messagesById:C,onReply:u,onEdit:n.editMessage,onDelete:n.deleteMessage,onDownloadAttachment:n.downloadAttachment},r.id))]}),f?e.jsxs("div",{className:"community-composer-wrap conversation-composer-shell",children:[n.actionError?e.jsx("div",{className:"community-composer-action-error",children:n.actionError}):null,n.failedSend?e.jsxs("div",{className:"community-failed-send",children:[e.jsxs("span",{children:["Message not sent. ",n.failedSend.message]}),e.jsx("button",{type:"button",disabled:n.sending,onClick:()=>{n.retrySend()},children:"Retry"}),e.jsx("button",{type:"button",onClick:n.dismissFailedSend,children:"Dismiss"})]}):null,e.jsx(ye,{members:n.members,replyTo:c,busy:n.sending,disabled:h||n.lostMembership||!n.selectedChannel||n.selectedChannel.postingPolicy==="admins"&&i.membership?.role==="member",onCancelReply:()=>u(null),onSearchMembers:n.searchMembers,onSend:n.sendMessage})]}):null]}),a&&v?e.jsx(pe,{rules:v,mode:a,busy:s.membershipBusy,error:M,onAccept:a==="join"?s.join:s.acceptRules,onClose:()=>y(null)}):null]})}function ve(s){const[n,m]=l.useState(!1);return e.jsxs("div",{className:"community-membership-menu",children:[e.jsxs("button",{type:"button",className:"secondary","aria-expanded":n,onClick:()=>m(a=>!a),children:[s.mode==="none"?e.jsx(le,{size:14}):e.jsx(ce,{size:14})," Joined"]}),n?e.jsxs("div",{className:"community-membership-popover",children:[e.jsx("strong",{children:"Notifications"}),["mentions","all","none"].map(a=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",name:"community-notifications",checked:s.mode===a,disabled:s.busy,onChange:()=>{s.onMode(a)}})," ",a==="mentions"?"Mentions":a==="all"?"All messages":"Nothing"]},a)),e.jsx("button",{type:"button",className:"danger",disabled:s.busy,onClick:()=>{window.confirm("Leave this community? You can join again later by accepting the current rules.")&&s.onLeave().then(a=>{a&&m(!1)})},children:"Leave community"})]}):null]})}function _({name:s,imageUrl:n}){return n?e.jsx("img",{className:"community-icon",src:n,alt:""}):e.jsx("span",{className:"community-icon fallback",children:s.slice(0,2).toUpperCase()})}export{ke as CommunityView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as _,r as j,j as e,t as P,N as w,ay as x,X as v,K as y,w as q,aF as N}from"./index-D7Vr3zcV.js";import{P as C}from"./play-BJdhBqQE.js";import{R as k}from"./refresh-cw-DE0u_nmZ.js";const A=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],z=_("circle-question-mark",A);function D({runtime:s}){const[a,o]=j.useState(!1),[i,u]=j.useState(""),[t,p]=j.useState(null),n=s.run,g=n.plan,h=B(n),c={run:n},f=E(n.state),r=$(n),R=r?.git?.pullRequest??n.releaseOutcome.pullRequest;j.useEffect(()=>{o(!1),u(""),p(null)},[n.id,n.revision,n.state,g?.id,h?.id]);async function l(d,b){if(!(!b||t)){p(d);try{await b()}finally{p(null)}}}return e.jsxs("section",{className:`composer-create-strip ${f}`,"aria-label":"Create or improve status",children:[e.jsxs("div",{className:"composer-create-strip-heading",children:[f==="danger"?e.jsx(P,{size:15}):n.state==="awaiting_questions"?e.jsx(z,{size:15}):S(n.state)?e.jsx(w,{className:"composer-create-spin",size:15}):e.jsx(x,{size:15}),e.jsx("span",{children:I(n)}),e.jsx("small",{children:n.target.kind})]}),n.state==="awaiting_questions"&&h?e.jsxs("div",{className:"composer-create-question",children:[e.jsx("p",{children:h.prompt}),e.jsx("div",{className:"composer-create-options",children:h.options.map(d=>e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l(`answer:${d.id}`,()=>s.onAnswerQuestion?s.onAnswerQuestion(c,h.id,d.value):Promise.resolve())},children:[e.jsx("span",{children:t===`answer:${d.id}`?"Saving":d.label}),d.description?e.jsx("small",{children:d.description}):null]},d.id))})]}):n.state==="awaiting_plan_approval"&&g?e.jsxs("div",{className:"composer-create-plan-summary",children:[e.jsx("p",{children:g.summary}),e.jsx(m,{run:n}),a?e.jsxs("div",{className:"composer-create-revision",children:[e.jsx("textarea",{rows:2,value:i,placeholder:"Describe the plan revision",onChange:d=>u(d.currentTarget.value)}),e.jsxs("div",{children:[e.jsxs("button",{type:"button",disabled:!i.trim()||!!t,onClick:()=>{l("revise",()=>s.onRevise?s.onRevise(c,i):Promise.resolve())},children:[e.jsx(x,{size:13}),e.jsx("span",{children:t==="revise"?"Saving":"Save revision"})]}),e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>o(!1),children:[e.jsx(v,{size:13}),e.jsx("span",{children:"Close"})]})]})]}):e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("approve",()=>s.onApprove?s.onApprove(c):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:t==="approve"?"Confirming":"Confirm plan"})]}),e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>o(!0),children:[e.jsx(x,{size:13}),e.jsx("span",{children:"Edit plan"})]}),e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("cancel",()=>s.onCancel?s.onCancel(c):Promise.resolve())},children:[e.jsx(v,{size:13}),e.jsx("span",{children:t==="cancel"?"Cancelling":"Cancel"})]})]})]}):n.state==="paused"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:"This work is paused. Resume it when you are ready to continue."}),e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:t==="resume"?"Resuming":"Resume"})]})]}):n.state==="awaiting_promotion"&&r?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:F(n,r.id)}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!t||!M(n,r.id),onClick:()=>{l("apply-candidate",()=>s.onApplyCandidate?s.onApplyCandidate(c,r.id):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:t==="apply-candidate"?"Merging":"Merge change"})]}),e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(v,{size:13}),e.jsx("span",{children:t==="reject-candidate"?"Rejecting":"Reject"})]})]})]}):n.state==="pull_request_open"&&r&&R?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:"An external review is open. Merge or close it, then refresh its status."}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:t==="reconcile-pr"?"Checking":"Refresh review"})]}),e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(v,{size:13}),e.jsx("span",{children:t==="reject-candidate"?"Closing":"Close review"})]})]})]}):n.state==="blocked"||n.state==="failed"||n.state==="cancelled"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:n.blockedReason??"This work stopped before it was ready."}),n.state==="blocked"&&r?.git?.worktreePath&&["draft","checking"].includes(r.status)?e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:t==="resume"?"Continuing":"Continue candidate"})]}):n.state==="blocked"&&r?.git?.pullRequest?.state==="merged"?e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:t==="reconcile-pr"?"Checking":"Re-run verification"})]}):null]}):n.state==="released"||n.state==="rejected"||n.state==="ready_local"||n.state==="ready"||n.state==="published_hosted"?e.jsxs("div",{className:"composer-create-status-body composer-create-status-body-reveals",children:[e.jsx("p",{children:n.state==="released"?"The Agent change merged and the active Profile passed its post-merge Evals.":n.state==="rejected"?"The Agent candidate was rejected.":n.state==="published_hosted"?"Published to the hosted Profile.":"The workproduct is ready."}),e.jsx("div",{className:"composer-create-hover-details",children:e.jsx(m,{run:n})})]}):e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:T(n.state)}),e.jsx(m,{run:n}),n.executionPolicy.pauseAllowed&&s.onPause?e.jsxs("button",{type:"button",disabled:!!t,onClick:()=>{l("pause",()=>s.onPause?.(c)??Promise.resolve())},children:[e.jsx(q,{size:13}),e.jsx("span",{children:t==="pause"?"Pausing":"Pause"})]}):null]})]})}function B(s){return s.questions.find(a=>a.status==="pending"&&a.required)??s.questions.find(a=>a.status==="pending")??null}function m({run:s}){const a=s.plan,o=s.sourceRefs[0]??a?.sourcePlan[0]?.path??null,i=s.checkRefs.length||a?.checks.length||0,u=a?.requirements.length??0,t=[...s.sourceRefs,...s.checkRefs].slice(0,4),p=N(a?.metadata);return!o&&i===0&&u===0&&t.length===0&&!p?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"composer-create-facts",children:[p?e.jsx("span",{title:p.detail,children:p.label}):null,o?e.jsx("span",{title:o,children:o}):null,i?e.jsx("span",{children:s.checkRefs.length?`${s.checkRefs.length} check refs`:`${i} checks`}):null,u?e.jsxs("span",{children:[u," setup rows"]}):null]}),t.length?e.jsx("ul",{className:"composer-create-refs","aria-label":"Source and check refs",children:t.map(n=>e.jsx("li",{children:e.jsx("code",{title:n,children:n})},n))}):null]})}function I(s){return s.state==="awaiting_questions"?"Question":s.state==="awaiting_plan_approval"?"Plan":s.state==="applying_source"?"Applying source":s.state==="running_checks"?"Running checks":s.state==="evaluating"?"Evaluating":s.state==="awaiting_promotion"?"Candidate ready":s.state==="opening_pull_request"?"Opening review":s.state==="pull_request_open"?"Review open":s.state==="reconciling_release"?"Merging change":s.state==="released"?"Released":s.state==="rejected"?"Rejected":s.state==="paused"?"Paused":s.state==="ready"||s.state==="ready_local"?"Ready":s.state==="published_hosted"?"Published":s.state==="cancelled"?"Cancelled":s.state==="blocked"?"Blocked":s.state==="failed"?"Failed":s.operation==="improve"?"Improve":"Create"}function T(s){return s==="applying_source"?"Applying the approved source changes.":s==="running_checks"?"Running checks against the candidate.":s==="evaluating"?"Evaluating the candidate against its Evals.":s==="opening_pull_request"?"Opening the candidate review.":s==="reconciling_release"?"Applying the change and verifying the active Profile.":s==="pushing_hosted"?"Pushing the Profile source.":s==="running_hosted_checks"?"Running hosted checks.":"Preparing the work."}function E(s){return["released","ready","ready_local","published_hosted"].includes(s)?"success":["rejected","blocked","failed","cancelled"].includes(s)?"danger":["awaiting_questions","awaiting_plan_approval","awaiting_promotion","pull_request_open","paused"].includes(s)?"warning":"info"}function S(s){return["planning","applying_source","running_checks","evaluating","opening_pull_request","reconciling_release","pushing_hosted","running_hosted_checks"].includes(s)}function $(s){return[...s.candidates].reverse().find(a=>a.target.kind==="agent")??null}function M(s,a){const o=s.evaluationReceipts.filter(i=>i.candidateId===a&&i.subject==="candidate");return o.length>0&&o.every(i=>i.status==="passed"&&i.publishGate!=="failed")}function F(s,a){const o=s.evaluationReceipts.find(t=>t.candidateId===a&&t.subject==="active"),i=s.evaluationReceipts.find(t=>t.candidateId===a&&t.subject==="candidate"),u=t=>t?.summaryCounts?`${t.summaryCounts.passed}/${t.summaryCounts.total}`:t?.status??"not run";return`Base Evals: ${u(o)} passed. Candidate Evals: ${u(i)} passed.`}export{D as ComposerCreateImproveStrip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as c,b5 as T,b7 as I,U as L,w as R,aJ as M}from"./index-D7Vr3zcV.js";import{P as D}from"./play-BJdhBqQE.js";function _({accent:t,kind:s}){switch(s){case"goal-state":return e.jsx(r,{accent:t,children:e.jsx(x,{inputs:[{title:"Local goal",detail:"session state",tone:"state"},{title:"Hosted goal",detail:"work item state",tone:"hosted"}],center:{title:"Shared goal record",detail:"same lifecycle language",tone:"gate"},outputs:[{title:"objective",detail:"what success means"},{title:"evidence",detail:"files, checks, logs"},{title:"blockers",detail:"approval or setup"},{title:"completion",detail:"evidence-backed"}]})});case"goal-evidence":return e.jsx(r,{accent:t,children:e.jsx(H,{center:"evidence state",nodes:[{title:"Prompt",detail:"objective captured"},{title:"Tools",detail:"files, shell, apps"},{title:"Events",detail:"logs and checks",tone:"gate"},{title:"Review",detail:"approval state"}]})});case"goal-controls":return e.jsx(r,{accent:t,children:e.jsx(O,{})});case"goal-context":return e.jsx(r,{accent:t,children:e.jsx(x,{inputs:[{title:"Chat turns",detail:"requests and approvals"},{title:"Workspace",detail:"files and source refs",tone:"source"}],center:{title:"Goal context",detail:"inspectable record",tone:"gate"},outputs:[{title:"messages",detail:"conversation trace"},{title:"checks",detail:"command output"},{title:"resources",detail:"linked files"},{title:"approval notes",detail:"what changed"}]})});case"subagent-router":return e.jsx(r,{accent:t,children:e.jsx(B,{})});case"subagent-handoff":return e.jsx(r,{accent:t,children:e.jsx(K,{})});case"subagent-settings":return e.jsx(r,{accent:t,children:e.jsx(U,{})});case"create-plan":return e.jsx(r,{accent:t,children:e.jsx(y,{nodes:[{title:"Ask",detail:"short request"},{title:"Clarify",detail:"focused questions",tone:"warn"},{title:"Plan",detail:"agent/action shape"},{title:"Review gate",detail:"confirm before source",tone:"gate"}]})});case"source-tree":return e.jsx(r,{accent:t,children:e.jsx(k,{heading:"profiles/default",sourceRows:["agent/agent.ts","agent/actions/*","agent/evals/*"],artifactRows:["action-registry.json","inspect.json","validation.json"]})});case"check-stack":return e.jsx(r,{accent:t,children:e.jsx($,{})});case"catalog":return e.jsx(r,{accent:t,children:e.jsx(q,{})});case"edit-review":return e.jsx(r,{accent:t,children:e.jsx(F,{})});case"profile-source":return e.jsx(r,{accent:t,children:e.jsx(k,{heading:"openpond-profile",sourceRows:["openpond-profile.json","profiles/default/agent","profiles/default/settings"],artifactRows:["artifact-index.json","manifest.json","eval-results.json"]})});case"profile-sync":return e.jsx(r,{accent:t,children:e.jsx(W,{})});case"secret-boundary":return e.jsx(r,{accent:t,children:e.jsx(z,{})});case"dual-source":return e.jsx(r,{accent:t,children:e.jsx(V,{})});case"work-item":return e.jsx(r,{accent:t,children:e.jsx(J,{})});case"publish-snapshot":return e.jsx(r,{accent:t,children:e.jsx(Q,{})});case"setup-gate":return e.jsx(r,{accent:t,children:e.jsx(X,{})});case"insights-loop":return e.jsx(r,{accent:t,children:e.jsx(Y,{})});case"insights-list":return e.jsx(r,{accent:t,children:e.jsx(Z,{})});case"apps-grid":return e.jsx(r,{accent:t,children:e.jsx(ee,{})});case"channel-router":return e.jsx(r,{accent:t,children:e.jsx(te,{})});default:return e.jsx(r,{accent:t,children:e.jsx(y,{nodes:[{title:"Profile source",detail:"agent code",tone:"source"},{title:"Checks",detail:"inspect and eval",tone:"gate"},{title:"Catalog",detail:"available actions"}]})})}}function r({accent:t,children:s}){return e.jsxs("div",{className:`get-started-visual accent-${t}`,children:[e.jsx("div",{className:"get-started-visual-accent"}),e.jsx("div",{className:"get-started-visual-inner",children:e.jsx("div",{className:"get-started-diagram",children:s})})]})}function y({nodes:t}){return e.jsx("div",{className:"get-started-flow-graph",children:t.map((s,i)=>e.jsx(re,{isLast:i===t.length-1,children:e.jsx(a,{...s})},s.title))})}function H({center:t,nodes:s}){return e.jsxs("div",{className:"get-started-loop-graph",children:[e.jsx("div",{className:"get-started-loop-ring"}),e.jsxs("div",{className:"get-started-loop-center",children:[e.jsx("strong",{children:t}),e.jsx("span",{children:"updated each turn"})]}),s.map(i=>c.createElement(a,{...i,key:i.title}))]})}function O(){return e.jsxs("div",{className:"get-started-state-graph",children:[e.jsx(a,{title:"active",detail:"next continuation allowed",tone:"state"}),e.jsx(a,{title:"paused",detail:"user stopped the loop",tone:"warn"}),e.jsxs("div",{className:"get-started-state-core",children:[e.jsx("strong",{children:"runtime controls"}),e.jsx("span",{children:"pause, resume, clear, complete"})]}),e.jsx(a,{title:"blocked",detail:"needs input or setup",tone:"warn"}),e.jsx(a,{title:"complete",detail:"evidence-backed finish",tone:"gate"})]})}function x({center:t,inputs:s,outputs:i}){return e.jsxs("div",{className:"get-started-hub-graph",children:[e.jsx("div",{className:"get-started-node-stack",children:s.map(n=>c.createElement(a,{...n,key:n.title}))}),e.jsx(a,{...t,variant:"hub"}),e.jsx("div",{className:"get-started-node-stack compact",children:i.map(n=>c.createElement(a,{...n,key:n.title,variant:"compact"}))})]})}function k({artifactRows:t,heading:s,sourceRows:i}){return e.jsxs("div",{className:"get-started-contract-graph",children:[e.jsx(a,{title:s,detail:"profile source",tone:"source",children:e.jsx(g,{rows:i})}),e.jsx(u,{label:"generates"}),e.jsx(a,{title:".openpond artifacts",detail:"machine-readable contract",tone:"gate",children:e.jsx(g,{rows:t})}),e.jsx("div",{className:"get-started-consumer-strip",children:["app","CLI","checks","hosted"].map(n=>e.jsx("span",{children:n},n))})]})}function $(){return e.jsxs("div",{className:"get-started-gate-graph",children:[e.jsx(a,{title:"source change",detail:"candidate profile state",tone:"source"}),e.jsx("div",{className:"get-started-check-grid",children:[["inspect","passed"],["build","passed"],["validate","passed"],["eval","setup ready"]].map(([t,s])=>e.jsxs("div",{className:"get-started-check-cell",children:[e.jsx("strong",{children:t}),e.jsx("span",{children:s})]},t))}),e.jsx(a,{title:"activate",detail:"catalog can refresh",tone:"gate"})]})}function q(){return e.jsx(x,{inputs:[{title:"manifest",detail:"checked snapshot",tone:"gate"},{title:"setup state",detail:"ready or required",tone:"warn"}],center:{title:"Profile action catalog",detail:"generated menu",tone:"state"},outputs:[{title:"default.chat",detail:"local chat"},{title:"support.open-items",detail:"connected app"},{title:"release-notes.generate",detail:"hosted action"}]})}function F(){return e.jsxs("div",{className:"get-started-review-graph",children:[e.jsx(a,{title:"patch plan",detail:"what will change"}),e.jsx(u,{label:"edits"}),e.jsx(a,{title:"source diff",detail:"+ actions, evals, settings",tone:"source",children:e.jsx(g,{rows:["+ agent/actions/support.ts","+ agent/evals/support.eval.ts","~ settings/profile.yaml"]})}),e.jsx(u,{label:"checks"}),e.jsx(a,{title:"review gate",detail:"commit, push, publish",tone:"gate",children:e.jsx(g,{rows:["source diff","check output","setup rows"]})})]})}function B(){return e.jsx(x,{inputs:[{title:"Goal",detail:"objective + state",tone:"state"},{title:"OpenAI GPT-5.6",detail:"orchestration model",tone:"hosted"}],center:{title:"Main agent",detail:"routes sub agents",tone:"gate"},outputs:[{title:"GLM coding",detail:"copy-on-write edits"},{title:"Research sub agent",detail:"findings + refs"},{title:"Review sub agent",detail:"ranked findings"},{title:"Test sub agent",detail:"validation evidence"}]})}function K(){return e.jsxs("div",{className:"get-started-subagent-handoff-graph",children:[e.jsx(a,{title:"sub agent run",detail:"bounded assignment",tone:"hosted"}),e.jsx(u,{label:"send"}),e.jsx(a,{title:"sub agent message",detail:"short receipt + details",tone:"gate",children:e.jsx(g,{rows:["summary","message id","run id"]})}),e.jsx(u,{label:"wake"}),e.jsx(a,{title:"parent decides",detail:"reply, route, join, cancel",tone:"state"})]})}function U(){return e.jsxs("div",{className:"get-started-subagent-settings-graph",children:[e.jsx(a,{title:"default model",detail:"shared sub agent model",tone:"gate"}),e.jsx("div",{className:"get-started-subagent-role-table",children:[["coding","GLM","copy-on-write"],["research","OpenAI","read only"],["review","default","goal scoped"]].map(([t,s,i])=>e.jsxs("div",{className:"get-started-subagent-role-row",children:[e.jsx("strong",{children:t}),e.jsx("span",{children:s}),e.jsx("em",{children:i})]},t))}),e.jsx(a,{title:"limits",detail:"concurrency + token caps",tone:"warn"})]})}function W(){return e.jsxs("div",{className:"get-started-sync-graph",children:[e.jsx(a,{title:"local profile",detail:"source + checks",tone:"source"}),e.jsx(u,{label:"push"}),e.jsx(a,{title:"hosted profile ref",detail:"uploaded source",tone:"hosted"}),e.jsx(u,{label:"check"}),e.jsx(a,{title:"published catalog",detail:"manifest snapshot",tone:"gate"})]})}function z(){return e.jsxs("div",{className:"get-started-boundary-graph",children:[e.jsx(a,{title:"source declares",detail:"requirements, not values",tone:"source",children:e.jsx(g,{rows:["SLACK_CHANNEL","drive scope","volume: reports"]})}),e.jsxs("div",{className:"get-started-boundary-wall",children:[e.jsx("strong",{children:"binding boundary"}),e.jsx("span",{children:"values stay outside Git"})]}),e.jsx(a,{title:"platform stores",detail:"runtime setup state",tone:"gate",children:e.jsx(g,{rows:["OAuth lease","secret ref","volume binding"]})})]})}function V(){return e.jsxs("div",{className:"get-started-dual-source-graph",children:[e.jsx(a,{title:"/openpond/profile",detail:"agent profile source",tone:"source",children:e.jsx(g,{rows:["agent/agent.ts",".openpond/*"]})}),e.jsx(a,{title:"/workspace",detail:"target project source",tone:"source",children:e.jsx(g,{rows:["src/*","package.json"]})}),e.jsxs("div",{className:"get-started-sandbox-core",children:[e.jsx("strong",{children:"hosted sandbox"}),e.jsx("span",{children:"runs work item with separate mounts"})]}),e.jsx(a,{title:"review output",detail:"diffs, logs, checks, setup rows",tone:"gate"})]})}function J(){return e.jsx("div",{className:"get-started-timeline-graph",children:[["goal","running"],["logs","captured"],["checks","pending review"],["approval","publish blocked"]].map(([t,s])=>e.jsxs("div",{className:"get-started-timeline-step",children:[e.jsx("strong",{children:t}),e.jsx("span",{children:s})]},t))})}function Q(){return e.jsxs("div",{className:"get-started-publish-graph",children:[e.jsx(a,{title:"source ref",detail:"reviewed profile state",tone:"source"}),e.jsx(u,{label:"hash"}),e.jsx(a,{title:"manifest hash",detail:"immutable contract",tone:"gate"}),e.jsx(u,{label:"publish"}),e.jsx(a,{title:"hosted catalog",detail:"runtime action menu",tone:"hosted"})]})}function X(){return e.jsxs("div",{className:"get-started-setup-graph",children:[e.jsx("div",{className:"get-started-setup-table",children:[["integration","Slack lease","missing"],["secret","REPORT_BUCKET","ready"],["volume","reports","optional"],["target repo","/workspace","required"]].map(([t,s,i])=>e.jsxs("div",{className:"get-started-setup-row",children:[e.jsx("span",{children:t}),e.jsx("strong",{children:s}),e.jsx("em",{children:i})]},s))}),e.jsxs("div",{className:"get-started-gate-decision",children:[e.jsx("strong",{children:"setup-required"}),e.jsx("span",{children:"block before run or publish"})]})]})}function Y(){return e.jsxs("div",{className:"get-started-insights-loop",children:[e.jsx(a,{title:"create_improve.updated",detail:"runtime event stream",tone:"source"}),e.jsx(u,{label:"scan"}),e.jsx(a,{title:"detector",detail:"waiting, blocked, failed",tone:"gate"}),e.jsx(u,{label:"persist"}),e.jsx(a,{title:"insight_items",detail:"active rows + fingerprints",tone:"state"})]})}function Z(){return e.jsxs("div",{className:"get-started-insights-list",children:[e.jsxs("div",{className:"get-started-insights-toolbar",children:[e.jsx("span",{children:"All"}),e.jsx("span",{children:"Active"}),e.jsx("span",{children:"Blocker"}),e.jsx("span",{children:"Scan"})]}),[["Blocker","failed","Create agent failed"],["Concern","awaiting approval","Edit agent needs plan approval"],["Concern","awaiting answers","Create agent is waiting for input"]].map(([t,s,i])=>e.jsxs("div",{className:"get-started-insight-row",children:[e.jsx("span",{children:t}),e.jsx("strong",{children:i}),e.jsx("em",{children:s})]},i))]})}function ee(){return e.jsxs("div",{className:"get-started-apps-graph",children:[e.jsx("div",{className:"get-started-app-grid",children:se.map(t=>e.jsx(G,{app:t},t.id))}),e.jsxs("div",{className:"get-started-router-core",children:[e.jsx("strong",{children:"profile catalog"}),e.jsx("span",{children:"actions + setup + permissions"})]})]})}function te(){return e.jsxs("div",{className:"get-started-router-graph",children:[e.jsx("div",{className:"get-started-channel-list",children:ae.map(t=>e.jsx(G,{app:t},t.id))}),e.jsxs("div",{className:"get-started-router-core",children:[e.jsx("strong",{children:"profile router"}),e.jsx("span",{children:"team + profile + catalog"})]}),e.jsx("div",{className:"get-started-router-results",children:["direct answer","profile action","work item","setup-required"].map(t=>e.jsx("span",{children:t},t))})]})}const se=[{id:"github",label:"GitHub"},{id:"google",label:"Google Drive"},{id:"slack",label:"Slack"},{id:"microsoft_teams",label:"Microsoft Teams"},{id:"mcp",label:"MCP"}],ae=[{id:"web",label:"Web"},{id:"slack",label:"Slack"},{id:"microsoft_teams",label:"Microsoft Teams"},{id:"mcp",label:"MCP"}];function G({app:t}){return e.jsxs("span",{className:"get-started-app-icon-tile",children:[e.jsx("span",{className:"get-started-app-icon",children:e.jsx("img",{alt:"",src:ie(t.id)})}),e.jsx("span",{children:t.label})]})}function ie(t){return t==="web"?T:I(t)}function a({children:t,detail:s,title:i,tone:n="default",variant:h="default"}){return e.jsxs("div",{className:`get-started-diagram-node tone-${n} variant-${h}`,children:[e.jsx("div",{className:"get-started-node-heading",children:e.jsx("strong",{children:i})}),e.jsx("span",{children:s}),t]})}function u({label:t}){return e.jsxs("div",{className:"get-started-connector","aria-hidden":t?void 0:!0,children:[e.jsx("span",{}),t?e.jsx("em",{children:t}):null]})}function re({children:t,isLast:s}){return e.jsxs(e.Fragment,{children:[t,s?null:e.jsx(u,{})]})}function g({rows:t}){return e.jsx("div",{className:"get-started-mini-rows",children:t.map(s=>e.jsx("span",{children:s},s))})}const v=5,N=v*1e3;function ne({deck:t,resetToken:s=0}){const i=oe(),[n,h]=c.useState(0),[p,m]=c.useState(!1),o=t.slides[n]??t.slides[0],b=n*v,C=t.slides.length*v;c.useEffect(()=>{h(0),m(!1)},[t.id,s]),c.useEffect(()=>{if(!p||i)return;const d=window.setTimeout(()=>{h(j=>j===t.slides.length-1?0:j+1)},N);return()=>window.clearTimeout(d)},[n,t.slides.length,p,i]),c.useEffect(()=>{i&&m(!1)},[i]);function E(){h(d=>d===0?t.slides.length-1:d-1)}function P(){h(d=>d===t.slides.length-1?0:d+1)}return e.jsxs("section",{className:"get-started-deck","aria-label":`${t.label} deck`,children:[e.jsxs("div",{className:"get-started-deck-body",children:[e.jsxs("div",{className:"get-started-deck-copy",children:[e.jsxs("div",{className:"get-started-eyebrow",children:[e.jsx("span",{className:`get-started-accent-dot accent-${o.accent}`}),e.jsx("span",{children:o.eyebrow})]}),e.jsxs("div",{className:"get-started-slide-copy",children:[e.jsx("h2",{children:o.title}),o.body?e.jsx("p",{children:o.body}):null,o.detail?e.jsx("p",{children:o.detail}):null]})]}),e.jsx(_,{accent:o.accent,kind:o.visual})]}),e.jsxs("div",{className:"get-started-deck-footer",children:[e.jsx("div",{className:"get-started-progress",style:{gridTemplateColumns:`repeat(${t.slides.length}, minmax(0, 1fr))`},children:t.slides.map((d,j)=>{const w=j===n,A=j<n;return e.jsx("button",{"aria-label":`Show ${d.title}`,className:"get-started-progress-button",onClick:()=>h(j),type:"button",children:e.jsx("span",{className:`get-started-progress-fill accent-${d.accent} ${w||A?"filled":""}`,style:{transitionDuration:w&&p&&!i?`${N}ms`:"180ms"}})},d.id)})}),e.jsxs("div",{className:"get-started-controls",children:[e.jsxs("div",{className:"get-started-control-group",children:[e.jsx("button",{"aria-label":"Previous slide",className:"get-started-icon-button",onClick:E,type:"button",children:e.jsx(L,{size:16})}),e.jsx("button",{"aria-label":p?"Pause slides":"Play slides",className:"get-started-icon-button",onClick:()=>m(d=>!d),type:"button",children:p?e.jsx(R,{size:16}):e.jsx(D,{size:16})}),e.jsx("button",{"aria-label":"Next slide",className:"get-started-icon-button",onClick:P,type:"button",children:e.jsx(M,{size:16})})]}),e.jsxs("div",{className:"get-started-time",children:[S(b)," / ",S(C)]})]})]})]})}function S(t){const s=Math.floor(t/60),i=t%60;return`${s}:${String(i).padStart(2,"0")}`}function oe(){const[t,s]=c.useState(!1);return c.useEffect(()=>{if(!window.matchMedia)return;const i=window.matchMedia("(prefers-reduced-motion: reduce)");s(i.matches);const n=()=>s(i.matches);return i.addEventListener("change",n),()=>i.removeEventListener("change",n)},[]),t}const l="cyan",f=[{id:"goal",label:"Goal loop",description:"How local and hosted goals share durable objective state.",slides:[{id:"goal-durable-objective",eyebrow:"Goal state",title:"Goals are durable objectives",body:"A goal is saved state for a local session or hosted work item, not just prompt text.",detail:"Local and hosted goals use the same lifecycle language: objective, evidence, blockers, approvals, checks, and completion.",visual:"goal-state",accent:l}]},{id:"orchestration",label:"Orchestration",description:"How the main agent delegates bounded work to addressable sub agents.",slides:[{id:"orchestration-delegate",eyebrow:"Model routing",title:"OpenAI GPT-5.6 can coordinate GLM coding",body:"Use a strong orchestration model to split a goal into sub agents, then route coding, research, review, testing, docs, or planning to the role and model that fit.",detail:"For example: OpenAI GPT-5.6 coordinates the goal, GLM handles coding in copy-on-write isolation, and every sub agent reports receipts back to the main chat.",visual:"subagent-router",accent:l},{id:"orchestration-handoff",eyebrow:"Handoffs",title:"Sub agents report back deliberately",body:"Sub agents can send compact handoffs back to the parent chat when a blocker, decision, important finding, or final result should return control.",detail:"The parent sees a short sub agent receipt and can respond, message the sub agent, join or cancel, update the goal, or route follow-up work.",visual:"subagent-handoff",accent:l},{id:"orchestration-settings",eyebrow:"Harness settings",title:"Configure each sub agent role",body:"Sub agents have a default model plus per-role provider and model overrides, tool policies, isolation modes, concurrency caps, token caps, and peer-message rules.",detail:"Copy-on-write is the default for write-capable sub agents so parallel edits stay reviewable before merge or handoff; roles can also use worktrees or no isolation.",visual:"subagent-settings",accent:l}]},{id:"build",label:"Create/Edit Loop",description:"How first-class Create and Edit agents are specific implementations on top of goals.",slides:[{id:"build-one-loop",eyebrow:"First-class agents",title:"Create/Edit is built on goals",body:"Create and Edit are first-class agents specifically designed as implementations on top of the goal loop.",detail:"They add source-aware planning, evidence, approvals, checks, and completion before profile files change.",visual:"create-plan",accent:l},{id:"build-profile-source",eyebrow:"Source",title:"Approved work changes profile source",body:"Create generates SDK-backed files. Edit patches existing agent source. Neither becomes loose chat memory.",detail:"Agents, actions, prompts, evals, and non-secret setup declarations live in the profile source tree.",visual:"source-tree",accent:l}]},{id:"insights",label:"Insights Loop",description:"How Insights reviews goal and Create/Improve state.",slides:[{id:"insights-detect",eyebrow:"Detector",title:"Insights runs on top of goals",body:"Insights watches `create_improve.updated` events and turns stuck Create/Improve runs into active rows.",detail:"Awaiting questions, plan approval, blocked, and failed states become concern or blocker rows tied back to the source event.",visual:"insights-loop",accent:l},{id:"insights-action",eyebrow:"Action",title:"Insights stay actionable",body:"Observation scanning is off by default. Open the suggestions inbox in Lab to enable scanning, then review, resolve, or dismiss the resulting observations there.",detail:"Rows persist in `insight_items` and resolve when the pipeline moves forward or the user marks them handled.",visual:"insights-list",accent:l}]},{id:"profile",label:"Profile",description:"How one Git-backed profile repository makes agents portable.",slides:[{id:"profile-git-repo",eyebrow:"Git-backed source",title:"One agent repository travels with you",body:"The profile repo stores agents, actions, prompts, evals, settings, and non-secret config as source.",detail:"Because it is Git-backed, local app, CLI, checks, and hosted runtime can inspect the same durable agent repository.",visual:"profile-source",accent:l},{id:"profile-portable-artifacts",eyebrow:"Portability",title:"Artifacts make agents portable",body:"The SDK emits a manifest, action registry, inspect output, validation report, and eval results from that repo.",detail:"Those contracts let the same agent run locally, publish hosted, or appear in connected apps without rebuilding it by hand.",visual:"source-tree",accent:l}]},{id:"local-hosted",label:"Local <> Hosted",description:"How hosted work keeps sources separate and publishes reviewed snapshots.",slides:[{id:"local-hosted-mounts",eyebrow:"Sandbox",title:"Hosted work keeps sources separate",body:"A hosted work item can mount profile source for the agent and target source for the project being changed.",detail:"The profile mount is `/openpond/profile`. The target project mount is `/workspace` when a target repo is needed.",visual:"dual-source",accent:l},{id:"local-hosted-publish",eyebrow:"Publish",title:"Published snapshots avoid source drift",body:"A checked manifest snapshot becomes the runtime source for hosted profile actions.",detail:"The hosted catalog should point at a reviewed snapshot, not an ambiguous latest file tree.",visual:"publish-snapshot",accent:l}]},{id:"connect-apps",label:"Connect 3rd party apps",description:"How connected apps bind into the same profile catalog.",slides:[{id:"connect-apps-grid",eyebrow:"Apps",title:"Apps connect to the profile catalog",visual:"apps-grid",accent:l},{id:"connect-channels",eyebrow:"Channels",title:"Web, Slack, Teams, and MCP use the same router",visual:"channel-router",accent:l}]}];function ce(t){const[s,i]=c.useState("goal"),[n,h]=c.useState(0),p=c.useMemo(()=>f.find(o=>o.id===s)??f[0],[s]);function m(o){i(o),h(b=>b+1)}return e.jsx("section",{className:"get-started-view","aria-label":"Get started",children:e.jsxs("div",{className:"get-started-shell",children:[e.jsx("div",{className:"surface-tabs get-started-tabs",role:"tablist","aria-label":"Get started topics",children:f.map(o=>e.jsx("button",{"aria-selected":p.id===o.id,className:p.id===o.id?"active":"",onClick:()=>m(o.id),role:"tab",type:"button",children:e.jsx("span",{children:o.label})},o.id))}),e.jsx(ne,{deck:p,resetToken:n},p.id)]})})}export{ce as GetStartedView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.labs-route{display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:var(--bg);color:var(--text)}.main-pane.page-active>.labs-route{grid-column:1;grid-row:1}.main-pane.page-active.diff-open>.labs-route{max-height:100%}.labs-header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0;padding:8px 28px 0;background:color-mix(in srgb,var(--bg) 94%,var(--panel))}.labs-header-navigation,.labs-header-actions{display:flex;align-items:center;gap:8px;min-width:0}.labs-create-button{display:inline-grid;width:32px;height:32px;flex:0 0 auto;place-items:center;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--text);cursor:pointer}.labs-create-button:hover{background:var(--panel-soft)}.labs-primary-tabs{display:flex;align-items:center;gap:2px;min-width:0}.labs-primary-tabs button,.labs-subtabs button{display:inline-flex;align-items:center;gap:6px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);padding:11px 12px 10px;font:inherit;font-size:12px;cursor:pointer}.labs-primary-tabs button.active,.labs-subtabs button.active{border-bottom-color:var(--text);color:var(--text)}.labs-primary-tabs button span,.labs-subtabs button span{color:var(--muted);font-size:10px}.labs-create-anchor{position:relative}.labs-create-menu{position:absolute;z-index:50;top:calc(100% + 7px);right:0;display:grid;width:270px;overflow:hidden;border:1px solid var(--border);border-radius:9px;background:var(--panel);box-shadow:0 16px 42px #00000038}.labs-create-menu button{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text);padding:12px;text-align:left;cursor:pointer}.labs-create-menu button:last-child{border-bottom:0}.labs-create-menu button:hover{background:var(--panel-soft)}.labs-create-menu button:disabled{background:transparent;color:var(--muted);cursor:not-allowed;opacity:.62}.labs-create-menu button>span{display:grid;gap:3px}.labs-create-menu strong{font-size:12px}.labs-create-menu small{color:var(--muted);font-size:10px;line-height:1.4}.labs-panel{min-width:0;min-height:0;overflow:auto;scrollbar-color:rgba(255,255,255,.24) transparent;scrollbar-width:thin}.labs-flat-body{display:grid;gap:12px;width:min(1180px,calc(100% - 56px));margin-inline:auto;padding:8px 0 56px}.labs-resource-actions{display:flex;justify-content:flex-end;padding:12px 0 4px}.labs-dataset-detail-heading h1{margin:0;font-size:20px}.labs-dataset-detail-heading p{max-width:760px;margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.5}.labs-dataset-detail-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:12px;padding:12px 0 6px}.labs-back-button{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--text);cursor:pointer}.labs-back-button:hover{background:var(--panel-soft)}.labs-datasets-table td:first-child{min-width:320px}.labs-workproduct-link{appearance:none;display:grid;width:100%;min-width:0;gap:3px;border:0;background:transparent;color:var(--text);padding:0;text-align:left;cursor:pointer;font:inherit}.labs-workproduct-link strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.labs-workproduct-link span{overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}.labs-home-models{display:grid;gap:10px;margin-top:10px;border-top:1px solid var(--border);padding-top:18px}.labs-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px}.labs-section-heading h2{margin:0;font-size:15px}.labs-section-heading p{margin:3px 0 0;color:var(--muted);font-size:10px}.labs-section-heading>button{border:0;background:transparent;color:var(--muted-strong);padding:3px 0;font:inherit;font-size:11px;cursor:pointer}.labs-section-heading>button:hover{color:var(--text)}.labs-home-profile-controls .account-settings{max-width:none}.labs-home-profile-controls .profile-view{width:100%;justify-self:stretch;gap:0;padding:0}.labs-home-profile-controls .profile-control-panel{padding:2px 0 4px}.labs-training-run-name{display:grid;min-width:260px;gap:3px;padding:4px 0}.labs-training-run-progress-wrap{display:grid;gap:2px;margin-top:2px}.labs-training-run-name>strong{color:var(--text);font-size:12px}.labs-training-run-name>span,.labs-training-run-progress small,.labs-training-run-verdicts{color:var(--muted);font-size:10px;line-height:1.4}.labs-training-run-progress{display:flex;align-items:center;gap:8px}.labs-training-run-progress progress{width:min(180px,45%);height:5px;accent-color:var(--cyan)}.labs-model-baseline-facts{margin-top:12px}.labs-training-run-progress small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.labs-workproduct-toolbar{display:flex;align-items:center;gap:8px}.labs-search{display:flex;align-items:center;flex:1;min-width:0;gap:7px;border:1px solid var(--border);border-radius:7px;background:var(--panel);padding:0 9px;color:var(--muted)}.labs-search input{width:100%;min-width:0;border:0;background:transparent;color:var(--text);padding:8px 0;font:inherit;font-size:12px;outline:0}.labs-workproduct-toolbar select{min-width:130px;border:1px solid var(--border);border-radius:7px;background:var(--panel);color:var(--text);padding:8px 9px;font:inherit;font-size:12px}.labs-table-empty{display:flex;min-height:88px;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--muted);font-size:12px}.labs-workproducts-table{min-width:860px}.labs-workproducts-table th:first-child{width:8%}.labs-workproducts-table th:nth-child(2){width:32%}.labs-workproducts-table th:nth-child(4){width:9%}.labs-workproducts-table th:nth-child(5){width:8%}.labs-workproducts-table th:nth-child(6){width:9%}.labs-workproducts-table td:last-child{text-align:right;color:var(--muted)}.labs-workproducts-table.models-only th:first-child{width:42%}.labs-workproducts-table.models-only th:nth-child(2){width:18%}.labs-workproducts-table.models-only th:nth-child(3),.labs-workproducts-table.models-only th:nth-child(4){width:10%}.labs-workproducts-table.models-only td:first-child{min-width:280px}.labs-workproduct-use{min-height:28px}.labs-workproduct-actions{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px}.labs-workproduct-training,.labs-workproduct-evals{text-align:center}.labs-workproduct-indicator{display:inline-flex;min-width:28px;align-items:center;justify-content:center;gap:4px;color:var(--muted)}.labs-workproduct-indicator strong{font-size:11px;font-variant-numeric:tabular-nums}.labs-workproduct-indicator.active{color:#68a8dd}.labs-workproduct-indicator.positive{color:#55aa74}.labs-workproduct-indicator.negative{color:#d76b70}.labs-workproduct-indicator.neutral,.labs-workproduct-na{color:var(--muted)}.labs-workproduct-na{font-size:12px}.labs-workproduct-updated{color:var(--muted);font-size:10px;white-space:nowrap}.labs-workproducts-table td:nth-child(2) button{display:grid;gap:3px;border:0;background:transparent;color:var(--text);padding:0;font:inherit;text-align:left;cursor:pointer}.labs-workproducts-table td:nth-child(2) strong{font-size:13px}.labs-workproducts-table td:nth-child(2) span{display:block;max-width:360px;overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}.labs-workproducts-table code{display:block;max-width:220px;overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}.labs-workproduct-type{color:var(--muted-strong);font-size:11px;font-weight:600}.labs-status-badge{display:inline-flex;align-items:center;width:max-content;border-radius:999px;padding:3px 8px;color:#fff;font-size:10px;font-weight:600;line-height:1.25;white-space:nowrap}.labs-status-badge.positive{background:#34784e}.labs-status-badge.info{background:#3f6394}.labs-status-badge.warning{background:#8b681f}.labs-status-badge.negative{background:#91484b}.labs-status-badge.neutral{background:#565861}.labs-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;color:var(--muted);font-size:11px}.labs-pagination button{border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--text);padding:5px 8px;font:inherit;font-size:11px;cursor:pointer}.labs-pagination button:disabled{opacity:.42;cursor:default}.labs-suggestions-page{min-height:100%}.labs-subtabs{display:flex;gap:2px;padding:0 28px}.labs-suggestions-body{overflow:auto}.labs-suggestions-body .insights-view,.labs-suggestions-body .training-page-body{width:min(1180px,calc(100% - 56px));margin-inline:auto}.labs-workproduct-detail{padding-top:22px}.labs-workproduct-detail-header{align-items:center}.labs-workproduct-detail-header>div:first-child{display:grid;min-width:0;gap:8px}.labs-workproduct-name-row{display:flex;align-items:center;min-width:0;gap:10px}.labs-workproduct-name-row h1{min-width:0}.labs-workproduct-header-actions,.labs-eval-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px}.labs-rename-backdrop{position:fixed;z-index:100;inset:0;display:flex;align-items:center;justify-content:center;background:#050609ad;padding:24px}.labs-rename-dialog{width:min(440px,100%);overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:0 22px 70px #0000006b}.labs-rename-dialog>header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:11px;border-bottom:1px solid var(--border);padding:16px 17px}.labs-rename-dialog h2,.labs-rename-dialog p{margin:0}.labs-rename-dialog h2{color:var(--text);font-size:14px}.labs-rename-dialog header p{margin-top:4px;color:var(--muted);font-size:11px;line-height:1.45}.labs-rename-dialog-icon{display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;border-radius:8px;background:#6291d124;color:#7da9e4}.labs-rename-dialog header button{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}.labs-rename-dialog header button:hover:not(:disabled){background:#ffffff12;color:var(--text)}.labs-rename-dialog form{display:grid;gap:14px;padding:17px}.labs-rename-dialog form>label{display:grid;gap:7px;color:var(--muted-strong);font-size:11px;font-weight:650}.labs-rename-dialog input{width:100%;min-width:0;border:1px solid var(--border);border-radius:7px;outline:none;background:var(--bg);color:var(--text);padding:9px 10px;font:inherit;font-size:12px}.labs-rename-dialog input:focus{border-color:#5c8cc9;box-shadow:0 0 0 2px #5c8cc92e}.labs-rename-agent-id{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:10px}.labs-rename-agent-id code{overflow:hidden;color:var(--muted-strong);text-overflow:ellipsis;white-space:nowrap}.labs-rename-error{color:#e47b7f;font-size:11px}.labs-rename-dialog footer{display:flex;justify-content:flex-end;gap:8px}.labs-rename-dialog footer button{min-height:30px;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--text);padding:0 12px;font:inherit;font-size:11px;font-weight:650;cursor:pointer}.labs-rename-dialog footer button[type=submit]{border-color:#4e7db9;background:#416da3;color:#fff}.labs-rename-dialog button:disabled{cursor:default;opacity:.5}.labs-run-decision .composer-create-strip{margin:0}.labs-run-decision{display:grid;gap:10px}.labs-run-decision-actions{display:flex;justify-content:flex-end;gap:7px}.labs-status-dot{width:9px;height:9px;flex:0 0 auto;border-radius:999px;background:#565861}.labs-status-dot.small{width:7px;height:7px;margin-left:1px}.labs-status-dot.positive{background:#48a868}.labs-status-dot.info{background:#6291d1}.labs-status-dot.warning{background:#c89b3c}.labs-status-dot.negative{background:#c45e62}.labs-change-page{display:grid;gap:20px;padding-top:18px}.labs-change-index,.labs-change-run-detail{display:grid;gap:14px;padding-top:18px}.labs-change-actions{display:flex;flex:0 0 auto;align-items:center;gap:7px}.labs-change-facts{display:grid;grid-template-columns:130px 130px minmax(0,1fr);margin:0;border-block:1px solid var(--border)}.labs-change-facts>div{display:grid;min-width:0;gap:4px;padding:12px 14px;border-right:1px solid var(--border)}.labs-change-facts>div:first-child{padding-left:0}.labs-change-facts>div:last-child{border-right:0}.labs-change-facts dt{color:var(--muted);font-size:10px}.labs-change-facts dd{margin:0;overflow:hidden;font:11px/1.4 monospace;text-overflow:ellipsis;white-space:nowrap}.labs-change-message,.labs-change-empty{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:8px;padding:11px 12px;color:var(--muted);font-size:12px}.labs-change-message.negative,.labs-change-empty.negative{border-color:color-mix(in srgb,#c45e62 48%,var(--border));color:#db7779}.labs-change-timeline{position:relative;display:grid;gap:14px}.labs-change-timeline:before{position:absolute;z-index:0;top:0;bottom:0;left:7.5%;width:1px;background:var(--border);content:""}.labs-change-timeline-item{position:relative;z-index:1}.labs-change-card{display:grid;overflow:hidden;min-width:0;border:1px solid var(--border);border-radius:9px;background:var(--panel)}.labs-change-card-header,.labs-change-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px}.labs-change-card-header{padding-bottom:4px}.labs-change-card-header>span:last-child{color:var(--muted);font-size:10px}.labs-change-card-body{display:grid;gap:6px;padding:14px 13px}.labs-change-card-body h3{margin:0;font-size:14px;line-height:1.45}.labs-change-card-body p{margin:0;color:var(--muted);font-size:11px;line-height:1.55}.labs-change-card-footer{padding-top:4px}.labs-change-card-footer.end{justify-content:flex-end}.labs-change-timeline-label{color:var(--muted);font-size:10px}.labs-change-footer-status{display:flex;align-items:center;gap:7px;color:var(--muted-strong);font-size:11px}.labs-change-evals{display:grid}.labs-change-eval{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-height:58px;padding:0 13px;border-bottom:1px solid var(--border)}.labs-change-eval:last-child{border-bottom:0}.labs-change-eval>div{display:grid;min-width:0;gap:3px}.labs-change-eval strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.labs-change-eval span{color:var(--muted);font-size:10px}.labs-change-evals .labs-change-empty{border:0;border-radius:0}.labs-eval-receipts{display:grid;gap:8px}.labs-agent-change-history{min-width:700px}.labs-agent-change-history th:first-child{width:48%}.labs-agent-change-history td:first-child button{display:grid;gap:3px;width:100%;border:0;background:transparent;color:var(--text);padding:0;font:inherit;text-align:left;cursor:pointer}.labs-agent-change-history td:first-child strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.labs-agent-change-history td:first-child span{color:var(--muted);font-size:10px}.labs-inline-facts{display:flex;gap:28px;flex-wrap:wrap;margin:0}.labs-inline-facts>div{display:grid;gap:3px}.labs-inline-facts dt{color:var(--muted);font-size:10px}.labs-inline-facts dd{margin:0;max-width:420px;overflow-wrap:anywhere;font-size:12px;font-weight:560}.labs-method-tabs{display:inline-flex;gap:3px;margin:0 0 18px;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft);padding:3px}.labs-method-tabs button{display:flex;align-items:baseline;gap:8px;min-width:150px;border:0;border-radius:5px;background:transparent;color:var(--muted);padding:8px 11px;font:inherit;font-size:12px;text-align:left;cursor:pointer}.labs-method-tabs button:hover{color:var(--text)}.labs-method-tabs button.active{background:var(--panel);color:var(--text);box-shadow:inset 0 0 0 1px var(--border)}.labs-method-tabs button strong{margin-left:auto;color:inherit;font-size:10px}.labs-dataset-summary,.labs-eval-copy,.labs-version-storage-copy{margin-top:0;margin-bottom:16px}.labs-dataset-tabs{display:flex;width:fit-content}.labs-dataset-tabs button{min-width:132px}.labs-dataset-tabs button>span{margin-left:auto;color:var(--muted);font-size:10px}.labs-dataset-examples{display:grid;gap:8px}.labs-dataset-show-all{justify-self:center;margin-top:4px}.labs-dataset-example{overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft)}.labs-dataset-example>summary{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 12px;cursor:pointer;list-style:none}.labs-dataset-example>summary::-webkit-details-marker{display:none}.labs-dataset-example[open]>summary{background:var(--panel)}.labs-dataset-example-index{color:var(--muted);font:10px/1 var(--mono)}.labs-dataset-example-title{display:grid;min-width:0;gap:4px}.labs-dataset-example-title strong{overflow:hidden;font-size:12px;font-weight:560;text-overflow:ellipsis;white-space:nowrap}.labs-dataset-example-title small{color:var(--muted);font-size:10px}.labs-dataset-example-body{display:grid;gap:15px;border-top:1px solid var(--border);padding:14px}.labs-dataset-example-body section{display:grid;gap:6px}.labs-dataset-example-body h3,.labs-version-promotion>h3{margin:0;font-size:11px}.labs-dataset-example-body p{margin:0;color:var(--muted-strong);font-size:12px;line-height:1.55}.labs-dataset-example-body pre{max-height:180px;overflow:auto;margin:0;border:1px solid var(--border);border-radius:6px;background:var(--bg);padding:9px 10px;color:var(--text);font:10px/1.5 var(--mono);white-space:pre-wrap}.labs-dataset-example-advanced>summary,.labs-run-technical>summary{color:var(--muted);font-size:11px;cursor:pointer}.labs-dataset-example-advanced .training-configuration-list,.labs-run-technical .training-configuration-list{margin-top:10px}.labs-run-technical{margin-top:14px;border-top:1px solid var(--border);padding-top:10px}.labs-eval-setup>summary{color:var(--muted-strong);font-size:12px;cursor:pointer}.labs-eval-setup .training-table-wrap{margin-top:12px}.labs-version-storage{display:grid;gap:4px;max-width:280px}.labs-version-name{min-width:92px}.labs-version-name strong,.labs-version-name small{display:block}.labs-version-name small{margin-top:3px;color:var(--muted);font-size:10px}.labs-version-storage code{overflow:hidden;color:var(--muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}.labs-version-promotion{display:grid;gap:12px;margin-top:18px;border-top:1px solid var(--border);padding-top:16px}.labs-detail-copy{margin:14px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.labs-expert-bootstrap-summary{display:grid;gap:12px}.labs-expert-bootstrap-summary>div:first-child{display:flex;align-items:center;gap:10px}.labs-expert-bootstrap-summary p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.labs-expert-bootstrap-dialog{width:min(820px,calc(100vw - 40px));max-height:min(780px,calc(100vh - 40px))}.labs-expert-trajectory-list{display:grid;gap:9px;margin-top:16px}.labs-expert-preview-facts{margin-bottom:4px}.labs-expert-trajectory{overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft)}.labs-expert-trajectory>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;cursor:pointer;list-style:none}.labs-expert-trajectory>summary::-webkit-details-marker{display:none}.labs-expert-trajectory>summary>span:first-child{display:grid;gap:3px}.labs-expert-trajectory summary strong{font-size:12px}.labs-expert-trajectory summary small,.labs-expert-approval-note{color:var(--muted);font-size:11px}.labs-expert-trajectory[open]>summary>span:last-child{transform:rotate(90deg)}.labs-expert-trajectory-body{display:grid;gap:14px;border-top:1px solid var(--border);padding:13px}.labs-expert-trajectory-body section{display:grid;gap:6px}.labs-expert-trajectory-body h3{margin:0;font-size:11px}.labs-expert-trajectory-body p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.labs-expert-trajectory-body .training-pills span{border:1px solid var(--border);border-radius:999px;background:var(--panel);padding:3px 7px;color:var(--muted);font-family:var(--mono);font-size:10px}.labs-expert-trajectory-body pre{max-height:260px;overflow:auto;margin:0;border:1px solid var(--border);border-radius:6px;background:var(--bg);padding:9px;color:var(--text);font:10px/1.5 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere}.labs-expert-messages>summary{color:var(--muted);font-size:11px;cursor:pointer}.labs-expert-messages pre{margin-top:8px}.labs-expert-bootstrap-dialog .training-dialog-actions{flex-wrap:nowrap}.labs-expert-approval-note{margin-right:auto}.labs-eval-summary{display:grid;gap:14px}.labs-eval-actions .dropdown-select{min-width:160px}.labs-validation-list{margin:14px 0 0;padding-left:18px;color:var(--muted);font-size:11px;line-height:1.5}.labs-activity-table{min-width:720px}.labs-model-eval-table{min-width:680px}.labs-training-error{margin:14px 0 0;color:#db7779;font-size:11px;line-height:1.5;white-space:pre-wrap}.labs-source-evals{display:grid;gap:8px}.labs-source-evals>strong{font-size:12px}.labs-source-evals ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}.labs-source-evals li{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);padding:0 0 6px}.labs-source-evals code{color:var(--muted);font-size:11px}.labs-source-evals+.labs-source-evals,.labs-source-evals+.training-table-wrap{margin-top:14px}.labs-models-table{min-width:820px}.labs-models-table th:first-child,.labs-models-table td:first-child{width:36%}.labs-models-table th:nth-child(2),.labs-models-table td:nth-child(2){width:190px}.labs-model-versions-table{min-width:860px}.labs-model-version-index{min-width:0}.labs-model-version-detail{display:grid;min-width:0;gap:14px}.labs-model-version-back{width:fit-content}.labs-version-row-button{display:grid;width:100%;gap:2px;border:0;background:transparent;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer}.labs-version-row-button small{color:var(--muted);font-family:var(--mono);font-size:10px}.labs-version-dataset-link{border:0;background:transparent;padding:0;color:var(--text);font:inherit;text-align:left;cursor:pointer}.labs-version-dataset-link:hover{text-decoration:underline;text-underline-offset:2px}.labs-version-detail-dataset{margin-top:14px}.labs-version-icon-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--muted-strong)}.labs-version-icon-button[aria-pressed=true]{background:var(--panel-soft);color:var(--text)}.labs-new-version-dialog{width:min(640px,calc(100vw - 32px))}.labs-new-version-step{display:flex;align-items:flex-start;gap:10px;margin-top:16px}.labs-new-version-step-number{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:var(--accent);color:#fff;font-size:11px;font-weight:700}.labs-new-version-step>div{display:grid;gap:2px}.labs-new-version-step p{margin:0;color:var(--muted);font-size:11px}.labs-new-version-select{display:grid;gap:6px;margin:12px 0;color:var(--muted-strong);font-size:11px}.labs-new-version-select select{width:100%;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft);padding:9px 10px;color:var(--text)}.labs-new-version-dataset-facts{margin-bottom:18px}@media(max-width:860px){.labs-header{padding:8px 18px 0}.labs-primary-tabs button{padding-inline:8px}.labs-flat-body{width:calc(100% - 36px);padding:20px 0 36px}.labs-workproduct-toolbar{align-items:stretch;flex-direction:column}.labs-workproduct-toolbar select{width:100%}.labs-workproduct-detail{width:calc(100% - 36px)}.labs-workproduct-detail-header{align-items:flex-start;flex-direction:column}.labs-change-actions{width:100%}.labs-change-actions .training-button{flex:1}.labs-change-facts{grid-template-columns:minmax(0,1fr)}.labs-change-facts>div{border-right:0;border-bottom:1px solid var(--border);padding-inline:14px}.labs-change-facts>div:last-child{border-bottom:0}.labs-change-card-footer:not(.end){align-items:stretch;flex-direction:column}.labs-change-card-footer.end .training-button{width:100%}.labs-inline-facts{gap:16px}.labs-method-tabs{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}.labs-dataset-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.labs-method-tabs button,.labs-dataset-tabs button{min-width:0}.labs-suggestions-body .insights-view,.labs-suggestions-body .training-page-body{width:calc(100% - 36px)}}@media(max-width:560px){.labs-primary-tabs button{font-size:11px;padding-inline:6px}.labs-primary-tabs button span{display:none}.labs-create-menu{right:-2px;width:min(270px,calc(100vw - 28px))}}.insights-view{display:grid;align-content:start;gap:24px;width:min(980px,calc(100% - 72px));min-width:0;justify-self:center;padding:42px 0 64px}.insights-empty,.insights-error{margin:0;color:var(--muted);font-size:13px;line-height:1.5}.insights-scan-preference{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:24px;min-width:0}.insights-scan-preference>div:first-child{display:grid;gap:4px;min-width:0}.insights-scan-preference strong{color:var(--text);font-size:13px;font-weight:600}.insights-scan-preference span{color:var(--muted);font-size:12px;line-height:1.45}.insights-scan-controls{display:inline-flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto}.insights-scan-preference button{flex:0 0 auto;min-width:72px;min-height:32px;border:1px solid var(--border);border-radius:8px;background:transparent;color:var(--muted);padding:0 11px}.insights-scan-preference button:hover:not(:disabled){background:var(--panel-hover);color:var(--text)}.insights-scan-preference button.active{border-color:color-mix(in srgb,#67d59a 40%,var(--border));background:color-mix(in srgb,#67d59a 9%,transparent);color:#79d8a4}.insights-scan-preference button:disabled{opacity:.65}.insights-scan-countdown{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;white-space:nowrap}.insights-scan-dot{width:7px;height:7px;border-radius:999px;background:#f0d77a}.insights-scan-countdown.running .insights-scan-dot{background:#6ee7a8}.insights-active-scan{display:inline-flex;align-items:center;gap:10px;width:fit-content;max-width:100%;border:1px solid rgba(110,231,168,.24);border-radius:8px;background:#6ee7a812;color:var(--muted-strong);padding:9px 11px}.insights-active-scan .insights-scan-dot{background:#6ee7a8}.insights-active-scan div{display:grid;gap:2px;min-width:0}.insights-active-scan strong{color:var(--text);font-size:13px;font-weight:600}.insights-active-scan span:not(.insights-scan-dot){color:var(--muted);font-size:12px}.insights-error{color:#ff8a84}.insights-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));align-items:end;gap:12px;min-width:0}.insights-filter-group{display:grid;gap:6px;min-width:0}.insights-filter-group>span{color:var(--muted);font-size:12px}.insights-filter-group select{width:100%;min-width:0;min-height:34px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--text);padding:0 30px 0 10px;font:inherit;font-size:12px}.insights-filter-group select:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}.insights-filter-group select:focus-visible{outline:2px solid color-mix(in srgb,var(--accent, #7aa2ff) 55%,transparent);outline-offset:1px}.insights-section{display:grid;gap:10px;min-width:0}.insights-section h2{margin:0;color:var(--muted-strong);font-size:13px;font-weight:600}.insights-table-frame{min-width:0;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--panel)}.insights-table-scroll{width:100%;overflow-x:auto}.insights-table{width:100%;min-width:760px;border-collapse:collapse;color:var(--text);font-size:12px;text-align:left}.insights-runs-table{min-width:880px}.insights-table th,.insights-table td{min-width:0;border-bottom:1px solid var(--border);text-align:left;vertical-align:middle}.insights-table th{padding:9px 12px;background:var(--panel-soft);color:var(--muted);font-size:12px;font-weight:500;white-space:nowrap}.insights-table td{padding:11px 12px}.insights-table tbody tr:last-child td{border-bottom:0}.insights-table tbody tr:hover{background:var(--panel-soft)}.insights-observations-table th:nth-child(1),.insights-observations-table td:nth-child(1){width:92px}.insights-observations-table th:nth-child(2),.insights-observations-table td:nth-child(2){width:110px}.insights-observations-table th:nth-child(4),.insights-observations-table td:nth-child(4){width:132px}.insights-observations-table th:nth-child(5),.insights-observations-table td:nth-child(5){width:150px}.insights-runs-table th:nth-child(1),.insights-runs-table td:nth-child(1){width:112px}.insights-runs-table th:nth-child(2),.insights-runs-table td:nth-child(2){width:98px}.insights-runs-table th:nth-child(3),.insights-runs-table td:nth-child(3){width:160px}.insights-runs-table th:nth-child(5),.insights-runs-table td:nth-child(5){width:136px}.insights-runs-table th:nth-child(6),.insights-runs-table td:nth-child(6){width:112px}.insights-severity{display:inline-flex;align-items:center;min-height:22px;border-radius:7px;padding:0 7px;font-size:12px}.insights-severity.nit{background:#3aa3ff1f;color:#8bc7ff}.insights-severity.concern{background:#f4c5421f;color:#f0d77a}.insights-severity.blocker{background:#ff706a24;color:#ff9b96}.insights-status,.insights-status-stack,.insights-time{overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.insights-status-stack{display:grid;gap:3px}.insights-status-stack small{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis}.insights-copy{display:grid;gap:4px;min-width:0}.insights-copy strong,.insights-copy span{min-width:0;overflow-wrap:anywhere}.insights-copy strong{color:var(--text);font-size:13px;font-weight:600}.insights-copy span{color:var(--muted-strong);line-height:1.4}.insights-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:0}.insights-actions button{display:inline-grid;place-items:center;width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:var(--muted);padding:0}.insights-actions .insights-text-action{width:auto;min-width:28px;padding:0 8px;white-space:nowrap}.insights-actions button:hover{background:#ffffff14;color:var(--text)}.insights-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--border);padding:8px 10px;color:var(--muted);font-size:12px}.insights-pagination>div{display:inline-flex;align-items:center;gap:10px}.insights-pagination button{min-height:28px;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--muted-strong);padding:0 9px;font-size:12px}.insights-pagination button:hover:not(:disabled){background:var(--panel-hover);color:var(--text)}.insights-pagination button:disabled{opacity:.42}@media(max-width:900px){.insights-filters{grid-template-columns:repeat(3,minmax(140px,1fr))}}@media(max-width:780px){.insights-view{width:min(100% - 32px,980px);padding:26px 0 42px}.insights-scan-preference{align-items:stretch;flex-direction:column;gap:12px}.insights-scan-controls{justify-content:space-between}.insights-filters{grid-template-columns:repeat(2,minmax(130px,1fr))}}@media(max-width:480px){.insights-filters{grid-template-columns:minmax(0,1fr)}}
|