dsh-searchflow: Real-Time Search Acceleration and Flow Visualization Plugin

Preface

DeepSeek Harness (DSH) developers often face two pain points when using tools: first, the tool call process operates in a “black box” state, making it difficult to diagnose failures or wait times; second, operations such as web_snapshot and browser_open take a long time, dragging down the overall response speed. The dsh-searchflow plugin aims to solve these two problems by using swimlane animations to display the full tool call chain and intercepting cache requests to significantly shorten rendering time.

Core Value

Maintained by Dayi-Z, this plugin provides two core capabilities:
1. Visualization: Presents steps such as web_search → web_fetch → web_snapshot → browser_open in real time inline within tool call rows, replacing default icons with wb_* animation icons (blue breathing light while running / green checkmark when complete / red X on failure), and marks noise (such as Cloudflare challenge pages) with ⚠ badges.
2. Acceleration: Intercepts cache requests in the tools/execute waterfall, reducing web_snapshot from 90s to 5ms, shortening browser_open foreground wait time to 0ms, and automatically prefetching the Top-3 search results.

Swimlane Visualization

The plugin maps tool calls into six swimlane stages, each corresponding to specific tools and icons. Real-time status (cache / rule badges) is displayed inline in the tool row.

Stage Tool Icon
search web_search, web_search_pro, web_platform_search, github_issue_list, browser_automation_search, wiki_recall, mcp_search Drawer Search
fetch web_fetch, web_fetch_pro, web_exa_contents, browser_crawl, wiki_acquire Grab
snapshot web_snapshot, browser_screenshot Frame·Fix
click browser_open, browser_click, browser_type, browser_hover, browser_set_files, browser_recipe_run, browser_scroll, browser_automation_run Tap Target
read browser_read, browser_evaluate, browser_status, browser_opencli_*, browser_script_*, wiki_*, mcp_call, web_rule, web_history, web_search_stats, github_issue_read, etc. 16-Grid Scan
navigate Other navigation-type tools Path Draw

Search Flow Card

In addition to inline icons, the plugin provides a task-level “Search Flow” panel (bottom right corner, collapsible/expandable):

  • Stage progress bar: Shows Searching → Reading → Writing, directly reusing the inline animation icons.
  • Progressive result flow: After search completion, the Top-6 results appear one by one (70ms staggered), clickable to jump directly to the source.
  • Completion summary chips: Displays total elapsed time, source count, deduplication, verification level (high/medium/low), and approximate token count, without exposing engine ownership.
  • Deep mode: Disabled by default; when enabled, automatically expands queries (CJK queries add English academic keywords, English queries add Chinese review keywords).

Cache Interception & Acceleration

The plugin intercepts requests through a dual-layer cache of in-memory LRU (200/1h) and the web-search-pro store.db. Specific benefits are as follows:

Interception Point Behavior Benefit
web_snapshot On cache hit, directly short-circuits and returns {value} 90s → 5ms
browser_open On cache hit, returns immediately; real navigation is preheated in the background ~13-18s → ~0ms foreground wait
Search results Top-3 After completion, serially prefetches and renders result URLs Subsequent open/snapshot directly hit
URL normalization Shared cache keys (strip www / trailing slash / sort parameters) Variant duplicate rendering reduced to zero
Noise detection Marks Cloudflare challenges / 404 / noise queries False successes at a glance

better-sidebar Integration

The Search Flow panel supports two parasitic forms, automatically selected:

  • Tab form: When ctx.betterSidebar is present, it registers as a sidebar tab (id searchflow:panel), filling the container. Supports “search history”, retaining up to 20 records, with up to 30 results per single-record expansion.
  • Floating card form: When better-sidebar is absent, displays a fixed card at the bottom right (368px frosted glass), collapsible into a capsule.
  • Soft dependency: The plugin does not force importing better-sidebar types; it only probes by structure. Supports late injection (ctx.inject) and manual override (localStorage['sf.host']).
  • Accessibility: Disables animations under prefers-reduced-motion. For debugging, status can be exposed via window.__SF_DEBUG__.task.

Search Definition & Tool Whitelist

The plugin defines the boundary of “a search”; only the following 4 tools can start a new task:

  1. web_search
  2. web_search_pro
  3. web_platform_search
  4. github_issue_list

Other web tools (such as web_fetch, browser_open, wiki_recall) only advance the current task. Knowledge base / MCP tools (such as wiki_recall, mcp_search) carry the search icon but do not count as Web searches, and will not mistakenly open the Search Flow panel.

Installation

dsh plugin --profile web add dsh-searchflow

After installation, restart the profile to enable it.

Development & Dependencies

  • Host dependencies: Requires the host to provide webServer, tools injection, and browser service (optional).
  • Environment requirements: Node.js ^22.19 || >=24, DSH >=0.1.0-rc.6.
  • Debugging: Frontend debugging can be accessed via window.__SF_DEBUG__.task.
  • Plugin directory: https://www.skillhub.cn/plugins/Dayi-Z/dsh-searchflow
  • GitHub repository: https://github.com/Dayi-Z/dsh-searchflow
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye