comisai 1.0.15 → 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/dist/bootstrap/types.d.ts +1 -1
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +12 -11
- package/node_modules/@comis/agent/dist/context-engine/constants.d.ts +11 -0
- package/node_modules/@comis/agent/dist/context-engine/constants.js +11 -0
- package/node_modules/@comis/agent/dist/context-engine/index.d.ts +1 -1
- package/node_modules/@comis/agent/dist/context-engine/index.js +1 -1
- package/node_modules/@comis/agent/dist/context-engine/llm-compaction.js +32 -18
- package/node_modules/@comis/agent/dist/executor/cache-break-diff-writer.d.ts +2 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-diff-writer.js +36 -0
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.d.ts +12 -0
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +117 -27
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.d.ts +1 -0
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +16 -4
- package/node_modules/@comis/agent/dist/executor/executor-stream-setup.js +17 -1
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +27 -1
- package/node_modules/@comis/agent/dist/executor/session-snapshot-cleanup.js +3 -1
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/index.d.ts +2 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/index.js +2 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.d.ts +9 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.js +65 -3
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/stub-filter-injector.d.ts +28 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/stub-filter-injector.js +63 -0
- package/node_modules/@comis/agent/dist/executor/tool-deferral.d.ts +18 -1
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +275 -133
- package/node_modules/@comis/agent/dist/executor/ttl-guard.d.ts +6 -0
- package/node_modules/@comis/agent/dist/executor/ttl-guard.js +8 -0
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/dist/shared/typing-controller.d.ts +7 -0
- package/node_modules/@comis/channels/dist/shared/typing-controller.js +33 -0
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/dist/commands/daemon.js +116 -28
- 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-agent.d.ts +10 -0
- package/node_modules/@comis/core/dist/config/schema-agent.js +8 -0
- 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-skills.d.ts +16 -2
- package/node_modules/@comis/core/dist/config/schema-skills.js +9 -2
- package/node_modules/@comis/core/dist/config/schema.d.ts +66 -60
- 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/dist/builtin/platform/gateway-tool.d.ts +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,231 @@
|
|
|
1
|
+
import{s as f,i as b,n as u,a as m,b as n,t as v,S,I as d,A as C,f as w,r as o}from"./index-CEcM1R_C.js";import{p as $,f as x,c as y}from"./session-key-parser-DPORMVyU.js";import"./ic-data-table-CKUNTxHw.js";import"./ic-tag-CPPUnDLF.js";import"./ic-relative-time-3FqpjeAI.js";import"./ic-search-input-CSOxY9g7.js";import"./ic-empty-state-60l2ePhd.js";import"./ic-confirm-dialog-CCDbB04e.js";import"./ic-icon-xeGTVhVG.js";var k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,_=(e,t,s,i)=>{for(var a=i>1?void 0:i?A(t,s):t,c=e.length-1,h;c>=0;c--)(h=e[c])&&(a=(i?h(t,s,a):h(a))||a);return i&&a&&k(t,s,a),a};function F(e){if(e>=1e3){const t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}const g={active:"#22c55e",idle:"#eab308",expired:"#6b7280"},D=[{key:"key",label:"Session",sortable:!0,render:(e,t)=>{const s=String(e??""),i=$(s),a=i?x(i):s.length>15?s.slice(0,12)+"...":s,c=i?.channelId??t.channelType;return n`<span title=${s}>
|
|
2
|
+
<strong style="font-size: var(--ic-text-sm);">${a}</strong>
|
|
3
|
+
<span style="font-size: var(--ic-text-xs); color: var(--ic-text-dim); margin-left: 4px;">${c}</span>
|
|
4
|
+
</span>`}},{key:"createdAt",label:"Status",sortable:!1,render:(e,t)=>{const s=y(t.lastActiveAt),i=g[s]??g.expired;return n`<span style="display: inline-flex; align-items: center; gap: 6px;">
|
|
5
|
+
<span style="display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: ${i};"></span>
|
|
6
|
+
<span style="font-size: var(--ic-text-xs); text-transform: capitalize;">${s}</span>
|
|
7
|
+
</span>`}},{key:"agentId",label:"Agent",sortable:!0},{key:"channelType",label:"Channel",sortable:!0,render:e=>{const t=String(e??"");return n`<ic-tag variant=${t}>${t}</ic-tag>`}},{key:"messageCount",label:"Messages",sortable:!0},{key:"totalTokens",label:"Tokens",sortable:!0,render:e=>F(Number(e??0))},{key:"lastActiveAt",label:"Age",sortable:!0,render:e=>{const t=Number(e??0);return n`<ic-relative-time .timestamp=${t}></ic-relative-time>`}}];let p=class extends m{constructor(){super(...arguments),this.sessions=[],this.selectable=!1}_handleRowClick(e){this.dispatchEvent(new CustomEvent("session-click",{detail:e.detail,bubbles:!0}))}_handleSelectionChange(e){this.dispatchEvent(new CustomEvent("selection-change",{detail:e.detail,bubbles:!0}))}render(){return n`
|
|
8
|
+
<ic-data-table
|
|
9
|
+
.columns=${D}
|
|
10
|
+
.rows=${this.sessions}
|
|
11
|
+
.pageSize=${25}
|
|
12
|
+
?selectable=${this.selectable}
|
|
13
|
+
emptyMessage="No sessions found"
|
|
14
|
+
@row-click=${this._handleRowClick}
|
|
15
|
+
@selection-change=${this._handleSelectionChange}
|
|
16
|
+
></ic-data-table>
|
|
17
|
+
`}};p.styles=[f,b`
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
`];_([u({attribute:!1})],p.prototype,"sessions",2);_([u({type:Boolean})],p.prototype,"selectable",2);p=_([v("ic-session-list")],p);var K=Object.defineProperty,R=Object.getOwnPropertyDescriptor,l=(e,t,s,i)=>{for(var a=i>1?void 0:i?R(t,s):t,c=e.length-1,h;c>=0;c--)(h=e[c])&&(a=(i?h(t,s,a):h(a))||a);return i&&a&&K(t,s,a),a};let r=class extends m{constructor(){super(...arguments),this.apiClient=null,this.rpcClient=null,this.eventDispatcher=null,this._sse=null,this._reloadDebounce=null,this._sessions=[],this._filteredSessions=[],this._loading=!1,this._error="",this._searchQuery="",this._agentFilter="",this._channelFilter="",this._statusFilter="",this._selectedKeys=[],this._showConfirm=!1,this._confirmAction="",this._configuredAgentIds=[],this._searchDebounceTimer=null,this._searchResultKeys=null}connectedCallback(){super.connectedCallback(),this._initSse()}updated(e){e.has("apiClient")&&this.apiClient&&(this._loadSessions(),this._loadConfiguredAgents()),e.has("eventDispatcher")&&this.eventDispatcher&&!this._sse&&this._initSse()}disconnectedCallback(){super.disconnectedCallback(),this._reloadDebounce!==null&&(clearTimeout(this._reloadDebounce),this._reloadDebounce=null)}_initSse(){!this.eventDispatcher||this._sse||(this._sse=new S(this,this.eventDispatcher,{"session:created":()=>{this._scheduleReload()},"session:expired":()=>{this._scheduleReload()}}))}_scheduleReload(e=300){this._reloadDebounce!==null&&clearTimeout(this._reloadDebounce),this._reloadDebounce=setTimeout(()=>{this._reloadDebounce=null,this._loadSessions()},e)}async _loadSessions(){if(this.apiClient){this._loading=!0,this._error="";try{this._sessions=await this.apiClient.listSessions(),this._applyFilters()}catch{this._error="Failed to load sessions. Please try again."}finally{this._loading=!1}}}_applyFilters(){let e=this._sessions;if(this._searchQuery)if(this._searchResultKeys)e=e.filter(t=>this._searchResultKeys.has(t.key));else{const t=this._searchQuery.toLowerCase();e=e.filter(s=>s.key.toLowerCase().includes(t)||s.agentId.toLowerCase().includes(t)||s.channelType.toLowerCase().includes(t))}this._agentFilter&&(e=e.filter(t=>t.agentId===this._agentFilter)),this._channelFilter&&(e=e.filter(t=>t.channelType===this._channelFilter)),this._statusFilter&&(e=e.filter(t=>y(t.lastActiveAt)===this._statusFilter)),this._filteredSessions=e}_getUniqueAgents(){return[...new Set([...this._configuredAgentIds,...this._sessions.map(t=>t.agentId)])].sort()}async _loadConfiguredAgents(){if(this.apiClient)try{const e=await this.apiClient.getAgents();this._configuredAgentIds=e.map(t=>t.id)}catch{}}_getUniqueChannels(){return[...new Set(this._sessions.map(t=>t.channelType))].sort()}_handleSearch(e){if(this._searchQuery=e.detail,this._searchDebounceTimer!==null&&(clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=null),!this._searchQuery){this._searchResultKeys=null,this._applyFilters();return}this.rpcClient?this._searchDebounceTimer=setTimeout(()=>{this._performRpcSearch(this._searchQuery)},300):(this._searchResultKeys=null,this._applyFilters())}async _performRpcSearch(e){if(this.rpcClient){try{const t=await this.rpcClient.call("session.search",{query:e,limit:50});this._searchResultKeys=new Set(t.map(s=>s.sessionKey))}catch{this._searchResultKeys=null}this._applyFilters()}}_handleAgentFilter(e){this._agentFilter=e.target.value,this._applyFilters()}_handleChannelFilter(e){this._channelFilter=e.target.value,this._applyFilters()}_handleStatusFilter(e){this._statusFilter=e.target.value,this._applyFilters()}_handleSessionClick(e){const t=e.detail;window.location.hash=`#/sessions/${t.key}`}_handleSelectionChange(e){this._selectedKeys=e.detail}_showBulkConfirm(e){this._confirmAction=e,this._showConfirm=!0}_handleConfirmCancel(){this._showConfirm=!1,this._confirmAction=""}async _handleConfirm(){if(this._showConfirm=!1,!!this.apiClient)try{this._confirmAction==="reset"?(await this.apiClient.resetSessionsBulk(this._selectedKeys),d.show(`${this._selectedKeys.length} sessions reset`,"success")):this._confirmAction==="delete"&&(await this.apiClient.deleteSessionsBulk(this._selectedKeys),d.show(`${this._selectedKeys.length} sessions deleted`,"success")),this._selectedKeys=[],this._confirmAction="",await this._loadSessions()}catch{d.show("Operation failed. Please try again.","error")}}async _handleBulkExport(){if(!(!this.apiClient||this._selectedKeys.length===0))try{const e=await this.apiClient.exportSessionsBulk(this._selectedKeys),t=new Blob([e],{type:"application/jsonl"}),s=URL.createObjectURL(t),i=document.createElement("a");i.href=s,i.download=`sessions-export-${Date.now()}.jsonl`,i.click(),URL.revokeObjectURL(s),d.show(`${this._selectedKeys.length} sessions exported`,"success")}catch{d.show("Export failed. Please try again.","error")}}_renderAgentSelect(){const e=this._getUniqueAgents();return n`<select class="filter-select" .value=${this._agentFilter} @change=${this._handleAgentFilter} aria-label="Filter by agent">
|
|
22
|
+
<option value="">All Agents</option>
|
|
23
|
+
${e.map(t=>n`<option .value=${t}>${t}</option>`)}
|
|
24
|
+
</select>`}_renderChannelSelect(){const e=this._getUniqueChannels();return n`<select class="filter-select" .value=${this._channelFilter} @change=${this._handleChannelFilter} aria-label="Filter by channel">
|
|
25
|
+
<option value="">All Channels</option>
|
|
26
|
+
${e.map(t=>n`<option .value=${t}>${t}</option>`)}
|
|
27
|
+
</select>`}_renderStatusSelect(){return n`<select class="filter-select" .value=${this._statusFilter} @change=${this._handleStatusFilter} aria-label="Filter by status">
|
|
28
|
+
<option value="">All Statuses</option>
|
|
29
|
+
<option value="active">Active</option>
|
|
30
|
+
<option value="idle">Idle</option>
|
|
31
|
+
<option value="expired">Expired</option>
|
|
32
|
+
</select>`}_renderFilterBar(){return n`
|
|
33
|
+
<div class="filter-bar">
|
|
34
|
+
<ic-search-input
|
|
35
|
+
placeholder="Search sessions..."
|
|
36
|
+
.value=${this._searchQuery}
|
|
37
|
+
@search=${this._handleSearch}
|
|
38
|
+
></ic-search-input>
|
|
39
|
+
${this._renderAgentSelect()}
|
|
40
|
+
${this._renderChannelSelect()}
|
|
41
|
+
${this._renderStatusSelect()}
|
|
42
|
+
</div>
|
|
43
|
+
`}_renderBulkBar(){return this._selectedKeys.length===0?C:n`
|
|
44
|
+
<div class="bulk-bar">
|
|
45
|
+
<span class="bulk-count">${this._selectedKeys.length} selected</span>
|
|
46
|
+
<div class="bulk-actions">
|
|
47
|
+
<button class="btn btn-ghost" @click=${()=>this._showBulkConfirm("reset")}>
|
|
48
|
+
Reset Selected
|
|
49
|
+
</button>
|
|
50
|
+
<button class="btn btn-ghost" @click=${this._handleBulkExport}>
|
|
51
|
+
Export Selected
|
|
52
|
+
</button>
|
|
53
|
+
<button class="btn btn-danger" @click=${()=>this._showBulkConfirm("delete")}>
|
|
54
|
+
Delete Selected
|
|
55
|
+
</button>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
`}_getConfirmProps(){return this._confirmAction==="delete"?{title:"Delete Sessions",message:`Are you sure you want to delete ${this._selectedKeys.length} sessions? This action cannot be undone.`,variant:"danger",label:"Delete"}:{title:"Reset Sessions",message:`Are you sure you want to reset ${this._selectedKeys.length} sessions? All conversation history will be cleared.`,variant:"default",label:"Reset"}}render(){if(this._loading)return n`
|
|
59
|
+
<div class="page-header"><h1 class="page-title">Sessions</h1></div>
|
|
60
|
+
<ic-skeleton-view variant="list"></ic-skeleton-view>
|
|
61
|
+
`;if(this._error)return n`
|
|
62
|
+
<div class="page-header"><h1 class="page-title">Sessions</h1></div>
|
|
63
|
+
<div class="error-container">
|
|
64
|
+
<div class="error-message">${this._error}</div>
|
|
65
|
+
<button class="retry-btn" @click=${()=>this._loadSessions()}>Retry</button>
|
|
66
|
+
</div>
|
|
67
|
+
`;if(this._sessions.length===0)return n`
|
|
68
|
+
<div class="page-header"><h1 class="page-title">Sessions</h1></div>
|
|
69
|
+
<ic-empty-state
|
|
70
|
+
icon="message-circle"
|
|
71
|
+
message="No active sessions"
|
|
72
|
+
description="Sessions appear when agents receive messages."
|
|
73
|
+
>
|
|
74
|
+
<button class="retry-btn" @click=${()=>{window.location.hash="#/chat"}}>Go to Chat</button>
|
|
75
|
+
</ic-empty-state>
|
|
76
|
+
`;const e=this._getConfirmProps();return n`
|
|
77
|
+
<div class="page-header" role="region" aria-label="Sessions">
|
|
78
|
+
<h1 class="page-title">Sessions</h1>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
${this._renderFilterBar()}
|
|
82
|
+
${this._renderBulkBar()}
|
|
83
|
+
|
|
84
|
+
<ic-session-list
|
|
85
|
+
.sessions=${this._filteredSessions}
|
|
86
|
+
selectable
|
|
87
|
+
@session-click=${this._handleSessionClick}
|
|
88
|
+
@selection-change=${this._handleSelectionChange}
|
|
89
|
+
></ic-session-list>
|
|
90
|
+
|
|
91
|
+
<ic-confirm-dialog
|
|
92
|
+
?open=${this._showConfirm}
|
|
93
|
+
title=${e.title}
|
|
94
|
+
message=${e.message}
|
|
95
|
+
variant=${e.variant}
|
|
96
|
+
confirmLabel=${e.label}
|
|
97
|
+
@confirm=${this._handleConfirm}
|
|
98
|
+
@cancel=${this._handleConfirmCancel}
|
|
99
|
+
></ic-confirm-dialog>
|
|
100
|
+
`}};r.styles=[f,w,b`
|
|
101
|
+
:host {
|
|
102
|
+
display: block;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.page-header {
|
|
106
|
+
margin-bottom: var(--ic-space-lg);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.page-title {
|
|
110
|
+
font-size: var(--ic-text-xl);
|
|
111
|
+
font-weight: 700;
|
|
112
|
+
color: var(--ic-text);
|
|
113
|
+
margin: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.filter-bar {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: var(--ic-space-md);
|
|
120
|
+
margin-bottom: var(--ic-space-md);
|
|
121
|
+
flex-wrap: wrap;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.filter-bar ic-search-input {
|
|
125
|
+
flex: 1;
|
|
126
|
+
min-width: 12rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.filter-select {
|
|
130
|
+
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
131
|
+
background: var(--ic-surface-2);
|
|
132
|
+
border: 1px solid var(--ic-border);
|
|
133
|
+
border-radius: var(--ic-radius-md);
|
|
134
|
+
color: var(--ic-text);
|
|
135
|
+
font-family: inherit;
|
|
136
|
+
font-size: var(--ic-text-sm);
|
|
137
|
+
min-width: 8rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.filter-select:focus {
|
|
141
|
+
outline: none;
|
|
142
|
+
border-color: var(--ic-accent);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.bulk-bar {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: var(--ic-space-md);
|
|
149
|
+
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
150
|
+
background: var(--ic-surface-2);
|
|
151
|
+
border: 1px solid var(--ic-border);
|
|
152
|
+
border-radius: var(--ic-radius-md);
|
|
153
|
+
margin-bottom: var(--ic-space-md);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.bulk-count {
|
|
157
|
+
font-size: var(--ic-text-sm);
|
|
158
|
+
color: var(--ic-text-muted);
|
|
159
|
+
font-weight: 500;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.bulk-actions {
|
|
163
|
+
display: flex;
|
|
164
|
+
gap: var(--ic-space-sm);
|
|
165
|
+
margin-left: auto;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.btn {
|
|
169
|
+
padding: var(--ic-space-xs) var(--ic-space-md);
|
|
170
|
+
border-radius: var(--ic-radius-md);
|
|
171
|
+
font-size: var(--ic-text-sm);
|
|
172
|
+
font-family: inherit;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
transition: background var(--ic-transition), border-color var(--ic-transition);
|
|
175
|
+
white-space: nowrap;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.btn-ghost {
|
|
179
|
+
background: transparent;
|
|
180
|
+
border: 1px solid var(--ic-border);
|
|
181
|
+
color: var(--ic-text-muted);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.btn-ghost:hover {
|
|
185
|
+
border-color: var(--ic-text-dim);
|
|
186
|
+
color: var(--ic-text);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.btn-danger {
|
|
190
|
+
background: transparent;
|
|
191
|
+
border: 1px solid var(--ic-error);
|
|
192
|
+
color: var(--ic-error);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.btn-danger:hover {
|
|
196
|
+
background: var(--ic-error);
|
|
197
|
+
color: #fff;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.error-container {
|
|
201
|
+
padding: var(--ic-space-lg);
|
|
202
|
+
text-align: center;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.error-message {
|
|
206
|
+
color: var(--ic-error);
|
|
207
|
+
font-size: var(--ic-text-sm);
|
|
208
|
+
margin-bottom: var(--ic-space-md);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.retry-btn {
|
|
212
|
+
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
213
|
+
background: var(--ic-accent);
|
|
214
|
+
border: none;
|
|
215
|
+
border-radius: var(--ic-radius-md);
|
|
216
|
+
color: #fff;
|
|
217
|
+
font-size: var(--ic-text-sm);
|
|
218
|
+
font-family: inherit;
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.retry-btn:hover {
|
|
223
|
+
background: var(--ic-accent-hover);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.loading-container {
|
|
227
|
+
display: flex;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
padding: var(--ic-space-2xl);
|
|
230
|
+
}
|
|
231
|
+
`];l([u({attribute:!1})],r.prototype,"apiClient",2);l([u({attribute:!1})],r.prototype,"rpcClient",2);l([u({attribute:!1})],r.prototype,"eventDispatcher",2);l([o()],r.prototype,"_sessions",2);l([o()],r.prototype,"_filteredSessions",2);l([o()],r.prototype,"_loading",2);l([o()],r.prototype,"_error",2);l([o()],r.prototype,"_searchQuery",2);l([o()],r.prototype,"_agentFilter",2);l([o()],r.prototype,"_channelFilter",2);l([o()],r.prototype,"_statusFilter",2);l([o()],r.prototype,"_selectedKeys",2);l([o()],r.prototype,"_showConfirm",2);l([o()],r.prototype,"_confirmAction",2);l([o()],r.prototype,"_configuredAgentIds",2);r=l([v("ic-session-list-view")],r);export{r as IcSessionListView};
|