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,632 @@
|
|
|
1
|
+
import{a as u,I as p,b as o,A as v,s as h,f as g,i as f,n as b,r as n,t as x}from"./index-CEcM1R_C.js";import{p as _,f as y,c as $}from"./session-key-parser-DPORMVyU.js";import{c as w}from"./ic-tool-call-7MaXSsCW.js";import"./ic-breadcrumb-CUMpp3BL.js";import"./ic-tag-CPPUnDLF.js";import"./ic-relative-time-3FqpjeAI.js";import"./ic-budget-segment-bar-BtJ6x5mN.js";import"./ic-layer-waterfall-COvEYMg5.js";import"./ic-chat-message-CFyDJd0z.js";import"./ic-confirm-dialog-CCDbB04e.js";import"./ic-empty-state-60l2ePhd.js";import"./ic-icon-xeGTVhVG.js";import"./directive-DoeGSK_T.js";var C=Object.defineProperty,S=Object.getOwnPropertyDescriptor,i=(t,e,r,s)=>{for(var c=s>1?void 0:s?S(e,r):e,l=t.length-1,m;l>=0;l--)(m=t[l])&&(c=(s?m(e,r,c):m(c))||c);return s&&c&&C(e,r,c),c};function d(t){if(t>=1e3){const e=t/1e3;return e>=100?`${Math.round(e)}K`:`${e.toFixed(1)}K`}return String(t)}function k(t){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(t)}let a=class extends u{constructor(){super(...arguments),this.apiClient=null,this.rpcClient=null,this.sessionKey="",this._session=null,this._messages=[],this._loading=!1,this._error="",this._showConfirm=!1,this._confirmAction="",this._activeTab="conversation",this._contextLoaded=!1,this._metricsLoaded=!1,this._pipelineSnapshots=[],this._dagCompactions=[],this._selectedSnapshot=null,this._sessionBilling=null}connectedCallback(){super.connectedCallback()}updated(t){(t.has("apiClient")||t.has("sessionKey"))&&this.apiClient&&this.sessionKey&&this._loadSession()}async _loadSession(){if(!(!this.apiClient||!this.sessionKey)){this._loading=!0,this._error="";try{const t=await this.apiClient.getSessionDetail(this.sessionKey);this._session=t.session,this._messages=t.messages}catch{this._error="Failed to load session. Please try again."}finally{this._loading=!1}}}_switchTab(t){this._activeTab=t,t==="context"&&!this._contextLoaded&&this._loadContextData(),t==="metrics"&&!this._metricsLoaded&&this._loadMetricsData()}async _loadContextData(){if(!(!this.rpcClient||!this._session))try{const t=this._session.agentId,[e,r]=await Promise.all([this.rpcClient.call("obs.context.pipeline",{agentId:t,limit:100}),this.rpcClient.call("obs.context.dag",{agentId:t,limit:50})]),s=Array.isArray(e)?e:[];this._pipelineSnapshots=s.filter(l=>l.sessionKey===this.sessionKey);const c=Array.isArray(r)?r:[];this._dagCompactions=c.filter(l=>l.sessionKey===this.sessionKey),this._pipelineSnapshots.length>0&&(this._selectedSnapshot=this._pipelineSnapshots[0]),this._contextLoaded=!0}catch{this._contextLoaded=!0}}async _loadMetricsData(){if(!this.rpcClient){this._metricsLoaded=!0;return}try{const t=await this.rpcClient.call("obs.billing.bySession",{sessionKey:this.sessionKey});this._sessionBilling=t??null}catch{this._sessionBilling=null}this._metricsLoaded=!0}_handleBreadcrumbNavigate(t){window.location.hash=`#/${t.detail}`}_showActionConfirm(t){this._confirmAction=t,this._showConfirm=!0}_handleConfirmCancel(){this._showConfirm=!1,this._confirmAction=""}async _handleConfirm(){if(this._showConfirm=!1,!!this.apiClient){try{this._confirmAction==="reset"?(await this.apiClient.resetSession(this.sessionKey),p.show("Session reset","success"),await this._loadSession()):this._confirmAction==="compact"?(await this.apiClient.compactSession(this.sessionKey),p.show("Session compacted","success"),await this._loadSession()):this._confirmAction==="delete"&&(await this.apiClient.deleteSession(this.sessionKey),p.show("Session deleted","success"),window.location.hash="#/sessions")}catch{p.show("Operation failed. Please try again.","error")}this._confirmAction=""}}async _handleExport(){if(this.apiClient)try{const t=await this.apiClient.exportSession(this.sessionKey),e=new Blob([t],{type:"application/jsonl"}),r=URL.createObjectURL(e),s=document.createElement("a");s.href=r,s.download=`session-${this.sessionKey}.jsonl`,s.click(),URL.revokeObjectURL(r),p.show("Session exported","success")}catch{p.show("Export failed. Please try again.","error")}}_truncateKey(t){return t.length>20?t.slice(0,16)+"...":t}_getBreadcrumbLabel(){const t=_(this.sessionKey);return t?y(t):this._truncateKey(this.sessionKey)}_isCompactionBoundary(t){if(t.role!=="system")return!1;const e=t.content.toLowerCase();return e.includes("compacted")||e.includes("summary")||e.includes("[compacted]")}_getConfirmProps(){switch(this._confirmAction){case"delete":return{title:"Delete Session",message:"Are you sure you want to delete this session? This action cannot be undone.",variant:"danger",label:"Delete"};case"compact":return{title:"Compact Session",message:"Are you sure you want to compact this session? Older messages will be summarized.",variant:"default",label:"Compact"};default:return{title:"Reset Session",message:"Are you sure you want to reset this session? All conversation history will be cleared.",variant:"default",label:"Reset"}}}_renderConversation(){return o`
|
|
2
|
+
<div class="conversation">
|
|
3
|
+
${this._messages.map(t=>{if(this._isCompactionBoundary(t))return o`
|
|
4
|
+
<div class="compaction-marker" data-testid="compaction-marker">
|
|
5
|
+
<hr />
|
|
6
|
+
<span>Context was compacted here</span>
|
|
7
|
+
<hr />
|
|
8
|
+
</div>
|
|
9
|
+
`;if(t.role==="tool"){let e=t.content;try{e=JSON.parse(t.content)}catch{}return o`
|
|
10
|
+
<ic-tool-call
|
|
11
|
+
.toolName=${t.toolName??"tool"}
|
|
12
|
+
.output=${e}
|
|
13
|
+
.status=${"success"}
|
|
14
|
+
.expanded=${!1}
|
|
15
|
+
></ic-tool-call>
|
|
16
|
+
`}return o`
|
|
17
|
+
<ic-chat-message
|
|
18
|
+
.role=${t.role}
|
|
19
|
+
.content=${w(t.content,t.role)}
|
|
20
|
+
.timestamp=${t.timestamp}
|
|
21
|
+
.showActions=${!1}
|
|
22
|
+
></ic-chat-message>
|
|
23
|
+
`})}
|
|
24
|
+
</div>
|
|
25
|
+
`}_renderContextState(){if(!this._contextLoaded)return o`<div class="loading-container"><ic-loading size="md"></ic-loading></div>`;if(this._pipelineSnapshots.length===0)return o`<ic-empty-state
|
|
26
|
+
icon="activity"
|
|
27
|
+
message="No pipeline data for this session"
|
|
28
|
+
></ic-empty-state>`;const t=this._pipelineSnapshots[0],e=Math.max(0,t.tokensLoaded-t.tokensEvicted),r=[{label:"System",tokens:e,color:"var(--ic-accent)"},{label:"Evicted",tokens:t.tokensEvicted,color:"var(--ic-error)"},{label:"Masked",tokens:t.tokensMasked,color:"var(--ic-warning)"},{label:"Available",tokens:Math.max(0,Math.round((1-t.budgetUtilization)*(e+t.tokensEvicted+t.tokensMasked))),color:"var(--ic-surface-2, #1f2937)"}].filter(s=>s.tokens>0);return o`
|
|
29
|
+
<!-- Latest snapshot summary -->
|
|
30
|
+
<div class="context-summary">
|
|
31
|
+
<div class="context-badge">
|
|
32
|
+
Budget <span class="badge-value">${Math.round(t.budgetUtilization*100)}%</span>
|
|
33
|
+
</div>
|
|
34
|
+
<span class="cache-badge ${t.cacheHitTokens>0?"cache-badge--hit":"cache-badge--miss"}">
|
|
35
|
+
${t.cacheHitTokens>0?"Cache HIT":"Cache MISS"}
|
|
36
|
+
</span>
|
|
37
|
+
<div class="context-badge">
|
|
38
|
+
Loaded <span class="badge-value">${d(t.tokensLoaded)}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="context-badge">
|
|
41
|
+
Evicted <span class="badge-value">${d(t.tokensEvicted)}</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="context-badge">
|
|
44
|
+
Duration <span class="badge-value">${t.durationMs}ms</span>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<!-- Budget segment bar -->
|
|
49
|
+
<div class="budget-section">
|
|
50
|
+
<div class="budget-section-title">Token Budget</div>
|
|
51
|
+
<ic-budget-segment-bar .segments=${r}></ic-budget-segment-bar>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<!-- Execution list -->
|
|
55
|
+
<div class="budget-section-title">Pipeline Executions</div>
|
|
56
|
+
<div class="execution-list">
|
|
57
|
+
${this._pipelineSnapshots.map(s=>o`
|
|
58
|
+
<button
|
|
59
|
+
class="execution-row ${this._selectedSnapshot===s?"selected":""}"
|
|
60
|
+
@click=${()=>{this._selectedSnapshot=s}}
|
|
61
|
+
>
|
|
62
|
+
<span class="exec-time">${new Date(s.timestamp).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}</span>
|
|
63
|
+
<span class="exec-duration">${s.durationMs}ms</span>
|
|
64
|
+
<span class="cache-badge ${s.cacheHitTokens>0?"cache-badge--hit":"cache-badge--miss"}">
|
|
65
|
+
${s.cacheHitTokens>0?"HIT":"MISS"}
|
|
66
|
+
</span>
|
|
67
|
+
<span class="exec-tokens">${d(s.tokensLoaded)} loaded</span>
|
|
68
|
+
</button>
|
|
69
|
+
`)}
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- Waterfall for selected snapshot -->
|
|
73
|
+
${this._selectedSnapshot&&this._selectedSnapshot.layers.length>0?o`
|
|
74
|
+
<div class="waterfall-card">
|
|
75
|
+
<ic-layer-waterfall
|
|
76
|
+
.layers=${this._selectedSnapshot.layers.map(s=>({name:s.name,durationMs:s.durationMs,messagesIn:s.messagesIn,messagesOut:s.messagesOut}))}
|
|
77
|
+
.totalDurationMs=${this._selectedSnapshot.durationMs}
|
|
78
|
+
></ic-layer-waterfall>
|
|
79
|
+
</div>
|
|
80
|
+
`:v}
|
|
81
|
+
`}_renderMetrics(){if(!this._session)return v;const t=this._session,e=$(t.lastActiveAt);return o`
|
|
82
|
+
<!-- Cost & Usage -->
|
|
83
|
+
<div class="metrics-section-title">Cost & Usage</div>
|
|
84
|
+
<div class="metrics-grid">
|
|
85
|
+
<ic-stat-card
|
|
86
|
+
label="Total Cost"
|
|
87
|
+
value=${this._sessionBilling?k(this._sessionBilling.totalCost):"--"}
|
|
88
|
+
></ic-stat-card>
|
|
89
|
+
<ic-stat-card
|
|
90
|
+
label="Total Tokens"
|
|
91
|
+
value=${d(t.totalTokens)}
|
|
92
|
+
></ic-stat-card>
|
|
93
|
+
<ic-stat-card
|
|
94
|
+
label="Input Tokens"
|
|
95
|
+
value=${d(t.inputTokens)}
|
|
96
|
+
></ic-stat-card>
|
|
97
|
+
<ic-stat-card
|
|
98
|
+
label="Output Tokens"
|
|
99
|
+
value=${d(t.outputTokens)}
|
|
100
|
+
></ic-stat-card>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<!-- Activity -->
|
|
104
|
+
<div class="metrics-section-title">Activity</div>
|
|
105
|
+
<div class="metrics-grid">
|
|
106
|
+
<ic-stat-card
|
|
107
|
+
label="Tool Calls"
|
|
108
|
+
value=${String(t.toolCalls)}
|
|
109
|
+
></ic-stat-card>
|
|
110
|
+
<ic-stat-card
|
|
111
|
+
label="Compactions"
|
|
112
|
+
value=${String(t.compactions)}
|
|
113
|
+
></ic-stat-card>
|
|
114
|
+
<ic-stat-card
|
|
115
|
+
label="Resets"
|
|
116
|
+
value=${String(t.resetCount)}
|
|
117
|
+
></ic-stat-card>
|
|
118
|
+
<ic-stat-card
|
|
119
|
+
label="API Calls"
|
|
120
|
+
value=${this._sessionBilling?String(this._sessionBilling.callCount):"--"}
|
|
121
|
+
></ic-stat-card>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<!-- Session Health -->
|
|
125
|
+
<div class="metrics-section-title">Session Health</div>
|
|
126
|
+
<div class="metrics-grid">
|
|
127
|
+
<ic-stat-card
|
|
128
|
+
label="Created"
|
|
129
|
+
value=${new Date(t.createdAt).toLocaleDateString()}
|
|
130
|
+
></ic-stat-card>
|
|
131
|
+
<ic-stat-card
|
|
132
|
+
label="Last Active"
|
|
133
|
+
value=${new Date(t.lastActiveAt).toLocaleString()}
|
|
134
|
+
></ic-stat-card>
|
|
135
|
+
<ic-stat-card label="Status" .value=${""}>
|
|
136
|
+
</ic-stat-card>
|
|
137
|
+
</div>
|
|
138
|
+
<div style="margin-top: calc(-1 * var(--ic-space-md));">
|
|
139
|
+
<span class="status-badge status-badge--${e}" data-testid="session-status">${e}</span>
|
|
140
|
+
</div>
|
|
141
|
+
`}render(){const t=[{label:"Sessions",route:"sessions"},{label:this._getBreadcrumbLabel()}];if(this._loading)return o`
|
|
142
|
+
<div class="breadcrumb-area">
|
|
143
|
+
<ic-breadcrumb
|
|
144
|
+
.items=${t}
|
|
145
|
+
@navigate=${this._handleBreadcrumbNavigate}
|
|
146
|
+
></ic-breadcrumb>
|
|
147
|
+
</div>
|
|
148
|
+
<ic-skeleton-view variant="detail"></ic-skeleton-view>
|
|
149
|
+
`;if(this._error)return o`
|
|
150
|
+
<div class="breadcrumb-area">
|
|
151
|
+
<ic-breadcrumb
|
|
152
|
+
.items=${t}
|
|
153
|
+
@navigate=${this._handleBreadcrumbNavigate}
|
|
154
|
+
></ic-breadcrumb>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="error-container">
|
|
157
|
+
<div class="error-message">${this._error}</div>
|
|
158
|
+
<button class="retry-btn" @click=${()=>this._loadSession()}>
|
|
159
|
+
Retry
|
|
160
|
+
</button>
|
|
161
|
+
</div>
|
|
162
|
+
`;if(!this._session)return o`
|
|
163
|
+
<div class="breadcrumb-area">
|
|
164
|
+
<ic-breadcrumb
|
|
165
|
+
.items=${t}
|
|
166
|
+
@navigate=${this._handleBreadcrumbNavigate}
|
|
167
|
+
></ic-breadcrumb>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="error-container">
|
|
170
|
+
<div class="error-message">Session not found</div>
|
|
171
|
+
</div>
|
|
172
|
+
`;const e=this._session,r=this._getConfirmProps();return o`
|
|
173
|
+
<div class="breadcrumb-area">
|
|
174
|
+
<ic-breadcrumb
|
|
175
|
+
.items=${t}
|
|
176
|
+
@navigate=${this._handleBreadcrumbNavigate}
|
|
177
|
+
></ic-breadcrumb>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div class="session-info">
|
|
181
|
+
<div class="info-item">
|
|
182
|
+
<span class="info-label">Agent</span>
|
|
183
|
+
<span class="info-value">${e.agentId}</span>
|
|
184
|
+
</div>
|
|
185
|
+
<div class="info-item">
|
|
186
|
+
<span class="info-label">Channel</span>
|
|
187
|
+
<span class="info-value"
|
|
188
|
+
><ic-tag variant=${e.channelType}
|
|
189
|
+
>${e.channelType}</ic-tag
|
|
190
|
+
></span
|
|
191
|
+
>
|
|
192
|
+
</div>
|
|
193
|
+
<div class="info-item">
|
|
194
|
+
<span class="info-label">Messages</span>
|
|
195
|
+
<span class="info-value">${e.messageCount}</span>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="info-item">
|
|
198
|
+
<span class="info-label">Tokens</span>
|
|
199
|
+
<span class="info-value">${d(e.totalTokens)}</span>
|
|
200
|
+
</div>
|
|
201
|
+
<div class="info-item">
|
|
202
|
+
<span class="info-label">Created</span>
|
|
203
|
+
<span class="info-value"
|
|
204
|
+
>${new Date(e.createdAt).toLocaleDateString()}</span
|
|
205
|
+
>
|
|
206
|
+
</div>
|
|
207
|
+
${e.label?o`
|
|
208
|
+
<div class="info-item">
|
|
209
|
+
<span class="info-label">Label</span>
|
|
210
|
+
<span class="info-value">${e.label}</span>
|
|
211
|
+
</div>
|
|
212
|
+
`:v}
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<div class="actions-bar">
|
|
216
|
+
<button
|
|
217
|
+
class="btn btn-ghost"
|
|
218
|
+
@click=${()=>this._showActionConfirm("reset")}
|
|
219
|
+
>
|
|
220
|
+
Reset
|
|
221
|
+
</button>
|
|
222
|
+
<button
|
|
223
|
+
class="btn btn-ghost"
|
|
224
|
+
@click=${()=>this._showActionConfirm("compact")}
|
|
225
|
+
>
|
|
226
|
+
Compact
|
|
227
|
+
</button>
|
|
228
|
+
<button class="btn btn-ghost" @click=${this._handleExport}>
|
|
229
|
+
Export JSONL
|
|
230
|
+
</button>
|
|
231
|
+
<button
|
|
232
|
+
class="btn btn-danger"
|
|
233
|
+
@click=${()=>this._showActionConfirm("delete")}
|
|
234
|
+
>
|
|
235
|
+
Delete
|
|
236
|
+
</button>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<!-- Tab bar -->
|
|
240
|
+
<div class="tab-bar" role="tablist">
|
|
241
|
+
<button
|
|
242
|
+
class="tab ${this._activeTab==="conversation"?"tab--active":""}"
|
|
243
|
+
role="tab"
|
|
244
|
+
aria-selected=${this._activeTab==="conversation"}
|
|
245
|
+
@click=${()=>this._switchTab("conversation")}
|
|
246
|
+
>
|
|
247
|
+
Conversation
|
|
248
|
+
</button>
|
|
249
|
+
<button
|
|
250
|
+
class="tab ${this._activeTab==="context"?"tab--active":""}"
|
|
251
|
+
role="tab"
|
|
252
|
+
aria-selected=${this._activeTab==="context"}
|
|
253
|
+
@click=${()=>this._switchTab("context")}
|
|
254
|
+
>
|
|
255
|
+
Context State
|
|
256
|
+
</button>
|
|
257
|
+
<button
|
|
258
|
+
class="tab ${this._activeTab==="metrics"?"tab--active":""}"
|
|
259
|
+
role="tab"
|
|
260
|
+
aria-selected=${this._activeTab==="metrics"}
|
|
261
|
+
@click=${()=>this._switchTab("metrics")}
|
|
262
|
+
>
|
|
263
|
+
Metrics
|
|
264
|
+
</button>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<!-- Tab content: use display:none to preserve scroll position -->
|
|
268
|
+
<div
|
|
269
|
+
class="tab-content ${this._activeTab==="conversation"?"tab-content--active":""}"
|
|
270
|
+
>
|
|
271
|
+
${this._renderConversation()}
|
|
272
|
+
</div>
|
|
273
|
+
<div
|
|
274
|
+
class="tab-content ${this._activeTab==="context"?"tab-content--active":""}"
|
|
275
|
+
>
|
|
276
|
+
${this._renderContextState()}
|
|
277
|
+
</div>
|
|
278
|
+
<div
|
|
279
|
+
class="tab-content ${this._activeTab==="metrics"?"tab-content--active":""}"
|
|
280
|
+
>
|
|
281
|
+
${this._renderMetrics()}
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
<ic-confirm-dialog
|
|
285
|
+
?open=${this._showConfirm}
|
|
286
|
+
title=${r.title}
|
|
287
|
+
message=${r.message}
|
|
288
|
+
variant=${r.variant}
|
|
289
|
+
confirmLabel=${r.label}
|
|
290
|
+
@confirm=${this._handleConfirm}
|
|
291
|
+
@cancel=${this._handleConfirmCancel}
|
|
292
|
+
></ic-confirm-dialog>
|
|
293
|
+
`}};a.styles=[h,g,f`
|
|
294
|
+
:host {
|
|
295
|
+
display: block;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.breadcrumb-area {
|
|
299
|
+
margin-bottom: var(--ic-space-md);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.session-info {
|
|
303
|
+
display: flex;
|
|
304
|
+
align-items: center;
|
|
305
|
+
gap: var(--ic-space-lg);
|
|
306
|
+
flex-wrap: wrap;
|
|
307
|
+
padding: var(--ic-space-md) var(--ic-space-lg);
|
|
308
|
+
background: var(--ic-surface);
|
|
309
|
+
border: 1px solid var(--ic-border);
|
|
310
|
+
border-radius: var(--ic-radius-lg);
|
|
311
|
+
margin-bottom: var(--ic-space-md);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.info-item {
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: column;
|
|
317
|
+
gap: 2px;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.info-label {
|
|
321
|
+
font-size: var(--ic-text-xs);
|
|
322
|
+
color: var(--ic-text-dim);
|
|
323
|
+
text-transform: uppercase;
|
|
324
|
+
letter-spacing: 0.05em;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.info-value {
|
|
328
|
+
font-size: var(--ic-text-sm);
|
|
329
|
+
color: var(--ic-text);
|
|
330
|
+
font-weight: 500;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.actions-bar {
|
|
334
|
+
display: flex;
|
|
335
|
+
gap: var(--ic-space-sm);
|
|
336
|
+
margin-bottom: var(--ic-space-md);
|
|
337
|
+
flex-wrap: wrap;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.btn {
|
|
341
|
+
padding: var(--ic-space-xs) var(--ic-space-md);
|
|
342
|
+
border-radius: var(--ic-radius-md);
|
|
343
|
+
font-size: var(--ic-text-sm);
|
|
344
|
+
font-family: inherit;
|
|
345
|
+
cursor: pointer;
|
|
346
|
+
transition: background var(--ic-transition),
|
|
347
|
+
border-color var(--ic-transition);
|
|
348
|
+
white-space: nowrap;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.btn-ghost {
|
|
352
|
+
background: transparent;
|
|
353
|
+
border: 1px solid var(--ic-border);
|
|
354
|
+
color: var(--ic-text-muted);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.btn-ghost:hover {
|
|
358
|
+
border-color: var(--ic-text-dim);
|
|
359
|
+
color: var(--ic-text);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.btn-danger {
|
|
363
|
+
background: transparent;
|
|
364
|
+
border: 1px solid var(--ic-error);
|
|
365
|
+
color: var(--ic-error);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.btn-danger:hover {
|
|
369
|
+
background: var(--ic-error);
|
|
370
|
+
color: #fff;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* Tab bar */
|
|
374
|
+
.tab-bar {
|
|
375
|
+
display: flex;
|
|
376
|
+
gap: 0;
|
|
377
|
+
border-bottom: 1px solid var(--ic-border);
|
|
378
|
+
margin-bottom: var(--ic-space-lg);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.tab {
|
|
382
|
+
padding: var(--ic-space-sm) var(--ic-space-lg);
|
|
383
|
+
background: transparent;
|
|
384
|
+
border: none;
|
|
385
|
+
border-bottom: 2px solid transparent;
|
|
386
|
+
color: var(--ic-text-muted);
|
|
387
|
+
font-size: var(--ic-text-sm);
|
|
388
|
+
font-family: inherit;
|
|
389
|
+
font-weight: 500;
|
|
390
|
+
cursor: pointer;
|
|
391
|
+
transition: color var(--ic-transition),
|
|
392
|
+
border-color var(--ic-transition);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.tab:hover {
|
|
396
|
+
color: var(--ic-text);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.tab--active {
|
|
400
|
+
color: var(--ic-accent);
|
|
401
|
+
border-bottom-color: var(--ic-accent);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* Tab content sections */
|
|
405
|
+
.tab-content {
|
|
406
|
+
display: none;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.tab-content--active {
|
|
410
|
+
display: block;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/* Conversation */
|
|
414
|
+
.conversation {
|
|
415
|
+
display: flex;
|
|
416
|
+
flex-direction: column;
|
|
417
|
+
gap: var(--ic-space-md);
|
|
418
|
+
max-height: 60vh;
|
|
419
|
+
overflow-y: auto;
|
|
420
|
+
padding: var(--ic-space-md);
|
|
421
|
+
background: var(--ic-bg);
|
|
422
|
+
border: 1px solid var(--ic-border);
|
|
423
|
+
border-radius: var(--ic-radius-lg);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/* Compaction marker */
|
|
427
|
+
.compaction-marker {
|
|
428
|
+
display: flex;
|
|
429
|
+
align-items: center;
|
|
430
|
+
gap: var(--ic-space-md);
|
|
431
|
+
padding: var(--ic-space-xs) 0;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.compaction-marker hr {
|
|
435
|
+
flex: 1;
|
|
436
|
+
border: none;
|
|
437
|
+
border-top: 1px dashed var(--ic-border);
|
|
438
|
+
margin: 0;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.compaction-marker span {
|
|
442
|
+
color: var(--ic-text-dim);
|
|
443
|
+
font-size: var(--ic-text-xs);
|
|
444
|
+
font-style: italic;
|
|
445
|
+
white-space: nowrap;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* Context State tab */
|
|
449
|
+
.context-summary {
|
|
450
|
+
display: flex;
|
|
451
|
+
gap: var(--ic-space-md);
|
|
452
|
+
flex-wrap: wrap;
|
|
453
|
+
margin-bottom: var(--ic-space-md);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.context-badge {
|
|
457
|
+
display: flex;
|
|
458
|
+
align-items: center;
|
|
459
|
+
gap: var(--ic-space-xs);
|
|
460
|
+
background: var(--ic-surface-2, #1f2937);
|
|
461
|
+
border: 1px solid var(--ic-border);
|
|
462
|
+
border-radius: var(--ic-radius-md);
|
|
463
|
+
padding: var(--ic-space-xs) var(--ic-space-sm);
|
|
464
|
+
font-size: var(--ic-text-sm);
|
|
465
|
+
color: var(--ic-text-dim);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.context-badge .badge-value {
|
|
469
|
+
font-weight: 600;
|
|
470
|
+
color: var(--ic-text);
|
|
471
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.cache-badge {
|
|
475
|
+
padding: 2px var(--ic-space-sm);
|
|
476
|
+
border-radius: var(--ic-radius-sm);
|
|
477
|
+
font-size: var(--ic-text-xs);
|
|
478
|
+
font-weight: 600;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.cache-badge--hit {
|
|
482
|
+
background: color-mix(in srgb, var(--ic-success) 20%, transparent);
|
|
483
|
+
color: var(--ic-success);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.cache-badge--miss {
|
|
487
|
+
background: color-mix(in srgb, var(--ic-warning) 20%, transparent);
|
|
488
|
+
color: var(--ic-warning);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.budget-section {
|
|
492
|
+
margin-bottom: var(--ic-space-lg);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.budget-section-title {
|
|
496
|
+
font-size: var(--ic-text-sm);
|
|
497
|
+
font-weight: 600;
|
|
498
|
+
color: var(--ic-text);
|
|
499
|
+
margin-bottom: var(--ic-space-sm);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* Execution list */
|
|
503
|
+
.execution-list {
|
|
504
|
+
display: flex;
|
|
505
|
+
flex-direction: column;
|
|
506
|
+
gap: var(--ic-space-xs);
|
|
507
|
+
margin-bottom: var(--ic-space-md);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.execution-row {
|
|
511
|
+
display: flex;
|
|
512
|
+
align-items: center;
|
|
513
|
+
gap: var(--ic-space-md);
|
|
514
|
+
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
515
|
+
background: var(--ic-surface);
|
|
516
|
+
border: 1px solid var(--ic-border);
|
|
517
|
+
border-radius: var(--ic-radius-md);
|
|
518
|
+
cursor: pointer;
|
|
519
|
+
font-size: var(--ic-text-sm);
|
|
520
|
+
transition: background var(--ic-transition);
|
|
521
|
+
width: 100%;
|
|
522
|
+
color: inherit;
|
|
523
|
+
font-family: inherit;
|
|
524
|
+
text-align: left;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.execution-row:hover {
|
|
528
|
+
background: var(--ic-surface-2, #1f2937);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.execution-row.selected {
|
|
532
|
+
border-color: var(--ic-accent);
|
|
533
|
+
background: rgba(59, 130, 246, 0.1);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.exec-time {
|
|
537
|
+
color: var(--ic-text-dim);
|
|
538
|
+
min-width: 6rem;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.exec-duration {
|
|
542
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
543
|
+
color: var(--ic-text-dim);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.exec-tokens {
|
|
547
|
+
color: var(--ic-text-dim);
|
|
548
|
+
flex: 1;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.waterfall-card {
|
|
552
|
+
background: var(--ic-surface);
|
|
553
|
+
border: 1px solid var(--ic-border);
|
|
554
|
+
border-radius: var(--ic-radius-lg);
|
|
555
|
+
padding: var(--ic-space-lg);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/* Metrics tab */
|
|
559
|
+
.metrics-grid {
|
|
560
|
+
display: grid;
|
|
561
|
+
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
|
|
562
|
+
gap: var(--ic-space-md);
|
|
563
|
+
margin-bottom: var(--ic-space-lg);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.metrics-section-title {
|
|
567
|
+
font-size: var(--ic-text-sm);
|
|
568
|
+
font-weight: 600;
|
|
569
|
+
color: var(--ic-text-muted);
|
|
570
|
+
text-transform: uppercase;
|
|
571
|
+
letter-spacing: 0.05em;
|
|
572
|
+
margin-bottom: var(--ic-space-sm);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.status-badge {
|
|
576
|
+
display: inline-flex;
|
|
577
|
+
align-items: center;
|
|
578
|
+
gap: var(--ic-space-xs);
|
|
579
|
+
padding: 2px var(--ic-space-sm);
|
|
580
|
+
border-radius: var(--ic-radius-sm);
|
|
581
|
+
font-size: var(--ic-text-xs);
|
|
582
|
+
font-weight: 600;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.status-badge--active {
|
|
586
|
+
background: color-mix(in srgb, var(--ic-success) 20%, transparent);
|
|
587
|
+
color: var(--ic-success);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.status-badge--idle {
|
|
591
|
+
background: color-mix(in srgb, var(--ic-warning) 20%, transparent);
|
|
592
|
+
color: var(--ic-warning);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.status-badge--expired {
|
|
596
|
+
background: color-mix(in srgb, var(--ic-text-dim) 20%, transparent);
|
|
597
|
+
color: var(--ic-text-dim);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/* Loading & error */
|
|
601
|
+
.loading-container {
|
|
602
|
+
display: flex;
|
|
603
|
+
justify-content: center;
|
|
604
|
+
padding: var(--ic-space-2xl);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.error-container {
|
|
608
|
+
padding: var(--ic-space-lg);
|
|
609
|
+
text-align: center;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.error-message {
|
|
613
|
+
color: var(--ic-error);
|
|
614
|
+
font-size: var(--ic-text-sm);
|
|
615
|
+
margin-bottom: var(--ic-space-md);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.retry-btn {
|
|
619
|
+
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
620
|
+
background: var(--ic-accent);
|
|
621
|
+
border: none;
|
|
622
|
+
border-radius: var(--ic-radius-md);
|
|
623
|
+
color: #fff;
|
|
624
|
+
font-size: var(--ic-text-sm);
|
|
625
|
+
font-family: inherit;
|
|
626
|
+
cursor: pointer;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.retry-btn:hover {
|
|
630
|
+
background: var(--ic-accent-hover);
|
|
631
|
+
}
|
|
632
|
+
`];i([b({attribute:!1})],a.prototype,"apiClient",2);i([b({attribute:!1})],a.prototype,"rpcClient",2);i([b()],a.prototype,"sessionKey",2);i([n()],a.prototype,"_session",2);i([n()],a.prototype,"_messages",2);i([n()],a.prototype,"_loading",2);i([n()],a.prototype,"_error",2);i([n()],a.prototype,"_showConfirm",2);i([n()],a.prototype,"_confirmAction",2);i([n()],a.prototype,"_activeTab",2);i([n()],a.prototype,"_contextLoaded",2);i([n()],a.prototype,"_metricsLoaded",2);i([n()],a.prototype,"_pipelineSnapshots",2);i([n()],a.prototype,"_dagCompactions",2);i([n()],a.prototype,"_selectedSnapshot",2);i([n()],a.prototype,"_sessionBilling",2);a=i([x("ic-session-detail")],a);export{a as IcSessionDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function s(n){if(!n||typeof n!="string")return;let e=n.split(":"),r;if(e[0]==="agent"&&e.length>=5&&(r=e[1],e=e.slice(2)),e.length<3)return;const i={tenantId:e[0],userId:e[1],channelId:e[2]};r!==void 0&&(i.agentId=r);for(let t=3;t<e.length;t++)e[t]==="peer"&&t+1<e.length?i.peerId=e[++t]:e[t]==="guild"&&t+1<e.length?i.guildId=e[++t]:e[t]==="thread"&&t+1<e.length&&(i.threadId=e[++t]);return i}function l(n){return n.userId.length>16?n.userId.slice(0,14)+"...":n.userId}function d(n){const e=Date.now()-n;return e<3e5?"active":e<36e5?"idle":"expired"}export{d as c,l as f,s as p};
|