@anthonyhan/token-pilot 0.3.3 → 0.3.4
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/web/dashboard.html +46 -16
package/package.json
CHANGED
package/web/dashboard.html
CHANGED
|
@@ -333,6 +333,23 @@ footer .notes{max-width:560px}
|
|
|
333
333
|
.m-row input:focus-visible{outline:2px solid var(--info);outline-offset:1px}
|
|
334
334
|
.m-headr{color:var(--muted);font-size:10.5px;font-weight:700}
|
|
335
335
|
.addrow{color:var(--info);font-weight:700;font-size:12px;padding:4px 0}
|
|
336
|
+
|
|
337
|
+
/* 设置项:复选框 + 标题 + 说明的三层结构 */
|
|
338
|
+
.opt{display:flex;align-items:flex-start;gap:10px;padding:9px 10px;margin:2px 0;border:1px solid transparent;border-radius:9px;cursor:pointer;transition:background .14s var(--ease),border-color .14s var(--ease)}
|
|
339
|
+
.opt:hover{background:color-mix(in oklab,var(--fg) 4%,transparent);border-color:var(--border)}
|
|
340
|
+
.opt input[type="checkbox"]{width:15px;height:15px;margin:1px 0 0;flex:none;accent-color:var(--info);cursor:pointer}
|
|
341
|
+
.opt-main{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
|
|
342
|
+
.opt-title{font-size:12.5px;font-weight:700;line-height:1.45;display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:var(--fg)}
|
|
343
|
+
.opt-desc{font-size:11.5px;color:color-mix(in oklab,var(--muted) 78%,var(--fg));line-height:1.7}
|
|
344
|
+
.opt-desc code{font-size:11px;background:color-mix(in oklab,var(--fg) 7%,transparent);border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
|
|
345
|
+
.opt-badge{font-size:10px;font-weight:700;color:var(--pos);background:color-mix(in oklab,var(--pos) 13%,transparent);border-radius:5px;padding:1px 6px;letter-spacing:.2px}
|
|
346
|
+
.opt-status{font-size:11px;font-weight:600;color:var(--muted)}
|
|
347
|
+
/* 带输入框的选项行:与复选框行左对齐(15px 复选框 + 10px gap = 25px) */
|
|
348
|
+
.opt-field{display:flex;align-items:center;gap:8px;padding:2px 10px 8px 35px;margin:0}
|
|
349
|
+
.opt-field .opt-title{font-size:12.5px;font-weight:700;flex:none}
|
|
350
|
+
.opt-field input{width:96px;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:6px 8px;font:inherit;font-size:12px;color:var(--fg)}
|
|
351
|
+
.opt-field input:focus-visible{outline:2px solid var(--info);outline-offset:1px}
|
|
352
|
+
.opt-unit{font-size:11.5px;color:var(--muted)}
|
|
336
353
|
.delrow{color:var(--muted);border:0;background:none;cursor:pointer;font-size:14px;line-height:1;padding:2px}
|
|
337
354
|
.modal-foot{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:12px 18px;border-top:1px solid var(--gridln)}
|
|
338
355
|
.saved-hint{color:var(--pos-text);font-size:12px;font-weight:700;opacity:0;transition:opacity .2s var(--ease)}
|
|
@@ -666,23 +683,36 @@ footer .notes{max-width:560px}
|
|
|
666
683
|
</div>
|
|
667
684
|
<div class="m-sec">
|
|
668
685
|
<div class="m-lab">自动压缩 <span>超阈值的活跃会话提醒/处理</span></div>
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
<
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
</
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
<
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
<input type="checkbox" id="mInstallRtk" aria-label="安装 RTK 输出压缩层" style="width:auto">
|
|
683
|
-
<label for="mInstallRtk" style="font-size:12px">安装 RTK 输出压缩层(含压缩引擎,brew/winget)<span id="rtkStatus" style="color:var(--muted);margin-left:6px"></span></label>
|
|
684
|
-
<div style="font-size:11.5px;color:var(--muted);margin-top:4px;line-height:1.6">勾选后点「保存」才会真正执行:安装 rtk 并自动执行 <code>rtk init -g</code> 接入 Claude Code hook(会修改 ~/.claude/settings.json,已做备份)。若系统里已装有 rtk-oss,需先卸载(两者占用同一命令、会冲突)。</div>
|
|
686
|
+
|
|
687
|
+
<label class="opt" for="mAutoCompact">
|
|
688
|
+
<input type="checkbox" id="mAutoCompact" aria-label="开启自动压缩">
|
|
689
|
+
<span class="opt-main">
|
|
690
|
+
<span class="opt-title">开启自动压缩</span>
|
|
691
|
+
<span class="opt-desc">会话上下文超过阈值时发系统通知提醒</span>
|
|
692
|
+
</span>
|
|
693
|
+
</label>
|
|
694
|
+
|
|
695
|
+
<div class="opt-field">
|
|
696
|
+
<span class="opt-title">提醒阈值</span>
|
|
697
|
+
<input id="mCompactK" type="number" min="20" step="10" placeholder="100" aria-label="压缩阈值(千 tokens)">
|
|
698
|
+
<span class="opt-unit">K tokens</span>
|
|
685
699
|
</div>
|
|
700
|
+
|
|
701
|
+
<label class="opt" for="mApplyCc">
|
|
702
|
+
<input type="checkbox" id="mApplyCc" aria-label="同时写入 Claude Code 自动压缩配置">
|
|
703
|
+
<span class="opt-main">
|
|
704
|
+
<span class="opt-title">同时写入 Claude Code 的 autoCompactEnabled</span>
|
|
705
|
+
<span class="opt-desc">会修改宿主配置,对之后新建的会话生效</span>
|
|
706
|
+
</span>
|
|
707
|
+
</label>
|
|
708
|
+
|
|
709
|
+
<label class="opt" for="mInstallRtk">
|
|
710
|
+
<input type="checkbox" id="mInstallRtk" aria-label="安装 RTK 输出压缩层">
|
|
711
|
+
<span class="opt-main">
|
|
712
|
+
<span class="opt-title">安装 RTK 输出压缩层 <span class="opt-badge">含压缩引擎</span><span id="rtkStatus" class="opt-status"></span></span>
|
|
713
|
+
<span class="opt-desc">勾选后点「保存」才执行:装 rtk 并自动跑 <code>rtk init -g</code> 接入 Claude Code hook。会修改 <code>~/.claude/settings.json</code>(已做备份可还原)。若系统里已有 rtk-oss,需先卸载,两者互斥。</span>
|
|
714
|
+
</span>
|
|
715
|
+
</label>
|
|
686
716
|
</div>
|
|
687
717
|
</div>
|
|
688
718
|
<div class="modal-foot"><span class="saved-hint" id="saveHint">已保存</span><button class="btn-ghost" id="settingsSave" type="button">保存</button></div>
|