deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
dsh-web-search-button)Direct web search button and /search host-level slash command plugin tailored for DeepSeek Harness (DSH) Desktop.
This plugin allows you to directly invoke the built-in host-level web search service (ctx.web) from the conversation input bar without routing through the LLM, returning real-time web search results formatted with titles, snippets, dates, and markdown source links with 0 Token overhead in ~1 second!
web_search tool ➔ Wait for tool result ➔ Model summarizes. Costs thousands of tokens and 10–20 seconds. conversation.input.left), matching DSH --dsw-* design tokens, supporting dark/light mode, live draft detection, and loading states.┌─────────────────────────────────────────────────────────────────────────────────┐
│ │
│ User: /search Latest AI model announcements 2026 │
│ │
│ 🌐 **Web Search Results** (Direct Web Tool Execution): │
│ Query: `Latest AI model announcements 2026` │
│ │
│ ### Sources: │
│ 1. [Gemini 3.8 Flash Launch](https://...) (2026-09-02) │
│ > Google officially releases Gemini 3.8 Flash with tool improvements... │
│ 2. [Claude Fable 5.1 Overview](https://...) (2026-06-09) │
│ > Anthropic introduces Fable 5.1 optimized for coding agents... │
│ │
├─────────────────────────────────────────────────────────────────────────────────┤
│ Input: Latest AI model announcements 2026 │
│ │
│ [+] [Standard Mode ▾] [ 🌐 Web Search ] [ Send ⬆]│
│ ▲ │
│ Plugin Search Button │
└─────────────────────────────────────────────────────────────────────────────────┘
conversation.input.left list slot./search <keyword> directly into the input bar and press Enter.ctx.inject(["slots", "remote.commands", "sessions"], (scope) => ...).--dsw-* CSS variables, perfectly adapting to theme changes.【 Client Plane (Browser Window) 】 【 Host Plane (Node Engine) 】
Composer draft: "Latest AI news"
│
(Click 🌐 Button)
│
Read zone.input.draft
│
Via remote.commands channel
Dispatch: "/search Latest AI news" ─────────► Matches ctx.commands("search")
│
Directly calls host service:
ctx.web.search({ query, maxResults: 8 })
│
Formats Markdown & sources
│
Markdown source card injected directly ◄────────────────── Injects into session
into conversation without LLM overhead (command/done)
dsh-web-search-button/
├── src/
│ ├── index.ts # Host-plane TypeScript source (registers /search command)
│ └── client/
│ └── index.tsx # Client-plane TSX source (SearchButton component & scope injection)
├── lib/
│ ├── index.js # Production Host ESM bundle
│ └── client.js # Production Client bundle (wrapped with window.__ModuleLoader__.load)
├── cordis.patch.yml # DSH bundle patch manifest
├── package.json # DSH manifest (dsh.bundle.patch & dsh.client configurations)
├── tsconfig.json # TypeScript build configuration
├── LICENSE # MIT License
├── README.md # English documentation
└── README.zh.md # Chinese documentation
git clone https://github.com/swenbo1-web/dsh-web-search-button.git D:/deepseek/dsh-web-search-button
DSH Desktop active profile is located at %APPDATA%\dsh-desktop\harness\profiles\web.
Create Directory Junction: Run in PowerShell:
New-Item -ItemType Junction -Path "$env:APPDATA\dsh-desktop\harness\profiles\web\node_modules\dsh-web-search-button" -Target "D:\deepseek\dsh-web-search-button"
Declare Bundle in profiles\web\package.json:
Open %APPDATA%\dsh-desktop\harness\profiles\web\package.json, ensure dependencies and dsh.profile.bundles include dsh-web-search-button (save as clean UTF-8 without BOM):
{
"dependencies": {
"dsh-web-search-button": "link:D:/deepseek/dsh-web-search-button"
},
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"dsh-web-search-button"
]
}
}
}
Ctrl + F5 (hard refresh) to load the updated client bundle.dsh-web-search-button enabled![ 🌐 联网搜索 ] button is displayed on the bottom-left of the input bar.web_search for real-time information;Type slash commands directly into the input bar and press Enter:
/search <keyword> # One-shot direct web search
/search on # Enable persistent Web Search Mode (turns button ON / Lit up)
/search off # Disable Web Search Mode (turns button OFF / Dimmed)
scope?In DSH, registering slots directly on the root context (ctx) can cause timing crashes if dependencies aren't ready, and leaves orphaned listeners on disable.
Our implementation uses scoped dependency injection:
export function apply(ctx: Context) {
// Guarded: Cordis dispatches scope only when slots and remote.commands are ready
ctx.inject(["slots", "remote.commands", "sessions"], (scope) => {
scope.slots.inject("conversation.input.left", () =>
scope.slots.register(
{
name: "conversation.input.left",
id: "web-search-button", // List slots require unique id & order
order: 10,
inject: (sessionId) => ({ ... })
},
SearchButton
)
);
});
}
Binding the button's lifetime to scope ensures clean, garbage-collected unmounting upon reload or disable.
MIT © swenbot
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。