2026-05-26 16:26:51 +02:00
|
|
|
import type { AiAgentId, AiAgentReadiness, AiAgentsStatus } from '../lib/aiAgents'
|
|
|
|
|
import type { AiModelProvider, AiTarget } from '../lib/aiTargets'
|
|
|
|
|
import type { AppLocale } from '../lib/i18n'
|
|
|
|
|
import type { NoteListItem } from '../utils/ai-context'
|
|
|
|
|
import type { VaultAiGuidanceStatus } from '../lib/vaultAiGuidance'
|
2026-05-26 19:15:05 +02:00
|
|
|
import type { AiWorkspaceConversationSetting, VaultEntry } from '../types'
|
2026-05-26 16:26:51 +02:00
|
|
|
import { AiWorkspace } from './AiWorkspace'
|
|
|
|
|
|
|
|
|
|
interface AppAiWorkspaceSurfaceProps {
|
|
|
|
|
activeEntry?: VaultEntry | null
|
|
|
|
|
activeNoteContent?: string | null
|
|
|
|
|
aiAgentsStatus: AiAgentsStatus
|
|
|
|
|
aiModelProviders?: AiModelProvider[]
|
2026-05-26 19:15:05 +02:00
|
|
|
conversationSettings?: AiWorkspaceConversationSetting[] | null
|
|
|
|
|
conversationSettingsReady?: boolean
|
2026-05-26 16:26:51 +02:00
|
|
|
defaultAiAgent: AiAgentId
|
|
|
|
|
defaultAiAgentReadiness: AiAgentReadiness
|
|
|
|
|
defaultAiAgentReady: boolean
|
|
|
|
|
defaultAiTarget?: AiTarget
|
|
|
|
|
entries: VaultEntry[]
|
|
|
|
|
locale: AppLocale
|
|
|
|
|
mode: 'docked' | 'window'
|
|
|
|
|
noteList: NoteListItem[]
|
|
|
|
|
noteListFilter: { type: string | null; query: string }
|
|
|
|
|
onClose: () => void
|
2026-05-26 19:15:05 +02:00
|
|
|
onConversationSettingsChange?: (conversations: AiWorkspaceConversationSetting[]) => void
|
2026-05-26 16:26:51 +02:00
|
|
|
onDock?: () => void
|
|
|
|
|
onFileCreated?: (relativePath: string) => void
|
|
|
|
|
onFileModified?: (relativePath: string) => void
|
|
|
|
|
onOpenAiSettings?: () => void
|
|
|
|
|
onOpenNote?: (path: string) => void
|
|
|
|
|
onPopOut?: () => void
|
|
|
|
|
onRestoreVaultAiGuidance?: () => void
|
|
|
|
|
onUnsupportedAiPaste?: (message: string) => void
|
|
|
|
|
onVaultChanged?: () => void
|
|
|
|
|
open: boolean
|
|
|
|
|
openTabs: VaultEntry[]
|
|
|
|
|
vaultAiGuidanceStatus?: VaultAiGuidanceStatus
|
|
|
|
|
vaultPath: string
|
|
|
|
|
vaultPaths?: string[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function AppAiWorkspaceSurface({
|
|
|
|
|
activeEntry,
|
|
|
|
|
activeNoteContent,
|
|
|
|
|
aiAgentsStatus,
|
|
|
|
|
aiModelProviders,
|
2026-05-26 19:15:05 +02:00
|
|
|
conversationSettings,
|
|
|
|
|
conversationSettingsReady,
|
2026-05-26 16:26:51 +02:00
|
|
|
defaultAiAgent,
|
|
|
|
|
defaultAiAgentReadiness,
|
|
|
|
|
defaultAiAgentReady,
|
|
|
|
|
defaultAiTarget,
|
|
|
|
|
entries,
|
|
|
|
|
locale,
|
|
|
|
|
mode,
|
|
|
|
|
noteList,
|
|
|
|
|
noteListFilter,
|
|
|
|
|
onClose,
|
2026-05-26 19:15:05 +02:00
|
|
|
onConversationSettingsChange,
|
2026-05-26 16:26:51 +02:00
|
|
|
onDock,
|
|
|
|
|
onFileCreated,
|
|
|
|
|
onFileModified,
|
|
|
|
|
onOpenAiSettings,
|
|
|
|
|
onOpenNote,
|
|
|
|
|
onPopOut,
|
|
|
|
|
onRestoreVaultAiGuidance,
|
|
|
|
|
onUnsupportedAiPaste,
|
|
|
|
|
onVaultChanged,
|
|
|
|
|
open,
|
|
|
|
|
openTabs,
|
|
|
|
|
vaultAiGuidanceStatus,
|
|
|
|
|
vaultPath,
|
|
|
|
|
vaultPaths,
|
|
|
|
|
}: AppAiWorkspaceSurfaceProps) {
|
|
|
|
|
return (
|
|
|
|
|
<AiWorkspace
|
|
|
|
|
mode={mode}
|
|
|
|
|
open={open}
|
|
|
|
|
aiAgentsStatus={aiAgentsStatus}
|
|
|
|
|
aiModelProviders={aiModelProviders}
|
2026-05-26 19:15:05 +02:00
|
|
|
conversationSettings={conversationSettings}
|
|
|
|
|
conversationSettingsReady={conversationSettingsReady}
|
2026-05-26 16:26:51 +02:00
|
|
|
defaultAiAgent={defaultAiAgent}
|
|
|
|
|
defaultAiTarget={defaultAiTarget}
|
|
|
|
|
defaultAiAgentReadiness={defaultAiAgentReadiness}
|
|
|
|
|
defaultAiAgentReady={defaultAiAgentReady}
|
|
|
|
|
activeEntry={activeEntry}
|
|
|
|
|
activeNoteContent={activeNoteContent}
|
|
|
|
|
entries={entries}
|
|
|
|
|
openTabs={openTabs}
|
|
|
|
|
noteList={noteList}
|
|
|
|
|
noteListFilter={noteListFilter}
|
|
|
|
|
onClose={onClose}
|
2026-05-26 19:15:05 +02:00
|
|
|
onConversationSettingsChange={onConversationSettingsChange}
|
2026-05-26 16:26:51 +02:00
|
|
|
onDock={onDock}
|
|
|
|
|
onPopOut={onPopOut}
|
|
|
|
|
onOpenAiSettings={onOpenAiSettings}
|
|
|
|
|
onOpenNote={onOpenNote}
|
|
|
|
|
onRestoreVaultAiGuidance={onRestoreVaultAiGuidance}
|
|
|
|
|
onUnsupportedAiPaste={onUnsupportedAiPaste}
|
|
|
|
|
onFileCreated={onFileCreated}
|
|
|
|
|
onFileModified={onFileModified}
|
|
|
|
|
onVaultChanged={onVaultChanged}
|
|
|
|
|
vaultAiGuidanceStatus={vaultAiGuidanceStatus}
|
|
|
|
|
vaultPath={vaultPath}
|
|
|
|
|
vaultPaths={vaultPaths}
|
|
|
|
|
locale={locale}
|
|
|
|
|
/>
|
|
|
|
|
)
|
|
|
|
|
}
|