- 新增 AI 写作功能,包括示例点击、重置和停止流等功能 - 实现 AI 知识库管理,支持创建、编辑和删除知识库 - 添加 AI 思维导图功能,支持预览和管理思维导图 - 实现 AI 工作流管理,支持创建、编辑和删除工作流 - 优化 API 调用,使用 Vben 组件库和 Vue 3 相关特性
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
import { Edge } from '@xyflow/svelte';
|
|
import { Node as Node_2 } from '@xyflow/svelte';
|
|
import { useSvelteFlow } from '@xyflow/svelte';
|
|
import { Viewport } from '@xyflow/svelte';
|
|
|
|
export declare type Item = {
|
|
value: number | string;
|
|
label: string;
|
|
children?: Item[];
|
|
};
|
|
|
|
export declare class Tinyflow {
|
|
private options;
|
|
private rootEl;
|
|
private svelteFlowInstance;
|
|
constructor(options: TinyflowOptions);
|
|
private _init;
|
|
private _setOptions;
|
|
getOptions(): TinyflowOptions;
|
|
getData(): {
|
|
nodes: Node_2[];
|
|
edges: Edge[];
|
|
viewport: Viewport;
|
|
};
|
|
setData(data: TinyflowData): void;
|
|
destroy(): void;
|
|
}
|
|
|
|
export declare type TinyflowData = Partial<ReturnType<ReturnType<typeof useSvelteFlow>['toObject']>>;
|
|
|
|
export declare type TinyflowOptions = {
|
|
element: string | Element;
|
|
data?: TinyflowData;
|
|
provider?: {
|
|
llm?: () => Item[] | Promise<Item[]>;
|
|
knowledge?: () => Item[] | Promise<Item[]>;
|
|
internal?: () => Item[] | Promise<Item[]>;
|
|
};
|
|
};
|
|
|
|
export { }
|