@docyrus/ui-pro-ai-assistant 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/docy-assistant.d.ts +1 -1
- package/dist/index.js +616 -532
- package/dist/index.js.map +1 -1
- package/dist/internal/plate-editor/editor/plugins/code-block-base-kit.d.ts +2 -1
- package/dist/internal/plate-editor/editor/plugins/code-block-kit.d.ts +2 -1
- package/dist/styles.css +7 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/views/assistant-view.d.ts +2 -0
- package/package.json +3 -3
- package/dist/internal/plate-editor/editor/plugins/ai-kit.d.ts +0 -73
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { createLowlight } from 'lowlight';
|
|
1
2
|
export declare const BaseCodeBlockKit: (import("platejs").SlatePlugin<import("platejs").PluginConfig<any, {}, {}, {}, {}>> | import("platejs").SlatePlugin<import("platejs").PluginConfig<"code_block", {
|
|
2
3
|
defaultLanguage?: string | null;
|
|
3
|
-
lowlight?: ReturnType<
|
|
4
|
+
lowlight?: ReturnType<typeof createLowlight> | null;
|
|
4
5
|
}, {}, Record<"code_block", {
|
|
5
6
|
toggle: () => void;
|
|
6
7
|
}>, {}>> | import("platejs").SlatePlugin<import("platejs").PluginConfig<"code_syntax", {}, {}, {}, {}>>)[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { createLowlight } from 'lowlight';
|
|
1
2
|
export declare const CodeBlockKit: (import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"code_block", {
|
|
2
3
|
defaultLanguage?: string | null;
|
|
3
|
-
lowlight?: ReturnType<
|
|
4
|
+
lowlight?: ReturnType<typeof createLowlight> | null;
|
|
4
5
|
}, {}, Record<"code_block", {
|
|
5
6
|
toggle: () => void;
|
|
6
7
|
}>, {}>> | import("platejs/react").PlatePlugin<import("platejs").PluginConfig<any, {}, {}, {}, {}>> | import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"code_syntax", {}, {}, {}, {}>>)[];
|
package/dist/styles.css
CHANGED
|
@@ -3984,6 +3984,13 @@
|
|
|
3984
3984
|
opacity: 100%;
|
|
3985
3985
|
}
|
|
3986
3986
|
}
|
|
3987
|
+
.group-hover\:flex {
|
|
3988
|
+
&:is(:where(.group):hover *) {
|
|
3989
|
+
@media (hover: hover) {
|
|
3990
|
+
display: flex;
|
|
3991
|
+
}
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3987
3994
|
.group-hover\:translate-x-full {
|
|
3988
3995
|
&:is(:where(.group):hover *) {
|
|
3989
3996
|
@media (hover: hover) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -47,6 +47,10 @@ export interface AssistantSession {
|
|
|
47
47
|
messages: AssistantMessage[];
|
|
48
48
|
createdAt: Date;
|
|
49
49
|
updatedAt: Date;
|
|
50
|
+
createdBy?: {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
} | null;
|
|
50
54
|
}
|
|
51
55
|
export interface Project {
|
|
52
56
|
id: string;
|
|
@@ -211,6 +215,10 @@ export interface DocyAssistantProps {
|
|
|
211
215
|
hideCloseButton?: boolean;
|
|
212
216
|
/** Hide the agent selector dropdown in the input area; shows agent name as static text instead */
|
|
213
217
|
hideAgentSelector?: boolean;
|
|
218
|
+
/** Hide the outer border of the assistant container */
|
|
219
|
+
hideBorder?: boolean;
|
|
220
|
+
/** Show the header bar (default true); when false the agent selector moves to the top of the sidebar */
|
|
221
|
+
showHeader?: boolean;
|
|
214
222
|
agentSelectorUrl?: string;
|
|
215
223
|
baseAgentSelectorUrl?: string;
|
|
216
224
|
/** Called after agent selection is persisted internally, for external notification only */
|
|
@@ -55,6 +55,8 @@ export interface InlineModeProps extends AssistantViewCommonProps {
|
|
|
55
55
|
renderThreadHeader?: () => ReactNode;
|
|
56
56
|
hideCloseButton?: boolean;
|
|
57
57
|
hideAgentSelector?: boolean;
|
|
58
|
+
hideBorder?: boolean;
|
|
59
|
+
showHeader?: boolean;
|
|
58
60
|
agentSelectorUrl?: string;
|
|
59
61
|
baseAgentSelectorUrl?: string;
|
|
60
62
|
onAgentChange?: (agentId: string, agentType: 'base' | 'deployment') => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docyrus/ui-pro-ai-assistant",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Docyrus AI Assistant component — full-featured chat UI with canvas, projects, and i18n support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -137,11 +137,11 @@
|
|
|
137
137
|
"tailwindcss": "4.2.1",
|
|
138
138
|
"tsup": "8.5.1",
|
|
139
139
|
"typescript": "5.9.3",
|
|
140
|
-
"@docyrus/ui-pro-shared": "0.0.
|
|
140
|
+
"@docyrus/ui-pro-shared": "0.0.2"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {
|
|
143
143
|
"@docyrus/api-client": ">=0.1.0",
|
|
144
|
-
"@docyrus/ui-pro-shared": ">=0.0.
|
|
144
|
+
"@docyrus/ui-pro-shared": ">=0.0.2",
|
|
145
145
|
"react": "19.2.4",
|
|
146
146
|
"react-dom": "19.2.4",
|
|
147
147
|
"vite": ">=5.0.0"
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { type PlateEditor } from 'platejs/react';
|
|
2
|
-
export declare const aiChatPlugin: import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"aiChat", any, {
|
|
3
|
-
aiChat: {
|
|
4
|
-
reset: import("platejs").OmitFirst<(editor: PlateEditor, { undo }?: {
|
|
5
|
-
undo?: boolean;
|
|
6
|
-
}) => void>;
|
|
7
|
-
submit: import("platejs").OmitFirst<(editor: PlateEditor, input: string, { mode, options, prompt, toolName: toolNameProps }?: {
|
|
8
|
-
mode?: import("@platejs/ai").AIMode;
|
|
9
|
-
options?: import("ai").ChatRequestOptions;
|
|
10
|
-
prompt?: import("@platejs/ai").EditorPrompt;
|
|
11
|
-
toolName?: import("@platejs/ai").AIToolName;
|
|
12
|
-
}) => void>;
|
|
13
|
-
hide: (options?: {
|
|
14
|
-
focus?: boolean;
|
|
15
|
-
undo?: boolean;
|
|
16
|
-
}) => void;
|
|
17
|
-
node: (options?: import("platejs").EditorNodesOptions & {
|
|
18
|
-
anchor?: boolean;
|
|
19
|
-
streaming?: boolean;
|
|
20
|
-
}) => import("platejs").NodeEntry | undefined;
|
|
21
|
-
reload: () => void;
|
|
22
|
-
show: () => void;
|
|
23
|
-
stop: () => void;
|
|
24
|
-
};
|
|
25
|
-
} & Record<"aiChat", Pick<{
|
|
26
|
-
reset: import("platejs").OmitFirst<(editor: PlateEditor, { undo }?: {
|
|
27
|
-
undo?: boolean;
|
|
28
|
-
}) => void>;
|
|
29
|
-
submit: import("platejs").OmitFirst<(editor: PlateEditor, input: string, { mode, options, prompt, toolName: toolNameProps }?: {
|
|
30
|
-
mode?: import("@platejs/ai").AIMode;
|
|
31
|
-
options?: import("ai").ChatRequestOptions;
|
|
32
|
-
prompt?: import("@platejs/ai").EditorPrompt;
|
|
33
|
-
toolName?: import("@platejs/ai").AIToolName;
|
|
34
|
-
}) => void>;
|
|
35
|
-
hide: (options?: {
|
|
36
|
-
focus?: boolean;
|
|
37
|
-
undo?: boolean;
|
|
38
|
-
}) => void;
|
|
39
|
-
node: (options?: import("platejs").EditorNodesOptions & {
|
|
40
|
-
anchor?: boolean;
|
|
41
|
-
streaming?: boolean;
|
|
42
|
-
}) => import("platejs").NodeEntry | undefined;
|
|
43
|
-
reload: () => void;
|
|
44
|
-
show: () => void;
|
|
45
|
-
stop: () => void;
|
|
46
|
-
}, "stop" | "submit" | "reset" | "node">> & Record<"aiChat", {
|
|
47
|
-
hide: ({ focus, undo }?: {
|
|
48
|
-
focus?: boolean;
|
|
49
|
-
undo?: boolean;
|
|
50
|
-
}) => void;
|
|
51
|
-
show: () => void;
|
|
52
|
-
}>, {
|
|
53
|
-
aiChat: {
|
|
54
|
-
accept: import("platejs").OmitFirst<(editor: PlateEditor) => void>;
|
|
55
|
-
insertBelow: import("platejs").OmitFirst<(editor: PlateEditor, sourceEditor: import("platejs").SlateEditor, { format }?: {
|
|
56
|
-
format?: "all" | "none" | "single";
|
|
57
|
-
}) => void>;
|
|
58
|
-
replaceSelection: import("platejs").OmitFirst<(editor: PlateEditor, sourceEditor: import("platejs").SlateEditor, { format }?: {
|
|
59
|
-
format?: "all" | "none" | "single";
|
|
60
|
-
}) => void>;
|
|
61
|
-
removeAnchor: (options?: import("platejs").EditorNodesOptions) => void;
|
|
62
|
-
};
|
|
63
|
-
} & Record<"aiChat", {
|
|
64
|
-
accept: () => void;
|
|
65
|
-
insertBelow: (sourceEditor: import("platejs").SlateEditor, args_1?: {
|
|
66
|
-
format?: "all" | "none" | "single";
|
|
67
|
-
} | undefined) => void;
|
|
68
|
-
removeAnchor: (options?: import("platejs").RemoveNodesOptions | undefined) => void;
|
|
69
|
-
replaceSelection: (sourceEditor: import("platejs").SlateEditor, args_1?: {
|
|
70
|
-
format?: "all" | "none" | "single";
|
|
71
|
-
} | undefined) => void;
|
|
72
|
-
}>, {}>>;
|
|
73
|
-
export declare const AIKit: any[];
|