feat: align controlled AI sessions and MVP controls

This commit is contained in:
2026-07-21 19:19:36 +08:00
parent 9fa6744516
commit 82829645c2
19 changed files with 850 additions and 465 deletions

View File

@@ -10,6 +10,7 @@ import { ProjectStatusbar } from './projects/project-statusbar'
import { ProjectTopbar } from './projects/project-topbar'
import type { SearchResultDTO } from '../api/search'
import type { InboxSuggestionDTO } from '../api/inbox'
import type { AISessionDTO, CreateAISessionInput } from '../api/ai'
import type { ChannelKey, InboxConfirmationOutcome, Project, ProjectWorkspace, Theme, WorkbenchView } from './projects/project-types'
const { Content } = Layout
@@ -45,6 +46,8 @@ export function ProjectPage({
onSelectSearchResult,
onAnalyzeInbox,
onConfirmInbox,
onListAISessions,
onCreateAISession,
}: {
activeView: WorkbenchView
activeWorkspace: ProjectWorkspace
@@ -76,6 +79,8 @@ export function ProjectPage({
onSelectSearchResult: (result: SearchResultDTO) => void
onAnalyzeInbox: (inboxId: string) => Promise<InboxSuggestionDTO[]>
onConfirmInbox: (inboxId: string, suggestionIds: string[]) => Promise<InboxConfirmationOutcome>
onListAISessions: (projectId: string) => Promise<AISessionDTO[]>
onCreateAISession: (projectId: string, input: CreateAISessionInput) => Promise<AISessionDTO>
}) {
const isProject = activeView === 'project'
const [navOpen, setNavOpen] = useState<'projects' | 'channels' | null>(null)
@@ -143,7 +148,7 @@ export function ProjectPage({
{activeView === 'workspace' ? (
<WorkspacePage workspaces={workspaces} onOpenTask={onOpenTask} onUpdateTask={onUpdateWorkspaceTask} />
) : activeView === 'workspace-explore' ? (
<WorkspaceExplorePage workspaces={workspaces} onSelectItem={onSelectItem} />
<WorkspaceExplorePage />
) : (
<ProjectChannelPage
activeChannel={activeChannel}
@@ -159,6 +164,8 @@ export function ProjectPage({
onUpdateTask={updateActiveProjectTask}
onAnalyzeInbox={onAnalyzeInbox}
onConfirmInbox={onConfirmInbox}
onListAISessions={onListAISessions}
onCreateAISession={onCreateAISession}
/>
)}
</Content>