Skip to content

About

基于 deepseek-ai/chat-demo 的安卓封装版:Capacitor 壳 + 会话抽屉搜索 + 上下文自动压缩

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

chat-demo (Android build)

English | 简体中文

A fork of deepseek-ai/chat-demo (MIT). Not an official project.

The upstream static chat front end, wrapped as an installable Android app with Capacitor, plus a few interaction changes of my own.

What this fork changes

  • Android packaging: Capacitor 8 shell (com.jingyu.chat), release signed locally through android/keystore.properties, which is git-ignored; without it the release build falls back to the debug key so anyone can build.
  • Redesigned session drawer: the search box stays at the top and searches message text across all conversations; the drawer covers 88% of the screen with a 150 ms slide animation and hides the title and new-chat button on mobile.
  • Automatic context compaction: once a conversation reaches 80% of the context window, older rounds are summarised (the last 20 rounds stay verbatim) and the summary is appended to the system prompt. Messages themselves stay on the device.
  • The deep-thinking and web-search toggles always show their full labels instead of collapsing to icons on narrow screens.
  • Fixed microphone permission in the Android WebView (the manifest was missing MODIFY_AUDIO_SETTINGS).
  • The default system prompt no longer claims the assistant is DeepSeek.

Features

  • Multiple conversations with automatic titles, renaming, and deletion; edit prompts, regenerate replies, and switch between message branches.
  • Streaming replies, deep thinking, smart search, link reading, and source citations; stop generation or continue eligible replies.
  • Upload, paste, or drag and drop attachments; use voice input and read replies aloud. A live audio spectrum appears in the first row of the input area while recording on mobile.
  • Markdown, syntax highlighting, KaTeX math, and Mermaid diagrams.
  • Simplified Chinese and English, light and dark themes, mobile layouts, location settings, and chat history import and export.

Data and storage

Your API key and settings are stored in the browser's localStorage. Conversations and original attachments are stored in IndexedDB. Local data is isolated by browser profile and site origin. Sending messages, uploading attachments, and using speech features sends the relevant content to the configured API service.

History import and export in Settings use ZIP archives. After confirmation and successful validation, importing replaces all local conversations and attachments. Exports include conversations and locally available original images, but exclude API keys, settings, and original non-image attachments. See the history import/export documentation (Chinese) for the archive format and preservation details.

Settings → Data → Delete all chats clears all local conversations, original attachments, and unsent drafts after confirmation. It stops ongoing replies and returns to a new chat. Your API key and settings are preserved; files already uploaded to the API service are not deleted.

Development

Command Description
pnpm dev Start the development server
pnpm build Build into dist/
pnpm type Run TypeScript type checks
pnpm lint Lint with oxlint
pnpm format Format with oxfmt

rspack.config.ts uses https://api.deepseek.com by default. Use createConfig({ apiOrigin, devServer }) to customize the API origin and development server proxy.

Chat uses deepseek-flash by default through Anthropic-compatible Messages / Files APIs. Speech features use ASR / TTS endpoints. Requests include extensions for search, link reading, titles, and latest_reminder, so the configured service must support the corresponding capabilities. Supported attachment formats are determined by server-side validation.

src/
  app/                 Application layout, themes, and global styles
  components/          Chat, settings, Markdown, and other UI components
  i18n/                English and Chinese translations
  services/
    api/               API requests, SSE, and protocol types
    chat/              Conversations, message branches, storage, and history import/export
    markdown/          Markdown parsing, syntax highlighting, and diagrams
    speech/            Audio recording and read-aloud playback
  utils/               Shared utilities

License

MIT. The build copies the license to dist/LICENSE; include it when distributing the app. Third-party dependencies are subject to their own licenses.

About

基于 deepseek-ai/chat-demo 的安卓封装版:Capacitor 壳 + 会话抽屉搜索 + 上下文自动压缩

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages