import React from "react"; import { ReactNextElement } from "@next-core/react-element"; import "@next-core/theme"; import type { ActionType } from "@next-bricks/basic/mini-actions"; import { type ActionClickDetail, type PersonalActionClickDetail, type Project, type ProjectActionClickDetail } from "./ChatHistory.js"; import type { SidebarLink } from "./interfaces.js"; import { type SpaceNavProps } from "./SpaceNav.js"; export type { SidebarLink, SpaceNavProps }; export interface ElevoSidebarProps { userInstanceId?: string; behavior?: "default" | "drawer"; logoUrl?: string; newChatUrl?: string; newChatLinkWhenCollapsed?: boolean; historyActiveId?: string; historyUrlTemplate?: string; historyActions?: ActionType[]; showProjects?: boolean; projectActiveId?: string; projectUrlTemplate?: string; projectActions?: ActionType[]; personalActions?: ActionType[]; links?: SidebarLink[]; canAddProject?: boolean; myLinks?: SidebarLink[]; scope?: "default" | "space"; spaceNav?: SpaceNavProps; } export type { ActionClickDetail, PersonalActionClickDetail, Project, ProjectActionClickDetail, }; /** * Elevo AI 侧边栏,包含 Logo 导航、新建对话、历史记录、项目列表及个人账户操作,支持折叠和抽屉两种行为模式。 * * @category layout-component */ export declare class ElevoSidebar extends ReactNextElement implements ElevoSidebarProps { #private; accessor userInstanceId: string | undefined; accessor behavior: "default" | "drawer" | undefined; accessor logoUrl: string | undefined; accessor newChatUrl: string | undefined; accessor newChatLinkWhenCollapsed: boolean | undefined; accessor historyUrlTemplate: string | undefined; accessor historyActions: ActionType[] | undefined; accessor showProjects: boolean | undefined; accessor projectUrlTemplate: string | undefined; accessor projectActions: ActionType[] | undefined; accessor personalActions: ActionType[] | undefined; accessor links: SidebarLink[] | undefined; accessor canAddProject: boolean | undefined; accessor myLinks: SidebarLink[] | undefined; /** * @default "default" */ accessor scope: "default" | "space" | undefined; accessor spaceNav: SpaceNavProps | undefined; /** * 延迟一段时间后拉取最新对话历史 * @param delay 拉取前的等待时长(毫秒),用于等待任务标题生成完成 */ pullHistory(delay: number): void; /** 展开侧边栏(behavior 为 drawer 时有效) */ open(): void; /** 折叠侧边栏(behavior 为 drawer 时有效) */ close(): void; /** * 从历史列表中移除指定项目及其对话 * @param projectId 要移除的项目 instanceId */ removeProject(projectId: string): void; /** * 向项目列表中追加一个新项目 * @param project 要追加的项目对象 */ addProject(project: Project): void; /** * 将指定对话标记为已移入项目,从历史列表中隐藏 * @param conversationId 要移动的对话 ID */ moveConversation(conversationId: string): void; render(): React.JSX.Element; }