dsh-folia 4.26.0-pre.28 → 4.26.0-pre.29

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/lib/client.js CHANGED
@@ -764,6 +764,10 @@ window.__ModuleLoader__.load({
764
764
  "对话": "Chat",
765
765
  "可选工作能力(已安装才可用)": "Optional work capabilities (installed only)",
766
766
  "能力": "Capabilities",
767
+ "功能": "Features",
768
+ "你可以这样说": "Try saying",
769
+ "提高日常办事效率": "Get daily work done faster",
770
+ "让界面和对话更有趣": "Make the UI and chat more fun",
767
771
  "工作能力": "Work",
768
772
  "娱乐": "Fun",
769
773
  "未安装": "Not installed",
@@ -774,7 +778,7 @@ window.__ModuleLoader__.load({
774
778
  "怎么用:": "How to use: ",
775
779
  "前提:": "Requires: ",
776
780
  "读取失败,重开设置页再试": "Failed to load; reopen settings and retry",
777
- "这些是可选插件:装好后能力是给 DSH 助手的,桌宠本身不受影响。我们不做一键安装,复制命令后自行安装。": "Optional plugins: they add abilities to the DSH assistant, not the pet. No one-click install — copy the command and install it yourself.",
781
+ "这些是可选插件:装好后能力给 DSH 助手用,桌宠本身不受影响。不做一键安装,复制命令自行安装。": "Optional plugins: they add abilities to the DSH assistant, not the pet. No one-click install — copy the command and install it yourself.",
778
782
  "正在读取…": "Loading…",
779
783
  "冲突提醒:": "Conflict: ",
780
784
  "站点上还没有桌宠。": "No pets on the site yet.",
@@ -18804,15 +18808,38 @@ window.__ModuleLoader__.load({
18804
18808
  * panel-tabs-work.js — 「能力」一级设置项(与「壁纸引擎」并列的第二个 settings.section)。
18805
18809
  *
18806
18810
  * 定位:**只做展示与指引,不做一键安装**(用户明确要求)。
18807
- * · 工作能力 / 娱乐 两片区域
18808
- * · 每张卡片:名称 + 包名 + 版本 + 状态徽标(已安装 / 未安装)
18809
- * · 「详情」行内展开:它是什么 / 怎么用 / 前提
18810
- * · 未安装的给一条可复制的安装命令
18811
+ * · 工作能力 / 娱乐 两片独立区域(各自标题 + 卡片网格)
18812
+ * · 卡片外观对齐 web-all 的插件列表:左侧图标方块 + 名称 + 描述 + 元信息 + 右侧状态点
18813
+ * · 「详情」行内展开:功能点 / 使用示例 / 前提 / 安装命令(可复制)
18811
18814
  *
18812
18815
  * 数据来自宿主 `GET /folia/pet-chat/capabilities`(catalog 写死在宿主侧,前端只渲染)。
18813
18816
  */
18814
18817
  const CAP_STATUS_TEXT = (item) => (item.installed ? weT('已安装') : weT('未安装'));
18815
18818
 
18819
+ const CAP_CARD = {
18820
+ display: 'flex',
18821
+ flexDirection: 'column',
18822
+ gap: '8px',
18823
+ padding: '10px 12px',
18824
+ border: '1px solid rgba(255,255,255,0.12)',
18825
+ borderRadius: '10px',
18826
+ background: 'rgba(255,255,255,0.03)',
18827
+ };
18828
+
18829
+ const CAP_ICON = {
18830
+ width: '40px',
18831
+ height: '40px',
18832
+ flex: '0 0 40px',
18833
+ borderRadius: '10px',
18834
+ display: 'flex',
18835
+ alignItems: 'center',
18836
+ justifyContent: 'center',
18837
+ fontSize: '20px',
18838
+ background: 'linear-gradient(135deg, rgba(124,108,255,0.35), rgba(76,175,125,0.22))',
18839
+ };
18840
+
18841
+ const CAP_META = { fontSize: '11px', opacity: 0.6, marginTop: '2px', wordBreak: 'break-all' };
18842
+
18816
18843
  function CapabilityCard({ item }) {
18817
18844
  const [open, setOpen] = React.useState(false);
18818
18845
  const [copied, setCopied] = React.useState(false);
@@ -18826,39 +18853,57 @@ window.__ModuleLoader__.load({
18826
18853
  setCopied(true);
18827
18854
  setTimeout(() => setCopied(false), 1500);
18828
18855
  };
18829
- const tail = [];
18830
- tail.push(React.createElement('div', {
18831
- key: 'row',
18832
- style: { display: 'flex', alignItems: 'baseline', gap: '8px', flexWrap: 'wrap' },
18856
+
18857
+ const head = React.createElement('div', {
18858
+ key: 'head',
18859
+ style: { display: 'flex', alignItems: 'flex-start', gap: '10px' },
18860
+ },
18861
+ React.createElement('div', { style: CAP_ICON }, item.icon || '🧩'),
18862
+ React.createElement('div', { style: { flex: '1 1 auto', minWidth: 0 } },
18863
+ React.createElement('div', { style: { display: 'flex', alignItems: 'baseline', gap: '6px', flexWrap: 'wrap' } },
18864
+ React.createElement('span', { style: { fontWeight: 600, fontSize: '13px' } }, item.name),
18865
+ item.installedVersion
18866
+ ? React.createElement('span', { className: 'we-picker__hint' }, 'v' + item.installedVersion)
18867
+ : null),
18868
+ React.createElement('div', { className: 'we-picker__hint', style: { marginTop: '2px' } }, item.summary),
18869
+ React.createElement('div', { style: CAP_META }, item.pkg + (item.size ? ' · ' + item.size : ''))),
18870
+ React.createElement('div', {
18871
+ style: { flex: '0 0 auto', textAlign: 'right', fontSize: '11px', opacity: 0.85, whiteSpace: 'nowrap' },
18833
18872
  },
18834
- React.createElement('span', { style: { fontWeight: 600 } }, item.name),
18835
- React.createElement('span', { className: 'we-picker__hint' }, item.pkg),
18836
- item.installedVersion
18837
- ? React.createElement('span', { className: 'we-picker__hint' }, 'v' + item.installedVersion)
18838
- : null,
18839
18873
  React.createElement('span', {
18840
- className: 'we-picker__hint',
18841
- style: { color: item.installed ? '#4caf7d' : undefined },
18842
- }, CAP_STATUS_TEXT(item))));
18843
- tail.push(React.createElement('div', { key: 'sum', className: 'we-picker__hint' }, item.summary));
18874
+ style: {
18875
+ width: '6px', height: '6px', borderRadius: '50%', marginRight: '4px',
18876
+ background: item.installed ? '#4caf7d' : 'rgba(255,255,255,0.35)',
18877
+ display: 'inline-block',
18878
+ },
18879
+ }),
18880
+ React.createElement('span', { style: item.installed ? { color: '#4caf7d' } : null }, CAP_STATUS_TEXT(item))));
18881
+
18882
+ const body = [head];
18844
18883
  if (open) {
18845
- tail.push(React.createElement('div', { key: 'usage', className: 'we-picker__hint', style: { marginTop: '4px' } },
18846
- weT('怎么用:') + item.usage));
18847
- if (item.requires) {
18848
- tail.push(React.createElement('div', { key: 'req', className: 'we-picker__hint' }, weT('前提:') + item.requires));
18884
+ const line = (k, v) => React.createElement('div', { key: k, className: 'we-picker__hint', style: { marginTop: '4px' } }, v);
18885
+ if (Array.isArray(item.features) && item.features.length) {
18886
+ body.push(React.createElement('div', { key: 'feat-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('功能')));
18887
+ item.features.forEach((f, i) => body.push(line('f' + i, '· ' + f)));
18888
+ }
18889
+ if (Array.isArray(item.examples) && item.examples.length) {
18890
+ body.push(React.createElement('div', { key: 'ex-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('你可以这样说')));
18891
+ item.examples.forEach((ex, i) => body.push(line('e' + i, '「' + ex + '」')));
18849
18892
  }
18893
+ if (item.requires) body.push(line('req', weT('前提:') + item.requires));
18850
18894
  if (!item.installed && item.command) {
18851
- tail.push(React.createElement('div', {
18895
+ body.push(React.createElement('div', {
18852
18896
  key: 'cmd',
18853
18897
  style: {
18854
- marginTop: '6px', padding: '6px 8px', borderRadius: '6px',
18898
+ marginTop: '8px', padding: '6px 8px', borderRadius: '6px',
18855
18899
  background: 'rgba(255,255,255,0.06)', fontFamily: 'monospace', fontSize: '11px',
18856
18900
  wordBreak: 'break-all',
18857
18901
  },
18858
18902
  }, item.command));
18859
18903
  }
18860
18904
  }
18861
- tail.push(React.createElement('div', { key: 'btns', style: { display: 'flex', gap: '6px', marginTop: '6px' } },
18905
+
18906
+ body.push(React.createElement('div', { key: 'btns', style: { display: 'flex', gap: '6px' } },
18862
18907
  React.createElement('button', {
18863
18908
  type: 'button', className: 'we-picker__btn', onClick: () => setOpen((v) => !v),
18864
18909
  }, open ? weT('收起') : weT('详情')),
@@ -18866,12 +18911,23 @@ window.__ModuleLoader__.load({
18866
18911
  ? React.createElement('button', { type: 'button', className: 'we-picker__btn', onClick: copy },
18867
18912
  copied ? weT('已复制') : weT('复制安装命令'))
18868
18913
  : null));
18869
- return React.createElement('div', {
18870
- style: {
18871
- border: '1px solid rgba(255,255,255,0.12)', borderRadius: '8px',
18872
- padding: '8px 10px', margin: '6px 0',
18873
- },
18874
- }, tail);
18914
+
18915
+ return React.createElement('div', { style: CAP_CARD }, body);
18916
+ }
18917
+
18918
+ function CapGroup({ title, hint, items }) {
18919
+ return React.createElement('div', { style: { marginTop: '14px' } },
18920
+ React.createElement('div', { style: { display: 'flex', alignItems: 'baseline', gap: '8px' } },
18921
+ React.createElement('div', { style: { fontWeight: 600, fontSize: '14px' } }, title),
18922
+ React.createElement('div', { className: 'we-picker__hint' }, hint)),
18923
+ React.createElement('div', {
18924
+ style: {
18925
+ display: 'grid',
18926
+ gridTemplateColumns: 'repeat(auto-fill, minmax(320px, 1fr))',
18927
+ gap: '8px',
18928
+ marginTop: '8px',
18929
+ },
18930
+ }, items.map((it) => React.createElement(CapabilityCard, { key: it.pkg, item: it }))));
18875
18931
  }
18876
18932
 
18877
18933
  function CapabilitiesSection() {
@@ -18892,16 +18948,13 @@ window.__ModuleLoader__.load({
18892
18948
 
18893
18949
  const work = items.filter((it) => it.section === 'work');
18894
18950
  const fun = items.filter((it) => it.section === 'fun');
18895
- const block = (title, list) => React.createElement('div', { key: title, style: { marginTop: '12px' } },
18896
- React.createElement('div', { style: { fontWeight: 600, fontSize: '13px', marginBottom: '4px' } }, title),
18897
- list.map((it) => React.createElement(CapabilityCard, { key: it.pkg, item: it })));
18898
18951
 
18899
18952
  return React.createElement('div', { style: { padding: '4px 2px' } },
18900
- React.createElement('div', { style: { fontSize: '13px', fontWeight: 600 } }, weT('能力')),
18953
+ React.createElement('div', { style: { fontSize: '14px', fontWeight: 600 } }, weT('能力')),
18901
18954
  React.createElement('div', { className: 'we-picker__hint', style: { marginTop: '2px' } },
18902
- weT('这些是可选插件:装好后能力是给 DSH 助手的,桌宠本身不受影响。我们不做一键安装,复制命令后自行安装。')),
18903
- block(weT('工作能力'), work),
18904
- block(weT('娱乐'), fun));
18955
+ weT('这些是可选插件:装好后能力给 DSH 助手用,桌宠本身不受影响。不做一键安装,复制命令自行安装。')),
18956
+ React.createElement(CapGroup, { title: weT('工作能力'), hint: weT('提高日常办事效率'), items: work }),
18957
+ React.createElement(CapGroup, { title: weT('娱乐'), hint: weT('让界面和对话更有趣'), items: fun }));
18905
18958
  }
18906
18959
 
18907
18960
  // ── 内联模块:src/pet-layer.js —— 桌宠渲染层:canvas 逐帧绘 sprite2d 雪碧图 + 拖动 + 状态机(自渲染,不依赖第三方宠物插件)(构建期注入;勿手改本段)──
@@ -926,17 +926,87 @@ const roots = [
926
926
  }
927
927
  return null;
928
928
  };
929
- const catalog = [
930
- { section: 'work', name: '联网搜索', pkg: '@240xu/dsh-websearch', summary: '让 AI 联网查资料、读网页内容', usage: '跟我说:帮我搜一下今天的 AI 新闻', requires: '装完要在它自己的设置里填搜索 key', command: 'dsh plugin --profile web add @240xu/dsh-websearch' },
931
- { section: 'work', name: '文档读取', pkg: '@civilization/dsh-office-reader', summary: '读 PDF / Word / Excel(只读,不修改)', usage: '跟我说:读一下 D:\\报告.pdf 前 5 页,总结要点', requires: '无需配置;大文件建议先让它看目录结构', command: 'dsh plugin --profile web add @civilization/dsh-office-reader' },
932
- { section: 'work', name: '定时任务', pkg: '@aiwayds/dsh-cron', summary: '按 cron 表达式或间隔自动跑任务', usage: '跟我说:每天早 9 点生成周报,到年底为止', requires: '无需配置;注意任务有有效期上限(1 年)', command: 'dsh plugin --profile web add @aiwayds/dsh-cron' },
933
- { section: 'work', name: 'Outlook 邮件', pkg: '@aryacode/dsh-arya-maildesk', summary: '让 AI 读 / 整理 / 回复本机 Outlook 邮件', usage: '跟我说:把昨天未读邮件列出来,挑重要的回', requires: '本机要装并登录 Outlook(Windows)', command: 'dsh plugin --profile web add @aryacode/dsh-arya-maildesk' },
934
- { section: 'work', name: '消息推送', pkg: '@alotop/dsh-notify-hub', summary: '任务完成后推送到手机(Bark/Telegram 等)', usage: '跟我说:这个任务跑完推我手机', requires: '要先配置推送渠道', command: 'dsh plugin --profile web add @alotop/dsh-notify-hub' },
935
- { section: 'work', name: '直接改 Office 文档', pkg: '@copylee/dsh-office', summary: '在正开着的 Word/Excel/PPT 里改,实时可见', usage: '跟我说:把这份 Word 的标题改字号、加一张三线表', requires: 'Windows + 本机 Office/WPS;会接管自带 Office 技能', command: 'dsh plugin --profile web add @copylee/dsh-office' },
936
- { section: 'fun', name: 'AI 音频', pkg: 'dsh-audiogen', summary: '生成语音 / 音乐 / 音效(多厂商渠道)', usage: '跟我说:用温柔女声读这段话', requires: '要在它自己的设置里配渠道 key', command: 'dsh plugin --profile web add dsh-audiogen' },
937
- { section: 'fun', name: '语音对话', pkg: 'dsh-talk', summary: '麦克风说话 → 转文字 → 朗读回答(浏览器端可用)', usage: '在输入框旁点麦克风说话', requires: '要联网 STT/TTS;桌面端麦克风受 DSH 权限限制', command: 'dsh plugin --profile web add dsh-talk' },
938
- { section: 'fun', name: '交互卡片', pkg: 'dsh-genui', summary: '让回答里直接出现可点的卡片/表单', usage: '跟我说:用卡片列出三个方案让我选', requires: '无需配置', command: 'dsh plugin --profile web add dsh-genui' },
939
- { section: 'fun', name: '皮肤风格', pkg: 'dsh-dream-skin', summary: '给 DSH 界面换一套外观主题', usage: '装完在它自己的设置里挑主题', requires: '和我们自带的皮肤中心可能重叠,二选一', command: 'dsh plugin --profile web add dsh-dream-skin' },
929
+ const catalog = [
930
+ {
931
+ section: 'work', name: '联网搜索', pkg: '@240xu/dsh-websearch', icon: '🔍', size: '约 0.3MB',
932
+ summary: '让 AI 联网查资料、读网页正文,支持多个搜索后端',
933
+ features: ['内置 11 个搜索后端(Exa / Parallel / Tavily 等)', '能抓取网页正文再总结,不只看标题', '搜索结果可以要求给出来源链接'],
934
+ examples: ['帮我搜一下今天的 AI 新闻,给我三条带链接的', '查一下这个报错怎么解决,顺便读一下官方文档'],
935
+ requires: '装完要在它自己的设置里填搜索 key(没有 key 装了也搜不了)',
936
+ command: 'dsh plugin --profile web add @240xu/dsh-websearch',
937
+ },
938
+ {
939
+ section: 'work', name: '文档读取', pkg: '@civilization/dsh-office-reader', icon: '📄', size: '约 0.2MB',
940
+ summary: '读 PDF / Word / Excel(只读不修改),大文件分页/分表读取防爆上下文',
941
+ features: ['先看结构(页数/工作表/标题大纲)再按需切片', 'PDF 可按页码区间读,Excel 可按工作表转 Markdown 表格', 'Word 可按小节标题精准提取'],
942
+ examples: ['读一下 D:\\报告.pdf 前 5 页,总结要点', '把这个月的报表 xlsx 第 2 个 sheet 转成表格给我分析'],
943
+ requires: '无需配置;只读,生成/修改请用 Office 相关能力',
944
+ command: 'dsh plugin --profile web add @civilization/dsh-office-reader',
945
+ },
946
+ {
947
+ section: 'work', name: '定时任务', pkg: '@aiwayds/dsh-cron', icon: '⏰', size: '约 0.2MB',
948
+ summary: '按 cron 表达式或固定间隔自动执行任务,绑定到具体会话',
949
+ features: ['支持标准 cron(工作日 9 点)与间隔(每 10 分钟)', '任务必须有有效期(最长 1 年),不会无限跑', '错过的时间点直接跳过,不补跑;每次触发都有记录'],
950
+ examples: ['每天早上 9 点生成昨天的汇总,到年底为止', '每 10 分钟检查一次这个链接,异常就提醒我'],
951
+ requires: '无需配置;任务绑会话,会话被归档任务就停',
952
+ command: 'dsh plugin --profile web add @aiwayds/dsh-cron',
953
+ },
954
+ {
955
+ section: 'work', name: 'Outlook 邮件', pkg: '@aryacode/dsh-arya-maildesk', icon: '📧', size: '约 1.2MB',
956
+ summary: '让 AI 读、整理、回复你本机的 Outlook 邮件',
957
+ features: ['列出未读/按条件筛选', '读取邮件正文与附件名', '起草回复(发送前会问你)'],
958
+ examples: ['把昨天未读邮件列出来,挑重要的回', '找一下客户那封关于报价的邮件,总结要点'],
959
+ requires: 'Windows + 本机已安装并登录 Outlook;不需要额外密钥',
960
+ command: 'dsh plugin --profile web add @aryacode/dsh-arya-maildesk',
961
+ },
962
+ {
963
+ section: 'work', name: '消息推送', pkg: '@alotop/dsh-notify-hub', icon: '🔔', size: '约 0.3MB',
964
+ summary: '任务完成后把结果推到你手机(Bark / Telegram 等渠道)',
965
+ features: ['支持多个推送渠道聚合', '可只推摘要或全文', '适合配合定时任务/长任务使用'],
966
+ examples: ['这个任务跑完推我手机', '每天早上把汇总推给我'],
967
+ requires: '要先配置推送渠道(Bark key / Telegram bot 等)',
968
+ command: 'dsh plugin --profile web add @alotop/dsh-notify-hub',
969
+ },
970
+ {
971
+ section: 'work', name: '直接改 Office 文档', pkg: '@copylee/dsh-office', icon: '📝', size: '约 1.3MB',
972
+ summary: '在你正开着的 Word / Excel / PowerPoint 里直接改,改动实时可见',
973
+ features: ['文件开着也能改(走 Office COM,不重写文件)', '原生公式、脚注、交叉引用、题注自动编号', '保存前会自己拼图做一次排版检查'],
974
+ examples: ['把这份 Word 的标题改成二号字,加一张三线表', '给这份 PPT 每页补一句讲稿备注'],
975
+ requires: 'Windows + 本机装 Office/WPS;会接管 DSH 自带 Office 技能(改变默认行为)',
976
+ command: 'dsh plugin --profile web add @copylee/dsh-office',
977
+ },
978
+ {
979
+ section: 'fun', name: 'AI 音频', pkg: 'dsh-audiogen', icon: '🎵', size: '约 1.3MB',
980
+ summary: '生成语音 / 音乐 / 音效,支持多家云渠道与音色目录',
981
+ features: ['文字转语音(多音色)', '音乐与音效生成', '历史记录与资源库'],
982
+ examples: ['用温柔女声把这段话读出来', '生成一段 10 秒的轻松背景音乐'],
983
+ requires: '要在它自己的设置里配渠道 key(OpenAI / MiniMax / ElevenLabs 等)',
984
+ command: 'dsh plugin --profile web add dsh-audiogen',
985
+ },
986
+ {
987
+ section: 'fun', name: '语音对话', pkg: 'dsh-talk', icon: '🗣️', size: '约 0.3MB',
988
+ summary: '输入框麦克风说话 → 转文字 → 朗读回答(语音优先的会话闭环)',
989
+ features: ['浏览器端麦克风按钮 + 中间结果', '支持浏览器语音 / FunASR / whisper.cpp', '说话即打断当前播报'],
990
+ examples: ['点输入框旁的麦克风直接说一段话', '让它把回答读出来'],
991
+ requires: '浏览器打开 DSH 时可用;桌面端麦克风受 DSH 权限限制(我们已有自己的语音链路)',
992
+ command: 'dsh plugin --profile web add dsh-talk',
993
+ },
994
+ {
995
+ section: 'fun', name: '交互卡片', pkg: 'dsh-genui', icon: '🧩', size: '约 0.5MB',
996
+ summary: '让回答里直接渲染卡片 / 表格 / 表单,可点可选',
997
+ features: ['回答内联交互组件', '适合做选择器、清单、表单', '不改变会话结构'],
998
+ examples: ['用卡片列出三个方案让我选', '把结果做成一张表给你看'],
999
+ requires: '无需配置',
1000
+ command: 'dsh plugin --profile web add dsh-genui',
1001
+ },
1002
+ {
1003
+ section: 'fun', name: '皮肤风格', pkg: 'dsh-dream-skin', icon: '🎨', size: '约 2.5MB',
1004
+ summary: '给 DSH 界面换一套外观主题(玻璃/配色/动效)',
1005
+ features: ['多套主题可选', '可自定义背景', '与官方皮肤机制兼容'],
1006
+ examples: ['装完在它自己的设置里挑主题', '换成深色磨砂那套'],
1007
+ requires: '可能与我们自带的皮肤中心重叠,二选一使用',
1008
+ command: 'dsh plugin --profile web add dsh-dream-skin',
1009
+ },
940
1010
  ];
941
1011
  const items = catalog.map((item) => {
942
1012
  const hit = findPkg(item.pkg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-folia",
3
- "version": "4.26.0-pre.28",
3
+ "version": "4.26.0-pre.29",
4
4
  "description": "DSH 壁纸引擎:本机 WE 壁纸实时渲染,视频/网页/开机动画/桌宠皮肤,一键拉取在线素材。",
5
5
  "type": "module",
6
6
  "engines": {