@lovelybunch/api 1.0.71-alpha.7 → 1.0.71-alpha.8
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/package.json +4 -4
- package/static/assets/{AgentDetailPage-Opv1vviq.js → AgentDetailPage-DgEbsro7.js} +1 -1
- package/static/assets/{AgentEditPage-uLCBQAKt.js → AgentEditPage-C-oRXb2i.js} +1 -1
- package/static/assets/{AgentsPage-CbwDfB0S.js → AgentsPage-LAiPsGo6.js} +1 -1
- package/static/assets/{AgentsSettingsPage-wqr9YnHr.js → AgentsSettingsPage-Dg6xOvLr.js} +1 -1
- package/static/assets/{ApiKeysSettingsPage-16htmPFV.js → ApiKeysSettingsPage-CCK0qACG.js} +1 -1
- package/static/assets/{ArchitectureEditPage-Dvfb4b-o.js → ArchitectureEditPage-BPO6OFWv.js} +1 -1
- package/static/assets/{ArchitecturePage-CzD1Oize.js → ArchitecturePage-8fad_lNX.js} +1 -1
- package/static/assets/{AuthSettingsPage-BP2zlNfC.js → AuthSettingsPage-DdfuUhwy.js} +1 -1
- package/static/assets/{CallbackPage-DEnicyfd.js → CallbackPage-B66-RhgE.js} +1 -1
- package/static/assets/{CodePage-wBG-_Rs8.js → CodePage-BXPnfaYj.js} +1 -1
- package/static/assets/{CollapsibleSection-DSatk0YZ.js → CollapsibleSection-Bo6dPNB0.js} +1 -1
- package/static/assets/{DashboardPage-DmXHKAfY.js → DashboardPage-g9RbjrxM.js} +1 -1
- package/static/assets/{GitPage-C-ZudM8s.js → GitPage-CRhOabK5.js} +1 -1
- package/static/assets/{GitSettingsPage-DtvqZDAp.js → GitSettingsPage-4ThmHYiO.js} +1 -1
- package/static/assets/{IdentityPage-WwVp_vBZ.js → IdentityPage-D2dQOIVu.js} +1 -1
- package/static/assets/{ImplementationStepsEditor-BKDdpUue.js → ImplementationStepsEditor-DqjmTpCD.js} +1 -1
- package/static/assets/{IntegrationsSettingsPage-Vhh08Jjd.js → IntegrationsSettingsPage-DL0EQ1Dp.js} +1 -1
- package/static/assets/{KnowledgeDetailPage-B8jlP-NF.js → KnowledgeDetailPage-Chu61B6A.js} +1 -1
- package/static/assets/{KnowledgeEditPage-BppjRoZZ.js → KnowledgeEditPage-n_nRhHz5.js} +1 -1
- package/static/assets/{KnowledgePage-CasWW1a1.js → KnowledgePage-CZBbkkxc.js} +1 -1
- package/static/assets/{LoginPage-DkguuNDQ.js → LoginPage-B3yLDlzb.js} +1 -1
- package/static/assets/{McpSettingsPage-CZfBLxIj.js → McpSettingsPage-CwJgm_Ig.js} +1 -1
- package/static/assets/{NewAgentPage-BbANsmjr.js → NewAgentPage-DWkEh2H0.js} +1 -1
- package/static/assets/{NewKnowledgePage-BE18vt4E.js → NewKnowledgePage-qiZHOBk_.js} +1 -1
- package/static/assets/{NewProposalPage-BxKHijwN.js → NewProposalPage-B-6r2u9V.js} +1 -1
- package/static/assets/{ProjectEditPage-uwwvFm_Y.js → ProjectEditPage-CXQL9wWm.js} +1 -1
- package/static/assets/{ProjectPage-DJvT8Jwp.js → ProjectPage-N1-VPCXb.js} +1 -1
- package/static/assets/{PromptsSettingsPage-CWdSTKxS.js → PromptsSettingsPage-CkfWwaVo.js} +1 -1
- package/static/assets/{ProposalDetailPage-CDyosWFj.js → ProposalDetailPage-CVjCtz3l.js} +1 -1
- package/static/assets/{ProposalEditPage-D9b0X_vT.js → ProposalEditPage-BlLNHhID.js} +1 -1
- package/static/assets/{ProposalsPage-DdfAejqH.js → ProposalsPage-Cg_8UnUz.js} +1 -1
- package/static/assets/ResourcesPage-6X2GbhJW.js +71 -0
- package/static/assets/{RulesSettingsPage-CrIrk78x.js → RulesSettingsPage-DejeW-zE.js} +1 -1
- package/static/assets/{SchedulePage-Dq53Q6fB.js → SchedulePage-DRdcV50U.js} +1 -1
- package/static/assets/{TagInput-DtQl22K7.js → TagInput-Qey-JNSc.js} +1 -1
- package/static/assets/{TerminalPage-BcclpXIS.js → TerminalPage-oL2epDcB.js} +1 -1
- package/static/assets/{TerminalSessionPage-Tecaum7f.js → TerminalSessionPage-Gy2cvUkm.js} +1 -1
- package/static/assets/{UserPreferencesPage-B4jeTbEe.js → UserPreferencesPage-BuI5MILN.js} +1 -1
- package/static/assets/{UserSettingsPage-D_fTJGEB.js → UserSettingsPage-qtJLo7KK.js} +1 -1
- package/static/assets/{UtilitiesPage-BVSfnezp.js → UtilitiesPage-BFQjoH8u.js} +1 -1
- package/static/assets/{alert-DT5dIcQb.js → alert-B1XiCMQp.js} +1 -1
- package/static/assets/{arrow-down-D5JMw0I7.js → arrow-down-CeHH_n_1.js} +1 -1
- package/static/assets/{arrow-left-BbL7bi4b.js → arrow-left-1kNbh1Lu.js} +1 -1
- package/static/assets/{arrow-up-D5zdohVZ.js → arrow-up-BYvPnrJd.js} +1 -1
- package/static/assets/{badge-CxMDR-vz.js → badge-NXKbF0v1.js} +1 -1
- package/static/assets/{browser-modal-DZprh22G.js → browser-modal-rJ-NhTpW.js} +1 -1
- package/static/assets/{calendar-DjIpzqju.js → calendar-v-JFQxNh.js} +1 -1
- package/static/assets/{card-Cq3qftln.js → card-CSNr-FQA.js} +1 -1
- package/static/assets/{chevron-left-8PdSXGp8.js → chevron-left-Br4J9Cp9.js} +1 -1
- package/static/assets/{circle-alert-CPeWHRYV.js → circle-alert-Dupw7IFA.js} +1 -1
- package/static/assets/{circle-check-BsF5HxbR.js → circle-check-B9hjnh3h.js} +1 -1
- package/static/assets/{circle-check-big-DViAc1A0.js → circle-check-big-oAo0Oeyn.js} +1 -1
- package/static/assets/{circle-play-C0yQlVR9.js → circle-play-CVSiuxiN.js} +1 -1
- package/static/assets/{circle-x-CT_9xyVN.js → circle-x-t7MHMAR2.js} +1 -1
- package/static/assets/{clipboard-D-CHbLVc.js → clipboard-DHZxrsFW.js} +1 -1
- package/static/assets/{clock-D5nAa1In.js → clock-LA-30ZGm.js} +1 -1
- package/static/assets/{download-Bl3cP1zr.js → download-CnYQegjL.js} +1 -1
- package/static/assets/{eye-DgdIekU1.js → eye-CeI1df80.js} +1 -1
- package/static/assets/{folder-git-2-BD7LL99o.js → folder-git-2-DEoH-p1C.js} +1 -1
- package/static/assets/{index-CKcm92Kn.js → index-D_Lz5G-Q.js} +8 -8
- package/static/assets/{label-COUiN2Pd.js → label-JyYTDtEw.js} +1 -1
- package/static/assets/{markdown-editor-Cln2Jo2-.js → markdown-editor-Chiudu3u.js} +1 -1
- package/static/assets/{pause-CupPWZ26.js → pause-C3Ag1l-W.js} +1 -1
- package/static/assets/{play-sWUKmZEy.js → play-BCmsp0g8.js} +1 -1
- package/static/assets/{plus-DM62ve-p.js → plus-CMaJeyI7.js} +1 -1
- package/static/assets/{radio-group-B6pYL4p4.js → radio-group-BaKpW9AK.js} +1 -1
- package/static/assets/{refresh-cw-ClU12bdt.js → refresh-cw-2s-Cw28o.js} +1 -1
- package/static/assets/{search-DHLiojAp.js → search-C_8YfOPe.js} +1 -1
- package/static/assets/{switch-DC_em8xh.js → switch-C8QENxXl.js} +1 -1
- package/static/assets/{tabs-KzUqSzqd.js → tabs-B2NsP4LT.js} +1 -1
- package/static/assets/{tag-cF4ktw0a.js → tag-BMxDJZSb.js} +1 -1
- package/static/assets/{terminal-preview-D-pmjUNP.js → terminal-preview-BcVtz3Tb.js} +1 -1
- package/static/assets/{use-terminal-C1j4Pa5C.js → use-terminal-Se41LFUi.js} +1 -1
- package/static/assets/{zap-DGHMgsd8.js → zap-CCyjZlP1.js} +1 -1
- package/static/index.html +1 -1
- package/static/assets/ResourcesPage-DCJ-ob0_.js +0 -71
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,H as k,b2 as N,A as g,j as e,a1 as P,v as h,w as u,x as m,y as f,z as a,I as b,B as y}from"./index-
|
|
1
|
+
import{r as n,H as k,b2 as N,A as g,j as e,a1 as P,v as h,w as u,x as m,y as f,z as a,I as b,B as y}from"./index-D_Lz5G-Q.js";import{C as w,b as F,c as T,d as L,a as D}from"./card-CSNr-FQA.js";import{L as o}from"./label-JyYTDtEw.js";const r={theme:"coconut",defaultEditor:"cursor",terminalShell:"bash",autoSaveInterval:60,notifications:{email:!1,desktop:!1,slack:!1}};function V(s){return{theme:s?.theme??r.theme,defaultEditor:s?.defaultEditor??r.defaultEditor,terminalShell:s?.terminalShell??r.terminalShell,autoSaveInterval:s?.autoSaveInterval??r.autoSaveInterval,notifications:{email:s?.notifications?.email??r.notifications.email,desktop:s?.notifications?.desktop??r.notifications.desktop,slack:s?.notifications?.slack??r.notifications.slack}}}function B(){const[s,v]=n.useState(r),[C,E]=n.useState(!0),[c,x]=n.useState(!1),{toast:d}=k(),{theme:j,setTheme:p}=N();n.useEffect(()=>{S()},[]),n.useEffect(()=>{s.theme!==j&&p(s.theme)},[s.theme,j,p]);const S=async()=>{try{const l=await(await fetch(`${g}/api/v1/user/settings`)).json();l.success&&v(V(l.data.preferences))}catch(t){console.error("Failed to load preferences:",t),d({title:"Error",description:"Failed to load user preferences",variant:"destructive"})}finally{E(!1)}},I=async()=>{x(!0);try{const l=await(await fetch(`${g}/api/v1/user/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:s})})).json();if(l.success)d({title:"Preferences saved",description:"Your personal preferences have been updated."});else throw new Error(l.error)}catch(t){console.error("Failed to save preferences:",t),d({title:"Error",description:"Failed to save preferences",variant:"destructive"})}finally{x(!1)}},i=t=>{v(l=>({...l,...t,notifications:{...l.notifications,...t.notifications}}))};return C?e.jsx("div",{children:"Loading..."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"User Preferences"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure defaults for editors, shells, themes, and notifications."})]}),e.jsx(P,{}),e.jsxs(w,{children:[e.jsxs(F,{children:[e.jsx(T,{children:"Workspace Defaults"}),e.jsx(L,{children:"Set the defaults Coconut uses when creating sessions and surfaces."})]}),e.jsxs(D,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"theme",children:"Theme"}),e.jsxs(h,{value:s.theme,onValueChange:t=>i({theme:t}),children:[e.jsx(u,{id:"theme",children:e.jsx(m,{placeholder:"Select theme"})}),e.jsxs(f,{children:[e.jsx(a,{value:"coconut",children:"Coconut"}),e.jsx(a,{value:"system",children:"System"}),e.jsx(a,{value:"light",children:"Light"}),e.jsx(a,{value:"dark",children:"Dark"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"System follows your OS preference. Coconut is the default branded theme."})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"defaultEditor",children:"Default Editor"}),e.jsxs(h,{value:s.defaultEditor,onValueChange:t=>i({defaultEditor:t}),children:[e.jsx(u,{id:"defaultEditor",children:e.jsx(m,{placeholder:"Select editor"})}),e.jsxs(f,{children:[e.jsx(a,{value:"cursor",children:"Cursor"}),e.jsx(a,{value:"vscode",children:"VS Code"}),e.jsx(a,{value:"vim",children:"Vim"}),e.jsx(a,{value:"emacs",children:"Emacs"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"terminalShell",children:"Preferred Shell"}),e.jsxs(h,{value:s.terminalShell,onValueChange:t=>i({terminalShell:t}),children:[e.jsx(u,{id:"terminalShell",children:e.jsx(m,{placeholder:"Select shell"})}),e.jsxs(f,{children:[e.jsx(a,{value:"bash",children:"Bash"}),e.jsx(a,{value:"zsh",children:"Zsh"}),e.jsx(a,{value:"fish",children:"Fish"}),e.jsx(a,{value:"sh",children:"sh"}),e.jsx(a,{value:"system",children:"System Default"})]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"autoSaveInterval",children:"Auto-save Interval (seconds)"}),e.jsx(b,{id:"autoSaveInterval",type:"number",min:10,max:600,value:s.autoSaveInterval,onChange:t=>i({autoSaveInterval:Number.parseInt(t.target.value,10)||r.autoSaveInterval})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Controls how often Coconut persists draft work to disk."})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(y,{variant:"outline",onClick:S,disabled:c,children:"Reset"}),e.jsx(y,{onClick:I,disabled:c,children:c?"Saving...":"Save Preferences"})]})]})}export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,H as I,A as S,j as e,a1 as D,B as g,I as p,v as F,w as P,x as z,y as L,z as A,L as R}from"./index-
|
|
1
|
+
import{r as a,H as I,A as S,j as e,a1 as D,B as g,I as p,v as F,w as P,x as z,y as L,z as A,L as R}from"./index-D_Lz5G-Q.js";import{C as q,b as T,c as M,d as O,a as U}from"./card-CSNr-FQA.js";import{L as c}from"./label-JyYTDtEw.js";import{C as B,a as H}from"./clipboard-DHZxrsFW.js";const m=[{id:"software-engineer",title:"Software Engineer",description:"Builds, refactors, and reviews high-quality code across stacks. Excellent at translating specs into implementation and optimizing system performance. Strong at debugging, architecture patterns, and accelerating development velocity."},{id:"product-strategist",title:"Product Strategist",description:"Defines product direction, clarifies requirements, and aligns work with user and business goals. Skilled in roadmap planning, prioritization, and transforming ambiguous ideas into actionable plans."},{id:"researcher",title:"Researcher",description:"Investigates topics deeply, synthesizes information, and produces evidence-based insights. Strong at literature review, competitive analysis, and generating clear summaries to inform decisions."},{id:"designer",title:"Designer",description:"Creates intuitive interfaces, user flows, and visual assets. Focused on usability, accessibility, and crafting polished experiences. Strong at wireframing and turning requirements into elegant solutions."},{id:"qa-engineer",title:"QA Engineer",description:"Identifies bugs, edge cases, and reliability gaps. Produces test plans, automated tests, and reproducible reports. Strong at ensuring product quality and preventing regressions."},{id:"devops-engineer",title:"DevOps Engineer",description:"Manages infrastructure, deployments, and operational reliability. Skilled with CI/CD, observability, automation, and environment provisioning. Ensures systems are scalable and fault-tolerant."},{id:"data-analyst",title:"Data Analyst",description:"Analyzes data, defines metrics, and generates actionable insights. Strong in SQL, visualization, experimentation, and turning raw data into strategic recommendations."},{id:"marketer",title:"Marketer",description:"Creates campaigns, messaging, and positioning to reach target audiences. Skilled in content, funnels, and brand strategy. Strong at synthesizing market needs and shaping demand."},{id:"sales-partnerships-agent",title:"Sales & Partnerships Agent",description:"Identifies prospects, crafts outreach, and develops strategic relationships. Strong at value articulation, objection handling, and mapping product capabilities to customer needs."},{id:"growth-operator",title:"Growth Operator",description:"Optimizes acquisition, activation, and retention through experimentation. Skilled in funnel analysis, rapid testing, and leveraging data for compounding growth."},{id:"customer-success-specialist",title:"Customer Success Specialist",description:"Ensures users succeed by providing onboarding, guidance, and proactive support. Strong at diagnosing user challenges and improving long-term satisfaction and retention."},{id:"orchestration-engineer",title:"Orchestration Engineer",description:"Coordinates multi-agent workflows, dependencies, and handoffs. Strong at breaking large tasks into sequenced steps and ensuring agents operate cohesively and efficiently."},{id:"context-curator",title:"Context Curator",description:"Maintains clean, accurate project context by organizing files, logs, and knowledge. Strong at eliminating ambiguity, ensuring agents have the right information at the right time."},{id:"documentation-writer",title:"Documentation Writer",description:"Produces clear technical docs, guides, READMEs, and CP summaries. Strong at structuring complex information and keeping knowledge bases up to date and accessible."}];function G(){const[n,h]=a.useState({}),[r,d]=a.useState(null),[f,x]=a.useState(!1),[b,N]=a.useState(!0),[u,v]=a.useState(!1),{toast:o}=I();a.useEffect(()=>{j()},[]);const j=async()=>{try{try{const t=await fetch(`${S}/api/v1/config`),s=await t.json();if(t.ok&&s?.success){const i=s.data?.coconut||{};d(i.id??null),(i.firstName||i.lastName||i.email||i.role||i.roleDescription)&&h({firstName:i.firstName,lastName:i.lastName,email:i.email,role:i.role,roleDescription:i.roleDescription})}else d(null)}catch(t){console.error("Failed to load coconut config:",t),d(null)}}catch(t){console.error("Failed to load settings:",t),o({title:"Error",description:"Failed to load user settings",variant:"destructive"})}finally{N(!1)}},w=async()=>{v(!0);try{const s=await(await fetch(`${S}/api/v1/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({coconut:{...n,id:r||void 0}})})).json();if(s.success)o({title:"Success",description:"Settings saved successfully"});else throw new Error(s.error||"Failed to save settings")}catch(t){console.error("Failed to save settings:",t),o({title:"Error",description:"Failed to save settings",variant:"destructive"})}finally{v(!1)}},l=t=>{h(s=>{const i={...s,...t};if(t.role!==void 0){const C=m.find(E=>E.id===t.role);C?.description&&(i.roleDescription=C.description)}return i})},y=a.useMemo(()=>n.role&&m.find(s=>s.id===n.role)?.description||null,[n.role]),k=async()=>{if(r)try{await navigator.clipboard.writeText(r),x(!0),o({title:"Copied",description:"Coconut ID copied to clipboard."}),setTimeout(()=>x(!1),1500)}catch(t){console.error("Failed to copy coconut ID:",t),o({title:"Copy failed",description:"Unable to copy the Coconut ID to the clipboard.",variant:"destructive"})}};return b?e.jsx("div",{children:"Loading..."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Coconut Settings"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage the Coconut's profile information."})]}),e.jsx(D,{}),e.jsx("div",{className:"rounded-lg border border-dashed bg-muted/40 p-4",children:r?e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID"}),e.jsx("p",{className:"mt-1 font-mono text-sm",children:r})]}),e.jsxs(g,{variant:"outline",size:"sm",onClick:k,children:[f?e.jsx(B,{className:"h-4 w-4"}):e.jsx(H,{className:"h-4 w-4"}),e.jsx("span",{className:"ml-2",children:f?"Copied":"Copy"})]})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID not configured"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Add an `id` under the `coconut` section in `.nut/config.json` to register this Coconut instance."})]})}),e.jsxs(q,{children:[e.jsxs(T,{children:[e.jsx(M,{children:"Coconut Profile"}),e.jsx(O,{children:"Update the Coconut's identifying details and role."})]}),e.jsxs(U,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(c,{htmlFor:"firstName",children:"First Name"}),e.jsx(p,{id:"firstName",value:n.firstName||"",onChange:t=>l({firstName:t.target.value}),placeholder:"Enter first name"})]}),e.jsxs("div",{children:[e.jsx(c,{htmlFor:"lastName",children:"Last Name"}),e.jsx(p,{id:"lastName",value:n.lastName||"",onChange:t=>l({lastName:t.target.value}),placeholder:"Enter last name"})]})]}),e.jsxs("div",{children:[e.jsx(c,{htmlFor:"email",children:"Email"}),e.jsx(p,{id:"email",type:"email",value:n.email||"",onChange:t=>l({email:t.target.value}),placeholder:"Enter email address"})]}),e.jsxs("div",{children:[e.jsx(c,{htmlFor:"role",children:"Role"}),e.jsxs(F,{value:n.role,onValueChange:t=>l({role:t}),children:[e.jsx(P,{children:e.jsx(z,{placeholder:"Select role"})}),e.jsx(L,{children:m.map(t=>e.jsx(A,{value:t.id,children:t.title},t.id))})]}),y&&e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:y})]})]})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["You can also manage the Coconut's identity to other agents on the"," ",e.jsx(R,{to:"/identity",className:"underline underline-offset-4 hover:text-primary",children:"Identity page"}),"."]}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(g,{variant:"outline",onClick:j,disabled:u,children:"Cancel"}),e.jsx(g,{onClick:w,disabled:u,children:u?"Saving...":"Save Changes"})]})]})}export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as k,H as w,r as n,j as e,B as g,af as b,L as C,A as S,a4 as I}from"./index-
|
|
1
|
+
import{u as k,H as w,r as n,j as e,B as g,af as b,L as C,A as S,a4 as I}from"./index-D_Lz5G-Q.js";import{C as R,a as B}from"./card-CSNr-FQA.js";import{u as Q}from"./use-terminal-Se41LFUi.js";import{C as $}from"./circle-play-CVSiuxiN.js";import{P as O}from"./play-BCmsp0g8.js";function L(){const o=k(),{loading:l,createSession:d,refreshSessions:j}=Q(),{toast:i}=w(),[m,u]=n.useState(!1),[x,h]=n.useState(!1),[,f]=n.useState([]),[c,y]=n.useState({});n.useEffect(()=>{try{const t=localStorage.getItem("terminal.commandHistory");t&&f(JSON.parse(t))}catch{}},[]),n.useEffect(()=>{(async()=>{try{const s=await fetch(`${S}/api/v1/context/architecture`);if(!s.ok)return;const a=await s.json();a?.success&&a?.document?.metadata?.commands&&y(a.document.metadata.commands)}catch{}})()},[]);const p=t=>{t&&f(s=>{const a=[t,...s.filter(r=>r!==t)].slice(0,5);try{localStorage.setItem("terminal.commandHistory",JSON.stringify(a))}catch{}return a})},N=async t=>{const s=(t||"").trim();if(!s)return;const a=`session-${Date.now()}`;u(!0);try{await d(a,!1,s)?(p(s),i({title:"Session started",description:`${a}`}),o(`/terminal/${a}`)):i({title:"Failed to start",description:"See error above",variant:"destructive"})}finally{u(!1)}},v=async t=>{const s=(t||"").trim();if(!s)return;const a=`session-${Date.now()}`;h(!0);try{await d(a,!1,s)?(p(s),setTimeout(()=>j(),150),i({title:"Started in background",description:`${a}`,action:e.jsx(I,{altText:"Open session",onClick:()=>o(`/terminal/${a}`),children:"Open"})})):i({title:"Failed to start",description:"See error above",variant:"destructive"})}finally{h(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Utilities"}),e.jsx("p",{className:"text-muted-foreground",children:"Quick commands and shortcuts"})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Quick Commands"}),e.jsx(R,{children:e.jsx(B,{className:"pt-6",children:c&&Object.keys(c).length>0?e.jsx("div",{className:"space-y-2",children:e.jsx("div",{className:"rounded-md border divide-y",children:Object.entries(c).map(([t,s])=>e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 p-2",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:t}),e.jsx("span",{className:"text-muted-foreground hidden sm:inline",children:":"}),e.jsx("span",{className:"truncate max-w-full",children:e.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs",children:s})})]}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 flex-shrink-0",children:[e.jsxs(g,{onClick:()=>v(s),variant:"secondary",size:"sm",disabled:l||x||m,title:"Run in background",children:[e.jsx($,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"Background"})]}),e.jsxs(g,{onClick:()=>N(s),size:"sm",disabled:l||m||x,title:"Run",children:[e.jsx(O,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"Run"})]})]})]},t))})}):e.jsxs("div",{className:"flex flex-col items-center justify-center text-center space-y-3 py-8",children:[e.jsx(b,{className:"h-12 w-12 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No quick commands configured"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md leading-relaxed",children:"Quick commands let you run common tasks with one click, like starting your development server or running build scripts."}),e.jsxs("p",{className:"text-sm text-muted-foreground max-w-md mt-2",children:["Set them up in the"," ",e.jsx(C,{to:"/context/architecture/edit",className:"text-primary hover:underline font-medium",children:"Quick Commands section"}),"."]})]})]})})})]})]})}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as a,f as o}from"./index-
|
|
1
|
+
import{r,j as a,f as o}from"./index-D_Lz5G-Q.js";const v=r.forwardRef(({className:e,variant:t="default",...s},d)=>{const l="relative w-full rounded-lg border px-4 py-3 text-sm [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",i=t==="destructive"?"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive":"bg-background text-foreground";return a.jsx("div",{ref:d,role:"alert",className:o(l,i,e),...s})});v.displayName="Alert";const c=r.forwardRef(({className:e,...t},s)=>a.jsx("div",{ref:s,className:o("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{v as A,c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,f as n,bd as a}from"./index-
|
|
1
|
+
import{j as o,f as n,bd as a}from"./index-D_Lz5G-Q.js";const s=a("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:r,variant:e,...t}){return o.jsx("div",{className:n(s({variant:e}),r),...t})}export{i as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as z,r,j as e,D as G,a as J,b as K,d as Q,I as V,n as M,S as W,f as X,$ as Y,B}from"./index-
|
|
1
|
+
import{c as z,r,j as e,D as G,a as J,b as K,d as Q,I as V,n as M,S as W,f as X,$ as Y,B}from"./index-D_Lz5G-Q.js";import{B as v}from"./badge-NXKbF0v1.js";import{a as Z}from"./registry-ANRa5WBi.js";import{S as O}from"./search-C_8YfOPe.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as d,f as t}from"./index-
|
|
1
|
+
import{r,j as d,f as t}from"./index-D_Lz5G-Q.js";const o=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("rounded-xl border bg-card text-card-foreground shadow",a),...e}));o.displayName="Card";const c=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("flex flex-col space-y-1.5 p-6",a),...e}));c.displayName="CardHeader";const i=r.forwardRef(({className:a,...e},s)=>d.jsx("h3",{ref:s,className:t("font-semibold leading-none tracking-tight",a),...e}));i.displayName="CardTitle";const n=r.forwardRef(({className:a,...e},s)=>d.jsx("p",{ref:s,className:t("text-sm text-muted-foreground",a),...e}));n.displayName="CardDescription";const l=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("p-6 pt-0",a),...e}));l.displayName="CardContent";const f=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("flex items-center p-6 pt-0",a),...e}));f.displayName="CardFooter";export{o as C,l as a,c as b,i as c,n as d,f as e};
|