@co0ontty/wand 1.14.2 → 1.14.3

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.
@@ -1514,32 +1514,49 @@
1514
1514
  '<div class="settings-panel" id="settings-tab-display">' +
1515
1515
  '<div class="settings-section-title">卡片默认展开状态</div>' +
1516
1516
  '<p class="hint" style="margin-top:-4px;margin-bottom:12px">设置结构化聊天视图中各类卡片的默认展开/折叠状态。手动操作的展开状态优先于此默认设置。</p>' +
1517
- '<div class="field field-inline">' +
1518
- '<input id="cfg-card-edit" type="checkbox" class="field-checkbox" />' +
1519
- '<label class="field-label" for="cfg-card-edit">编辑卡片 (Edit/Write)</label>' +
1520
- '</div>' +
1521
- '<p class="hint" style="margin-top:0;margin-bottom:10px">文件编辑和写入操作的 diff 视图</p>' +
1522
- '<div class="field field-inline">' +
1523
- '<input id="cfg-card-inline" type="checkbox" class="field-checkbox" />' +
1524
- '<label class="field-label" for="cfg-card-inline">内联工具 (Read/Glob/Grep)</label>' +
1525
- '</div>' +
1526
- '<p class="hint" style="margin-top:0;margin-bottom:10px">文件读取、搜索等工具的结果</p>' +
1527
- '<div class="field field-inline">' +
1528
- '<input id="cfg-card-terminal" type="checkbox" class="field-checkbox" />' +
1529
- '<label class="field-label" for="cfg-card-terminal">终端输出 (Bash)</label>' +
1530
- '</div>' +
1531
- '<p class="hint" style="margin-top:0;margin-bottom:10px">命令行执行结果</p>' +
1532
- '<div class="field field-inline">' +
1533
- '<input id="cfg-card-thinking" type="checkbox" class="field-checkbox" />' +
1534
- '<label class="field-label" for="cfg-card-thinking">思考过程 (Thinking)</label>' +
1535
- '</div>' +
1536
- '<p class="hint" style="margin-top:0;margin-bottom:10px">Claude 的思考过程块</p>' +
1537
- '<div class="field field-inline">' +
1538
- '<input id="cfg-card-toolgroup" type="checkbox" class="field-checkbox" />' +
1539
- '<label class="field-label" for="cfg-card-toolgroup">工具组</label>' +
1517
+ '<div class="switch-card-list">' +
1518
+ '<label class="switch-card" for="cfg-card-edit">' +
1519
+ '<div class="switch-card-header">' +
1520
+ '<span class="switch-card-title">编辑卡片 (Edit/Write)</span>' +
1521
+ '<input id="cfg-card-edit" type="checkbox" class="switch-toggle" />' +
1522
+ '<span class="switch-slider"></span>' +
1523
+ '</div>' +
1524
+ '<div class="switch-card-desc">文件编辑和写入操作的 diff 视图</div>' +
1525
+ '</label>' +
1526
+ '<label class="switch-card" for="cfg-card-inline">' +
1527
+ '<div class="switch-card-header">' +
1528
+ '<span class="switch-card-title">内联工具 (Read/Glob/Grep)</span>' +
1529
+ '<input id="cfg-card-inline" type="checkbox" class="switch-toggle" />' +
1530
+ '<span class="switch-slider"></span>' +
1531
+ '</div>' +
1532
+ '<div class="switch-card-desc">文件读取、搜索等工具的结果</div>' +
1533
+ '</label>' +
1534
+ '<label class="switch-card" for="cfg-card-terminal">' +
1535
+ '<div class="switch-card-header">' +
1536
+ '<span class="switch-card-title">终端输出 (Bash)</span>' +
1537
+ '<input id="cfg-card-terminal" type="checkbox" class="switch-toggle" />' +
1538
+ '<span class="switch-slider"></span>' +
1539
+ '</div>' +
1540
+ '<div class="switch-card-desc">命令行执行结果</div>' +
1541
+ '</label>' +
1542
+ '<label class="switch-card" for="cfg-card-thinking">' +
1543
+ '<div class="switch-card-header">' +
1544
+ '<span class="switch-card-title">思考过程 (Thinking)</span>' +
1545
+ '<input id="cfg-card-thinking" type="checkbox" class="switch-toggle" />' +
1546
+ '<span class="switch-slider"></span>' +
1547
+ '</div>' +
1548
+ '<div class="switch-card-desc">Claude 的思考过程块</div>' +
1549
+ '</label>' +
1550
+ '<label class="switch-card" for="cfg-card-toolgroup">' +
1551
+ '<div class="switch-card-header">' +
1552
+ '<span class="switch-card-title">工具组</span>' +
1553
+ '<input id="cfg-card-toolgroup" type="checkbox" class="switch-toggle" />' +
1554
+ '<span class="switch-slider"></span>' +
1555
+ '</div>' +
1556
+ '<div class="switch-card-desc">连续同类工具调用的折叠组</div>' +
1557
+ '</label>' +
1540
1558
  '</div>' +
1541
- '<p class="hint" style="margin-top:0;margin-bottom:10px">连续同类工具调用的折叠组</p>' +
1542
- '<button id="save-display-button" class="btn btn-primary btn-block">保存显示设置</button>' +
1559
+ '<button id="save-display-button" class="btn btn-primary btn-block" style="margin-top:16px">保存显示设置</button>' +
1543
1560
  '<p id="display-message" class="hint hidden"></p>' +
1544
1561
  '</div>' +
1545
1562
  '</div>' +
@@ -2876,6 +2893,7 @@
2876
2893
  }
2877
2894
  });
2878
2895
  }
2896
+ }
2879
2897
  };
2880
2898
  // Update streaming thinking content (called from WebSocket handler)
2881
2899
  function updateStreamingThinking(text) {
@@ -7473,6 +7473,93 @@
7473
7473
  cursor: pointer;
7474
7474
  }
7475
7475
 
7476
+ /* Switch card list */
7477
+ .switch-card-list {
7478
+ display: flex;
7479
+ flex-direction: column;
7480
+ gap: 8px;
7481
+ }
7482
+ .switch-card {
7483
+ display: block;
7484
+ background: var(--bg-secondary);
7485
+ border: 1px solid var(--border);
7486
+ border-radius: 10px;
7487
+ padding: 12px 14px;
7488
+ cursor: pointer;
7489
+ transition: border-color 0.2s, background 0.2s;
7490
+ user-select: none;
7491
+ }
7492
+ .switch-card:hover {
7493
+ border-color: var(--text-muted);
7494
+ }
7495
+ .switch-card-header {
7496
+ display: flex;
7497
+ align-items: center;
7498
+ gap: 10px;
7499
+ }
7500
+ .switch-card-title {
7501
+ flex: 1;
7502
+ font-size: 0.8125rem;
7503
+ font-weight: 600;
7504
+ color: var(--text-primary);
7505
+ }
7506
+ .switch-card-desc {
7507
+ font-size: 0.75rem;
7508
+ color: var(--text-muted);
7509
+ margin-top: 0;
7510
+ max-height: 0;
7511
+ overflow: hidden;
7512
+ opacity: 0;
7513
+ transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
7514
+ }
7515
+ /* When switch is ON, expand the description */
7516
+ .switch-card:has(.switch-toggle:checked) .switch-card-desc {
7517
+ max-height: 40px;
7518
+ opacity: 1;
7519
+ margin-top: 8px;
7520
+ }
7521
+ .switch-card:has(.switch-toggle:checked) {
7522
+ border-color: var(--accent);
7523
+ background: color-mix(in srgb, var(--accent) 6%, var(--bg-secondary));
7524
+ }
7525
+
7526
+ /* Switch toggle (iOS style) */
7527
+ .switch-toggle {
7528
+ position: absolute;
7529
+ opacity: 0;
7530
+ width: 0;
7531
+ height: 0;
7532
+ pointer-events: none;
7533
+ }
7534
+ .switch-slider {
7535
+ position: relative;
7536
+ display: inline-block;
7537
+ width: 40px;
7538
+ height: 22px;
7539
+ min-width: 40px;
7540
+ background: #c4b8a8;
7541
+ border-radius: 11px;
7542
+ transition: background 0.25s;
7543
+ }
7544
+ .switch-slider::after {
7545
+ content: "";
7546
+ position: absolute;
7547
+ top: 3px;
7548
+ left: 3px;
7549
+ width: 16px;
7550
+ height: 16px;
7551
+ background: #fff;
7552
+ border-radius: 50%;
7553
+ transition: transform 0.25s;
7554
+ box-shadow: 0 1px 3px rgba(0,0,0,0.2);
7555
+ }
7556
+ .switch-toggle:checked + .switch-slider {
7557
+ background: var(--accent);
7558
+ }
7559
+ .switch-toggle:checked + .switch-slider::after {
7560
+ transform: translateX(18px);
7561
+ }
7562
+
7476
7563
  .field-file {
7477
7564
  font-size: 0.8rem;
7478
7565
  padding: 6px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@co0ontty/wand",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "A web terminal for local CLI tools like Claude.",
5
5
  "type": "module",
6
6
  "bin": {