dsh-long-plugins 2.4.1 → 2.4.2

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/README.md CHANGED
@@ -122,60 +122,5 @@ MIT
122
122
 
123
123
  完整的版权声明与来源见 [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md)。
124
124
 
125
- ## Changelog / 更新记录
126
-
127
- ### v2.2.1
128
-
129
- 修复输入框实底、浅色主题可读性问题,并为输入框、背景罩新增浅色/深色主题的分套设置。
130
-
131
- 🐛 Bug 修复
132
-
133
- - 输入框实底跟随主题:此前用操作系统深色偏好判断,导致浅色主题下黑底黑字。改为读取 DSH 真实主题(`<html>` 上的 `color-scheme`),浅色 = 白底深字、深色 = 深底浅字,切换主题自动实时重算。
134
- - 浅色主题可读性:统一桌面浅色下,气泡、工具调用名(Bash 等)、推理(think)标签、底部状态/统计行文字在背景图上过浅看不清。已按主题提高对比度并加描边;状态/统计行改用稳定的 `data-slot` 槽位定位(不再依赖会变的混淆类名),提高升级稳定性。
135
-
136
- ✨ 新增功能
137
-
138
- - 输入框设置(设置面板新增"输入框"区):浅色主题、深色主题可分别设置背景颜色与不透明度,支持一键"恢复原生"。
139
- - 背景罩设置(设置面板新增"背景罩"区):浅色主题、深色主题可分别设置罩色与罩强度,切换主题自动应用对应的一套。
140
-
141
- 🎨 视觉 / 交互
142
-
143
- - 左栏「新会话」按钮去掉白/黑实底边框,文字改为跟随侧边栏的白字+描边,更好融入背景。
144
-
145
- ### v2.2.0
146
-
147
- 界面优化与重构
148
-
149
- - 背景图独立层:背景图改为独立图层,新增「背景图模糊 / 背景图透明度」滑杆(单独一组,不影响磨砂卡),并新增「背景罩层颜色」色盘,背景图可模糊、可调透明度、罩色可选。
150
- - 会话区:去掉会话区独立磨砂卡片,直接透出共享背景(背景图 + 罩层颜色 + 模糊),版面更通透。
151
- - 输入区:整个输入区外围(composer 根/位置座)透明透出背景。
152
- - 可读性:浅色主题下弱化标签/元信息文字加深,对比度更高。
153
-
154
- ### v2.1.0
155
- - 增强:毛玻璃界面(玻璃拟态)进一步打磨。
156
- - 主题感知磨砂:磨砂卡片颜色跟随系统深色/浅色主题自动反转(浅色=白磨砂深字 / 深色=深磨砂浅字)。
157
- - 会话区内容反底色全透明化:去掉代码块/提示/气泡等反底色小块,统一融入磨砂卡片。
158
- - 会话区「启用玻璃」开关:可单独禁用会话区磨砂(还原原生)。
159
- - 会话区/输入区各自独立「罩色 + 罩强度 + 透明度」调节。
160
- - 新增「背景图罩」:背景图上叠一层半透明罩色,深度可调。
161
- - 手机端/窄屏(≤768px)自动禁用毛玻璃,还原 DSH 原生。
162
- - 输入卡片/底部白色层透明化,更透背景。
163
- - 修复:输入框下拉/悬浮菜单(`/` 命令、`@` 提及)背景透明,改为不透明随主题色。
164
- - 修复:玻璃界面自定义背景图上传超大文件报 `Unexpected token '<'` 错误——上传上限提升到 4MiB。
165
-
166
- ### v2.0.0
167
- - 新增:毛玻璃界面(玻璃拟态)。为 DSH 网页叠加自定义毛玻璃效果,将界面打磨成"玻璃"质感。
168
- - **自定义背景图**:上传一张背景图铺满整个页面(含左边栏、顶部、会话区),实现桌面壁纸式的背景;左边栏 / 顶部半透明透出背景图,界面更通透。
169
- - **分区独立磨砂与罩色**:会话区、输入区各自独立设置「罩色 + 罩强度」,互不影响,实现"玻璃卡片"的分区质感;会话窗口磨砂玻璃悬浮卡片效果。
170
- - **磨砂模糊**:全局磨砂模糊强度可调(0–80px),文字清晰可读。
171
- - **跟随系统主题**:界面文字/内容颜色跟随系统深色/浅色主题,不强制改色,保证任意主题下可读。
172
- - **设置面板「毛玻璃界面」**:总开关、背景图上传、磨砂模糊、会话区/输入区各自的罩色与罩强度,实时保存生效。
173
-
174
- ### v1.3.10
175
- - 新增 `.xlsx` 浏览器端预览:用 SheetJS 解析并显示为表格(行列标头、合并单元格、多工作表切换),预览支持 − / + / 适合宽度缩放,默认整表适配;浏览器端处理,不占用 NAS 本地资源。
176
- - 工作区浏览、工作区文件、上传文件列表中的 `.xlsx` 均接入该预览页。
177
- - `.csv` / `.tsv` 保留表格预览(首行作表头)。
178
- - 文件列表按钮顺序调整:工作区浏览页为 复制路径、重命名、下载、预览;上传/输出文件面板为 复制路径、删除、下载、预览。
179
- - 「上传文件」「输出文件」新增「开启删除」开关:关闭时删除按钮置灰禁用,开启后可删除;上传文件的「复制路径」不再使用删除红色。
180
- - 手机端(≤640px)文件列表顶部操作行保持单行:搜索/日期等宽、刷新/开关靠右。
125
+ 📄 更新记录见 [`CHANGELOG.md`](CHANGELOG.md)。
181
126
 
package/client/client.js CHANGED
@@ -683,23 +683,16 @@ window.__ModuleLoader__.load({
683
683
  /** 🔍 放大镜搜索:点击图标弹出搜索框,输入即过滤;✕ 清除并关闭。不自动隐藏(需人工关闭或刷新)。 */
684
684
  function SearchPopup({ value, onChange, placeholder }) {
685
685
  const [open, setOpen] = React.useState(false)
686
- const [pos, setPos] = React.useState({ top: 72, left: 8 })
687
686
  const ref = React.useRef(null)
688
687
  React.useEffect(() => { if (open && ref.current) { try { ref.current.focus() } catch (e) {} } }, [open])
689
- const toggle = (e) => {
690
- if (!open && e && e.currentTarget) {
691
- const r = e.currentTarget.getBoundingClientRect()
692
- setPos({ top: r.bottom + 8, left: Math.max(8, Math.min(r.left, (window.innerWidth || 0) - 280)) })
693
- }
694
- setOpen((o) => !o)
695
- }
688
+ const toggle = () => setOpen((o) => !o)
696
689
  return React.createElement('div', { className: 'dsh-searchpop' },
697
690
  React.createElement('button', {
698
691
  type: 'button', className: 'dsh-searchpop-btn',
699
692
  onClick: toggle,
700
693
  title: '搜索文件名', 'aria-label': '搜索文件名',
701
694
  }, '🔍'),
702
- open && React.createElement('div', { className: 'dsh-searchpop-box', style: { top: pos.top, left: pos.left } },
695
+ open && React.createElement('div', { className: 'dsh-searchpop-box' },
703
696
  React.createElement('input', {
704
697
  ref, type: 'text', className: 'dsh-searchpop-input', value,
705
698
  onChange: (e) => onChange(e.target.value), placeholder: placeholder || '搜索文件名…', autoFocus: true,
@@ -1007,7 +1000,7 @@ window.__ModuleLoader__.load({
1007
1000
  .dsh-searchpop{position:relative;display:inline-flex;align-items:center;flex:none}
1008
1001
  .dsh-searchpop-btn{width:30px;height:30px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);font-size:14px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
1009
1002
  .dsh-searchpop-btn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
1010
- .dsh-searchpop-box{position:fixed;z-index:60;display:flex;align-items:center;gap:6px;background:var(--dsw-specific-input-major,#0f1720);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;padding:6px;box-shadow:var(--dsw-shadow-lv3);max-width:calc(100vw - 16px)}
1003
+ .dsh-searchpop-box{position:absolute;top:calc(100% + 6px);left:0;z-index:60;display:flex;align-items:center;gap:6px;background:var(--dsw-specific-input-major,#0f1720);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;padding:6px;box-shadow:var(--dsw-shadow-lv3);max-width:calc(100vw - 16px)}
1011
1004
  .dsh-searchpop-input{border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:transparent;color:var(--dsw-alias-label-primary);padding:5px 9px;font:inherit;font-size:12px;line-height:18px;min-width:160px}
1012
1005
  .dsh-searchpop-input::placeholder{color:var(--dsw-alias-label-tertiary)}
1013
1006
  .dsh-searchpop-clear{background:transparent;border:none;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1;cursor:pointer;padding:0 3px}
package/dsh.plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-long-plugins",
3
3
  "description": "Merged DSH web plugins: upload manager (drag-and-drop attach any file to the message), workspace output files, skill docs, account balance, Markdown-to-Word (md2docx), and polished file preview (Word & PowerPoint real preview with zoom/pan, rendered Markdown), plus an auto-repair install for DSH core patches (reverse-proxy WebSocket heartbeat, upgrade relink). | 一个插件整合 DSH Web 的常用增强:上传管理(拖放上传:拖任意文件到会话框直接附加)、工作区「输出文件」面板、技能文档浏览、账户余额显示、Markdown 转 Word(md2docx)、Word/PowerPoint 真实预览(可缩放、翻页);并自带修复安装,自动重连 DSH 核心补丁(反代 WebSocket 心跳、升级重连)。",
4
- "version": "2.4.1",
4
+ "version": "2.4.2",
5
5
  "entry": {
6
6
  "name": "dsh-long-plugins",
7
7
  "inject": [
package/lib/index.js CHANGED
@@ -385,6 +385,8 @@ async function collectGroups(root, excluded, hiddenNames = []) {
385
385
  const groups = [];
386
386
  for (const entry of entries) {
387
387
  if (!entry.isDirectory() || entry.name === excluded) continue;
388
+ // 排除点开头的文件夹(如 .dsh / .outputdir)及其下层所有内容
389
+ if (entry.name.startsWith(".")) continue;
388
390
  const files = [];
389
391
  const walk = async (dir) => {
390
392
  let sub;
@@ -397,6 +399,8 @@ async function collectGroups(root, excluded, hiddenNames = []) {
397
399
  sub.sort((a, b) => a.name.localeCompare(b.name));
398
400
  for (const item of sub) {
399
401
  const abs = join(dir, item.name);
402
+ // 嵌套里的点开头条目(夹/文件)也一并排除
403
+ if (item.name.startsWith(".")) continue;
400
404
  if (item.isDirectory()) {
401
405
  await walk(abs);
402
406
  } else if (item.isFile()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-long-plugins",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Merged DSH web plugins: upload manager (drag-and-drop attach any file to the message), workspace output files, skill docs, account balance, Markdown-to-Word (md2docx), and polished file preview (Word & PowerPoint real preview with zoom/pan, rendered Markdown), plus an auto-repair install for DSH core patches (reverse-proxy WebSocket heartbeat, upgrade relink). | 一个插件整合 DSH Web 的常用增强:上传管理(拖放上传:拖任意文件到会话框直接附加)、工作区「输出文件」面板、技能文档浏览、账户余额显示、Markdown 转 Word(md2docx)、Word/PowerPoint 真实预览(可缩放、翻页);并自带修复安装,自动重连 DSH 核心补丁(反代 WebSocket 心跳、升级重连)。",
5
5
  "type": "module",
6
6
  "license": "MIT",