Skip to content

Turn meetings into live agent loops. Record, transcribe, and analyze meetings with real-time AI intelligence — before, during, and after calls.

feat: collection id change

Om Gatebad59a7d7a0b
diff --git a/src/main/db/index.ts b/src/main/db/index.ts
index 29775c2..30ee650 100644
--- a/src/main/db/index.ts
+++ b/src/main/db/index.ts
@@ -264,6 +264,7 @@ export function initDatabase(): ReturnType<typeof drizzle<typeof schema>> {
ensureRecordingColumns();
ensureNudgesHistorySchema();
ensureMCPServerColumns();
+ ensureUserColumns();
seedDefaultCueCards();
@@ -362,6 +363,21 @@ function ensureMCPServerColumns(): void {
}
}
+function ensureUserColumns(): void {
+ if (!sqlite) return;
+
+ const columns = sqlite
+ .prepare("PRAGMA table_info(users)")
+ .all() as { name: string }[];
+
+ const columnNames = columns.map((c) => c.name);
+
+ if (!columnNames.includes('collection_id')) {
+ sqlite.exec("ALTER TABLE users ADD COLUMN collection_id TEXT");
+ logger.info('Added collection_id column to users table');
+ }
+}
+
export function getDatabase(): ReturnType<typeof drizzle<typeof schema>> {
if (!db) {
throw new Error('Database not initialized. Call initDatabase() first.');
@@ -392,6 +408,16 @@ export function createUser(data: schema.NewUser) {
return database.insert(schema.users).values(data).returning().get();
}
+export function updateUser(id: number, data: Partial<schema.User>) {
+ const database = getDatabase();
+ return database
+ .update(schema.users)
+ .set(data)
+ .where(eq(schema.users.id, id))
+ .returning()
+ .get();
+}
+
export function getRecordingById(id: number) {
const database = getDatabase();
return database
diff --git a/src/main/db/schema.ts b/src/main/db/schema.ts
index e421433..e9297c0 100644
--- a/src/main/db/schema.ts
+++ b/src/main/db/schema.ts
@@ -8,6 +8,7 @@ export const users = sqliteTable('users', {
name: text('name').notNull(),
apiKey: text('api_key').notNull(),
accessToken: text('access_token').notNull().unique(),
+ collectionId: text('collection_id'), // VideoDB collection ID for this user
});
export const recordings = sqliteTable('recordings', {
diff --git a/src/main/index.ts b/src/main/index.ts
index 99c1bbc..40ba373 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -5,7 +5,7 @@ fixPath();
import { app, BrowserWindow, Menu } from 'electron';
import path from 'path';
import fs from 'fs';
-import { initDatabase, closeDatabase, getUserByAccessToken } from './db';
+import { initDatabase, closeDatabase, getUserByAccessToken, updateUser } from './db';
import { startServer, stopServer } from './server';
import {
setupIpcHandlers,
@@ -38,6 +38,7 @@ import { logger } from './lib/logger';
import { applyVideoDBPatches } from './lib/videodb-patch';
import { getLockFilePath } from './lib/paths';
import { createSessionRecoveryService } from './services/session-recovery.service';
+import { createVideoDBService } from './services/videodb.service';
let mainWindow: BrowserWindow | null = null;
const isDev = !app.isPackaged;
@@ -293,14 +294,16 @@ async function recoverPendingSessions(): Promise<void> {
const appConfig = loadAppConfig();
const runtimeConfig = loadRuntimeConfig();
- // Try to get API key from app config first
+ // Try to get API key and collection ID from app config first
let apiKey = appConfig.apiKey;
+ let collectionId: string | undefined;
// If not in config, look up the user in the database using the access token
if (!apiKey && appConfig.accessToken) {
const user = getUserByAccessToken(appConfig.accessToken);
if (user) {
apiKey = user.apiKey;
+ collectionId = user.collectionId || undefined;
}
}
@@ -309,12 +312,13 @@ async function recoverPendingSessions(): Promise<void> {
return;
}
- logger.info('Starting background session recovery...');
+ logger.info({ collectionId }, 'Starting background session recovery...');
try {
const recoveryService = createSessionRecoveryService(
apiKey,
- runtimeConfig.apiUrl
+ runtimeConfig.apiUrl,
+ collectionId
);
const result = await recoveryService.recoverPendingSessions();
@@ -331,6 +335,46 @@ async function recoverPendingSessions(): Promise<void> {
}
}
+/**
+ * Migrate existing users to use the call.md collection.
+ * For users who registered before this feature was added, find or create
+ * the collection and update their record.
+ */
+async function migrateExistingUserCollection(): Promise<void> {
+ const appConfig = loadAppConfig();
+ const runtimeConfig = loadRuntimeConfig();
+
+ if (!appConfig.accessToken) {
+ logger.debug('No access token, skipping collection migration');
+ return;
+ }
+
+ const user = getUserByAccessToken(appConfig.accessToken);
+ if (!user) {
+ logger.debug('User not found, skipping collection migration');
+ return;
+ }
+
+ // Already has a collection ID
+ if (user.collectionId) {
+ logger.debug({ collectionId: user.collectionId }, 'User already has collection ID');
+ return;
+ }
+
+ logger.info({ userId: user.id }, 'Migrating existing user to call.md collection');
+
+ try {
+ const videodbService = createVideoDBService(user.apiKey, runtimeConfig.apiUrl);
+ const collectionId = await videodbService.findOrCreateCallMdCollection();
+
+ updateUser(user.id, { collectionId });
+ logger.info({ userId: user.id, collectionId }, 'User migrated to call.md collection');
+ } catch (error) {
+ const errorMsg = error instanceof Error ? error.message : String(error);
+ logger.error({ error: errorMsg, userId: user.id }, 'Failed to migrate user collection');
+ }
+}
+
async function startServices(): Promise<void> {
const runtimeConfig = loadRuntimeConfig();
const port = runtimeConfig.apiPort;
@@ -451,6 +495,11 @@ app.whenReady().then(async () => {
await autoRegister();
+ // Migrate existing users to call.md collection (fire and forget)
+ migrateExistingUserCollection().catch(() => {
+ // Error already logged in migrateExistingUserCollection
+ });
+
// Start calendar polling if already authenticated
if (hasTokens()) {
logger.info('Google tokens found, starting calendar polling');
diff --git a/src/main/ipc/capture.ts b/src/main/ipc/capture.ts
index 49e4d73..bf32f75 100644
--- a/src/main/ipc/capture.ts
+++ b/src/main/ipc/capture.ts
@@ -47,6 +47,7 @@ let currentSessionId: string | null = null;
let currentApiKey: string | null = null;
let currentAccessToken: string | null = null;
let currentApiUrl: string | undefined = undefined;
+let currentCollectionId: string | null = null;
function ensureVideoDBPatched(): void {
if (!app.isPackaged) return;
@@ -362,6 +363,7 @@ async function stopRecordingInternal(): Promise<{ success: boolean; error?: stri
const apiKeyForPoller = currentApiKey;
const accessTokenForPoller = currentAccessToken;
const apiUrlForPoller = currentApiUrl;
+ const collectionIdForPoller = currentCollectionId;
try {
if (captureClient) {
@@ -399,12 +401,13 @@ async function stopRecordingInternal(): Promise<{ success: boolean; error?: stri
// Start export poller to detect when video is ready
if (sessionIdForPoller && apiKeyForPoller && accessTokenForPoller) {
- logger.info({ sessionId: sessionIdForPoller }, 'Starting export poller');
+ logger.info({ sessionId: sessionIdForPoller, collectionId: collectionIdForPoller }, 'Starting export poller');
startExportPoller(
sessionIdForPoller,
apiKeyForPoller,
accessTokenForPoller,
- apiUrlForPoller
+ apiUrlForPoller,
+ collectionIdForPoller || undefined
);
} else {
logger.warn('Missing session info for export poller');
@@ -415,6 +418,7 @@ async function stopRecordingInternal(): Promise<{ success: boolean; error?: stri
currentApiKey = null;
currentAccessToken = null;
currentApiUrl = undefined;
+ currentCollectionId = null;
return { success: true };
} catch (error) {
@@ -429,6 +433,7 @@ async function stopRecordingInternal(): Promise<{ success: boolean; error?: stri
currentApiKey = null;
currentAccessToken = null;
currentApiUrl = undefined;
+ currentCollectionId = null;
return {
success: false,
@@ -628,9 +633,10 @@ export function setupCaptureHandlers(): void {
currentAccessToken = accessToken;
currentApiUrl = apiUrl;
- // Get API key from user record for export polling
+ // Get API key and collection ID from user record for export polling
const user = getUserByAccessToken(accessToken);
currentApiKey = user?.apiKey || null;
+ currentCollectionId = user?.collectionId || null;
return {
success: true,
@@ -797,6 +803,7 @@ export async function shutdownCaptureClient(): Promise<void> {
currentApiKey = null;
currentAccessToken = null;
currentApiUrl = undefined;
+ currentCollectionId = null;
if (captureClient) {
logger.info('Shutting down CaptureClient before app quit');
diff --git a/src/main/server/trpc/procedures/auth.ts b/src/main/server/trpc/procedures/auth.ts
index e0509e1..211de0c 100644
--- a/src/main/server/trpc/procedures/auth.ts
+++ b/src/main/server/trpc/procedures/auth.ts
@@ -32,6 +32,19 @@ export const authRouter = router({
};
}
+ // Find or create the call.md collection
+ let collectionId: string;
+ try {
+ collectionId = await videodbService.findOrCreateCallMdCollection();
+ logger.info({ collectionId }, 'Using call.md collection');
+ } catch (error) {
+ logger.error({ error, name }, 'Failed to setup call.md collection');
+ return {
+ success: false,
+ error: 'Failed to setup collection. Please try again.',
+ };
+ }
+
// Generate access token
const accessToken = uuidv4();
@@ -45,15 +58,16 @@ export const authRouter = router({
});
}
- // Create user
+ // Create user with collection ID
try {
const user = createUser({
name,
apiKey,
accessToken,
+ collectionId,
});
- logger.info({ userId: user.id, name }, 'User registered successfully');
+ logger.info({ userId: user.id, name, collectionId }, 'User registered successfully');
return {
success: true,
diff --git a/src/main/server/trpc/procedures/capture.ts b/src/main/server/trpc/procedures/capture.ts
index 09a5c67..19cb336 100644
--- a/src/main/server/trpc/procedures/capture.ts
+++ b/src/main/server/trpc/procedures/capture.ts
@@ -18,9 +18,9 @@ export const captureRouter = router({
const runtimeConfig = loadRuntimeConfig();
- logger.info({ userId: user.id }, '[Capture] Creating capture session');
+ logger.info({ userId: user.id, collectionId: user.collectionId }, '[Capture] Creating capture session');
- const videodbService = createVideoDBService(user.apiKey, runtimeConfig.apiUrl);
+ const videodbService = createVideoDBService(user.apiKey, runtimeConfig.apiUrl, user.collectionId || undefined);
const session = await videodbService.createCaptureSession({
endUserId: `user-${user.id}`,
diff --git a/src/main/server/trpc/procedures/recordings.ts b/src/main/server/trpc/procedures/recordings.ts
index b5f4500..ae56105 100644
--- a/src/main/server/trpc/procedures/recordings.ts
+++ b/src/main/server/trpc/procedures/recordings.ts
@@ -308,7 +308,8 @@ export const recordingsRouter = router({
try {
const runtimeConfig = loadRuntimeConfig();
- const service = createVideoDBService(apiKey, runtimeConfig.apiUrl);
+ const collectionId = ctx.user?.collectionId || undefined;
+ const service = createVideoDBService(apiKey, runtimeConfig.apiUrl, collectionId);
const result = await service.downloadVideo(recording.videoId, recording.meetingName || undefined);
logger.info({ recordingId: input.recordingId, result }, 'Video download URL obtained');
return result;
diff --git a/src/main/services/export-poller.service.ts b/src/main/services/export-poller.service.ts
index 550008a..ba0b58a 100644
--- a/src/main/services/export-poller.service.ts
+++ b/src/main/services/export-poller.service.ts
@@ -22,6 +22,7 @@ interface ActivePoller {
startTime: number;
apiKey: string;
apiUrl?: string;
+ collectionId?: string;
}
const activePollers = new Map<string, ActivePoller>();
@@ -33,14 +34,15 @@ export function startExportPoller(
sessionId: string,
apiKey: string,
_accessToken: string, // Kept for API compatibility, not used
- apiUrl?: string
+ apiUrl?: string,
+ collectionId?: string
): void {
if (activePollers.has(sessionId)) {
logger.debug({ sessionId }, 'Poller already active for session');
return;
}
- logger.info({ sessionId }, 'Starting export poller');
+ logger.info({ sessionId, collectionId }, 'Starting export poller');
const startTime = Date.now();
@@ -55,7 +57,7 @@ export function startExportPoller(
return;
}
- const result = await checkSessionExport(sessionId, apiKey, apiUrl);
+ const result = await checkSessionExport(sessionId, apiKey, apiUrl, collectionId);
logger.debug(
{ sessionId, status: result.status, exportedVideoId: result.videoId },
@@ -71,7 +73,8 @@ export function startExportPoller(
result.videoId,
apiKey,
apiUrl,
- true // trigger insights
+ true, // trigger insights
+ collectionId
);
if (!recovery.success) {
@@ -96,7 +99,7 @@ export function startExportPoller(
pollForExport();
const intervalId = setInterval(pollForExport, POLL_INTERVAL_MS);
- activePollers.set(sessionId, { intervalId, startTime, apiKey, apiUrl });
+ activePollers.set(sessionId, { intervalId, startTime, apiKey, apiUrl, collectionId });
}
/**
diff --git a/src/main/services/insights.service.ts b/src/main/services/insights.service.ts
index 38fe4ae..5fe2188 100644
--- a/src/main/services/insights.service.ts
+++ b/src/main/services/insights.service.ts
@@ -13,17 +13,19 @@ export interface InsightsResult {
export class InsightsService {
private apiKey: string;
private baseUrl?: string;
+ private collectionId?: string;
- constructor(apiKey: string, baseUrl?: string) {
+ constructor(apiKey: string, baseUrl?: string, collectionId?: string) {
this.apiKey = apiKey;
this.baseUrl = baseUrl;
+ this.collectionId = collectionId;
}
async processRecording(
recordingId: number,
videoId: string
): Promise<InsightsResult> {
- const videodbService = createVideoDBService(this.apiKey, this.baseUrl);
+ const videodbService = createVideoDBService(this.apiKey, this.baseUrl, this.collectionId);
try {
// Mark as processing
@@ -110,6 +112,6 @@ export class InsightsService {
}
}
-export function createInsightsService(apiKey: string, baseUrl?: string): InsightsService {
- return new InsightsService(apiKey, baseUrl);
+export function createInsightsService(apiKey: string, baseUrl?: string, collectionId?: string): InsightsService {
+ return new InsightsService(apiKey, baseUrl, collectionId);
}
diff --git a/src/main/services/mcp-inference.service.ts b/src/main/services/mcp-inference.service.ts
index d217f07..dd6c67e 100644
--- a/src/main/services/mcp-inference.service.ts
+++ b/src/main/services/mcp-inference.service.ts
@@ -53,7 +53,12 @@ Clean markdown the user can glance at mid-meeting. Lead with the data. Add a sug
- Don't repeat a fetch already made this session unless explicitly asked again.
- Don't summarize the meeting or narrate your reasoning.
- If fetched data contains sensitive internals, flag it as not safe to share aloud.
-- Silence is your default. An empty response is correct.`;
+- Silence is your default. An empty response is correct.
+
+## META INFO
+Current time and date: ${new Date().toISOString()}
+
+`;
interface TranscriptChunk {
text: string;
diff --git a/src/main/services/recording-export.service.ts b/src/main/services/recording-export.service.ts
index 23bbd71..ce91d11 100644
--- a/src/main/services/recording-export.service.ts
+++ b/src/main/services/recording-export.service.ts
@@ -35,11 +35,12 @@ export interface ExportRecoveryResult {
export async function checkSessionExport(
sessionId: string,
apiKey: string,
- apiUrl?: string
+ apiUrl?: string,
+ collectionId?: string
): Promise<ExportCheckResult> {
try {
const conn = connect(apiUrl ? { apiKey, baseUrl: apiUrl } : { apiKey });
- const session: CaptureSessionFull = await conn.getCaptureSession(sessionId);
+ const session: CaptureSessionFull = await conn.getCaptureSession(sessionId, collectionId);
await session.refresh();
return {
@@ -67,11 +68,12 @@ export async function recoverExportedRecording(
videoId: string,
apiKey: string,
apiUrl?: string,
- _triggerInsights: boolean = true // deprecated, kept for API compatibility
+ _triggerInsights: boolean = true, // deprecated, kept for API compatibility
+ collectionId?: string
): Promise<ExportRecoveryResult> {
try {
const conn = connect(apiUrl ? { apiKey, baseUrl: apiUrl } : { apiKey });
- const collection = await conn.getCollection();
+ const collection = await conn.getCollection(collectionId);
const video = await collection.getVideo(videoId);
// Parse duration from video.length
@@ -139,9 +141,10 @@ export async function checkAndRecoverSession(
sessionId: string,
apiKey: string,
apiUrl?: string,
- triggerInsights: boolean = true
+ triggerInsights: boolean = true,
+ collectionId?: string
): Promise<ExportRecoveryResult & { exported: boolean }> {
- const checkResult = await checkSessionExport(sessionId, apiKey, apiUrl);
+ const checkResult = await checkSessionExport(sessionId, apiKey, apiUrl, collectionId);
if (!checkResult.exported || !checkResult.videoId) {
return {
@@ -156,7 +159,8 @@ export async function checkAndRecoverSession(
checkResult.videoId,
apiKey,
apiUrl,
- triggerInsights
+ triggerInsights,
+ collectionId
);
return {
diff --git a/src/main/services/session-recovery.service.ts b/src/main/services/session-recovery.service.ts
index d007e14..9dcb329 100644
--- a/src/main/services/session-recovery.service.ts
+++ b/src/main/services/session-recovery.service.ts
@@ -22,7 +22,8 @@ export interface RecoveryResult {
*/
export async function recoverPendingSessions(
apiKey: string,
- apiUrl?: string
+ apiUrl?: string,
+ collectionId?: string
): Promise<RecoveryResult> {
const result: RecoveryResult = {
recovered: 0,
@@ -40,14 +41,15 @@ export async function recoverPendingSessions(
return result;
}
- logger.info({ count: pendingRecordings.length }, 'Found pending recordings to recover');
+ logger.info({ count: pendingRecordings.length, collectionId }, 'Found pending recordings to recover');
for (const recording of pendingRecordings) {
const recovery = await checkAndRecoverSession(
recording.sessionId,
apiKey,
apiUrl,
- true // trigger insights
+ true, // trigger insights
+ collectionId
);
if (recovery.exported && recovery.success) {
@@ -76,8 +78,8 @@ export async function recoverPendingSessions(
}
// Factory function for backward compatibility
-export function createSessionRecoveryService(apiKey: string, apiUrl?: string) {
+export function createSessionRecoveryService(apiKey: string, apiUrl?: string, collectionId?: string) {
return {
- recoverPendingSessions: () => recoverPendingSessions(apiKey, apiUrl),
+ recoverPendingSessions: () => recoverPendingSessions(apiKey, apiUrl, collectionId),
};
}
diff --git a/src/main/services/videodb.service.ts b/src/main/services/videodb.service.ts
index 82fba07..c7c0203 100644
--- a/src/main/services/videodb.service.ts
+++ b/src/main/services/videodb.service.ts
@@ -17,10 +17,26 @@ let cachedConnection: CachedConnection | null = null;
export class VideoDBService {
private apiKey: string;
private baseUrl?: string;
+ private collectionId?: string;
- constructor(apiKey: string, baseUrl?: string) {
+ constructor(apiKey: string, baseUrl?: string, collectionId?: string) {
this.apiKey = apiKey;
this.baseUrl = baseUrl;
+ this.collectionId = collectionId;
+ }
+
+ /**
+ * Set the collection ID to use for all operations
+ */
+ setCollectionId(collectionId: string): void {
+ this.collectionId = collectionId;
+ }
+
+ /**
+ * Get the collection ID being used
+ */
+ getCollectionId(): string | undefined {
+ return this.collectionId;
}
private getConnection(): Connection {
@@ -61,6 +77,44 @@ export class VideoDBService {
}
}
+ /**
+ * Find or create the "call.md" collection for this user.
+ * Returns the collection ID.
+ */
+ async findOrCreateCallMdCollection(): Promise<string> {
+ const conn = this.getConnection();
+ const COLLECTION_NAME = 'call.md Recordings';
+
+ logger.info('Looking for call.md collection...');
+
+ try {
+ // List all collections and find the one named "call.md"
+ const collections = await conn.getCollections();
+
+ for (const collection of collections) {
+ if (collection.name === COLLECTION_NAME) {
+ logger.info({ collectionId: collection.id }, 'Found existing call.md collection');
+ return collection.id;
+ }
+ }
+
+ // Collection not found, create it
+ logger.info('call.md collection not found, creating...');
+ const newCollection = await conn.createCollection(
+ COLLECTION_NAME,
+ 'Meeting recordings from Call.md app',
+ false // isPublic
+ );
+
+ logger.info({ collectionId: newCollection.id }, 'Created call.md collection');
+ return newCollection.id;
+ } catch (error: unknown) {
+ const errorMessage = error instanceof Error ? error.message : String(error);
+ logger.error({ errorMessage }, 'Failed to find or create call.md collection');
+ throw error;
+ }
+ }
+
async createSessionToken(
userId: string = 'default-user',
expiresIn: number = 86400
@@ -96,9 +150,10 @@ export class VideoDBService {
}> {
const conn = this.getConnection();
- logger.info({ endUserId: params.endUserId }, 'Creating capture session');
+ logger.info({ endUserId: params.endUserId, collectionId: this.collectionId }, 'Creating capture session');
- const collection = await conn.getCollection();
+ // Use the configured collection ID, or fall back to default
+ const collection = await conn.getCollection(this.collectionId);
const sessionOptions: {
endUserId: string;
@@ -113,7 +168,7 @@ export class VideoDBService {
const session = await collection.createCaptureSession(sessionOptions);
- logger.info({ sessionId: session.id }, 'Capture session created');
+ logger.info({ sessionId: session.id, collectionId: collection.id }, 'Capture session created');
return {
sessionId: session.id,
@@ -125,7 +180,7 @@ export class VideoDBService {
async getVideo(videoId: string) {
const conn = this.getConnection();
- const collection = await conn.getCollection();
+ const collection = await conn.getCollection(this.collectionId);
return collection.getVideo(videoId);
}
@@ -137,9 +192,9 @@ export class VideoDBService {
}
async generateInsights(videoId: string, customPrompt?: string): Promise<string | null> {
- logger.info({ videoId }, 'Generating AI insights');
+ logger.info({ videoId, collectionId: this.collectionId }, 'Generating AI insights');
const conn = this.getConnection();
- const collection = await conn.getCollection();
+ const collection = await conn.getCollection(this.collectionId);
const video = await this.getVideo(videoId);
// Fetch transcript text (like Python version)
@@ -216,6 +271,6 @@ ${transcriptText}`;
}
}
-export function createVideoDBService(apiKey: string, baseUrl?: string): VideoDBService {
- return new VideoDBService(apiKey, baseUrl);
+export function createVideoDBService(apiKey: string, baseUrl?: string, collectionId?: string): VideoDBService {
+ return new VideoDBService(apiKey, baseUrl, collectionId);
}
diff --git a/src/renderer/components/recording/LiveAssistPanel.tsx b/src/renderer/components/recording/LiveAssistPanel.tsx
index 72337a2..7c3a1bd 100644
--- a/src/renderer/components/recording/LiveAssistPanel.tsx
+++ b/src/renderer/components/recording/LiveAssistPanel.tsx
@@ -149,6 +149,7 @@ interface InsightSectionProps {
variant: 'say' | 'ask';
emptyText: string;
scrollRef: React.RefObject<HTMLDivElement>;
+ className?: string;
}
function InsightSection({
@@ -160,11 +161,12 @@ function InsightSection({
variant,
emptyText,
scrollRef,
+ className = '',
}: InsightSectionProps) {
return (
- <div className="border border-[#efefef] rounded-[12px] overflow-hidden">
+ <div className={`border border-[#efefef] rounded-[12px] overflow-hidden flex flex-col ${className}`}>
{/* Header */}
- <div className="bg-[#f7f7f7] border-b border-[#efefef] px-[16px] py-[10px] flex items-center gap-[8px]">
+ <div className="bg-[#f7f7f7] border-b border-[#efefef] px-[16px] py-[10px] flex items-center gap-[8px] shrink-0">
{icon}
<span className="font-medium text-[15px] text-black">{title}</span>
</div>
@@ -172,7 +174,7 @@ function InsightSection({
{/* Content */}
<div
ref={scrollRef}
- className="bg-white p-[16px] max-h-[200px] overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"
+ className="bg-white p-[16px] flex-1 min-h-0 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"
>
{items.length > 0 ? (
<div className="flex flex-col gap-[10px]">
@@ -364,7 +366,7 @@ export function LiveAssistPanel() {
</div>
{/* Panels */}
- <div className="flex-1 flex flex-col gap-[20px] min-h-0 overflow-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]">
+ <div className="flex-1 flex flex-col gap-[20px] min-h-0 overflow-hidden">
{/* Say this section */}
<InsightSection
title="Say this"
@@ -375,6 +377,7 @@ export function LiveAssistPanel() {
variant="say"
emptyText="No suggestions yet - keep the conversation going"
scrollRef={sayThisScrollRef}
+ className="flex-1 min-h-0"
/>
{/* Ask this section */}
@@ -387,20 +390,21 @@ export function LiveAssistPanel() {
variant="ask"
emptyText="No questions yet - we'll suggest when relevant"
scrollRef={askThisScrollRef}
+ className="flex-1 min-h-0"
/>
{/* MCP Findings Section - only show if MCP servers are connected */}
{connectedServerCount > 0 && (
- <div className="border border-[#efefef] rounded-[12px] overflow-hidden flex-1 min-h-[100px]">
+ <div className="border border-[#efefef] rounded-[12px] overflow-hidden flex-1 min-h-0 flex flex-col">
{/* MCP Findings Header */}
- <div className="bg-[#f7f7f7] border-b border-[#efefef] px-[16px] py-[10px]">
+ <div className="bg-[#f7f7f7] border-b border-[#efefef] px-[16px] py-[10px] shrink-0">
<span className="font-medium text-[14px] text-black tracking-[0.07px]">
MCP Findings
</span>
</div>
{/* MCP Findings Content */}
- <div className="bg-white p-[16px]">
+ <div className="bg-white p-[16px] flex-1 min-h-0 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]">
{mcpFindings ? (
<div className="prose prose-sm max-w-none text-[14px] text-black leading-[22px]">
<ReactMarkdown
diff --git a/src/types/videodb.d.ts b/src/types/videodb.d.ts
index cc7dc86..2e6ade3 100644
--- a/src/types/videodb.d.ts
+++ b/src/types/videodb.d.ts
@@ -54,6 +54,9 @@ declare module 'videodb' {
export interface Collection {
id: string;
+ name?: string;
+ description?: string;
+ isPublic?: boolean;
createCaptureSession(options: CreateCaptureSessionOptions): Promise<CaptureSession>;
getCaptureSession(sessionId: string): Promise<CaptureSession>;
listCaptureSessions(config?: ListCaptureSessionsConfig): Promise<CaptureSession[]>;
@@ -136,6 +139,7 @@ declare module 'videodb' {
export class Connection {
getCollection(id?: string): Promise<Collection>;
getCollections(): Promise<Collection[]>;
+ createCollection(name: string, description: string, isPublic?: boolean): Promise<Collection>;
generateClientToken(expiresIn?: number): Promise<string>;
createCaptureSession(config: CreateCaptureSessionOptions): Promise<CaptureSession>;
connectWebsocket(collectionId?: string): Promise<WebSocketConnection>;