claude-code-cost 0.12.0 → 0.12.1
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/package.json +1 -1
- package/public/app.js +22 -10
- package/public/index.html +5 -1
- package/public/style.css +32 -8
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -1224,6 +1224,16 @@ async function applyScope(encoded, name) {
|
|
|
1224
1224
|
await navigate('sessions', { project: scopeProject, projectName: scopeProjectName });
|
|
1225
1225
|
}
|
|
1226
1226
|
|
|
1227
|
+
// Scope teardown without applyScope's landing rule, for callers that navigate themselves.
|
|
1228
|
+
function dropScope() {
|
|
1229
|
+
if (!scopeProject) return;
|
|
1230
|
+
scopeProject = null;
|
|
1231
|
+
scopeProjectName = null;
|
|
1232
|
+
saveScope();
|
|
1233
|
+
lastRenderHash = {};
|
|
1234
|
+
renderScopeChip();
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1227
1237
|
// biome-ignore lint/correctness/noUnusedVariables: called from HTML onclick
|
|
1228
1238
|
async function clearScope() {
|
|
1229
1239
|
// No redirect when clearing: the cursor is still a valid drill-down.
|
|
@@ -1374,21 +1384,23 @@ function activateSelectedRow() {
|
|
|
1374
1384
|
async function goBack() {
|
|
1375
1385
|
let target;
|
|
1376
1386
|
if (currentView === 'detail') {
|
|
1377
|
-
|
|
1378
|
-
target = 'sessions';
|
|
1379
|
-
await navigate('sessions', { project: currentProjectPath, projectName: currentProjectName });
|
|
1380
|
-
} else {
|
|
1381
|
-
target = parentView;
|
|
1382
|
-
await navigate(parentView);
|
|
1383
|
-
}
|
|
1387
|
+
target = currentProjectPath ? 'sessions' : parentView;
|
|
1384
1388
|
} else if (currentView === 'sessions') {
|
|
1385
1389
|
target = parentView;
|
|
1386
|
-
await navigate(parentView);
|
|
1387
1390
|
} else if (currentView === 'projects') {
|
|
1388
1391
|
target = 'overview';
|
|
1389
|
-
await navigate('overview');
|
|
1390
1392
|
}
|
|
1391
|
-
if (target)
|
|
1393
|
+
if (!target) return;
|
|
1394
|
+
|
|
1395
|
+
if (target === 'sessions') {
|
|
1396
|
+
await navigate('sessions', { project: currentProjectPath, projectName: currentProjectName });
|
|
1397
|
+
} else {
|
|
1398
|
+
// Backing out to a top-level view drops the scope with the cursor: a scoped overview
|
|
1399
|
+
// showing one project has no visible cause once you've left that project behind.
|
|
1400
|
+
dropScope();
|
|
1401
|
+
await navigate(target);
|
|
1402
|
+
}
|
|
1403
|
+
focusPreviousRow(target);
|
|
1392
1404
|
}
|
|
1393
1405
|
|
|
1394
1406
|
document.addEventListener('keydown', (e) => {
|
package/public/index.html
CHANGED
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
<span class="scope-chip" id="scopeChip" hidden title="Scoped to one project">
|
|
38
38
|
<span id="scopeChipName"></span>
|
|
39
|
-
<button class="scope-chip-clear" onclick="clearScope()" title="Clear project scope"
|
|
39
|
+
<button class="scope-chip-clear" onclick="clearScope()" title="Clear project scope" aria-label="Clear project scope">
|
|
40
|
+
<svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round">
|
|
41
|
+
<path d="M3 3l6 6M9 3l-6 6"/>
|
|
42
|
+
</svg>
|
|
43
|
+
</button>
|
|
40
44
|
</span>
|
|
41
45
|
<select class="topbar-select" id="rangeSelect" onchange="onRangeChange(this.value)">
|
|
42
46
|
<option value="today">Today</option>
|
package/public/style.css
CHANGED
|
@@ -155,18 +155,33 @@ body {
|
|
|
155
155
|
color: var(--accent-text);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
/* Native chevron is OS-styled and clashes with the mono topbar, so appearance is reset
|
|
159
|
+
and the chevron redrawn; its gray reads as tertiary text in both themes. */
|
|
158
160
|
.topbar-select {
|
|
159
|
-
|
|
161
|
+
appearance: none;
|
|
162
|
+
background-color: var(--bg-elevated);
|
|
163
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%238a8d95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5L5 5 9 1.5'/%3E%3C/svg%3E");
|
|
164
|
+
background-repeat: no-repeat;
|
|
165
|
+
background-position: right 9px center;
|
|
166
|
+
background-size: 9px 6px;
|
|
160
167
|
border: 1px solid var(--border);
|
|
161
168
|
border-radius: 6px;
|
|
162
|
-
color: var(--text-
|
|
169
|
+
color: var(--text-tertiary);
|
|
163
170
|
font-family: var(--mono);
|
|
164
171
|
font-size: 11px;
|
|
165
|
-
|
|
172
|
+
font-weight: 500;
|
|
173
|
+
letter-spacing: 0.03em;
|
|
174
|
+
text-transform: uppercase;
|
|
175
|
+
padding: 6px 26px 6px 10px;
|
|
166
176
|
outline: none;
|
|
167
177
|
cursor: pointer;
|
|
178
|
+
transition: all 0.15s ease;
|
|
179
|
+
}
|
|
180
|
+
.topbar-select:hover {
|
|
181
|
+
border-color: var(--accent);
|
|
182
|
+
color: var(--text-secondary);
|
|
168
183
|
}
|
|
169
|
-
.topbar-select:focus {
|
|
184
|
+
.topbar-select:focus-visible {
|
|
170
185
|
border-color: var(--accent);
|
|
171
186
|
}
|
|
172
187
|
.topbar-select option {
|
|
@@ -200,16 +215,25 @@ body {
|
|
|
200
215
|
white-space: nowrap;
|
|
201
216
|
}
|
|
202
217
|
|
|
218
|
+
/* SVG cross instead of a × glyph: the glyph's ink sits ~1px below its line box, so it never centers. */
|
|
203
219
|
.scope-chip-clear {
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
width: 15px;
|
|
224
|
+
height: 15px;
|
|
225
|
+
padding: 0;
|
|
204
226
|
background: none;
|
|
205
227
|
border: none;
|
|
228
|
+
border-radius: 4px;
|
|
206
229
|
color: inherit;
|
|
207
230
|
cursor: pointer;
|
|
208
|
-
font-family: inherit;
|
|
209
|
-
font-size: 13px;
|
|
210
|
-
line-height: 1;
|
|
211
231
|
opacity: 0.7;
|
|
212
|
-
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.scope-chip-clear svg {
|
|
235
|
+
width: 10px;
|
|
236
|
+
height: 10px;
|
|
213
237
|
}
|
|
214
238
|
|
|
215
239
|
.scope-chip-clear:hover {
|