The right sidebar of DeepSeek Harness (DSH) is usually used for document display. When working with code, developers often need to switch between viewing code, quoting specific lines, and searching workspace files. dsh-sidebar-editor addresses this pain point. It is a no-build DSH plugin that provides colored code previews, name-based workspace file search, and one-click quoting of selected lines into the chat input box in the right sidebar’s document panel.
Core Features¶
Right Sidebar Preview and Quoting¶
Preview code files with colored syntax in the right sidebar’s document panel, supporting line-by-line rendering. The plugin has built-in category coloring, covering syntax elements such as comments, strings, keywords, and function names. Click a line or drag-select multiple lines, and the selected lines appear in real time above the panel. Click the “Quote Selected Lines” button to insert the @路径 L10-L20 format into the chat input box. The toolbar provides “Quote Entire File” and “Quote Containing Directory” buttons, and the same actions are also available from menu items.
Workspace Search and Navigation¶
Enter a name in the search box on the file panel toolbar (leftmost part of the path bar) to match workspace files and folders. Press Ctrl/Cmd+Shift+P to open the file panel directly and focus the search box. Click a search result: if it is a file, it automatically expands and highlights; if it is a folder, it only expands to the location. After opening a file, the “Find” button on the toolbar or Ctrl+F can search content within the current file, supporting jumping and counting.
File Tree Quick Actions¶
Right-click a line in the right-side file tree to choose “Quote Entire File”, “Quote This Directory”, or “Copy Absolute Path” directly. This feature does not require opening the document panel first; it applies directly to the file tree.
Other Features¶
- Large File Handling: When exceeding 4000 lines, coloring is automatically disabled and only plain text is displayed. Lines remain selectable and quoteable.
- Editing and Saving: Disabled by default. The plugin bundle includes editor and saving logic, but considering browser undo stack compatibility and the fact that the sidebar is not suitable for writing code, the default mode is read-only preview.
Notes¶
- Editing and Saving Are Disabled by Default: To enable this, modify the return value of
editingEnabled()inclient.js. A controlled<textarea>clears the browser’s native undo stack, and the sidebar environment is not suitable for full code editing. - Search Limitations: The search feature does not recognize
.gitignore, does not perform fuzzy scoring, and matches by file name only. - File Tree Right-Click Behavior: Right-clicking in the file tree replaces the browser’s native context menu.
- Host Interface: The plugin registers the
POST /api/sidebarEditor/saveroute on the host side for saving files.
Summary¶
dsh-sidebar-editor streamlines the workflow for viewing code and quoting files by providing code preview and quoting capabilities in the DSH right sidebar. The plugin adopts a preview-first design strategy and is read-only by default, making it suitable for developers to quickly consult and quote code snippets.