RaulLazaro/dsh-pwa-plugin ↗★ 0
dsh-pwa-plugin
PWA plugin for DeepSeek Harness - adds offline support and install capability
AI Analysis
核心用途是提升 DSH Web 端的加载速度并支持离线访问静态资源。适合希望将 DSH 像原生客户端一样安装到桌面或手机上使用的用户。提供智能缓存策略和自动更新通知。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full 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