openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.93 kB
JavaScript
import{n as stylePromptMessage,r as stylePromptTitle}from"./prompt-style-B-J86yY8.mjs";import{t as styleSelectParams}from"./prompt-select-styled-params-CBaJGoWK.mjs";import{confirm,intro,outro,password,select,text}from"@clack/prompts";
//!src/commands/configure.shared.ts
function parseConfigureWizardSections(e){const t=[];const n=[];for(const r of Array.isArray(e)?e:[]){const e=String(r).trim();const i=CONFIGURE_WIZARD_SECTIONS.find(t=>t===e);if(i)t.push(i);else n.push(e)}return{sections:t,invalid:n}}const CONFIGURE_SECTION_OPTIONS=[{value:`workspace`,label:`Workspace`,hint:`Set workspace + sessions`},{value:`model`,label:`Model`,hint:`Pick provider + credentials`},{value:`memory`,label:`Memory search`,hint:`Choose and verify embeddings`},{value:`web`,label:`Web tools`,hint:`Configure web search (Perplexity/Brave) + fetch`},{value:`gateway`,label:`Gateway`,hint:`Port, bind, auth, tailscale`},{value:`daemon`,label:`Daemon`,hint:`Install/manage the background service`},{value:`channels`,label:`Channels`,hint:`Link WhatsApp/Telegram/etc and defaults`},{value:`plugins`,label:`Plugins`,hint:`Configure plugin settings (sandbox, tools, etc.)`},{value:`skills`,label:`Skills`,hint:`Install/enable workspace skills`},{value:`health`,label:`Health check`,hint:`Run gateway + channel checks`}];const CONFIGURE_WIZARD_SECTIONS=CONFIGURE_SECTION_OPTIONS.map(e=>e.value);const intro$1=e=>intro(stylePromptTitle(e)??e);const outro$1=e=>outro(stylePromptTitle(e)??e);function stylePromptParams(e){return{...e,message:stylePromptMessage(e.message)}}const text$1=e=>text(stylePromptParams(e));const password$1=e=>password(stylePromptParams(e));const confirm$1=e=>confirm(stylePromptParams(e));const select$1=e=>select(styleSelectParams(e));export{outro$1 as a,select$1 as c,intro$1 as i,text$1 as l,CONFIGURE_WIZARD_SECTIONS as n,parseConfigureWizardSections as o,confirm$1 as r,password$1 as s,CONFIGURE_SECTION_OPTIONS as t};