comisai 1.0.16 → 1.0.17
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/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/dist/wizard/non-interactive.js +1 -0
- package/node_modules/@comis/cli/dist/wizard/steps/01-detect-existing.js +4 -0
- package/node_modules/@comis/cli/dist/wizard/steps/07-gateway.js +9 -0
- package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.js +2 -0
- package/node_modules/@comis/cli/dist/wizard/steps/12-finish.js +5 -2
- package/node_modules/@comis/cli/dist/wizard/types.d.ts +1 -0
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +17 -2
- package/node_modules/@comis/core/dist/config/schema-gateway.js +11 -0
- package/node_modules/@comis/core/dist/config/schema.d.ts +60 -57
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +34 -6
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/android-chrome-192x192.png +0 -0
- package/node_modules/@comis/web/dist/android-chrome-512x512.png +0 -0
- package/node_modules/@comis/web/dist/apple-touch-icon.png +0 -0
- package/node_modules/@comis/web/dist/assets/agent-detail-BG9MGWWj.js +615 -0
- package/node_modules/@comis/web/dist/assets/agent-editor-C26Q_xCs.js +2173 -0
- package/node_modules/@comis/web/dist/assets/agent-list-LHCJ4rw2.js +504 -0
- package/node_modules/@comis/web/dist/assets/approvals-q9VH_IKr.js +54 -0
- package/node_modules/@comis/web/dist/assets/billing-view-CtYvBqTE.js +375 -0
- package/node_modules/@comis/web/dist/assets/channel-detail-CaInesJM.js +681 -0
- package/node_modules/@comis/web/dist/assets/channel-list-B8dj3O9a.js +323 -0
- package/node_modules/@comis/web/dist/assets/chat-console-CNmzl0JW.js +943 -0
- package/node_modules/@comis/web/dist/assets/config-editor-DX4ITw6y.js +1374 -0
- package/node_modules/@comis/web/dist/assets/context-dag-browser-BwiaF5tf.js +393 -0
- package/node_modules/@comis/web/dist/assets/context-engine-BZ5Am6hA.js +393 -0
- package/node_modules/@comis/web/dist/assets/delivery-view-OfBZof-m.js +392 -0
- package/node_modules/@comis/web/dist/assets/diagnostics-view-YFwCxgr2.js +231 -0
- package/node_modules/@comis/web/dist/assets/directive-DoeGSK_T.js +1 -0
- package/node_modules/@comis/web/dist/assets/extract-variables-BM5qyK-s.js +149 -0
- package/node_modules/@comis/web/dist/assets/ic-array-editor-B7m6x7-S.js +118 -0
- package/node_modules/@comis/web/dist/assets/ic-breadcrumb-CUMpp3BL.js +75 -0
- package/node_modules/@comis/web/dist/assets/ic-budget-segment-bar-BtJ6x5mN.js +64 -0
- package/node_modules/@comis/web/dist/assets/ic-chat-message-CFyDJd0z.js +352 -0
- package/node_modules/@comis/web/dist/assets/ic-confirm-dialog-CCDbB04e.js +110 -0
- package/node_modules/@comis/web/dist/assets/ic-connection-dot-CnT1b8xr.js +54 -0
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKUNTxHw.js +277 -0
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-GP5Fkygs.js +67 -0
- package/node_modules/@comis/web/dist/assets/ic-detail-panel-BF83r-if.js +116 -0
- package/node_modules/@comis/web/dist/assets/ic-empty-state-60l2ePhd.js +52 -0
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-C8FuSMe1.js +359 -0
- package/node_modules/@comis/web/dist/assets/ic-icon-xeGTVhVG.js +33 -0
- package/node_modules/@comis/web/dist/assets/ic-layer-waterfall-COvEYMg5.js +69 -0
- package/node_modules/@comis/web/dist/assets/ic-relative-time-3FqpjeAI.js +12 -0
- package/node_modules/@comis/web/dist/assets/ic-search-input-CSOxY9g7.js +92 -0
- package/node_modules/@comis/web/dist/assets/ic-select-Ce-Raudx.js +127 -0
- package/node_modules/@comis/web/dist/assets/ic-tabs-B7QtM_v8.js +95 -0
- package/node_modules/@comis/web/dist/assets/ic-tag-CPPUnDLF.js +33 -0
- package/node_modules/@comis/web/dist/assets/ic-time-range-picker-CypCT68y.js +93 -0
- package/node_modules/@comis/web/dist/assets/ic-tool-call-7MaXSsCW.js +146 -0
- package/node_modules/@comis/web/dist/assets/index-CEcM1R_C.js +2830 -0
- package/node_modules/@comis/web/dist/assets/index-CIJFuItj.css +1 -0
- package/node_modules/@comis/web/dist/assets/mcp-management-BNZPnpDn.js +582 -0
- package/node_modules/@comis/web/dist/assets/media-config-BBvTYxOX.js +314 -0
- package/node_modules/@comis/web/dist/assets/media-test-BkK3RCRK.js +496 -0
- package/node_modules/@comis/web/dist/assets/memory-inspector-1hDGCGat.js +1139 -0
- package/node_modules/@comis/web/dist/assets/message-center-CXefwsUu.js +785 -0
- package/node_modules/@comis/web/dist/assets/models-C1qcU_j3.js +894 -0
- package/node_modules/@comis/web/dist/assets/observability-types-D7jUtSde.js +1 -0
- package/node_modules/@comis/web/dist/assets/observe-view-C0VBhX4C.js +814 -0
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DcUUIrm0.js +1496 -0
- package/node_modules/@comis/web/dist/assets/pipeline-history-DkfOQ6SW.js +317 -0
- package/node_modules/@comis/web/dist/assets/pipeline-history-detail-hyHgD0ai.js +287 -0
- package/node_modules/@comis/web/dist/assets/pipeline-list-BPW8hV-q.js +518 -0
- package/node_modules/@comis/web/dist/assets/pipeline-monitor-Bip16T7e.js +972 -0
- package/node_modules/@comis/web/dist/assets/scheduler-BGgwKd06.js +1182 -0
- package/node_modules/@comis/web/dist/assets/security-D15st4xx.js +1224 -0
- package/node_modules/@comis/web/dist/assets/session-detail-SGEYNJ0M.js +632 -0
- package/node_modules/@comis/web/dist/assets/session-key-parser-DPORMVyU.js +1 -0
- package/node_modules/@comis/web/dist/assets/session-list-6ybUTxbY.js +231 -0
- package/node_modules/@comis/web/dist/assets/setup-wizard-nT0tz9QP.js +853 -0
- package/node_modules/@comis/web/dist/assets/skills-D8yVfSUy.js +1051 -0
- package/node_modules/@comis/web/dist/assets/subagents-HHXMeHYo.js +193 -0
- package/node_modules/@comis/web/dist/assets/workspace-manager-BQlr10iH.js +785 -0
- package/node_modules/@comis/web/dist/comis-logo.png +0 -0
- package/node_modules/@comis/web/dist/favicon-16x16.png +0 -0
- package/node_modules/@comis/web/dist/favicon-32x32.png +0 -0
- package/node_modules/@comis/web/dist/favicon.ico +0 -0
- package/node_modules/@comis/web/dist/index.html +17 -0
- package/node_modules/@comis/web/package.json +29 -0
- package/package.json +15 -13
|
@@ -0,0 +1,853 @@
|
|
|
1
|
+
import{a as _,I as m,A as n,b as s,s as w,f as x,i as $,n as k,r as p,t as C}from"./index-CEcM1R_C.js";import"./ic-icon-xeGTVhVG.js";var D=Object.defineProperty,z=Object.getOwnPropertyDescriptor,c=(e,a,t,r)=>{for(var i=r>1?void 0:r?z(a,t):a,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=(r?o(a,t,i):o(i))||i);return r&&i&&D(a,t,i),i};const b=[{label:"Basics",icon:"settings"},{label:"Provider",icon:"server"},{label:"Agent",icon:"agent"},{label:"Channels",icon:"channel"},{label:"Review",icon:"check"}],f=[{key:"anthropic",type:"anthropic",name:"Anthropic",description:"Claude models, recommended for agents",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"claude-sonnet-4-5-20250929"},{key:"openai",type:"openai",name:"OpenAI",description:"GPT-4o, o1, o3 models",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"gpt-4o"},{key:"google",type:"google",name:"Google",description:"Gemini models",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"gemini-2.0-flash"},{key:"groq",type:"groq",name:"Groq",description:"Fast inference (Llama, Mixtral)",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"llama-3.3-70b-versatile"},{key:"mistral",type:"mistral",name:"Mistral",description:"Mistral models",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"mistral-large-latest"},{key:"deepseek",type:"deepseek",name:"DeepSeek",description:"DeepSeek models",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"deepseek-chat"},{key:"xai",type:"xai",name:"xAI",description:"Grok models",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"grok-2"},{key:"together",type:"together",name:"Together AI",description:"Open-source model hosting",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo"},{key:"cerebras",type:"cerebras",name:"Cerebras",description:"Fast inference",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"llama-3.3-70b"},{key:"openrouter",type:"openrouter",name:"OpenRouter",description:"Multi-provider routing",needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:"",defaultModel:"anthropic/claude-sonnet-4-5-20250929"},{key:"ollama",type:"ollama",name:"Ollama",description:"Local open-source models, no API key needed",needsApiKey:!1,needsBaseUrl:!0,defaultBaseUrl:"http://localhost:11434",defaultModel:"llama3"},{key:"custom",type:"openai",name:"Custom",description:"Any OpenAI-compatible API endpoint",needsApiKey:!1,needsBaseUrl:!0,defaultBaseUrl:"",defaultModel:""}],g=[{key:"telegram",label:"Telegram",fields:[{key:"botToken",label:"Bot Token",type:"password"},{key:"allowedChatIds",label:"Allowed Chat IDs",type:"text",placeholder:"Comma-separated IDs"}]},{key:"discord",label:"Discord",fields:[{key:"botToken",label:"Bot Token",type:"password"},{key:"guildIds",label:"Guild IDs",type:"text",placeholder:"Comma-separated IDs"}]},{key:"slack",label:"Slack",fields:[{key:"botToken",label:"Bot Token",type:"password"},{key:"appToken",label:"App Token",type:"password"},{key:"signingSecret",label:"Signing Secret",type:"password"}]},{key:"whatsapp",label:"WhatsApp",fields:[{key:"phoneNumberId",label:"Phone Number ID",type:"text"},{key:"accessToken",label:"Access Token",type:"password"},{key:"verifyToken",label:"Verify Token",type:"text"}]},{key:"line",label:"LINE",fields:[{key:"channelAccessToken",label:"Channel Access Token",type:"password"},{key:"channelSecret",label:"Channel Secret",type:"password"}]},{key:"signal",label:"Signal",fields:[{key:"phone",label:"Phone Number",type:"text"},{key:"signalCliPath",label:"Signal CLI Path",type:"text"}]},{key:"irc",label:"IRC",fields:[{key:"server",label:"Server",type:"text"},{key:"port",label:"Port",type:"number",defaultValue:"6667"},{key:"nick",label:"Nickname",type:"text"},{key:"channels",label:"Channels",type:"text",placeholder:"Comma-separated, e.g. #general,#dev"}]},{key:"imessage",label:"iMessage",fields:[{key:"applescriptPath",label:"AppleScript Path",type:"text",placeholder:"Requires macOS with Messages app"}]}],S=["trace","debug","info","warn","error"];function h(e,a=0){const t=" ".repeat(a);if(e==null)return`${t}~
|
|
2
|
+
`;if(typeof e=="string")return e===""||/[:#[\]{},&*!|>'"@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.length===0?`[]
|
|
3
|
+
`:e.map(r=>{if(typeof r=="object"&&r!==null){const i=h(r,a+1),l=i.split(`
|
|
4
|
+
`).filter(Boolean);if(l.length>0){const o=" ".repeat(a+1);return`${t}- ${l[0].substring(o.length)}
|
|
5
|
+
${l.slice(1).map(u=>`${t} ${u.substring(o.length)}
|
|
6
|
+
`).join("")}`}return`${t}- ${i.trim()}
|
|
7
|
+
`}return`${t}- ${h(r,0)}
|
|
8
|
+
`}).join("");if(typeof e=="object"){const r=Object.entries(e).filter(([,i])=>i!=null&&i!=="");return r.length===0?`{}
|
|
9
|
+
`:r.map(([i,l])=>{if(typeof l=="object"&&!Array.isArray(l)){const o=h(l,a+1);return`${t}${i}:
|
|
10
|
+
${o}`}if(Array.isArray(l)){const o=h(l,a+1);return`${t}${i}:
|
|
11
|
+
${o}`}return`${t}${i}: ${h(l,0)}
|
|
12
|
+
`}).join("")}return String(e)}function P(){const e={};for(const a of g)e[a.key]={enabled:!1,credentials:{}};return{tenantId:"default",dataDir:"~/.comis",logLevel:"info",gatewayHost:"127.0.0.1",gatewayPort:4766,providerName:"",providerType:"",apiKey:"",baseUrl:"",defaultModel:"",agentId:"default",agentName:"Comis",agentModel:"",agentProvider:"",maxSteps:50,budgetPerDay:1e8,budgetPerHour:1e7,channels:e}}let d=class extends _{constructor(){super(...arguments),this.rpcClient=null,this._currentStep=0,this._wizardData=P(),this._testResult={status:"idle"},this._expandedChannels=new Set,this._yamlPreview="",this._applying=!1,this._applyStatus="",this._applyDone=!1,this._validationErrors={}}_validateStep(e){const a={};switch(e){case 0:this._wizardData.tenantId.trim()||(a.tenantId="Tenant ID is required");break;case 1:{this._wizardData.providerType||(a.providerType="Please select a provider");const t=f.find(r=>r.key===this._wizardData.providerName);t?.needsApiKey&&!this._wizardData.apiKey.trim()&&(a.apiKey="API key is required for this provider"),t?.needsBaseUrl&&!this._wizardData.baseUrl.trim()&&(a.baseUrl="Base URL is required for this provider");break}case 2:this._wizardData.agentId.trim()||(a.agentId="Agent ID is required");break}return this._validationErrors=a,Object.keys(a).length===0}_goNext(){this._validateStep(this._currentStep)&&(this._currentStep===3&&this._generateYaml(),this._currentStep===1&&(this._wizardData.agentModel||(this._wizardData={...this._wizardData,agentModel:this._wizardData.defaultModel,agentProvider:this._wizardData.providerName})),this._currentStep=Math.min(this._currentStep+1,b.length-1),this._validationErrors={})}_goBack(){this._currentStep=Math.max(this._currentStep-1,0),this._validationErrors={}}_selectProvider(e){this._wizardData={...this._wizardData,providerName:e.key,providerType:e.type,baseUrl:e.defaultBaseUrl,defaultModel:e.defaultModel},this._testResult={status:"idle"},this._validationErrors={}}async _testConnection(){if(this.rpcClient){this._testResult={status:"testing"};try{await this.rpcClient.call("models.test",{provider:this._wizardData.providerType}),this._testResult={status:"success",message:"Connected"}}catch(e){const a=e instanceof Error?e.message:"Connection failed";this._testResult={status:"error",message:a}}}}_toggleChannel(e){const a=this._wizardData.channels[e],t={...this._wizardData.channels,[e]:{...a,enabled:!a.enabled}};if(this._wizardData={...this._wizardData,channels:t},!a.enabled){const r=new Set(this._expandedChannels);r.add(e),this._expandedChannels=r}}_toggleExpand(e){const a=new Set(this._expandedChannels);a.has(e)?a.delete(e):a.add(e),this._expandedChannels=a}_updateChannelCredential(e,a,t){const r=this._wizardData.channels[e],i={...r.credentials,[a]:t},l={...this._wizardData.channels,[e]:{...r,credentials:i}};this._wizardData={...this._wizardData,channels:l}}_generateYaml(){const e=this._wizardData,a={};if(e.tenantId&&e.tenantId!=="default"&&(a.tenantId=e.tenantId),a.logLevel=e.logLevel,a.dataDir=e.dataDir,a.gateway={enabled:!0,host:e.gatewayHost,port:e.gatewayPort},e.providerName){const i={};e.apiKey&&(i.apiKeyName="env:"+e.providerName.toUpperCase()+"_API_KEY"),e.baseUrl&&(i.baseUrl=e.baseUrl),a.providers={[e.providerName]:i},e.defaultModel&&(a.models={defaultProvider:e.providerName,defaultModel:e.defaultModel})}const t={name:e.agentName,model:e.agentModel||e.defaultModel,provider:e.agentProvider||e.providerName,maxSteps:e.maxSteps,budgets:{perExecution:2e6,perHour:e.budgetPerHour,perDay:e.budgetPerDay}};a.agents={[e.agentId]:t};const r={};for(const[i,l]of Object.entries(e.channels)){if(!l.enabled)continue;const o={enabled:!0};for(const[u,v]of Object.entries(l.credentials))v&&(u==="allowedChatIds"?o.allowFrom=v.split(",").map(y=>y.trim()).filter(Boolean):o[u]=v);r[i]=o}Object.keys(r).length>0&&(a.channels=r),this._yamlPreview=h(a)}async _copyYaml(){try{await navigator.clipboard.writeText(this._yamlPreview),m.show("Copied to clipboard","success")}catch{m.show("Failed to copy","error")}}_downloadYaml(){const e=new Blob([this._yamlPreview],{type:"text/yaml"}),a=URL.createObjectURL(e),t=document.createElement("a");t.href=a,t.download="comis-config.yaml",t.click(),URL.revokeObjectURL(a)}async _applyConfig(){if(!this.rpcClient||this._applying)return;this._applying=!0,this._applyDone=!1;const e=this._wizardData,a=[];e.providerName&&e.defaultModel&&a.push({label:"models",section:"models",value:{defaultProvider:e.providerName,defaultModel:e.defaultModel}});const t=[];t.push("agents"),t.push("gateway"),e.providerName&&t.push("providers"),Object.values(e.channels).some(l=>l.enabled)&&t.push("channels");let i=0;for(const l of a){this._applyStatus=`Applying ${l.label}...`;try{await this.rpcClient.call("config.apply",{section:l.section,value:l.value}),i++}catch(o){const u=o instanceof Error?o.message:"Failed to apply configuration";m.show(`${l.label}: ${u}`,"error")}}this._applying=!1,this._applyStatus="",this._applyDone=!0,t.length>0?m.show(`Applied ${i} section(s). ${t.join(", ")} require saving the config file and restarting the daemon. Use Copy or Download to get the full config.`,"info"):m.show("Configuration applied! Restart the daemon to activate.","success")}_goToDashboard(){this.dispatchEvent(new CustomEvent("navigate",{detail:"dashboard",bubbles:!0,composed:!0}))}_renderStep1(){const e=this._wizardData,a=this._validationErrors;return s`
|
|
13
|
+
<div class="form-container">
|
|
14
|
+
<div class="form-field">
|
|
15
|
+
<label class="form-label">Tenant ID</label>
|
|
16
|
+
<input
|
|
17
|
+
class="form-input"
|
|
18
|
+
type="text"
|
|
19
|
+
.value=${e.tenantId}
|
|
20
|
+
@input=${t=>{this._wizardData={...this._wizardData,tenantId:t.target.value}}}
|
|
21
|
+
/>
|
|
22
|
+
<span class="form-hint">Unique identifier for this installation</span>
|
|
23
|
+
${a.tenantId?s`<span class="form-error">${a.tenantId}</span>`:n}
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="form-field">
|
|
27
|
+
<label class="form-label">Data Directory</label>
|
|
28
|
+
<input
|
|
29
|
+
class="form-input"
|
|
30
|
+
type="text"
|
|
31
|
+
.value=${e.dataDir}
|
|
32
|
+
@input=${t=>{this._wizardData={...this._wizardData,dataDir:t.target.value}}}
|
|
33
|
+
/>
|
|
34
|
+
<span class="form-hint">Where Comis stores databases and logs</span>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="form-field">
|
|
38
|
+
<label class="form-label">Log Level</label>
|
|
39
|
+
${this._renderLogLevelSelect()}
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="form-field">
|
|
43
|
+
<label class="form-label">Gateway Host</label>
|
|
44
|
+
<input
|
|
45
|
+
class="form-input"
|
|
46
|
+
type="text"
|
|
47
|
+
.value=${e.gatewayHost}
|
|
48
|
+
@input=${t=>{this._wizardData={...this._wizardData,gatewayHost:t.target.value}}}
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="form-field">
|
|
53
|
+
<label class="form-label">Gateway Port</label>
|
|
54
|
+
<input
|
|
55
|
+
class="form-input"
|
|
56
|
+
type="number"
|
|
57
|
+
min="1"
|
|
58
|
+
max="65535"
|
|
59
|
+
.value=${String(e.gatewayPort)}
|
|
60
|
+
@input=${t=>{this._wizardData={...this._wizardData,gatewayPort:Number(t.target.value)||4766}}}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`}_renderLogLevelSelect(){return s`
|
|
65
|
+
<select
|
|
66
|
+
class="form-select"
|
|
67
|
+
@change=${e=>{this._wizardData={...this._wizardData,logLevel:e.target.value}}}
|
|
68
|
+
>
|
|
69
|
+
${S.map(e=>s`<option value=${e} ?selected=${e===this._wizardData.logLevel}>${e}</option>`)}
|
|
70
|
+
</select>
|
|
71
|
+
`}_renderStep2(){const e=this._wizardData,a=this._validationErrors,t=f.find(r=>r.key===e.providerName);return s`
|
|
72
|
+
<div class="provider-grid">
|
|
73
|
+
${f.map(r=>s`
|
|
74
|
+
<div
|
|
75
|
+
class="provider-card ${e.providerName===r.key?"active":""}"
|
|
76
|
+
role="button"
|
|
77
|
+
tabindex="0"
|
|
78
|
+
aria-pressed=${e.providerName===r.key?"true":"false"}
|
|
79
|
+
@click=${()=>this._selectProvider(r)}
|
|
80
|
+
@keydown=${i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this._selectProvider(r))}}
|
|
81
|
+
>
|
|
82
|
+
<div class="provider-card-name">${r.name}</div>
|
|
83
|
+
<div class="provider-card-desc">${r.description}</div>
|
|
84
|
+
</div>
|
|
85
|
+
`)}
|
|
86
|
+
</div>
|
|
87
|
+
${a.providerType?s`<span class="form-error">${a.providerType}</span>`:n}
|
|
88
|
+
|
|
89
|
+
${t?this._renderProviderConfig(t):n}
|
|
90
|
+
`}_renderProviderConfig(e){const a=this._wizardData,t=this._validationErrors;return s`
|
|
91
|
+
<div class="provider-config">
|
|
92
|
+
${e.needsApiKey?s`
|
|
93
|
+
<div class="form-field">
|
|
94
|
+
<label class="form-label">API Key</label>
|
|
95
|
+
<input
|
|
96
|
+
class="form-input"
|
|
97
|
+
type="password"
|
|
98
|
+
.value=${a.apiKey}
|
|
99
|
+
placeholder="Enter your API key"
|
|
100
|
+
@input=${r=>{this._wizardData={...this._wizardData,apiKey:r.target.value}}}
|
|
101
|
+
/>
|
|
102
|
+
${t.apiKey?s`<span class="form-error">${t.apiKey}</span>`:n}
|
|
103
|
+
</div>
|
|
104
|
+
`:n}
|
|
105
|
+
|
|
106
|
+
${e.needsBaseUrl?s`
|
|
107
|
+
<div class="form-field">
|
|
108
|
+
<label class="form-label">Base URL</label>
|
|
109
|
+
<input
|
|
110
|
+
class="form-input"
|
|
111
|
+
type="text"
|
|
112
|
+
.value=${a.baseUrl}
|
|
113
|
+
placeholder=${e.defaultBaseUrl||"https://api.example.com"}
|
|
114
|
+
@input=${r=>{this._wizardData={...this._wizardData,baseUrl:r.target.value}}}
|
|
115
|
+
/>
|
|
116
|
+
${t.baseUrl?s`<span class="form-error">${t.baseUrl}</span>`:n}
|
|
117
|
+
</div>
|
|
118
|
+
`:n}
|
|
119
|
+
|
|
120
|
+
<div class="form-field">
|
|
121
|
+
<label class="form-label">Default Model</label>
|
|
122
|
+
<input
|
|
123
|
+
class="form-input"
|
|
124
|
+
type="text"
|
|
125
|
+
.value=${a.defaultModel}
|
|
126
|
+
placeholder=${e.defaultModel||"Model ID"}
|
|
127
|
+
@input=${r=>{this._wizardData={...this._wizardData,defaultModel:r.target.value}}}
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="test-row">
|
|
132
|
+
<button
|
|
133
|
+
class="test-btn"
|
|
134
|
+
?disabled=${this._testResult.status==="testing"}
|
|
135
|
+
@click=${()=>this._testConnection()}
|
|
136
|
+
>
|
|
137
|
+
${this._testResult.status==="testing"?"Testing...":"Test Connection"}
|
|
138
|
+
</button>
|
|
139
|
+
${this._testResult.status==="success"?s`<span class="test-success">Connected</span>`:n}
|
|
140
|
+
${this._testResult.status==="error"?s`<span class="test-error">${this._testResult.message}</span>`:n}
|
|
141
|
+
${this._testResult.status==="testing"?s`<span class="test-spinner">Connecting...</span>`:n}
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
`}_renderStep3(){const e=this._wizardData,a=this._validationErrors;return s`
|
|
145
|
+
<div class="form-container">
|
|
146
|
+
<div class="info-box">
|
|
147
|
+
The agent will use the provider configured in Step 2. You can add more agents later from the Agents view.
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div class="form-field">
|
|
151
|
+
<label class="form-label">Agent ID</label>
|
|
152
|
+
<input
|
|
153
|
+
class="form-input"
|
|
154
|
+
type="text"
|
|
155
|
+
.value=${e.agentId}
|
|
156
|
+
@input=${t=>{this._wizardData={...this._wizardData,agentId:t.target.value}}}
|
|
157
|
+
/>
|
|
158
|
+
<span class="form-hint">Unique identifier (letters, numbers, hyphens)</span>
|
|
159
|
+
${a.agentId?s`<span class="form-error">${a.agentId}</span>`:n}
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<div class="form-field">
|
|
163
|
+
<label class="form-label">Agent Name</label>
|
|
164
|
+
<input
|
|
165
|
+
class="form-input"
|
|
166
|
+
type="text"
|
|
167
|
+
.value=${e.agentName}
|
|
168
|
+
@input=${t=>{this._wizardData={...this._wizardData,agentName:t.target.value}}}
|
|
169
|
+
/>
|
|
170
|
+
<span class="form-hint">Display name for the agent</span>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div class="form-field">
|
|
174
|
+
<label class="form-label">Model</label>
|
|
175
|
+
<input
|
|
176
|
+
class="form-input"
|
|
177
|
+
type="text"
|
|
178
|
+
.value=${e.agentModel}
|
|
179
|
+
@input=${t=>{this._wizardData={...this._wizardData,agentModel:t.target.value}}}
|
|
180
|
+
/>
|
|
181
|
+
<span class="form-hint">LLM model ID to use</span>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<div class="form-field">
|
|
185
|
+
<label class="form-label">Provider</label>
|
|
186
|
+
<input
|
|
187
|
+
class="form-input"
|
|
188
|
+
type="text"
|
|
189
|
+
.value=${e.agentProvider}
|
|
190
|
+
readonly
|
|
191
|
+
/>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div class="form-field">
|
|
195
|
+
<label class="form-label">Max Steps</label>
|
|
196
|
+
<input
|
|
197
|
+
class="form-input"
|
|
198
|
+
type="number"
|
|
199
|
+
min="1"
|
|
200
|
+
max="100"
|
|
201
|
+
.value=${String(e.maxSteps)}
|
|
202
|
+
@input=${t=>{this._wizardData={...this._wizardData,maxSteps:Number(t.target.value)||25}}}
|
|
203
|
+
/>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<div class="form-field">
|
|
207
|
+
<label class="form-label">Budget Per Day (tokens)</label>
|
|
208
|
+
<input
|
|
209
|
+
class="form-input"
|
|
210
|
+
type="number"
|
|
211
|
+
min="0"
|
|
212
|
+
step="0.01"
|
|
213
|
+
.value=${String(e.budgetPerDay)}
|
|
214
|
+
@input=${t=>{this._wizardData={...this._wizardData,budgetPerDay:Number(t.target.value)||0}}}
|
|
215
|
+
/>
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
<div class="form-field">
|
|
219
|
+
<label class="form-label">Budget Per Hour (tokens)</label>
|
|
220
|
+
<input
|
|
221
|
+
class="form-input"
|
|
222
|
+
type="number"
|
|
223
|
+
min="0"
|
|
224
|
+
step="0.01"
|
|
225
|
+
.value=${String(e.budgetPerHour)}
|
|
226
|
+
@input=${t=>{this._wizardData={...this._wizardData,budgetPerHour:Number(t.target.value)||0}}}
|
|
227
|
+
/>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
`}_renderStep4(){return s`
|
|
231
|
+
<div class="info-box">
|
|
232
|
+
Enable the channels you want to connect. You can configure more channels later.
|
|
233
|
+
</div>
|
|
234
|
+
<div class="channel-cards">
|
|
235
|
+
${g.map(e=>this._renderChannelCard(e))}
|
|
236
|
+
</div>
|
|
237
|
+
`}_renderChannelCard(e){const a=this._wizardData.channels[e.key],t=this._expandedChannels.has(e.key);return s`
|
|
238
|
+
<div class="channel-card">
|
|
239
|
+
<div
|
|
240
|
+
class="channel-header"
|
|
241
|
+
@click=${()=>this._toggleExpand(e.key)}
|
|
242
|
+
>
|
|
243
|
+
<ic-platform-icon platform=${e.key} size="20px"></ic-platform-icon>
|
|
244
|
+
<span class="channel-name">${e.label}</span>
|
|
245
|
+
<button
|
|
246
|
+
class="channel-toggle ${a.enabled?"enabled":""}"
|
|
247
|
+
aria-label="${a.enabled?"Disable":"Enable"} ${e.label}"
|
|
248
|
+
@click=${r=>{r.stopPropagation(),this._toggleChannel(e.key)}}
|
|
249
|
+
></button>
|
|
250
|
+
<span class="channel-expand ${t?"open":""}">▼</span>
|
|
251
|
+
</div>
|
|
252
|
+
${t?s`
|
|
253
|
+
<div class="channel-body">
|
|
254
|
+
${this._renderChannelFields(e)}
|
|
255
|
+
</div>
|
|
256
|
+
`:n}
|
|
257
|
+
</div>
|
|
258
|
+
`}_renderChannelFields(e){switch(e.key){case"telegram":return this._renderTelegramFields();case"discord":return this._renderDiscordFields();case"slack":return this._renderSlackFields();case"whatsapp":return this._renderWhatsappFields();case"line":return this._renderLineFields();case"signal":return this._renderSignalFields();case"irc":return this._renderIrcFields();case"imessage":return this._renderImessageFields();default:return n}}_renderTelegramFields(){const e=this._wizardData.channels.telegram.credentials;return s`
|
|
259
|
+
<div class="form-field">
|
|
260
|
+
<label class="form-label">Bot Token</label>
|
|
261
|
+
<input class="form-input" type="password" .value=${e.botToken??""}
|
|
262
|
+
@input=${a=>this._updateChannelCredential("telegram","botToken",a.target.value)} />
|
|
263
|
+
</div>
|
|
264
|
+
<div class="form-field">
|
|
265
|
+
<label class="form-label">Allowed Chat IDs</label>
|
|
266
|
+
<input class="form-input" type="text" placeholder="Comma-separated IDs" .value=${e.allowedChatIds??""}
|
|
267
|
+
@input=${a=>this._updateChannelCredential("telegram","allowedChatIds",a.target.value)} />
|
|
268
|
+
</div>
|
|
269
|
+
`}_renderDiscordFields(){const e=this._wizardData.channels.discord.credentials;return s`
|
|
270
|
+
<div class="form-field">
|
|
271
|
+
<label class="form-label">Bot Token</label>
|
|
272
|
+
<input class="form-input" type="password" .value=${e.botToken??""}
|
|
273
|
+
@input=${a=>this._updateChannelCredential("discord","botToken",a.target.value)} />
|
|
274
|
+
</div>
|
|
275
|
+
<div class="form-field">
|
|
276
|
+
<label class="form-label">Guild IDs</label>
|
|
277
|
+
<input class="form-input" type="text" placeholder="Comma-separated IDs" .value=${e.guildIds??""}
|
|
278
|
+
@input=${a=>this._updateChannelCredential("discord","guildIds",a.target.value)} />
|
|
279
|
+
</div>
|
|
280
|
+
`}_renderSlackFields(){const e=this._wizardData.channels.slack.credentials;return s`
|
|
281
|
+
<div class="form-field">
|
|
282
|
+
<label class="form-label">Bot Token</label>
|
|
283
|
+
<input class="form-input" type="password" .value=${e.botToken??""}
|
|
284
|
+
@input=${a=>this._updateChannelCredential("slack","botToken",a.target.value)} />
|
|
285
|
+
</div>
|
|
286
|
+
<div class="form-field">
|
|
287
|
+
<label class="form-label">App Token</label>
|
|
288
|
+
<input class="form-input" type="password" .value=${e.appToken??""}
|
|
289
|
+
@input=${a=>this._updateChannelCredential("slack","appToken",a.target.value)} />
|
|
290
|
+
</div>
|
|
291
|
+
<div class="form-field">
|
|
292
|
+
<label class="form-label">Signing Secret</label>
|
|
293
|
+
<input class="form-input" type="password" .value=${e.signingSecret??""}
|
|
294
|
+
@input=${a=>this._updateChannelCredential("slack","signingSecret",a.target.value)} />
|
|
295
|
+
</div>
|
|
296
|
+
`}_renderWhatsappFields(){const e=this._wizardData.channels.whatsapp.credentials;return s`
|
|
297
|
+
<div class="form-field">
|
|
298
|
+
<label class="form-label">Phone Number ID</label>
|
|
299
|
+
<input class="form-input" type="text" .value=${e.phoneNumberId??""}
|
|
300
|
+
@input=${a=>this._updateChannelCredential("whatsapp","phoneNumberId",a.target.value)} />
|
|
301
|
+
</div>
|
|
302
|
+
<div class="form-field">
|
|
303
|
+
<label class="form-label">Access Token</label>
|
|
304
|
+
<input class="form-input" type="password" .value=${e.accessToken??""}
|
|
305
|
+
@input=${a=>this._updateChannelCredential("whatsapp","accessToken",a.target.value)} />
|
|
306
|
+
</div>
|
|
307
|
+
<div class="form-field">
|
|
308
|
+
<label class="form-label">Verify Token</label>
|
|
309
|
+
<input class="form-input" type="text" .value=${e.verifyToken??""}
|
|
310
|
+
@input=${a=>this._updateChannelCredential("whatsapp","verifyToken",a.target.value)} />
|
|
311
|
+
</div>
|
|
312
|
+
`}_renderLineFields(){const e=this._wizardData.channels.line.credentials;return s`
|
|
313
|
+
<div class="form-field">
|
|
314
|
+
<label class="form-label">Channel Access Token</label>
|
|
315
|
+
<input class="form-input" type="password" .value=${e.channelAccessToken??""}
|
|
316
|
+
@input=${a=>this._updateChannelCredential("line","channelAccessToken",a.target.value)} />
|
|
317
|
+
</div>
|
|
318
|
+
<div class="form-field">
|
|
319
|
+
<label class="form-label">Channel Secret</label>
|
|
320
|
+
<input class="form-input" type="password" .value=${e.channelSecret??""}
|
|
321
|
+
@input=${a=>this._updateChannelCredential("line","channelSecret",a.target.value)} />
|
|
322
|
+
</div>
|
|
323
|
+
`}_renderSignalFields(){const e=this._wizardData.channels.signal.credentials;return s`
|
|
324
|
+
<div class="form-field">
|
|
325
|
+
<label class="form-label">Phone Number</label>
|
|
326
|
+
<input class="form-input" type="text" .value=${e.phone??""}
|
|
327
|
+
@input=${a=>this._updateChannelCredential("signal","phone",a.target.value)} />
|
|
328
|
+
</div>
|
|
329
|
+
<div class="form-field">
|
|
330
|
+
<label class="form-label">Signal CLI Path</label>
|
|
331
|
+
<input class="form-input" type="text" .value=${e.signalCliPath??""}
|
|
332
|
+
@input=${a=>this._updateChannelCredential("signal","signalCliPath",a.target.value)} />
|
|
333
|
+
</div>
|
|
334
|
+
`}_renderIrcFields(){const e=this._wizardData.channels.irc.credentials;return s`
|
|
335
|
+
<div class="form-field">
|
|
336
|
+
<label class="form-label">Server</label>
|
|
337
|
+
<input class="form-input" type="text" .value=${e.server??""}
|
|
338
|
+
@input=${a=>this._updateChannelCredential("irc","server",a.target.value)} />
|
|
339
|
+
</div>
|
|
340
|
+
<div class="form-field">
|
|
341
|
+
<label class="form-label">Port</label>
|
|
342
|
+
<input class="form-input" type="number" .value=${e.port??"6667"}
|
|
343
|
+
@input=${a=>this._updateChannelCredential("irc","port",a.target.value)} />
|
|
344
|
+
</div>
|
|
345
|
+
<div class="form-field">
|
|
346
|
+
<label class="form-label">Nickname</label>
|
|
347
|
+
<input class="form-input" type="text" .value=${e.nick??""}
|
|
348
|
+
@input=${a=>this._updateChannelCredential("irc","nick",a.target.value)} />
|
|
349
|
+
</div>
|
|
350
|
+
<div class="form-field">
|
|
351
|
+
<label class="form-label">Channels</label>
|
|
352
|
+
<input class="form-input" type="text" placeholder="Comma-separated, e.g. #general,#dev" .value=${e.channels??""}
|
|
353
|
+
@input=${a=>this._updateChannelCredential("irc","channels",a.target.value)} />
|
|
354
|
+
</div>
|
|
355
|
+
`}_renderImessageFields(){const e=this._wizardData.channels.imessage.credentials;return s`
|
|
356
|
+
<div class="form-field">
|
|
357
|
+
<label class="form-label">AppleScript Path</label>
|
|
358
|
+
<input class="form-input" type="text" placeholder="Requires macOS with Messages app" .value=${e.applescriptPath??""}
|
|
359
|
+
@input=${a=>this._updateChannelCredential("imessage","applescriptPath",a.target.value)} />
|
|
360
|
+
</div>
|
|
361
|
+
`}_renderStep5(){return s`
|
|
362
|
+
<div class="yaml-preview">${this._yamlPreview}</div>
|
|
363
|
+
<div class="review-actions">
|
|
364
|
+
<button class="btn btn-secondary" @click=${()=>this._copyYaml()}>Copy</button>
|
|
365
|
+
<button class="btn btn-secondary" @click=${()=>this._downloadYaml()}>Download</button>
|
|
366
|
+
<button class="btn btn-primary" ?disabled=${this._applying} @click=${()=>this._applyConfig()}>
|
|
367
|
+
${this._applying?"Applying...":"Apply"}
|
|
368
|
+
</button>
|
|
369
|
+
</div>
|
|
370
|
+
${this._applyStatus?s`<div class="apply-status">${this._applyStatus}</div>`:n}
|
|
371
|
+
${this._applyDone?s`
|
|
372
|
+
<div class="dashboard-link">
|
|
373
|
+
<a @click=${e=>{e.preventDefault(),this._goToDashboard()}}>Go to Dashboard</a>
|
|
374
|
+
</div>
|
|
375
|
+
`:n}
|
|
376
|
+
`}_renderStepBar(){return s`
|
|
377
|
+
<div class="step-bar" role="navigation" aria-label="Setup wizard progress">
|
|
378
|
+
${b.map((e,a)=>{const t=a<this._currentStep,r=a===this._currentStep,i=t?"completed":r?"current":"",l=t?"completed":r?"current":"";return s`
|
|
379
|
+
${a>0?s`<div class="step-line ${a<=this._currentStep?"completed":""}"></div>`:n}
|
|
380
|
+
<div class="step-item">
|
|
381
|
+
<div class="step-circle ${i}" aria-label="Step ${a+1}: ${e.label}">
|
|
382
|
+
${t?s`✓`:s`${a+1}`}
|
|
383
|
+
</div>
|
|
384
|
+
<span class="step-label ${l}">${e.label}</span>
|
|
385
|
+
</div>
|
|
386
|
+
`})}
|
|
387
|
+
</div>
|
|
388
|
+
`}render(){return s`
|
|
389
|
+
<div class="wizard-header">
|
|
390
|
+
<div class="wizard-title">Setup Wizard</div>
|
|
391
|
+
<div class="wizard-subtitle">Configure your Comis installation step by step</div>
|
|
392
|
+
</div>
|
|
393
|
+
|
|
394
|
+
${this._renderStepBar()}
|
|
395
|
+
|
|
396
|
+
<div class="step-content">
|
|
397
|
+
${this._currentStep===0?this._renderStep1():n}
|
|
398
|
+
${this._currentStep===1?this._renderStep2():n}
|
|
399
|
+
${this._currentStep===2?this._renderStep3():n}
|
|
400
|
+
${this._currentStep===3?this._renderStep4():n}
|
|
401
|
+
${this._currentStep===4?this._renderStep5():n}
|
|
402
|
+
</div>
|
|
403
|
+
|
|
404
|
+
<div class="nav-bar">
|
|
405
|
+
${this._currentStep>0?s`<button class="btn btn-secondary" @click=${()=>this._goBack()}>Back</button>`:s`<div class="nav-spacer"></div>`}
|
|
406
|
+
${this._currentStep<4?s`<button class="btn btn-primary" @click=${()=>this._goNext()}>
|
|
407
|
+
${this._currentStep===3?"Review":"Next"}
|
|
408
|
+
</button>`:s`<div class="nav-spacer"></div>`}
|
|
409
|
+
</div>
|
|
410
|
+
`}};d.styles=[w,x,$`
|
|
411
|
+
:host {
|
|
412
|
+
display: block;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.wizard-header {
|
|
416
|
+
margin-bottom: var(--ic-space-lg);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.wizard-title {
|
|
420
|
+
font-size: 1.125rem;
|
|
421
|
+
font-weight: 600;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.wizard-subtitle {
|
|
425
|
+
font-size: var(--ic-text-sm);
|
|
426
|
+
color: var(--ic-text-muted);
|
|
427
|
+
margin-top: var(--ic-space-xs);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* Step progress bar */
|
|
431
|
+
.step-bar {
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: flex-start;
|
|
434
|
+
justify-content: center;
|
|
435
|
+
gap: 0;
|
|
436
|
+
margin-bottom: var(--ic-space-xl, 2rem);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.step-item {
|
|
440
|
+
display: flex;
|
|
441
|
+
flex-direction: column;
|
|
442
|
+
align-items: center;
|
|
443
|
+
min-width: 80px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.step-circle {
|
|
447
|
+
width: 32px;
|
|
448
|
+
height: 32px;
|
|
449
|
+
border-radius: 50%;
|
|
450
|
+
display: flex;
|
|
451
|
+
align-items: center;
|
|
452
|
+
justify-content: center;
|
|
453
|
+
font-size: var(--ic-text-sm);
|
|
454
|
+
font-weight: 600;
|
|
455
|
+
border: 2px solid var(--ic-border);
|
|
456
|
+
background: var(--ic-surface-2);
|
|
457
|
+
color: var(--ic-text-dim);
|
|
458
|
+
position: relative;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.step-circle.completed {
|
|
462
|
+
background: var(--ic-accent);
|
|
463
|
+
border-color: var(--ic-accent);
|
|
464
|
+
color: white;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.step-circle.current {
|
|
468
|
+
border-color: var(--ic-accent);
|
|
469
|
+
color: var(--ic-accent);
|
|
470
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ic-accent) 25%, transparent);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.step-label {
|
|
474
|
+
font-size: var(--ic-text-xs);
|
|
475
|
+
margin-top: var(--ic-space-xs);
|
|
476
|
+
color: var(--ic-text-dim);
|
|
477
|
+
text-align: center;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.step-label.current {
|
|
481
|
+
color: var(--ic-text);
|
|
482
|
+
font-weight: 500;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.step-label.completed {
|
|
486
|
+
color: var(--ic-text-muted);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.step-line {
|
|
490
|
+
flex: 1;
|
|
491
|
+
height: 2px;
|
|
492
|
+
background: var(--ic-border);
|
|
493
|
+
margin-top: 16px;
|
|
494
|
+
min-width: 40px;
|
|
495
|
+
max-width: 80px;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.step-line.completed {
|
|
499
|
+
background: var(--ic-accent);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* Step content area */
|
|
503
|
+
.step-content {
|
|
504
|
+
max-width: 640px;
|
|
505
|
+
margin: 0 auto;
|
|
506
|
+
min-height: 300px;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/* Form styling */
|
|
510
|
+
.form-container {
|
|
511
|
+
max-width: 500px;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.form-field {
|
|
515
|
+
display: flex;
|
|
516
|
+
flex-direction: column;
|
|
517
|
+
gap: var(--ic-space-xs);
|
|
518
|
+
margin-bottom: var(--ic-space-md);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.form-label {
|
|
522
|
+
font-size: var(--ic-text-sm);
|
|
523
|
+
font-weight: 500;
|
|
524
|
+
color: var(--ic-text-muted);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.form-input {
|
|
528
|
+
padding: 0.5rem 0.75rem;
|
|
529
|
+
background: var(--ic-surface-2);
|
|
530
|
+
border: 1px solid var(--ic-border);
|
|
531
|
+
border-radius: var(--ic-radius-md);
|
|
532
|
+
color: var(--ic-text);
|
|
533
|
+
font-family: inherit;
|
|
534
|
+
font-size: var(--ic-text-sm);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.form-input:focus {
|
|
538
|
+
outline: none;
|
|
539
|
+
border-color: var(--ic-accent);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.form-input::placeholder {
|
|
543
|
+
color: var(--ic-text-dim);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.form-hint {
|
|
547
|
+
font-size: var(--ic-text-xs);
|
|
548
|
+
color: var(--ic-text-dim);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.form-error {
|
|
552
|
+
font-size: var(--ic-text-xs);
|
|
553
|
+
color: var(--ic-error);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.form-select {
|
|
557
|
+
padding: 0.5rem 0.75rem;
|
|
558
|
+
background: var(--ic-surface-2);
|
|
559
|
+
border: 1px solid var(--ic-border);
|
|
560
|
+
border-radius: var(--ic-radius-md);
|
|
561
|
+
color: var(--ic-text);
|
|
562
|
+
font-family: inherit;
|
|
563
|
+
font-size: var(--ic-text-sm);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.form-select:focus {
|
|
567
|
+
outline: none;
|
|
568
|
+
border-color: var(--ic-accent);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/* Provider cards */
|
|
572
|
+
.provider-grid {
|
|
573
|
+
display: grid;
|
|
574
|
+
grid-template-columns: repeat(3, 1fr);
|
|
575
|
+
gap: 0.75rem;
|
|
576
|
+
margin-bottom: var(--ic-space-lg);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
@media (max-width: 768px) {
|
|
580
|
+
.provider-grid {
|
|
581
|
+
grid-template-columns: repeat(2, 1fr);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
@media (max-width: 480px) {
|
|
586
|
+
.provider-grid {
|
|
587
|
+
grid-template-columns: 1fr;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.provider-card {
|
|
592
|
+
padding: 1rem;
|
|
593
|
+
background: var(--ic-surface);
|
|
594
|
+
border: 2px solid var(--ic-border);
|
|
595
|
+
border-radius: var(--ic-radius-md);
|
|
596
|
+
cursor: pointer;
|
|
597
|
+
transition: border-color var(--ic-transition, 150ms), background var(--ic-transition, 150ms);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.provider-card:hover {
|
|
601
|
+
border-color: var(--ic-text-dim);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.provider-card.active {
|
|
605
|
+
border-color: var(--ic-accent);
|
|
606
|
+
background: var(--ic-surface-2);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.provider-card-name {
|
|
610
|
+
font-weight: 600;
|
|
611
|
+
font-size: var(--ic-text-sm);
|
|
612
|
+
margin-bottom: var(--ic-space-xs);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.provider-card-desc {
|
|
616
|
+
font-size: var(--ic-text-xs);
|
|
617
|
+
color: var(--ic-text-muted);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/* Provider config section */
|
|
621
|
+
.provider-config {
|
|
622
|
+
margin-top: var(--ic-space-lg);
|
|
623
|
+
max-width: 500px;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/* Test connection */
|
|
627
|
+
.test-row {
|
|
628
|
+
display: flex;
|
|
629
|
+
align-items: center;
|
|
630
|
+
gap: var(--ic-space-sm);
|
|
631
|
+
margin-top: var(--ic-space-sm);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.test-btn {
|
|
635
|
+
padding: 0.375rem 0.75rem;
|
|
636
|
+
background: var(--ic-surface-2);
|
|
637
|
+
border: 1px solid var(--ic-border);
|
|
638
|
+
border-radius: var(--ic-radius-md);
|
|
639
|
+
color: var(--ic-text-muted);
|
|
640
|
+
font-size: var(--ic-text-xs);
|
|
641
|
+
font-family: inherit;
|
|
642
|
+
cursor: pointer;
|
|
643
|
+
white-space: nowrap;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.test-btn:hover {
|
|
647
|
+
background: var(--ic-border);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.test-btn:disabled {
|
|
651
|
+
opacity: 0.5;
|
|
652
|
+
cursor: not-allowed;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.test-success {
|
|
656
|
+
font-size: var(--ic-text-xs);
|
|
657
|
+
color: var(--ic-success);
|
|
658
|
+
display: flex;
|
|
659
|
+
align-items: center;
|
|
660
|
+
gap: 0.25rem;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.test-error {
|
|
664
|
+
font-size: var(--ic-text-xs);
|
|
665
|
+
color: var(--ic-error);
|
|
666
|
+
display: flex;
|
|
667
|
+
align-items: center;
|
|
668
|
+
gap: 0.25rem;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.test-spinner {
|
|
672
|
+
font-size: var(--ic-text-xs);
|
|
673
|
+
color: var(--ic-text-muted);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/* Info box */
|
|
677
|
+
.info-box {
|
|
678
|
+
padding: 0.75rem 1rem;
|
|
679
|
+
background: color-mix(in srgb, var(--ic-accent) 10%, transparent);
|
|
680
|
+
border: 1px solid color-mix(in srgb, var(--ic-accent) 30%, transparent);
|
|
681
|
+
border-radius: var(--ic-radius-md);
|
|
682
|
+
font-size: var(--ic-text-sm);
|
|
683
|
+
color: var(--ic-text-muted);
|
|
684
|
+
margin-bottom: var(--ic-space-md);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/* Channel cards */
|
|
688
|
+
.channel-cards {
|
|
689
|
+
display: flex;
|
|
690
|
+
flex-direction: column;
|
|
691
|
+
gap: 0.75rem;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.channel-card {
|
|
695
|
+
border: 1px solid var(--ic-border);
|
|
696
|
+
border-radius: var(--ic-radius-md);
|
|
697
|
+
overflow: hidden;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.channel-header {
|
|
701
|
+
display: flex;
|
|
702
|
+
align-items: center;
|
|
703
|
+
gap: var(--ic-space-sm);
|
|
704
|
+
padding: 0.75rem 1rem;
|
|
705
|
+
cursor: pointer;
|
|
706
|
+
background: var(--ic-surface);
|
|
707
|
+
user-select: none;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.channel-header:hover {
|
|
711
|
+
background: var(--ic-surface-2);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.channel-name {
|
|
715
|
+
font-weight: 500;
|
|
716
|
+
font-size: var(--ic-text-sm);
|
|
717
|
+
flex: 1;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.channel-toggle {
|
|
721
|
+
width: 36px;
|
|
722
|
+
height: 20px;
|
|
723
|
+
border-radius: 10px;
|
|
724
|
+
border: none;
|
|
725
|
+
cursor: pointer;
|
|
726
|
+
position: relative;
|
|
727
|
+
background: var(--ic-border);
|
|
728
|
+
transition: background var(--ic-transition, 150ms);
|
|
729
|
+
padding: 0;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.channel-toggle.enabled {
|
|
733
|
+
background: var(--ic-accent);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.channel-toggle::after {
|
|
737
|
+
content: "";
|
|
738
|
+
position: absolute;
|
|
739
|
+
width: 16px;
|
|
740
|
+
height: 16px;
|
|
741
|
+
border-radius: 50%;
|
|
742
|
+
background: white;
|
|
743
|
+
top: 2px;
|
|
744
|
+
left: 2px;
|
|
745
|
+
transition: transform var(--ic-transition, 150ms);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.channel-toggle.enabled::after {
|
|
749
|
+
transform: translateX(16px);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.channel-expand {
|
|
753
|
+
font-size: var(--ic-text-xs);
|
|
754
|
+
color: var(--ic-text-dim);
|
|
755
|
+
transition: transform var(--ic-transition, 150ms);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.channel-expand.open {
|
|
759
|
+
transform: rotate(180deg);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.channel-body {
|
|
763
|
+
padding: 0.75rem 1rem 1rem;
|
|
764
|
+
border-top: 1px solid var(--ic-border);
|
|
765
|
+
background: var(--ic-surface-2);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/* Review YAML preview */
|
|
769
|
+
.yaml-preview {
|
|
770
|
+
background: var(--ic-surface-2);
|
|
771
|
+
color: var(--ic-text);
|
|
772
|
+
padding: 1rem;
|
|
773
|
+
border-radius: var(--ic-radius-md);
|
|
774
|
+
border: 1px solid var(--ic-border);
|
|
775
|
+
max-height: 500px;
|
|
776
|
+
overflow: auto;
|
|
777
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
778
|
+
font-size: var(--ic-text-sm);
|
|
779
|
+
white-space: pre;
|
|
780
|
+
line-height: 1.5;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.review-actions {
|
|
784
|
+
display: flex;
|
|
785
|
+
gap: var(--ic-space-sm);
|
|
786
|
+
margin-top: var(--ic-space-md);
|
|
787
|
+
flex-wrap: wrap;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.btn {
|
|
791
|
+
padding: 0.5rem 1rem;
|
|
792
|
+
border-radius: var(--ic-radius-md);
|
|
793
|
+
font-size: var(--ic-text-sm);
|
|
794
|
+
font-family: inherit;
|
|
795
|
+
cursor: pointer;
|
|
796
|
+
border: none;
|
|
797
|
+
white-space: nowrap;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.btn-primary {
|
|
801
|
+
background: var(--ic-accent);
|
|
802
|
+
color: white;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.btn-primary:hover {
|
|
806
|
+
opacity: 0.9;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.btn-primary:disabled {
|
|
810
|
+
opacity: 0.5;
|
|
811
|
+
cursor: not-allowed;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.btn-secondary {
|
|
815
|
+
background: var(--ic-surface-2);
|
|
816
|
+
border: 1px solid var(--ic-border);
|
|
817
|
+
color: var(--ic-text-muted);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.btn-secondary:hover {
|
|
821
|
+
background: var(--ic-border);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.apply-status {
|
|
825
|
+
font-size: var(--ic-text-sm);
|
|
826
|
+
color: var(--ic-text-muted);
|
|
827
|
+
margin-top: var(--ic-space-sm);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.dashboard-link {
|
|
831
|
+
margin-top: var(--ic-space-md);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.dashboard-link a {
|
|
835
|
+
color: var(--ic-accent);
|
|
836
|
+
cursor: pointer;
|
|
837
|
+
text-decoration: underline;
|
|
838
|
+
font-size: var(--ic-text-sm);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/* Navigation bar */
|
|
842
|
+
.nav-bar {
|
|
843
|
+
display: flex;
|
|
844
|
+
justify-content: space-between;
|
|
845
|
+
margin-top: var(--ic-space-xl, 2rem);
|
|
846
|
+
padding-top: var(--ic-space-md);
|
|
847
|
+
border-top: 1px solid var(--ic-border);
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.nav-spacer {
|
|
851
|
+
flex: 1;
|
|
852
|
+
}
|
|
853
|
+
`];c([k({attribute:!1})],d.prototype,"rpcClient",2);c([p()],d.prototype,"_currentStep",2);c([p()],d.prototype,"_wizardData",2);c([p()],d.prototype,"_testResult",2);c([p()],d.prototype,"_expandedChannels",2);c([p()],d.prototype,"_yamlPreview",2);c([p()],d.prototype,"_applying",2);c([p()],d.prototype,"_applyStatus",2);c([p()],d.prototype,"_applyDone",2);c([p()],d.prototype,"_validationErrors",2);d=c([C("ic-setup-wizard")],d);export{d as IcSetupWizard};
|