Introduction

In a DSH environment, managing schedules and to-dos within a workspace must balance session context with data persistence. The dsh-calendar-todo plugin binds a calendar application to a DSH folder and patches browser and Bash timezone sampling, resolving pain points in cross-timezone calculations and UI synchronization.

Core Positioning

DSH Web plugin: a folder-organized calendar + to-do application. It supports iCal import (such as Google Calendar), a small calendar UI with two-way synchronization, and a complete set of conversational tools.

Installation and Enablement

Use the official installation command:

dsh plugin --profile web add dsh-calendar-todo
# 或
dsh plugin --profile web add https://github.com/qschen86/dsh-calendar-todo/releases/download/v0.2.0/dsh-calendar-todo-0.2.0.tgz

After installation, a 📅 icon appears in the sidebar. Click it to enter calendar mode; the browser side and host side will automatically apply layout patches.

Data and Workspace Binding

The plugin runs in a folder context:
- Default path: On first entry without configuration, it automatically creates ~/.dsh/calendar-todo.
- Data file: dsh-calendar-todo.json, which stores calendars, to-dos, and external calendar data.
- Session management: The folder is registered as a workspace, and conversation content is archived under ~/.dsh/sessions. In calendar mode, the conversation list is automatically filtered to sessions for this folder.

UI Layout

Calendar mode uses a dedicated layout, and the sidebar icon shows a “Today X” count.

  • Left (simplified conversation): 320px width, retaining only the message list and input box for the current session; other session management features are moved to settings.
  • Center (timeline): Displays to-dos and events sorted by time, with support for monthly grouping. When entering, it automatically jumps to today.
  • Top to-do bar: Horizontally lists timeless to-dos, supporting priority (High/Medium/Low), category tags, and pinning. Clicking toggles completion status.
  • Right (small calendar): Two-way synchronization with the timeline; scrolling the list highlights the date, and clicking a date locates the list.

External Calendar Support

Supports external calendars such as Google Calendar via iCal sources.

  • Configuration: Add an ICS URL in the settings panel (e.g., a Google Calendar webcal link).
  • Synchronization: Default interval is 60 minutes; manual immediate synchronization is supported.
  • Recurrence rules: RRULE (such as DAILY) is stored only once and expanded on demand during queries.
  • Filtering: At the top of the timeline, filter by source (local/external/specific tags).

Conversation Tool Integration

The plugin provides 5 core tools that can be used directly in conversation:

  • calendar_todo_query: Query to-dos/events, supporting filtering by source.
  • calendar_todo_add: Add a to-do (no time); the model automatically determines priority and category.
  • calendar_todo_add_event: Add an event (with time), used for scenarios such as “remind me in X minutes.”
  • calendar_todo_update: Mark completion or modify attributes (priority/category/pinning).
  • calendar_todo_delete: Delete an entry.

Decision logic: The model determines whether the content is an event or a to-do. If the intent is unclear, it asks the user to confirm via a card.

Timezone Handling

The plugin enforces UTC+8 (Asia/Shanghai):
- Browser side: Patches Intl.DateTimeFormat.prototype.resolvedOptions so the browser reports the UTC+8 timezone.
- Server side: Prepends export TZ=Asia/Shanghai to Bash commands, preventing the model from using system time to calculate relative times.

Reminder Mechanism

Time-based events support reminders:
- In-session: Sends a message in the session bound to the workspace.
- Telegram: Sends notifications via the dsh-telegram-bridge plugin (requires configuring bot token and authorized chat).

Configuration Parameters

Default behavior can be adjusted via environment variables:
- DSH_CALENDAR_TODO_SYNC_INTERVAL: Synchronization interval (minutes, default 60).
- DSH_CALENDAR_TODO_LOOKBACK_DAYS / DSH_CALENDAR_TODO_LOOKAHEAD_DAYS: Expansion window for recurring events (default 90 / 365).
- DSH_CALENDAR_TODO_REMIND_MINUTES: Minutes to remind in advance (default 5).

Notes

  • Depends on dsh-client-ui-layout and dsh-workspace-dock for layout patches.
  • Uninstallation does not delete data; data is stored in the bound folder and plugin directory.
  • License: MIT.

Summary

dsh-calendar-todo is a plugin that deeply integrates calendar functionality into the DSH workflow. Through folder binding, two-way synchronized UI, and conversation tools, it solves the problem of fragmented schedule management and enforces a unified timezone calculation logic.

Link: GitHub