diff options
| author | Adam Malczewski <[email protected]> | 2026-03-29 13:44:05 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-29 13:44:05 +0900 |
| commit | e8d107e454b3804e089a33ce5fe7c931040d4647 (patch) | |
| tree | 4f8787fae670e86515baed54e00087ce3ef28da6 /.rules/plan/calendar-phase-6.md | |
| parent | 67d7d50ee2b05f66de3ab6aea38ff5d7d56ce839 (diff) | |
| download | ai-pulse-obsidian-plugin-e8d107e454b3804e089a33ce5fe7c931040d4647.tar.gz ai-pulse-obsidian-plugin-e8d107e454b3804e089a33ce5fe7c931040d4647.zip | |
remove calendar and chat history
Diffstat (limited to '.rules/plan/calendar-phase-6.md')
| -rw-r--r-- | .rules/plan/calendar-phase-6.md | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/.rules/plan/calendar-phase-6.md b/.rules/plan/calendar-phase-6.md deleted file mode 100644 index 382059a..0000000 --- a/.rules/plan/calendar-phase-6.md +++ /dev/null @@ -1,39 +0,0 @@ -# Phase 6: Main Plugin Wiring (`src/main.ts`) - -**Status:** Not started -**Depends on:** Phase 4 (calendar-view.ts), Phase 5 (settings) -**Modifies:** `src/main.ts` - ---- - -## Overview - -Wire the calendar view into the main plugin class: register the view, add ribbon icon, register commands, handle lifecycle. - ---- - -## Changes to `src/main.ts` - -``` -In onload(): - - registerView(VIEW_TYPE_CALENDAR, (leaf) => new CalendarView(leaf, this)) - - addRibbonIcon("calendar", "Open Calendar", () => activateCalendarView()) - - addCommand("open-calendar", "Open Calendar View", ...) - - addCommand("reveal-active-note", "Reveal active note in calendar", ...) - - addCommand("open-today", "Open today's daily note", ...) - -In onunload(): - - detachLeavesOfType(VIEW_TYPE_CALENDAR) - -activateCalendarView(): - - Same pattern as activateView() for the chat — check for existing leaf first -``` - ---- - -## Notes - -- Follow the existing pattern in `main.ts` for registering views (look at how the chat view is registered). -- The `activateCalendarView()` helper should check if a calendar leaf already exists before creating a new one. -- Calendar settings must be included in `loadData()`/`saveData()` — merge with defaults. -- The "Open today's daily note" command uses `openDailyNote()` from Phase 1 with `window.moment()` as the date. |
