When handling long conversations or file previews in DSH, selecting text for quotation is a common requirement. The original plugin often crushes the quote box or cuts off characters when handling multi-line quotes or long text, leading to context loss. Below is an introduction to dsh-huaci-pinglun, a patched fork focused on fixing layout issues.
What it is¶
dsh-huaci-pinglun (Package name: dsh-huaci-pinglun) is an MIT-licensed patched fork of dsh-client-ui-quote. Maintained by BaoBao1996121, it primarily fixes character clipping issues caused by incorrect quote box height calculations and provides functionality to integrate comments with conversations.
Core Features¶
- Floating Action Entry: Select text in the conversation body, file preview, or terminal to float the “Comment / Add to Conversation” buttons.
- Separate Input Fields: The quote body and comment occupy separate input boxes, allowing you to trim the quote or append questions.
- Usage Conditions: “Comment” requires both the quote and comment to be non-empty; “Add to Conversation” allows direct quoting.
- Draft Integration: The quote and comment are combined into a capsule and added to the current session draft; sending is still initiated by you.
- Layout Fix: Multi-line quotes automatically expand in height, and long quotes can be scrolled after reaching the height limit, eliminating crushing and character clipping.
- Feature Preservation: Retains upstream features such as the quote list, jumping back to the original text, quote revision, and replying to specific items.
Installation and Activation¶
Applicable to DSH Web / Desktop UI. The fix baseline has been verified on DSH 0.2.0-rc.2; please verify compatibility for other versions first. The overlay is not displayed in headless profiles.
The installation command is as follows:
dsh plugin --profile desktop add github:BaoBao1996121/dsh-huaci-pinglun#v0.1.0
After installation, please save your draft and fully exit and restart DSH. When replacing a plugin with the same name, simply refreshing the page may result in the continued use of the host cache. Find dsh-huaci-pinglun on the “Plugins” page and enable it.
Typical Usage¶
- Drag to select a sentence in the conversation body.
- Select “Comment”, fill in the comment, then click “Add to Conversation”; or simply select “Add to Conversation”.
- Verify the quote content in the input box, supplement questions, and send it yourself.
Shortcuts inherit from upstream: Alt+Q for Quote, Alt+C for Comment, Alt+B for Sidebar Conversation, Alt+L for Quote List.
Scenarios and Notes¶
- Compatibility: This project is an alternative fork to the original; do not enable it simultaneously with
dsh-client-ui-quote. Both retain the same quote format, quote serialization source, and local record keys. - Error Troubleshooting: If the console shows
cannot get property "remote.session" without inject, first check the dependency declarations of the corresponding plugin based on the call stack. - Distribution Note: This version is distributed via GitHub Release and does not claim to be published on npm.
- Cache Issues: When replacing a plugin with the same name, simply refreshing the page may result in the continued use of the host cache; a full exit and restart is required.
Brief Conclusion¶
By fixing the quote box layout, this plugin resolves the issue of long text being clipped and provides a more intuitive way to integrate quotes with conversations. For more details and source code, please refer to the directory page or the GitHub repository.