mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 16:30:27 +00:00
Implement a comprehensive diff viewing system that allows users to review and approve/reject file changes before they're applied. The system includes event-driven architecture for managing diff lifecycle and integrates diff2html for rich visual diffs. Key changes: - Add DiffService for managing diff approval workflow with accept/reject/suggest actions - Create EventService for type-safe event handling (DiffOpened/DiffClosed) - Add DiffView component with diff2html integration for visual diff rendering - Modify VaultService to propose changes and require confirmation before file operations - Update FileSystemService to support optional confirmation for write operations - Add Event enum for centralized event type definitions - Import custom styles and diff2html styles for proper diff rendering - Update ConversationContent validation to support optional toolId field - Remove FileManager from dependency injection (now accessed directly from app) - Update .gitignore to track styles.css instead of main.css
13 lines
No EOL
362 B
TypeScript
13 lines
No EOL
362 B
TypeScript
import type { Event } from "Enums/Event";
|
|
import { Events } from "obsidian";
|
|
|
|
export class EventService extends Events {
|
|
|
|
public trigger(name: Event.DiffOpened, data?: unknown): void;
|
|
public trigger(name: Event.DiffClosed, data?: unknown): void;
|
|
|
|
public trigger(name: string, ...data: unknown[]): void {
|
|
super.trigger(name, ...data);
|
|
}
|
|
|
|
} |