RaulLazaro/dsh-pwa-plugin ↗★ 0
dsh-pwa-plugin
PWA plugin for DeepSeek Harness - adds offline support and install capability
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