loopengine 0.5.10 → 0.5.12
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/dist/web/agents-config-page.js +339 -131
- package/dist/web/agents-list-page.js +167 -127
- package/dist/web/audit-page.js +59 -40
- package/dist/web/console-shell.js +9 -5
- package/dist/web/dev-ui-styles.js +21 -5
- package/dist/web/goals-page.js +483 -372
- package/dist/web/inbox-page.js +38 -40
- package/dist/web/workflows-overview-page.js +102 -74
- package/package.json +1 -1
|
@@ -7,169 +7,210 @@
|
|
|
7
7
|
// why the look is a shared import rather than a third copy of the same CSS.
|
|
8
8
|
import { devUiCss } from './dev-ui-styles.js';
|
|
9
9
|
import { consoleShellScript, consoleSidebarHtml } from './console-shell.js';
|
|
10
|
+
import { MASCOT_CSS, mascotSvg } from './mascot.js';
|
|
10
11
|
export const agentsListPageHtml = `<!doctype html>
|
|
11
12
|
<html lang="en">
|
|
12
13
|
<head>
|
|
13
14
|
<meta charset="utf-8">
|
|
14
15
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
15
16
|
<title>LoopEngine Agents</title>
|
|
16
|
-
<style>${devUiCss}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.
|
|
20
|
-
.
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
.
|
|
17
|
+
<style>${devUiCss}${MASCOT_CSS}
|
|
18
|
+
.ag { max-width: 1120px; display: grid; gap: 0; }
|
|
19
|
+
.ag-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 36px 32px 28px; border: 1px solid var(--line); border-bottom: 0; }
|
|
20
|
+
.ag-hero .le-mascot { flex: none; margin-bottom: -6px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .12)); }
|
|
21
|
+
.ag-cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
22
|
+
.ag-cols1 { grid-template-columns: minmax(0, 1fr); }
|
|
23
|
+
.ag-cols1[hidden] { display: none; }
|
|
24
|
+
.ag-card { display: grid; gap: 14px; align-content: start; padding: 20px 22px; background: var(--bg); }
|
|
25
|
+
.ag-filler { background: var(--bg); }
|
|
26
|
+
.ag-card-head { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
|
|
27
|
+
.ag-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-muted); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
|
|
28
|
+
.ag-icon svg { width: 16px; height: 16px; }
|
|
29
|
+
.ag-icon.live { color: var(--good); }
|
|
30
|
+
.ag-card-text { display: grid; gap: 3px; min-width: 0; }
|
|
31
|
+
.ag-card-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; }
|
|
32
|
+
a.ag-card-title:hover { text-decoration: underline; }
|
|
33
|
+
.ag-id { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); font-weight: 400; margin-left: 6px; }
|
|
34
|
+
.ag-card-desc { font-size: 13px; line-height: 1.5; color: var(--ink-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
35
|
+
.ag-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
|
36
|
+
.ag-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); font-size: 12px; color: var(--ink-muted); white-space: nowrap; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
|
|
37
|
+
.ag-chip.strong { background: var(--surface); border-color: transparent; color: var(--ink); font-weight: 500; }
|
|
38
|
+
.ag-chip.good { background: var(--good-soft); border-color: transparent; color: var(--good); font-weight: 600; }
|
|
39
|
+
.ag-chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); font-weight: 600; }
|
|
40
|
+
a.ag-chip:hover { color: var(--ink); border-color: var(--ink-faint); }
|
|
41
|
+
.ag-actions { display: flex; gap: 8px; align-items: center; }
|
|
42
|
+
.ag-actions a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--bg); }
|
|
43
|
+
.ag-actions a:hover { background: var(--surface); }
|
|
44
|
+
.ag-actions a.dark { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
|
|
45
|
+
.ag-actions a.dark:hover { opacity: .88; }
|
|
46
|
+
.ag-tile { display: grid; gap: 6px; align-content: start; padding: 22px; background: var(--bg); text-decoration: none; color: inherit; transition: background .15s; }
|
|
47
|
+
.ag-tile:hover { background: var(--surface); }
|
|
48
|
+
.ag-tile b { font-size: 15px; font-weight: 600; color: var(--ink); }
|
|
49
|
+
.ag-tile span { font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
|
|
50
|
+
.ag-empty { padding: 40px 32px; text-align: center; color: var(--ink-muted); font-size: 14px; background: var(--bg); grid-column: 1 / -1; margin: 0; }
|
|
51
|
+
.ag-topbar-link { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; }
|
|
52
|
+
.ag-topbar-link:hover { background: var(--surface); }
|
|
53
|
+
.hint { font-size: 12.5px; color: var(--ink-muted); }
|
|
30
54
|
.error { font-size: 13px; color: var(--bad); }
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
55
|
+
#newAgentResult { margin: 12px 2px 0; }
|
|
56
|
+
/* New agent, in a dialog like Create schedule. */
|
|
57
|
+
.ag-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .22); overflow: hidden; }
|
|
58
|
+
.ag-dialog::backdrop { background: rgba(20, 24, 25, .35); backdrop-filter: blur(3px); }
|
|
59
|
+
.ag-dialog form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100vh - 50px); }
|
|
60
|
+
.ag-dlg-head { display: flex; align-items: center; gap: 8px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
|
|
61
|
+
.ag-dlg-head h2 { margin: 0 auto 0 0; font-size: 18px; font-weight: 500; }
|
|
62
|
+
.ag-dlg-head button { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; }
|
|
63
|
+
.ag-dlg-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: auto; }
|
|
64
|
+
.ag-dlg-col { display: grid; align-content: start; }
|
|
65
|
+
.ag-dlg-col + .ag-dlg-col { border-left: 1px solid var(--line); background: var(--surface); }
|
|
66
|
+
.ag-field { display: grid; gap: 9px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
|
|
67
|
+
.ag-field > label, .ag-field-k { font-size: 14px; font-weight: 500; }
|
|
68
|
+
.ag-field label { display: grid; gap: 9px; }
|
|
69
|
+
.ag-field .hint { margin: 0; line-height: 1.45; }
|
|
70
|
+
.ag-field input, .ag-field select { height: 38px; border-radius: 9px; font-size: 13.5px; width: 100%; box-sizing: border-box; }
|
|
71
|
+
.ag-field textarea { min-height: 110px; border-radius: 9px; font-size: 13.5px; width: 100%; box-sizing: border-box; }
|
|
72
|
+
.ag-dlg-foot { padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); min-height: 46px; display: flex; align-items: center; }
|
|
73
|
+
.ag-dlg-foot:not(:has(.error[style*="block"])) { display: none; }
|
|
74
|
+
@media (max-width: 860px) {
|
|
75
|
+
.ag-hero { padding: 24px 18px 20px; }
|
|
76
|
+
.ag-hero .le-mascot { display: none; }
|
|
77
|
+
.ag-cols2 { grid-template-columns: minmax(0, 1fr); }
|
|
78
|
+
.ag-dlg-body { grid-template-columns: minmax(0, 1fr); }
|
|
79
|
+
.ag-dlg-col + .ag-dlg-col { border-left: 0; border-top: 1px solid var(--line); }
|
|
80
|
+
.le-search, .ag-topbar-link { display: none; }
|
|
38
81
|
}
|
|
39
|
-
#newAgentForm h2 { font-size: 15px; margin: 0; }
|
|
40
|
-
#newAgentForm label { display: grid; gap: 4px; font-size: 13px; }
|
|
41
|
-
#newAgentForm .row { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
42
|
-
#newAgentForm details summary { cursor: pointer; color: var(--ink-muted); font-size: 13px; }
|
|
43
|
-
#newAgentForm details[open] { display: grid; gap: 10px; }
|
|
44
|
-
#newAgentForm textarea { min-height: 72px; }
|
|
45
82
|
</style>
|
|
46
83
|
</head>
|
|
47
84
|
<body data-le-page="agents">
|
|
48
85
|
<div class="le-app">
|
|
49
86
|
${consoleSidebarHtml}
|
|
50
87
|
<main class="le-main">
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
<p class="hint" style="margin:0">Not sure what to build? <a href="/interview">Find your first agent</a>: a short interview that suggests one and creates it. Then give it workflows, described in your own words or from an example.</p>
|
|
63
|
-
<h2>New agent</h2>
|
|
64
|
-
<label>Name <span class="hint">(what you'll see in the sidebar; you can change it later)</span>
|
|
65
|
-
<input type="text" name="displayName" placeholder="Weather assistant" maxlength="60" required>
|
|
66
|
-
</label>
|
|
67
|
-
<label>ID <span class="hint">(lowercase and hyphens; its folder agents/<id>/ and API address use it, so it can't be changed later)</span>
|
|
68
|
-
<input type="text" name="name" placeholder="weather-assistant" pattern="[a-z0-9]+(-[a-z0-9]+)*" required>
|
|
69
|
-
</label>
|
|
70
|
-
<label>Instructions <span class="hint">(who it is and the rules it always follows)</span>
|
|
71
|
-
<textarea name="systemPrompt" placeholder="You are ..."></textarea>
|
|
72
|
-
</label>
|
|
73
|
-
<label>Model provider
|
|
74
|
-
<select name="provider">
|
|
75
|
-
<option value="openai" selected>openai</option>
|
|
76
|
-
<option value="anthropic">anthropic</option>
|
|
77
|
-
<option value="gemini">gemini</option>
|
|
78
|
-
<option value="meta">meta</option>
|
|
79
|
-
<option value="xai">xai</option>
|
|
80
|
-
<option value="deepseek">deepseek</option>
|
|
81
|
-
<option value="kimi">kimi</option>
|
|
82
|
-
<option value="glm">glm</option>
|
|
83
|
-
</select>
|
|
84
|
-
</label>
|
|
85
|
-
<label id="modelNameLabel">Model name <span class="hint">(choose Other… to type a model that isn't listed)</span>
|
|
86
|
-
<input type="text" name="modelName" value="gpt-6-luna" placeholder="model name">
|
|
87
|
-
</label>
|
|
88
|
-
<div class="row">
|
|
89
|
-
<button type="submit">Create agent</button>
|
|
90
|
-
<button type="button" id="cancelNewAgentBtn">Cancel</button>
|
|
91
|
-
</div>
|
|
92
|
-
</form>
|
|
93
|
-
<p class="error" id="newAgentError" style="display:none"></p>
|
|
88
|
+
<header class="le-topbar">
|
|
89
|
+
<button type="button" class="le-menu-btn" data-le-menu aria-label="Open navigation">☰</button>
|
|
90
|
+
<h1 class="le-topbar-title">Agents</h1>
|
|
91
|
+
<span class="le-topbar-gap"></span>
|
|
92
|
+
<label class="le-search"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="M20 20l-3.5-3.5"/></svg><input type="search" id="agSearch" placeholder="Search agents" aria-label="Search agents"></label>
|
|
93
|
+
<a class="ag-topbar-link" href="/interview">Find your first agent</a>
|
|
94
|
+
<button type="button" id="newAgentBtn" class="le-btn-dark">+ New agent</button>
|
|
95
|
+
</header>
|
|
96
|
+
<div class="le-scroll"><div class="le-page"><div class="ag">
|
|
97
|
+
<div class="ag-hero"><div><h2 class="le-display">Your agents</h2><p class="le-display-sub" id="agSub">Each has its own instructions, tools and permissions. Open one to chat with it, give it workflows, or change how it works.</p></div>${mascotSvg(92)}</div>
|
|
98
|
+
<div class="le-grid ag-cols2" id="agentUl"><p class="ag-empty">Loading…</p></div>
|
|
94
99
|
<p class="hint" id="newAgentResult" style="display:none"></p>
|
|
95
|
-
|
|
96
|
-
<p id="empty" style="display:none">No agents yet. Create one above, or add a folder under agents/.</p>
|
|
97
|
-
</div></div>
|
|
100
|
+
</div></div></div>
|
|
98
101
|
</main>
|
|
99
102
|
</div>
|
|
103
|
+
<dialog class="ag-dialog" id="newAgentDialog" aria-labelledby="agDlgTitle">
|
|
104
|
+
<form id="newAgentForm">
|
|
105
|
+
<div class="ag-dlg-head"><h2 id="agDlgTitle">New agent</h2><button type="button" id="cancelNewAgentBtn">Cancel</button><button type="submit" class="primary">Create agent</button></div>
|
|
106
|
+
<div class="ag-dlg-body">
|
|
107
|
+
<div class="ag-dlg-col">
|
|
108
|
+
<div class="ag-field"><label for="agDisplayName">Name</label><input type="text" id="agDisplayName" name="displayName" placeholder="Weather assistant" maxlength="60" required><p class="hint">What you'll see in the sidebar. You can change it later.</p></div>
|
|
109
|
+
<div class="ag-field"><label for="agId">ID</label><input type="text" id="agId" name="name" placeholder="weather-assistant" pattern="[a-z0-9]+(-[a-z0-9]+)*" required><p class="hint">Lowercase and hyphens. Its folder agents/<id>/ and API address use it, so it can't be changed later.</p></div>
|
|
110
|
+
<div class="ag-field"><label for="agPrompt">Instructions</label><textarea id="agPrompt" name="systemPrompt" placeholder="You are ..."></textarea><p class="hint">Who it is and the rules it always follows. Its workflows say what to do.</p></div>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="ag-dlg-col">
|
|
113
|
+
<div class="ag-field"><label for="agProvider">Model provider</label>
|
|
114
|
+
<select id="agProvider" name="provider">
|
|
115
|
+
<option value="openai" selected>openai</option>
|
|
116
|
+
<option value="anthropic">anthropic</option>
|
|
117
|
+
<option value="gemini">gemini</option>
|
|
118
|
+
<option value="meta">meta</option>
|
|
119
|
+
<option value="xai">xai</option>
|
|
120
|
+
<option value="deepseek">deepseek</option>
|
|
121
|
+
<option value="kimi">kimi</option>
|
|
122
|
+
<option value="glm">glm</option>
|
|
123
|
+
</select></div>
|
|
124
|
+
<div class="ag-field" id="modelNameLabel"><label>Model name
|
|
125
|
+
<input type="text" name="modelName" value="gpt-6-luna" placeholder="model name"></label><p class="hint">Choose Other… to type a model that isn't listed.</p></div>
|
|
126
|
+
<div class="ag-field"><span class="ag-field-k">Not sure what to build?</span><p class="hint"><a href="/interview">Find your first agent</a>: a short interview suggests one that fits your work and creates it. Then give it workflows, in your own words or from an example.</p></div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="ag-dlg-foot"><p class="error" id="newAgentError" style="display:none;margin:0"></p></div>
|
|
130
|
+
</form>
|
|
131
|
+
</dialog>
|
|
100
132
|
${consoleShellScript}
|
|
101
133
|
<script>
|
|
102
134
|
(function () {
|
|
103
135
|
var agentUl = document.getElementById('agentUl');
|
|
104
|
-
var empty = document.getElementById('empty');
|
|
105
136
|
var newAgentBtn = document.getElementById('newAgentBtn');
|
|
137
|
+
var newAgentDialog = document.getElementById('newAgentDialog');
|
|
106
138
|
var newAgentForm = document.getElementById('newAgentForm');
|
|
107
139
|
var newAgentError = document.getElementById('newAgentError');
|
|
108
140
|
var newAgentResult = document.getElementById('newAgentResult');
|
|
109
141
|
var cancelNewAgentBtn = document.getElementById('cancelNewAgentBtn');
|
|
142
|
+
var search = document.getElementById('agSearch');
|
|
143
|
+
var ICON_AGENT = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="7" width="16" height="12" rx="3"/><path d="M12 3v4"/><circle cx="9" cy="13" r="1"/><circle cx="15" cy="13" r="1"/></svg>';
|
|
144
|
+
|
|
145
|
+
var agents = [];
|
|
146
|
+
var workflowsBy = null;
|
|
147
|
+
|
|
148
|
+
function escapeHtml(s) {
|
|
149
|
+
return String(s).replace(/[&<>"']/g, function (c) {
|
|
150
|
+
return { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c];
|
|
151
|
+
});
|
|
152
|
+
}
|
|
110
153
|
|
|
111
|
-
|
|
112
|
-
//
|
|
113
|
-
|
|
154
|
+
// Each agent as a card: its name, its instructions in a line or two,
|
|
155
|
+
// what it does (its workflows, from /workflows/overview), Chat and Open.
|
|
156
|
+
function cardHtml(agent) {
|
|
157
|
+
var qs = '?agent=' + encodeURIComponent(agent.name);
|
|
158
|
+
var list = workflowsBy ? workflowsBy[agent.name] || [] : null;
|
|
159
|
+
var live = list ? list.filter(function (w) { return w.live; }).length : 0;
|
|
160
|
+
var chips = list === null ? '<span class="ag-chip">' + String.fromCharCode(8230) + '</span>'
|
|
161
|
+
: list.length
|
|
162
|
+
? '<span class="ag-chip strong">' + list.length + (list.length === 1 ? ' workflow' : ' workflows') + '</span>' + (live ? '<span class="ag-chip good">' + live + ' running</span>' : '') +
|
|
163
|
+
list.slice(0, 3).map(function (w) { return '<a class="ag-chip" href="/agents/config' + qs + '&tab=workflows&workflow=' + encodeURIComponent(w.id) + '" title="' + escapeHtml(w.title) + '">' + escapeHtml(w.title) + '</a>'; }).join('') +
|
|
164
|
+
(list.length > 3 ? '<span class="hint">+' + (list.length - 3) + ' more</span>' : '')
|
|
165
|
+
: '<a class="ag-chip" href="/workflows/new' + qs + '">No workflows yet: give it one</a>';
|
|
166
|
+
return '<div class="ag-card">' +
|
|
167
|
+
'<div class="ag-card-head"><span class="ag-icon' + (live ? ' live' : '') + '">' + ICON_AGENT + '</span>' +
|
|
168
|
+
'<span class="ag-card-text"><a class="ag-card-title" href="/agents/config' + qs + '">' + escapeHtml(agent.displayName || agent.name) + (agent.displayName ? '<span class="ag-id">' + escapeHtml(agent.name) + '</span>' : '') + '</a>' +
|
|
169
|
+
(agent.systemPrompt ? '<span class="ag-card-desc">' + escapeHtml(agent.systemPrompt) + '</span>' : '') + '</span>' +
|
|
170
|
+
'<span class="ag-actions"><a class="dark" href="/playground' + qs + '">Chat</a><a href="/agents/config' + qs + '">Open</a></span></div>' +
|
|
171
|
+
'<div class="ag-chips">' + chips + (agent.toSet ? '<a class="ag-chip warn" href="/agents/config' + qs + '&tab=env">' + agent.toSet + (agent.toSet === 1 ? ' setting' : ' settings') + ' to set</a>' : '') + '</div>' +
|
|
172
|
+
'</div>';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function render() {
|
|
176
|
+
var q = (search.value || '').trim().toLowerCase();
|
|
177
|
+
var shown = agents.filter(function (a) { return !q || [a.name, a.displayName || '', a.systemPrompt || ''].join(' ').toLowerCase().indexOf(q) !== -1; });
|
|
178
|
+
var total = workflowsBy ? Object.keys(workflowsBy).reduce(function (n, k) { return n + workflowsBy[k].length; }, 0) : 0;
|
|
179
|
+
if (agents.length) document.getElementById('agSub').textContent = agents.length + (agents.length === 1 ? ' agent' : ' agents') + (total ? ', ' + total + (total === 1 ? ' workflow' : ' workflows') : '') + '. Open one to chat with it, give it workflows, or change how it works.';
|
|
180
|
+
var tiles = q ? [] : ['<a class="ag-tile" href="/agents?new=1" data-new-tile><b>+ New agent</b><span>Its own instructions, tools and permissions, for one area of your work.</span></a>',
|
|
181
|
+
'<a class="ag-tile" href="/interview"><b>Find an agent to build</b><span>A short interview suggests one that fits your work, and creates it.</span></a>'];
|
|
182
|
+
var cells = shown.map(cardHtml).concat(tiles);
|
|
183
|
+
agentUl.innerHTML = !agents.length && !q ? tiles.join('')
|
|
184
|
+
: shown.length || tiles.length ? cells.join('') + (cells.length % 2 ? '<div class="ag-filler" aria-hidden="true"></div>' : '')
|
|
185
|
+
: '<p class="ag-empty">No agent matches.</p>';
|
|
186
|
+
var tile = agentUl.querySelector('[data-new-tile]');
|
|
187
|
+
if (tile) tile.addEventListener('click', function (ev) { ev.preventDefault(); newAgentBtn.click(); });
|
|
188
|
+
}
|
|
189
|
+
search.addEventListener('input', render);
|
|
190
|
+
|
|
191
|
+
// What each agent does, from its workflows.
|
|
114
192
|
function fillWorkflows() {
|
|
115
193
|
return fetch('/workflows/overview', { headers: { accept: 'application/json' } })
|
|
116
194
|
.then(function (r) { return r.ok ? r.json() : null; })
|
|
117
195
|
.then(function (d) {
|
|
118
|
-
|
|
119
|
-
((d && d.workflows) || []).forEach(function (w) { (
|
|
120
|
-
|
|
121
|
-
var box = document.querySelector('[data-agent-does="' + CSS.escape(name) + '"]');
|
|
122
|
-
if (!box || !d) return;
|
|
123
|
-
var list = by[name] || [];
|
|
124
|
-
var link = function (w) { return '<a href="/agents/config?agent=' + encodeURIComponent(name) + '&tab=workflows&workflow=' + encodeURIComponent(w.id) + '">' + escapeHtml(w.title) + '</a>'; };
|
|
125
|
-
box.innerHTML = list.length
|
|
126
|
-
? '<strong>' + list.length + (list.length === 1 ? ' workflow' : ' workflows') + ':</strong> ' + list.slice(0, 3).map(link).join(', ') + (list.length > 3 ? ' <span class="hint">and ' + (list.length - 3) + ' more</span>' : '')
|
|
127
|
-
: '<span class="hint">No workflows yet. <a href="/workflows/new?agent=' + encodeURIComponent(name) + '">Give it one</a></span>';
|
|
128
|
-
});
|
|
196
|
+
workflowsBy = {};
|
|
197
|
+
((d && d.workflows) || []).forEach(function (w) { (workflowsBy[w.agent] = workflowsBy[w.agent] || []).push(w); });
|
|
198
|
+
render();
|
|
129
199
|
})
|
|
130
200
|
.catch(function () {});
|
|
131
201
|
}
|
|
132
202
|
|
|
133
|
-
|
|
134
|
-
return String(s).replace(/[&<>"']/g, function (c) {
|
|
135
|
-
return { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c];
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// (Re)loads the list from GET /agents — factored out so a successful
|
|
140
|
-
// create can refresh it directly instead of duplicating this fetch.
|
|
203
|
+
// (Re)loads the list from GET /agents.
|
|
141
204
|
function loadAgents() {
|
|
142
205
|
fetch('/agents')
|
|
143
206
|
.then(function (r) { return r.json(); })
|
|
144
207
|
.then(function (data) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
agentNames = agents.map(function (a) { return a.name; });
|
|
148
|
-
if (!agents.length) {
|
|
149
|
-
empty.style.display = 'block';
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
empty.style.display = 'none';
|
|
153
|
-
for (var i = 0; i < agents.length; i++) {
|
|
154
|
-
var agent = agents[i];
|
|
155
|
-
var li = document.createElement('li');
|
|
156
|
-
var qs = '?agent=' + encodeURIComponent(agent.name);
|
|
157
|
-
li.innerHTML =
|
|
158
|
-
'<div class="le-card agent-card">' +
|
|
159
|
-
'<div class="name">' + escapeHtml(agent.displayName || agent.name) + (agent.displayName ? ' <span class="hint" style="font-family:var(--font-mono);font-weight:400">' + escapeHtml(agent.name) + '</span>' : '') + '</div>' +
|
|
160
|
-
'<div class="does" data-agent-does="' + escapeHtml(agent.name) + '"></div>' +
|
|
161
|
-
'<div class="prompt">' + escapeHtml(agent.systemPrompt) + '</div>' +
|
|
162
|
-
'<div class="links">' +
|
|
163
|
-
'<a class="primary" href="/playground' + qs + '">Chat</a>' +
|
|
164
|
-
'<a href="/agents/config' + qs + '">Open</a>' +
|
|
165
|
-
'</div></div>';
|
|
166
|
-
agentUl.appendChild(li);
|
|
167
|
-
}
|
|
208
|
+
agents = data.agents || [];
|
|
209
|
+
render();
|
|
168
210
|
})
|
|
169
211
|
.then(fillWorkflows)
|
|
170
212
|
.catch(function (err) {
|
|
171
|
-
|
|
172
|
-
empty.style.display = 'block';
|
|
213
|
+
agentUl.innerHTML = '<p class="ag-empty">Could not load agents: ' + escapeHtml(err.message) + '</p>';
|
|
173
214
|
});
|
|
174
215
|
}
|
|
175
216
|
|
|
@@ -206,9 +247,9 @@ ${consoleShellScript}
|
|
|
206
247
|
newAgentForm.addEventListener('reset', function () { setTimeout(applyProviderKeys, 0); });
|
|
207
248
|
|
|
208
249
|
newAgentBtn.addEventListener('click', function () {
|
|
209
|
-
newAgentBtn.style.display = 'none';
|
|
210
|
-
newAgentForm.style.display = 'grid';
|
|
211
250
|
newAgentResult.style.display = 'none';
|
|
251
|
+
newAgentError.style.display = 'none';
|
|
252
|
+
if (!newAgentDialog.open) newAgentDialog.showModal();
|
|
212
253
|
newAgentForm.querySelector('input[name="displayName"]').focus();
|
|
213
254
|
// Checks which providers have keys, then loads the chosen provider's
|
|
214
255
|
// models; both when the form opens, not on every visit to this page.
|
|
@@ -233,9 +274,9 @@ ${consoleShellScript}
|
|
|
233
274
|
});
|
|
234
275
|
newAgentForm.addEventListener('reset', function () { idTyped = false; });
|
|
235
276
|
|
|
277
|
+
newAgentDialog.addEventListener('click', function (ev) { if (ev.target === newAgentDialog) newAgentDialog.close(); });
|
|
236
278
|
cancelNewAgentBtn.addEventListener('click', function () {
|
|
237
|
-
|
|
238
|
-
newAgentBtn.style.display = '';
|
|
279
|
+
newAgentDialog.close();
|
|
239
280
|
newAgentError.style.display = 'none';
|
|
240
281
|
});
|
|
241
282
|
|
|
@@ -269,8 +310,7 @@ ${consoleShellScript}
|
|
|
269
310
|
.then(function (r) { return r.json().then(function (j) { return { ok: r.ok, body: j }; }); })
|
|
270
311
|
.then(function (result) {
|
|
271
312
|
if (!result.ok) throw new Error(result.body.error || 'request failed');
|
|
272
|
-
|
|
273
|
-
newAgentBtn.style.display = '';
|
|
313
|
+
newAgentDialog.close();
|
|
274
314
|
newAgentForm.reset();
|
|
275
315
|
newAgentResult.style.display = 'block';
|
|
276
316
|
if (result.body.registered) {
|
package/dist/web/audit-page.js
CHANGED
|
@@ -23,27 +23,27 @@ export const auditPageHtml = `<!doctype html>
|
|
|
23
23
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
24
24
|
<title>Audit</title>
|
|
25
25
|
<style>${devUiCss}
|
|
26
|
-
.au { max-width:
|
|
27
|
-
.au-
|
|
28
|
-
.au-
|
|
29
|
-
.au-
|
|
30
|
-
.au-
|
|
31
|
-
.au-
|
|
32
|
-
.au-
|
|
33
|
-
.au-check { padding:
|
|
26
|
+
.au { max-width: 1180px; display: grid; gap: 14px; }
|
|
27
|
+
.au-topbar { flex-wrap: wrap; row-gap: 8px; }
|
|
28
|
+
.au-tool { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 13.5px; font-weight: 500; color: var(--ink); }
|
|
29
|
+
.au-tool:hover:not(:disabled) { background: var(--surface); }
|
|
30
|
+
.au-grid { grid-template-columns: minmax(0, 1fr); }
|
|
31
|
+
.au-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 20px; background: var(--bg); }
|
|
32
|
+
.au-bar select { height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--surface); font-size: 13px; color: var(--ink); max-width: 200px; }
|
|
33
|
+
.au-check { padding: 12px 16px; border-radius: 10px; font-size: 13px; background: var(--good-soft); color: var(--good); }
|
|
34
34
|
.au-check.bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
|
|
35
35
|
.au-check .hint { display: block; margin-top: 2px; font-weight: 400; }
|
|
36
|
-
.au-summary { border: 1px solid var(--line);
|
|
36
|
+
.au-summary { border: 1px solid var(--line); padding: 18px 20px; display: grid; gap: 10px; background: var(--bg); }
|
|
37
37
|
.au-summary[hidden], .au-check[hidden] { display: none; }
|
|
38
|
-
.au-summary h2 { margin: 0; font-size:
|
|
38
|
+
.au-summary h2 { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
|
|
39
39
|
.au-summary ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; }
|
|
40
40
|
.au-summary-tools { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
41
|
-
.au-summary-tools a { font-size: 13px; font-weight: 600; color: var(--
|
|
41
|
+
.au-summary-tools a { display: inline-flex; align-items: center; height: 32px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; }
|
|
42
42
|
.au-summary-tools a.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
|
|
43
|
-
.au-
|
|
44
|
-
.au-
|
|
45
|
-
.au-row
|
|
46
|
-
.au-head {
|
|
43
|
+
.au-list { background: var(--bg); }
|
|
44
|
+
.au-row, .au-head { display: grid; grid-template-columns: 136px minmax(0, 170px) minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
|
|
45
|
+
.au-row:hover { background: var(--surface); }
|
|
46
|
+
.au-head { padding-top: 10px; padding-bottom: 10px; background: var(--surface); font-size: 12px; font-weight: 500; color: var(--ink-faint); }
|
|
47
47
|
.au-who { overflow-wrap: anywhere; }
|
|
48
48
|
.au-who.system { color: var(--ink-muted); font-style: italic; }
|
|
49
49
|
.au-res { display: grid; gap: 1px; min-width: 0; }
|
|
@@ -71,10 +71,11 @@ export const auditPageHtml = `<!doctype html>
|
|
|
71
71
|
.chg-ins { background: var(--good-soft); color: var(--good); padding: 1px 6px; }
|
|
72
72
|
.chg-note { color: var(--ink-muted); font-family: inherit; font-weight: 400; }
|
|
73
73
|
.chg details summary { cursor: pointer; color: var(--accent-ink); font-family: var(--font-sans, inherit); font-size: 12px; margin-top: 2px; }
|
|
74
|
-
.au-empty { padding:
|
|
75
|
-
.au-more { justify-self: center; }
|
|
74
|
+
.au-empty { margin: 0; padding: 40px 20px; text-align: center; color: var(--ink-muted); font-size: 13.5px; }
|
|
75
|
+
.au-more { justify-self: center; height: 34px; padding: 0 14px; border-radius: 9px; }
|
|
76
76
|
.error { font-size: 13px; color: var(--bad); margin: 0; }
|
|
77
77
|
@media (max-width: 720px) {
|
|
78
|
+
.le-search { display: none; }
|
|
78
79
|
.au-head { display: none; }
|
|
79
80
|
.au-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
|
|
80
81
|
}
|
|
@@ -84,31 +85,34 @@ export const auditPageHtml = `<!doctype html>
|
|
|
84
85
|
<div class="le-app">
|
|
85
86
|
${consoleSidebarHtml}
|
|
86
87
|
<main class="le-main">
|
|
87
|
-
<
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</
|
|
92
|
-
</
|
|
93
|
-
|
|
88
|
+
<header class="le-topbar au-topbar">
|
|
89
|
+
<button type="button" class="le-menu-btn" data-le-menu aria-label="Open navigation">☰</button>
|
|
90
|
+
<h1 class="le-topbar-title">Audit</h1>
|
|
91
|
+
<span class="le-seg" role="tablist" aria-label="Show" id="auKinds">
|
|
92
|
+
<button type="button" role="tab" data-kind="change" aria-selected="true">Changes</button><button type="button" role="tab" data-kind="decision" aria-selected="false">Approvals</button><button type="button" role="tab" data-kind="answer" aria-selected="false">Answers</button><button type="button" role="tab" data-kind="feedback" aria-selected="false">Feedback</button><button type="button" role="tab" data-kind="all" aria-selected="false">Everything</button>
|
|
93
|
+
</span>
|
|
94
|
+
<span class="le-topbar-gap"></span>
|
|
95
|
+
<label class="le-search"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="M20 20l-3.5-3.5"/></svg><input type="search" id="auQ" placeholder="Search the log" aria-label="Search"></label>
|
|
96
|
+
<button type="button" class="au-tool" id="auVerify">Verify log</button>
|
|
97
|
+
<a class="le-btn-dark" id="auExport" href="/audit/events.csv" download>Export CSV</a>
|
|
98
|
+
</header>
|
|
94
99
|
<div class="le-scroll"><div class="le-page"><div class="au">
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
<select id="auBy" aria-label="Person"><option value="">Anyone</option></select>
|
|
99
|
-
<select id="auKind" aria-label="Kind">
|
|
100
|
-
<option value="change">Changes to workflows and settings</option><option value="decision">Approvals in runs</option><option value="answer">Answers in runs</option><option value="feedback">Feedback on runs</option><option value="all">Everything</option>
|
|
101
|
-
</select>
|
|
102
|
-
<select id="auPeriod" aria-label="Period">
|
|
103
|
-
<option value="7">Last 7 days</option><option value="30" selected>Last 30 days</option><option value="90">Last 90 days</option><option value="365">Last year</option><option value="">All time</option>
|
|
104
|
-
</select>
|
|
105
|
-
<input type="search" id="auQ" placeholder="Search" aria-label="Search">
|
|
106
|
-
<span class="au-actions"><button type="button" class="au-verify" id="auVerify">Verify log</button>
|
|
107
|
-
<a class="au-export" id="auExport" href="/audit/events.csv" download>Export CSV</a></span>
|
|
108
|
-
</div>
|
|
100
|
+
<select id="auKind" aria-label="Kind" hidden>
|
|
101
|
+
<option value="change">Changes to workflows and settings</option><option value="decision">Approvals in runs</option><option value="answer">Answers in runs</option><option value="feedback">Feedback on runs</option><option value="all">Everything</option>
|
|
102
|
+
</select>
|
|
109
103
|
<div class="au-check" id="auCheck" role="status" hidden></div>
|
|
110
104
|
<section class="au-summary" id="auSummary" hidden></section>
|
|
111
|
-
<div
|
|
105
|
+
<div class="le-grid au-grid">
|
|
106
|
+
<div class="au-bar">
|
|
107
|
+
<select id="auAgent" aria-label="Agent"><option value="">All agents</option></select>
|
|
108
|
+
<select id="auWorkflow" aria-label="Workflow"><option value="">All workflows</option></select>
|
|
109
|
+
<select id="auBy" aria-label="Person"><option value="">Anyone</option></select>
|
|
110
|
+
<select id="auPeriod" aria-label="Period">
|
|
111
|
+
<option value="7">Last 7 days</option><option value="30" selected>Last 30 days</option><option value="90">Last 90 days</option><option value="365">Last year</option><option value="">All time</option>
|
|
112
|
+
</select>
|
|
113
|
+
</div>
|
|
114
|
+
<div id="auList"><p class="hint" style="padding:16px 20px;margin:0">Loading…</p></div>
|
|
115
|
+
</div>
|
|
112
116
|
<button type="button" class="au-more" id="auMore" hidden>Load older</button>
|
|
113
117
|
</div></div></div>
|
|
114
118
|
</main>
|
|
@@ -259,7 +263,7 @@ ${consoleShellScript}
|
|
|
259
263
|
var url = '/audit/events?';
|
|
260
264
|
var extra = append && next != null ? { before: String(next) } : {};
|
|
261
265
|
extra.limit = '100';
|
|
262
|
-
if (!append) list.innerHTML = '<p class="hint">Loading' + String.fromCharCode(8230) + '</p>';
|
|
266
|
+
if (!append) list.innerHTML = '<p class="hint" style="padding:16px 20px;margin:0">Loading' + String.fromCharCode(8230) + '</p>';
|
|
263
267
|
more.hidden = true;
|
|
264
268
|
return fetch(url + query(extra), { headers: { accept: 'application/json' } })
|
|
265
269
|
.then(function (r) { return r.ok ? r.json() : r.json().then(function (b) { throw new Error(b.error || 'HTTP ' + r.status); }); })
|
|
@@ -357,6 +361,21 @@ ${consoleShellScript}
|
|
|
357
361
|
|
|
358
362
|
el.q.value = state.q;
|
|
359
363
|
el.kind.value = state.kind;
|
|
364
|
+
// The kinds, as the top bar's segmented control: each picks the hidden
|
|
365
|
+
// select's value, so the rest reads it as before.
|
|
366
|
+
var kinds = document.getElementById('auKinds');
|
|
367
|
+
function markKind() {
|
|
368
|
+
var bs = kinds.querySelectorAll('[data-kind]');
|
|
369
|
+
for (var b = 0; b < bs.length; b++) bs[b].setAttribute('aria-selected', String(bs[b].getAttribute('data-kind') === el.kind.value));
|
|
370
|
+
}
|
|
371
|
+
kinds.addEventListener('click', function (ev) {
|
|
372
|
+
var b = ev.target.closest('[data-kind]');
|
|
373
|
+
if (!b || b.getAttribute('data-kind') === el.kind.value) return;
|
|
374
|
+
el.kind.value = b.getAttribute('data-kind');
|
|
375
|
+
markKind();
|
|
376
|
+
el.kind.dispatchEvent(new Event('change'));
|
|
377
|
+
});
|
|
378
|
+
markKind();
|
|
360
379
|
el.period.value = state.period;
|
|
361
380
|
function fillFilters(f) {
|
|
362
381
|
filters = f;
|
|
@@ -325,11 +325,15 @@ export const consoleShellScript = `<script>
|
|
|
325
325
|
: (counts[t[0]] != null ? '<span class="le-count">' + counts[t[0]] + '</span>' : '');
|
|
326
326
|
return '<a class="le-tab" data-tab="' + t[0] + '" href="' + tabHref(opts.name, t[0]) + '" aria-selected="' + (t[0] === opts.tab) + '">' + t[1] + count + '</a>';
|
|
327
327
|
}).join('');
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
'<
|
|
328
|
+
// A top bar like the other pages': where you are (Agents / its name),
|
|
329
|
+
// its model and permissions as chips; then its tabs, as a segmented
|
|
330
|
+
// control. Its instructions are on Overview.
|
|
331
|
+
return '<div class="le-head le-agent-head"><div class="le-agent-bar">' +
|
|
332
|
+
'<button type="button" class="le-menu-btn" data-le-menu aria-label="Open navigation">☰</button>' +
|
|
333
|
+
'<h1 class="le-crumb"><a href="/agents">Agents</a><span class="le-crumb-sep" aria-hidden="true">/</span>' +
|
|
334
|
+
'<span class="le-crumb-here"><span data-le-head-name>' + esc(opts.displayName || opts.name) + '</span>' +
|
|
335
|
+
'<span class="le-head-id" data-le-head-id' + (opts.displayName ? '' : ' hidden') + '>' + esc(opts.name) + '</span></span></h1>' +
|
|
336
|
+
'<span class="le-topbar-gap"></span><div class="le-chips">' + chips + '</div></div>' +
|
|
333
337
|
'<nav class="le-tabs" aria-label="Agent sections">' + tabs + '</nav></div>';
|
|
334
338
|
}
|
|
335
339
|
|
|
@@ -209,16 +209,32 @@ export const devUiCss = `
|
|
|
209
209
|
.le-head-id { margin-left: 10px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; vertical-align: middle; }
|
|
210
210
|
.le-title p { margin: 4px 0 0; color: var(--ink-muted); max-width: 72ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
211
211
|
.le-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
|
|
212
|
-
.le-chip { font-size: 12px; padding:
|
|
212
|
+
.le-chip { display: inline-flex; align-items: center; height: 26px; font-size: 12px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); color: var(--ink-muted); white-space: nowrap; }
|
|
213
213
|
.le-chip.mono { font-family: var(--font-mono); font-size: 11.5px; }
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
/* An agent's header: a top bar (Agents / its name, its chips), then its
|
|
215
|
+
tabs as a segmented control. */
|
|
216
|
+
.le-agent-head { padding: 0; gap: 0; }
|
|
217
|
+
.le-agent-bar { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 20px; }
|
|
218
|
+
.le-crumb { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0; }
|
|
219
|
+
.le-crumb a { color: var(--ink-muted); text-decoration: none; }
|
|
220
|
+
.le-crumb a:hover { color: var(--ink); }
|
|
221
|
+
.le-crumb-sep { color: var(--ink-faint); font-weight: 400; }
|
|
222
|
+
.le-crumb-here { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
223
|
+
.le-agent-head .le-head-id { font-size: 12px; margin-left: 8px; }
|
|
224
|
+
.le-tabs { display: flex; gap: 2px; width: fit-content; max-width: calc(100% - 40px); margin: 0 20px 14px; padding: 3px; border-radius: 10px; background: var(--surface); overflow-x: auto; scrollbar-width: none; }
|
|
225
|
+
.le-tab { height: 30px; padding: 0 12px; border-radius: 8px; color: var(--ink-muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; text-decoration: none; font-size: 13px; font-weight: 500; }
|
|
216
226
|
.le-tab:hover { color: var(--ink); }
|
|
217
|
-
.le-tab[aria-selected="true"] { color: var(--ink);
|
|
218
|
-
.le-count { font-size: 11px; background: var(--surface-2); color: var(--ink-muted); padding: 0 6px; border-radius:
|
|
227
|
+
.le-tab[aria-selected="true"] { color: var(--ink); background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
|
|
228
|
+
.le-count { font-size: 11px; background: var(--surface-2); color: var(--ink-muted); padding: 0 6px; border-radius: 6px; }
|
|
219
229
|
.le-count.warn { background: var(--warn-soft); color: var(--warn); }
|
|
220
230
|
.le-menu-btn { display: none; border: 0; background: transparent; padding: 2px 6px; font-size: 18px; line-height: 1; color: var(--ink-muted); }
|
|
221
231
|
.le-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
|
|
232
|
+
/* Cards in a hairline grid (.le-grid): cells share their lines. */
|
|
233
|
+
.le-grid.le-cards { gap: 0; }
|
|
234
|
+
.le-grid > .le-card { border-width: 0 1px 1px 0; border-radius: 0; padding: 20px 22px; gap: 4px; }
|
|
235
|
+
.le-grid > a.le-card:hover { border-color: var(--line); box-shadow: none; background: var(--surface); }
|
|
236
|
+
.le-grid > .le-card .le-card-value { font-size: 28px; font-weight: 400; letter-spacing: -0.02em; }
|
|
237
|
+
.le-grid > .le-card.attention { box-shadow: none; background: var(--warn-soft); }
|
|
222
238
|
.le-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; align-content: start; color: var(--ink); text-decoration: none; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
|
|
223
239
|
a.le-card:hover { border-color: var(--ink-faint); box-shadow: 0 2px 8px rgba(0, 0, 0, .05); }
|
|
224
240
|
.le-card .le-card-label { font-size: 12px; color: var(--ink-faint); display: flex; justify-content: space-between; }
|