RaulLazaro/dsh-pwa-plugin ↗★ 0
dsh-pwa-plugin
DeepSeek Harness 的 PWA 插件:添加离线缓存支持和将其作为独立应用安装到设备的能力。
AI 分析
核心用途是提升 DSH Web 端的加载速度并支持离线访问静态资源。适合希望将 DSH 像原生客户端一样安装到桌面或手机上使用的用户。提供智能缓存策略和自动更新通知。
安裝
此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗
說明文件
閱讀完整 README ↗DSH PWA Plugin
PWA plugin for DeepSeek Harness that adds offline support and install-as-app capability.
Features
- Service Worker with smart caching strategy
- PWA Manifest with icons and metadata
- Automatic updates with user notification
- Offline-first for static assets
- Official DeepSeek icons (whale on black background)
Installation
Option 1: Local plugin
# Copy the plugin to the DSH plugins directory
cp -r dsh-pwa-plugin ~/.dsh/plugins/
# Or create a symlink
ln -s /path/to/dsh-pwa-plugin ~/.dsh/plugins/dsh-pwa-plugin
Option 2: Use with the web profile
Add to your web profile's package.json:
{
"dependencies": {
"dsh-pwa-plugin": "file:../dsh-pwa-plugin"
}
}
And in cordis.patch.yml:
- insert:
- id: pwa
name: 'dsh-pwa-plugin'
Generate PNG Icons
To generate the PNG icons required by the manifest:
npm install sharp --save-dev
node scripts/generate-icons.js
How It Works
- The host plugin injects a service worker registration script into the HTML
- The service worker caches static assets for offline use
- The manifest enables installing the app as a PWA
- Updates are detected automatically
Caching Strategy
- HTML: Network-first (always tries to fetch the latest version)
- Static assets (JS, CSS, fonts, images): Cache-first (serves from cache if available)
- API calls: Not cached (always goes to the network)
Limitations
- Requires HTTPS to work (except localhost)
- Service worker cannot cache API calls
- Updates require a page reload
License
MIT