The plugin ecosystem of DeepSeek Harness (DSH) enables the integration of visual feedback within conversation flows. The dsh-character-emote-plugin provides a fixed overlay on the right side of the conversation, displaying the current character’s emotive artwork in real time. It triggers portrait switching either through model tool calls or via streaming-text emotion detection, addressing the lack of visual expression in agent conversations.
Installation & Activation¶
Installing the plugin requires specifying the DSH execution method. After installation, restart the DSH process to apply the configuration.
# Install
<dsh> plugin --profile <profile> add <plugin-directory>
# Uninstall
<dsh> plugin --profile <profile> remove dsh-character-emote-plugin
Note: The plugin code is licensed under MIT, and the documentation is licensed under CC BY 4.0.
Directory Structure & Asset Preparation¶
The plugin identifies characters and emotions through directory structure. You must prepare the portrait assets yourself; the repository does not include image files.
Directory Structure¶
Multi-character management is supported. Each character corresponds to a directory, and the directory name is the character name.
dsh-character-emote/
characters/
高奈利亚/ ← Character name (directory name = character id)
joy.png ← Base level (intensity 0)
anger.png ← Base level
anger-1.png anger-2.png anger-3.png ← Intensity progression levels (intensity 1/2/3)
角色B/
...
Naming Convention¶
Emotion names are independent of the character; all character directories follow the same internal convention:
* joy.png: Base emotion image (intensity 0).
* anger-1.png / anger-2.png / anger-3.png: Intensity progression levels (intensity 1/2/3).
* Supported formats: png, jpg, jpeg, webp, gif.
After placing the assets, click the “Refresh Characters” button on the settings page to recognize them; no restart is required.
Core Features¶
Emotion Modes¶
The plugin offers three emotion modes that can be switched on the settings page:
- Auto (default): The model either calls the
set_expressiontool or performs streaming-based emotion detection, directly triggering image switching. - Manual: The model only records a “pending emotion”. The settings page shows a pending card; you must manually select an emotion and click “Apply” to switch the image.
- Paused: Completely frozen; no emotion changes take effect.
Visual Interaction¶
- Animation: Portrait switching supports fade-in/out and scale transition animations; enable/disable via the settings page.
- Operation: Only the image itself is draggable and zoomable (mouse wheel). The overlay does not block other UI interactions.
- Styling: Size, position, and opacity of the portrait are adjustable; configuration persists to localStorage.
- Preload: Switching characters triggers preloading of all portraits for that character, avoiding flicker on slow networks.
Composite Emotions & Mood¶
- Composite emotions: Supports combining a primary emotion with a secondary emotion (e.g.,
surprise+embarrassment); the label shows “Primary + Secondary”. - Mood baseline: Built-in valence (positive/negative) and arousal axis mappings for 28 emotions. Each emotion call blends a proportion of the current mood, which decays exponentially over time (half-life: 2 minutes). Mood is in-memory only and resets to zero on restart.
- Dynamic intensity mapping: Emotion intensity is influenced by mood; when the direction is opposite or the difference is too large, the intensity automatically steps down, preventing abrupt expression switches.
Trigger Conditions¶
In addition to model tool calls, the plugin supports extended text-based triggers:
- Punctuation:
!→ excitement,?→ confusion,...→ sadness. - Emojis:
😊→ joy,😠→ anger,😢→ sadness,😲→ surprise. - Interjections:
哇/啊→ surprise,哎/唉→ disappointment,嘿/嘻嘻→ amusement.
API & Settings¶
API Routes¶
The plugin provides the following HTTP endpoints:
POST /character-emote/mode: Switch emotion mode. Body:{mode: "auto"|"manual"|"paused"}.POST /character-emote/apply: Manually apply an emotion. Body:{emotion, intensity?, secondary?}.
Settings¶
- Refresh Characters: Rescans the
characters/directory and re-registers the tool enumeration. - Emotion Intensity Visualization: Displays an intensity indicator bar below the portrait (maximum 3 levels).
- Intensity Scaling Without Levels: When only a base image exists (no variants), simulates visual intensity by scaling the base image; if variants exist, uses level images (backward compatible).
Notes¶
- Assets: The repository contains no portrait images; prepare them according to the conventions.
- In-memory state: Mood data is in-memory only and resets after DSH restarts.
- Global sharing: Multiple sessions share the same current character and emotion state.
- Tool enumeration refresh: After switching characters or emotions, the
set_expressiontool enumeration is a snapshot from the last refresh; you must refresh (i.e., click “Refresh Characters”) for changes to take effect. - Sibling repositories: The author maintains several related plugins, such as
dsh-liya-skin(skins) anddsh-liya-ui(UI polish).
Author: feverZHONG