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:
+2
-2
@@ -1,5 +1,5 @@
|
||||
import path from 'path';
|
||||
import { HooksDatabase } from '../services/sqlite/HooksDatabase.js';
|
||||
import { SessionStore } from '../services/sqlite/SessionStore.js';
|
||||
import { createHookResponse } from './hook-response.js';
|
||||
|
||||
export interface UserPromptSubmitInput {
|
||||
@@ -42,7 +42,7 @@ export async function newHook(input?: UserPromptSubmitInput): Promise<void> {
|
||||
|
||||
const { session_id, cwd, prompt } = input;
|
||||
const project = path.basename(cwd);
|
||||
const db = new HooksDatabase();
|
||||
const db = new SessionStore();
|
||||
|
||||
try {
|
||||
// Check for any existing session (active, failed, or completed)
|
||||
|
||||
Reference in New Issue
Block a user