claude-opencode-viewer 2.6.16 → 2.6.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.
@@ -7,7 +7,11 @@
7
7
  "Bash(node:*)",
8
8
  "Bash(lsof -ti:7008)",
9
9
  "Bash(sqlite3:*)",
10
- "Bash(ps:*)"
10
+ "Bash(ps:*)",
11
+ "Bash(git add:*)",
12
+ "Bash(git commit -m ':*)",
13
+ "Bash(git push:*)",
14
+ "Bash(npm publish:*)"
11
15
  ]
12
16
  }
13
17
  }
package/index.html CHANGED
@@ -1044,6 +1044,7 @@
1044
1044
  }
1045
1045
 
1046
1046
  // 触摸滚动实现 - 混合模式:alternate buffer 发鼠标滚轮,normal buffer 用 scrollLines
1047
+ var SCROLL_SENSITIVITY = 0.7; // 滚动灵敏度,越小每次滑动行数越少
1047
1048
  var touchScreen = null;
1048
1049
  var touchEventsBound = false;
1049
1050
 
@@ -1112,7 +1113,7 @@
1112
1113
  scrollRaf = null;
1113
1114
  if (pendingDy === 0) return;
1114
1115
 
1115
- pixelAccum += pendingDy;
1116
+ pixelAccum += pendingDy * SCROLL_SENSITIVITY;
1116
1117
  pendingDy = 0;
1117
1118
 
1118
1119
  var lh = getLineHeight();
@@ -1164,7 +1165,7 @@
1164
1165
  }
1165
1166
 
1166
1167
  if (pendingDy !== 0) {
1167
- pixelAccum += pendingDy;
1168
+ pixelAccum += pendingDy * SCROLL_SENSITIVITY;
1168
1169
  pendingDy = 0;
1169
1170
  var lh = getLineHeight();
1170
1171
  var lines = Math.trunc(pixelAccum / lh);
@@ -1189,8 +1190,9 @@
1189
1190
  }
1190
1191
  velocitySamples = [];
1191
1192
 
1193
+ velocity *= SCROLL_SENSITIVITY;
1192
1194
  console.log('[scroll] velocity:', velocity);
1193
- if (Math.abs(velocity) < 0.5) return;
1195
+ if (Math.abs(velocity) < 0.3) return;
1194
1196
 
1195
1197
  var friction = 0.95;
1196
1198
  var mAccum = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-opencode-viewer",
3
- "version": "2.6.16",
3
+ "version": "2.6.17",
4
4
  "description": "A unified terminal viewer for Claude Code and OpenCode with seamless switching",
5
5
  "type": "module",
6
6
  "main": "server.js",