In the DeepSeek Harness (DSH) environment, agents often require longer thinking time when handling complex tasks. During this period, the conversation flow is usually silent, and users may not realize that the system is working or receive real-time background information. Existing approaches usually involve status polling or manual queries, resulting in a less seamless interaction experience. The dsh-gap-feed plugin aims to solve this problem by inserting trending news or custom reminder cards directly into the conversation flow during an agent’s extended thinking period, helping users stay aware of the current session.

This is a network-enabled utility plugin maintained by faukwaa and licensed under the MIT License. It triggers message injection during extended thinking phases to add card content to the conversation flow. The frequency is low enough that it does not interrupt normal interactions.

Installation

Install it using the official command:

dsh plugin --profile web add dsh-gap-feed

After installation, restart dsh web or refresh the page to take effect.

Core Features

  1. Extended Thinking Injection
    The plugin does not trigger on every thinking cycle. Cards are injected into the conversation flow only when the following conditions are met:

    • The enabled switch is true;
    • The agent’s continuous thinking duration exceeds minThinkSeconds (default 20 seconds) and it is not idle;
    • More than cooldownMinutes (default 15 minutes) have elapsed since the last injection;
    • The number of injections in the past hour has not exceeded maxPerHour (default 4).
  2. Parallel Multi-Source Fetching
    Supports fetching data from three sources simultaneously:

    • Toutiao: Uses the public API and requires no login;
    • GitHub Trending: Fetches repositories created this week and sorted by Star count;
    • Bilibili Trending: Retrieves the current popular video rankings.
      Multiple sources are fetched in parallel, and a failure in any source does not affect the normal operation of the others.
  3. Natural Language Reminders
    Users can set reminders directly in the conversation using natural language. The plugin parses the task and due time, then saves them. Supported examples include:

    • “Remind me to have a meeting at 18:00”
    • “remind me to have a meeting at 18:00”
    • “Remind me to reply to emails in half an hour”
      If parsing fails, a friendly error is returned without blocking the conversation.
  4. Priority and Deduplication

    • Priority: Due reminders are displayed before news.
    • Deduplication: The same content is not injected repeatedly within a single session.
  5. Persistence and Configuration

    • A built-in settings page automatically renders the UI based on the configuration form. It supports modifying rate-limiting parameters and managing reminders (create, read, update, delete, enable/complete).
    • Configuration and reminder data are persisted to storage and are not lost after restart.
    • Injected messages inherit the model source of existing messages in the session, ensuring session loading works correctly.

Configuration Options

Configuration Option Type Default Value Description
enabled boolean true Master switch
minThinkSeconds number 20 Minimum thinking time required to trigger injection (seconds)
cooldownMinutes number 15 Minimum interval between injections (minutes)
maxPerHour number 4 Maximum injections per hour
blacklist string[] [] Blacklist keywords for titles. Matching titles are filtered out

Reminder Storage

Reminder data is stored in a local file:

$DSH_HOME/profiles/<profile>/data/gap-feed/reminders.json
  • DSH_HOME defaults to ~/.dsh;
  • The file structure is a JSON array containing the id, text, dueAt, done, enabled, and createdAt fields;
  • Missing directories are created automatically. If reading or writing fails, or if the JSON is corrupted, the plugin silently falls back to in-memory state.

Notes

  • Bilibili Rate Limiting: The Bilibili source may trigger rate limiting (error code -352) under data center IPs, but the plugin degrades gracefully without affecting other sources.
  • Session Deduplication: The deduplication logic applies only to the lifecycle of a single session (it is recalculated after restart), so duplicate content may appear after a restart.
  • Runtime Permissions: The plugin runs with the permissions of the current DSH process. Verify the source code and license before installation.