feat: Implement session management and search functionality
- Added SDK session, observation, and summary types to types.ts. - Refactored worker-service to use SessionStore for session management. - Created SessionSearch class for FTS5 full-text search and structured queries. - Implemented SessionStore for CRUD operations on SDK sessions, observations, and summaries. - Added migrations for database schema updates, including new columns and constraints. - Enhanced search capabilities with filters for projects, types, concepts, and date ranges.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import path from 'path';
|
||||
import { HooksDatabase } from '../services/sqlite/HooksDatabase.js';
|
||||
import { SessionStore } from '../services/sqlite/SessionStore.js';
|
||||
|
||||
export interface SessionStartInput {
|
||||
session_id?: string;
|
||||
@@ -20,7 +20,7 @@ export function contextHook(input?: SessionStartInput): void {
|
||||
const cwd = input?.cwd ?? process.cwd();
|
||||
const project = cwd ? path.basename(cwd) : 'unknown-project';
|
||||
|
||||
const db = new HooksDatabase();
|
||||
const db = new SessionStore();
|
||||
|
||||
try {
|
||||
const sessions = db.getRecentSessionsWithStatus(project, 3);
|
||||
|
||||
Reference in New Issue
Block a user