Introduction

The Web GUI for DeepSeek Harness (DSH) is an important interface for agent development and debugging. In Android application development, viewing logcat logs is a core part of troubleshooting. The traditional approach is to manually run adb logcat in a terminal or open a separate window in an IDE, which lacks seamless integration with the current Web interface. The dsh-adb-logcat plugin solves this fragmentation by embedding a log viewing panel, consistent with the Android Studio style, inside the DSH Web GUI.

Plugin Overview

Plugin Name: dsh-adb-logcat
Maintainer: dxsdyhm
License: MIT
Positioning: An Android Studio-style ADB logcat viewer for the DSH Web GUI.

Installation and Enabling

Installing this plugin requires DSH’s package management command. Run the following command to add it:

dsh plugin --profile web add dsh-adb-logcat

After installation, restart the dsh web service to load the new plugin.

Core Features

This plugin provides full logcat viewing capabilities on the Web side, including the following:

  1. Device List: Automatically refreshed using the adb devices -l command, showing the device’s serial number, status (online/offline), and device model.
  2. Real-time Stream: Uses the adb -s <serial> logcat -v threadtime -T 300 command to fetch logs and parses them into readable line data in real time.
  3. Level and Text Filtering: Supports filtering by log level (V/D/I/W/E/F), as well as filtering text and tags by keyword or regular expression.
  4. Color Coding: Displays different colors based on log level (V=gray, D=blue, I=green, W=yellow, E=red, F=bright red), with the color scheme automatically adapting to the theme.
  5. Layout Control: Supports two modes—floating mode (a capsule-shaped floating window in the bottom-right corner of the screen) and docked mode (fixed below the chat input box).
  6. Interaction and Adjustment: Users can drag the top edge of the panel to adjust its height. Options such as word wrap, full-width display, and auto-scrolling are supported.
  7. Auto Start: When the panel is open and a device is detected, log capture starts automatically.

Usage

Using this plugin involves the following steps:

  1. Open the “ADB Logcat” capsule in the bottom-right corner.
  2. Select the target device in the device list (if a device exists, it is usually selected automatically and capture begins).
  3. Use the level chips, text/tag filters, and wrap/full-width/auto-scroll toggle buttons below to manage log display.
  4. Click the “Dock” button on the panel to move it below the chat input box for convenient viewing during a debugging conversation; click “Float” to restore it as an overlay.

Notes and Security

Before use, ensure the environment meets the following conditions:

  • Host Environment: adb (from Android platform-tools) must be installed in the PATH environment variable of the host system.
  • Device Connection: An Android device with USB debugging enabled, or an authorized emulator, must be connected.
  • Security Mechanisms: All device access is performed through the host’s subprocess service, without shell string interpolation, avoiding command injection risks. The host mounts an HTTP gateway (/api/logcat/*) restricted to loopback access, meaning remote browser access is rejected (returns 403) and only local Web GUI calls are allowed.

Ecosystem and Resources

DSH adopts the ecosystem philosophy of “everything is a plugin.” This plugin follows the MIT license and can be freely used and modified. For more details and source code, visit the plugin directory page or the GitHub repository.