Files
DeepTutor/web/features/notes/components/note-companion-props.ts
Bingxi Zhao (Frank) 28c11e2ae8 feat: update notes, chat interactions and workspace UI on preview
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.

Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.

Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
2026-10-26 22:13:34 +08:00

31 lines
1.2 KiB
TypeScript

import type { NoteThreadView } from '../model/threads'
import type { OpenThread, ThreadSendOptions } from './useNoteThreads'
export interface NoteCompanionProps {
pageId: string
pageTitle?: string
thread: OpenThread
bound: boolean
threads: NoteThreadView[]
/** Plain text of a block, for naming where a conversation was held. */
blockText: (blockId: string) => string | null
/** A learning block's `learning:<kind>`, else the block type; null once gone. */
blockKind: (blockId: string) => string | null
/** Another block the learner clicked while this conversation is under way. */
focus: string | null
/** Ask about the clicked block, in a conversation of its own. */
onAskFocus: (draft: string) => void
onDismissFocus: () => void
prefill: { id: number; text: string } | null
onSend: (content: string, options?: ThreadSendOptions) => void
/** Insert a learning block after the line and fill it from this thread;
* `again` fills the block the thread was opened to regenerate instead. */
onMake: (kind: string, prompt: string, again?: boolean) => void
onRegenerate: () => void
onSelect: (sessionId: string) => void
onNewHere: () => void
onJump: () => void
onSuggestions: () => void
onClose: () => void
}