agentic-ui-libs 1.0.0-beta.7 → 1.0.0-beta.8
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/dist/assets/style.css +3 -0
- package/dist/features/md-editor/MDEditor.d.ts.map +1 -1
- package/dist/features/md-editor/components/SlashMenu.d.ts.map +1 -1
- package/dist/features/md-editor/extensions/MentionCommand.d.ts +3 -0
- package/dist/features/md-editor/extensions/MentionCommand.d.ts.map +1 -1
- package/dist/features/md-editor/extensions/SlashCommand.d.ts +12 -0
- package/dist/features/md-editor/extensions/SlashCommand.d.ts.map +1 -1
- package/dist/features/md-editor/index.d.ts +1 -1
- package/dist/features/md-editor/index.d.ts.map +1 -1
- package/dist/features/md-editor/types.d.ts +12 -0
- package/dist/features/md-editor/types.d.ts.map +1 -1
- package/dist/index.js +177 -73
- package/dist/ui-libs.umd.js +177 -73
- package/package.json +1 -1
package/dist/assets/style.css
CHANGED
|
@@ -1824,6 +1824,9 @@ video {
|
|
|
1824
1824
|
.border-r-gray-900 {
|
|
1825
1825
|
border-right-color: var(--colors-text-text-primary-900, #101828);
|
|
1826
1826
|
}
|
|
1827
|
+
.border-t-gray-600 {
|
|
1828
|
+
border-top-color: var(--component-colors-utility-gray-utility-gray-600, #475467);
|
|
1829
|
+
}
|
|
1827
1830
|
.border-t-gray-900 {
|
|
1828
1831
|
border-top-color: var(--colors-text-text-primary-900, #101828);
|
|
1829
1832
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MDEditor.d.ts","sourceRoot":"","sources":["../../../src/features/md-editor/MDEditor.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,
|
|
1
|
+
{"version":3,"file":"MDEditor.d.ts","sourceRoot":"","sources":["../../../src/features/md-editor/MDEditor.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EASZ,MAAM,SAAS,CAAC;AAiBjB,OAAO,wBAAwB,CAAC;AA4BhC,eAAO,MAAM,QAAQ,uGAyrCpB,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlashMenu.d.ts","sourceRoot":"","sources":["../../../../src/features/md-editor/components/SlashMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AACzG,OAAO,KAAK,EAKV,cAAc,EACf,MAAM,UAAU,CAAC;AAwJlB,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;CAC9C;AAED,UAAU,sBAAuB,SAAQ,cAAc;IACrD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"SlashMenu.d.ts","sourceRoot":"","sources":["../../../../src/features/md-editor/components/SlashMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AACzG,OAAO,KAAK,EAKV,cAAc,EACf,MAAM,UAAU,CAAC;AAwJlB,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;CAC9C;AAED,UAAU,sBAAuB,SAAQ,cAAc;IACrD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,6FAwlBrB,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Extension } from '@tiptap/core';
|
|
2
2
|
import type { Mention } from '../types';
|
|
3
|
+
import type { SuggestionsGetter } from './SlashCommand';
|
|
3
4
|
export interface MentionCommandOptions {
|
|
4
5
|
agents?: Mention[];
|
|
5
6
|
tools?: Mention[];
|
|
6
7
|
knowledge?: Mention[];
|
|
7
8
|
onSelectItem?: (item: Mention) => void;
|
|
9
|
+
suggestionsLoading?: boolean;
|
|
10
|
+
getSuggestions?: () => SuggestionsGetter;
|
|
8
11
|
}
|
|
9
12
|
export declare const MentionCommandExtension: Extension<MentionCommandOptions, any>;
|
|
10
13
|
//# sourceMappingURL=MentionCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionCommand.d.ts","sourceRoot":"","sources":["../../../../src/features/md-editor/extensions/MentionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"MentionCommand.d.ts","sourceRoot":"","sources":["../../../../src/features/md-editor/extensions/MentionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,UAAU,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKxD,MAAM,WAAW,qBAAqB;IAEpC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,cAAc,CAAC,EAAE,MAAM,iBAAiB,CAAC;CAC1C;AAED,eAAO,MAAM,uBAAuB,uCAgJlC,CAAC"}
|
|
@@ -2,6 +2,16 @@ import { Extension } from '@tiptap/core';
|
|
|
2
2
|
import { SuggestionOptions } from '@tiptap/suggestion';
|
|
3
3
|
import type { Editor } from '@tiptap/core';
|
|
4
4
|
import type { SlashMenuCategory, Variable, Mention } from '../types';
|
|
5
|
+
export interface SuggestionsGetter {
|
|
6
|
+
agents: Mention[];
|
|
7
|
+
tools: Mention[];
|
|
8
|
+
knowledge: Mention[];
|
|
9
|
+
envVariables: Variable[];
|
|
10
|
+
memoryVariables: Variable[];
|
|
11
|
+
systemVariables: Variable[];
|
|
12
|
+
contentVariables: Variable[];
|
|
13
|
+
loading: boolean;
|
|
14
|
+
}
|
|
5
15
|
export interface SlashCommandOptions {
|
|
6
16
|
suggestion: Partial<SuggestionOptions<SlashMenuCategory>>;
|
|
7
17
|
agents?: Mention[];
|
|
@@ -13,6 +23,8 @@ export interface SlashCommandOptions {
|
|
|
13
23
|
contentVariables?: Variable[];
|
|
14
24
|
onSelectItem?: (item: Variable | Mention) => void;
|
|
15
25
|
highlightMentions?: boolean;
|
|
26
|
+
suggestionsLoading?: boolean;
|
|
27
|
+
getSuggestions?: () => SuggestionsGetter;
|
|
16
28
|
}
|
|
17
29
|
export declare const SlashCommandExtension: Extension<SlashCommandOptions, any>;
|
|
18
30
|
export declare function createSlashCommandSuggestion(categories: SlashMenuCategory[], onCommand?: (editor: Editor, category: SlashMenuCategory) => void): Partial<SuggestionOptions<SlashMenuCategory>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlashCommand.d.ts","sourceRoot":"","sources":["../../../../src/features/md-editor/extensions/SlashCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAc,iBAAiB,EAAmB,MAAM,oBAAoB,CAAC;AAIpF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EA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AC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAE1D,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,KAAK,IAAI,CAAC;IAElD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,cAAc,CAAC,EAAE,MAAM,iBAAiB,CAAC;CAC1C;AAED,eAAO,MAAM,qBAAqB,qCAwKhC,CAAC;AAGH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,iBAAiB,EAAE,EAC/B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,KAAK,IAAI,GAChE,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAmB/C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { MDEditor, default } from './MDEditor';
|
|
2
|
-
export type { BlockType, InlineStyle, TextSegment, VariableSegment, MentionSegment, InlineContent, Block, BlockMeta, EditorDocument, VariableType, Variable, VariableCategory, MentionType, Mention, MentionCategory, SlashMenuItem, SlashMenuCategory, SlashMenuConfig, MenuPosition, ToolbarItem, MDEditorFeatures, MDEditorProps, MDEditorRef, VariableChipProps, MentionChipProps, SlashMenuProps, InlineToolbarProps, CategoryMenuProps, VariableChipNodeAttrs, MentionChipNodeAttrs, AIPanelPosition, AIRefineConfig, AIRefineContext, AIMessage, AIRefinementMode, AIRefineRequest, AIRefineResponse, AIRefinePanelProps, } from './types';
|
|
2
|
+
export type { BlockType, InlineStyle, TextSegment, VariableSegment, MentionSegment, InlineContent, Block, BlockMeta, EditorDocument, VariableType, Variable, VariableCategory, MentionType, Mention, MentionCategory, SlashMenuItem, SlashMenuCategory, SlashMenuConfig, MenuPosition, ToolbarItem, MDEditorFeatures, MDEditorProps, MDEditorRef, SuggestionsData, VariableChipProps, MentionChipProps, SlashMenuProps, InlineToolbarProps, CategoryMenuProps, VariableChipNodeAttrs, MentionChipNodeAttrs, AIPanelPosition, AIRefineConfig, AIRefineContext, AIMessage, AIRefinementMode, AIRefineRequest, AIRefineResponse, AIRefinePanelProps, } from './types';
|
|
3
3
|
export { VariableChip, VariableChipComponent, MentionChip, MentionChipComponent, SlashMenu, VariableMenu, InlineToolbar, LinkEditor, TableToolbar, } from './components';
|
|
4
4
|
export { AIRefinePanel } from './components/AIRefinePanel';
|
|
5
5
|
export { AIContextMenu } from './components/AIContextMenu';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/md-editor/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG/C,YAAY,EAEV,SAAS,EACT,WAAW,EACX,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACT,cAAc,EAEd,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAEhB,WAAW,EACX,OAAO,EACP,eAAe,EAEf,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EAEZ,WAAW,EAEX,gBAAgB,EAEhB,aAAa,EACb,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/md-editor/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG/C,YAAY,EAEV,SAAS,EACT,WAAW,EACX,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACT,cAAc,EAEd,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAEhB,WAAW,EACX,OAAO,EACP,eAAe,EAEf,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EAEZ,WAAW,EAEX,gBAAgB,EAEhB,aAAa,EACb,WAAW,EACX,eAAe,EAEf,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EAEjB,qBAAqB,EACrB,oBAAoB,EAEpB,eAAe,EACf,cAAc,EACd,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -129,6 +129,15 @@ export interface SlashCommandConfig {
|
|
|
129
129
|
highlightMentions?: boolean;
|
|
130
130
|
includeVariablesInSlash?: boolean;
|
|
131
131
|
}
|
|
132
|
+
export interface SuggestionsData {
|
|
133
|
+
agents?: Mention[];
|
|
134
|
+
tools?: Mention[];
|
|
135
|
+
knowledge?: Mention[];
|
|
136
|
+
envVariables?: Variable[];
|
|
137
|
+
memoryVariables?: Variable[];
|
|
138
|
+
systemVariables?: Variable[];
|
|
139
|
+
contentVariables?: Variable[];
|
|
140
|
+
}
|
|
132
141
|
export interface MDEditorProps {
|
|
133
142
|
value?: EditorDocument;
|
|
134
143
|
markdownValue?: string;
|
|
@@ -141,6 +150,8 @@ export interface MDEditorProps {
|
|
|
141
150
|
memoryVariables?: Variable[];
|
|
142
151
|
systemVariables?: Variable[];
|
|
143
152
|
contentVariables?: Variable[];
|
|
153
|
+
onLoadSuggestions?: () => Promise<SuggestionsData>;
|
|
154
|
+
suggestionsLoading?: boolean;
|
|
144
155
|
features?: MDEditorFeatures;
|
|
145
156
|
slashMenuConfig?: Partial<SlashMenuConfig>;
|
|
146
157
|
slashCommandConfig?: SlashCommandConfig;
|
|
@@ -219,6 +230,7 @@ export interface SlashMenuProps {
|
|
|
219
230
|
memoryVariables?: Variable[];
|
|
220
231
|
systemVariables?: Variable[];
|
|
221
232
|
contentVariables?: Variable[];
|
|
233
|
+
suggestionsLoading?: boolean;
|
|
222
234
|
}
|
|
223
235
|
export interface InlineToolbarProps {
|
|
224
236
|
editor: Editor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/md-editor/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,MAAM,SAAS,GACjB,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,GACZ,cAAc,GACd,UAAU,GACV,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC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,CAAC;IACpB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAMD,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -67681,7 +67681,7 @@ function nodeToMarkdown(node) {
|
|
|
67681
67681
|
case "paragraph":
|
|
67682
67682
|
return inlineContentToMarkdown(node.content || []);
|
|
67683
67683
|
case "heading":
|
|
67684
|
-
const level = ((_a = node.attrs) == null ? void 0 : _a
|
|
67684
|
+
const level = ((_a = node.attrs) == null ? void 0 : _a["level"]) || 1;
|
|
67685
67685
|
const headingPrefix = "#".repeat(level);
|
|
67686
67686
|
return `${headingPrefix} ${inlineContentToMarkdown(node.content || [])}`;
|
|
67687
67687
|
case "bulletList":
|
|
@@ -67697,11 +67697,11 @@ function nodeToMarkdown(node) {
|
|
|
67697
67697
|
case "taskList":
|
|
67698
67698
|
return (node.content || []).map((item) => {
|
|
67699
67699
|
var _a2, _b2, _c2;
|
|
67700
|
-
const checked = ((_a2 = item.attrs) == null ? void 0 : _a2
|
|
67700
|
+
const checked = ((_a2 = item.attrs) == null ? void 0 : _a2["checked"]) ? "x" : " ";
|
|
67701
67701
|
return `- [${checked}] ${inlineContentToMarkdown(((_c2 = (_b2 = item.content) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.content) || [])}`;
|
|
67702
67702
|
}).join("\n");
|
|
67703
67703
|
case "codeBlock":
|
|
67704
|
-
const language = ((_b = node.attrs) == null ? void 0 : _b
|
|
67704
|
+
const language = ((_b = node.attrs) == null ? void 0 : _b["language"]) || "";
|
|
67705
67705
|
const code = ((_d = (_c = node.content) == null ? void 0 : _c[0]) == null ? void 0 : _d.text) || "";
|
|
67706
67706
|
return `\`\`\`${language}
|
|
67707
67707
|
${code}
|
|
@@ -67764,7 +67764,7 @@ function inlineContentToMarkdown(content) {
|
|
|
67764
67764
|
text = `<u>${text}</u>`;
|
|
67765
67765
|
break;
|
|
67766
67766
|
case "link":
|
|
67767
|
-
const href = ((_a = mark.attrs) == null ? void 0 : _a
|
|
67767
|
+
const href = ((_a = mark.attrs) == null ? void 0 : _a["href"]) || "";
|
|
67768
67768
|
text = `[${text}](${href})`;
|
|
67769
67769
|
break;
|
|
67770
67770
|
}
|
|
@@ -68219,7 +68219,7 @@ function nodeToBlock(node) {
|
|
|
68219
68219
|
const id = crypto.randomUUID ? crypto.randomUUID() : `block-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
68220
68220
|
switch (node.type) {
|
|
68221
68221
|
case "heading":
|
|
68222
|
-
const level = ((_a = node.attrs) == null ? void 0 : _a
|
|
68222
|
+
const level = ((_a = node.attrs) == null ? void 0 : _a["level"]) || 1;
|
|
68223
68223
|
return {
|
|
68224
68224
|
id,
|
|
68225
68225
|
type: `heading${level}`,
|
|
@@ -68258,7 +68258,7 @@ function nodeToBlock(node) {
|
|
|
68258
68258
|
id,
|
|
68259
68259
|
type: "code",
|
|
68260
68260
|
content: [{ type: "text", text: ((_c = (_b = node.content) == null ? void 0 : _b[0]) == null ? void 0 : _c.text) || "" }],
|
|
68261
|
-
meta: { language: (_d = node.attrs) == null ? void 0 : _d
|
|
68261
|
+
meta: { language: (_d = node.attrs) == null ? void 0 : _d["language"] }
|
|
68262
68262
|
};
|
|
68263
68263
|
case "blockquote":
|
|
68264
68264
|
return {
|
|
@@ -68282,18 +68282,18 @@ function nodeContentToInline(content) {
|
|
|
68282
68282
|
if (node.type === "variableChip") {
|
|
68283
68283
|
return {
|
|
68284
68284
|
type: "variable",
|
|
68285
|
-
variableType: (_a = node.attrs) == null ? void 0 : _a
|
|
68286
|
-
path: (_b = node.attrs) == null ? void 0 : _b
|
|
68287
|
-
displayName: (_c = node.attrs) == null ? void 0 : _c
|
|
68285
|
+
variableType: (_a = node.attrs) == null ? void 0 : _a["variableType"],
|
|
68286
|
+
path: (_b = node.attrs) == null ? void 0 : _b["path"],
|
|
68287
|
+
displayName: (_c = node.attrs) == null ? void 0 : _c["displayName"]
|
|
68288
68288
|
};
|
|
68289
68289
|
}
|
|
68290
68290
|
if (node.type === "mentionChip") {
|
|
68291
68291
|
return {
|
|
68292
68292
|
type: "mention",
|
|
68293
|
-
mentionType: (_d = node.attrs) == null ? void 0 : _d
|
|
68294
|
-
id: (_e = node.attrs) == null ? void 0 : _e
|
|
68295
|
-
name: (_f = node.attrs) == null ? void 0 : _f
|
|
68296
|
-
icon: (_g = node.attrs) == null ? void 0 : _g
|
|
68293
|
+
mentionType: (_d = node.attrs) == null ? void 0 : _d["mentionType"],
|
|
68294
|
+
id: (_e = node.attrs) == null ? void 0 : _e["id"],
|
|
68295
|
+
name: (_f = node.attrs) == null ? void 0 : _f["name"],
|
|
68296
|
+
icon: (_g = node.attrs) == null ? void 0 : _g["icon"]
|
|
68297
68297
|
};
|
|
68298
68298
|
}
|
|
68299
68299
|
const styles = {};
|
|
@@ -68315,7 +68315,7 @@ function nodeContentToInline(content) {
|
|
|
68315
68315
|
styles.code = true;
|
|
68316
68316
|
break;
|
|
68317
68317
|
case "link":
|
|
68318
|
-
styles.link = (_h = mark.attrs) == null ? void 0 : _h
|
|
68318
|
+
styles.link = (_h = mark.attrs) == null ? void 0 : _h["href"];
|
|
68319
68319
|
break;
|
|
68320
68320
|
}
|
|
68321
68321
|
}
|
|
@@ -68522,22 +68522,22 @@ const VariableChipExtension = Node$1.create({
|
|
|
68522
68522
|
default: "env",
|
|
68523
68523
|
parseHTML: (element) => element.getAttribute("data-variable-type"),
|
|
68524
68524
|
renderHTML: (attributes) => ({
|
|
68525
|
-
"data-variable-type": attributes
|
|
68525
|
+
"data-variable-type": attributes["variableType"]
|
|
68526
68526
|
})
|
|
68527
68527
|
},
|
|
68528
68528
|
path: {
|
|
68529
68529
|
default: "",
|
|
68530
68530
|
parseHTML: (element) => element.getAttribute("data-path"),
|
|
68531
68531
|
renderHTML: (attributes) => ({
|
|
68532
|
-
"data-path": attributes
|
|
68532
|
+
"data-path": attributes["path"]
|
|
68533
68533
|
})
|
|
68534
68534
|
},
|
|
68535
68535
|
displayName: {
|
|
68536
68536
|
default: null,
|
|
68537
68537
|
parseHTML: (element) => element.getAttribute("data-display-name"),
|
|
68538
68538
|
renderHTML: (attributes) => {
|
|
68539
|
-
if (!attributes
|
|
68540
|
-
return { "data-display-name": attributes
|
|
68539
|
+
if (!attributes["displayName"]) return {};
|
|
68540
|
+
return { "data-display-name": attributes["displayName"] };
|
|
68541
68541
|
}
|
|
68542
68542
|
}
|
|
68543
68543
|
};
|
|
@@ -68697,29 +68697,29 @@ const MentionChipExtension = Node$1.create({
|
|
|
68697
68697
|
default: "agent",
|
|
68698
68698
|
parseHTML: (element) => element.getAttribute("data-mention-type"),
|
|
68699
68699
|
renderHTML: (attributes) => ({
|
|
68700
|
-
"data-mention-type": attributes
|
|
68700
|
+
"data-mention-type": attributes["mentionType"]
|
|
68701
68701
|
})
|
|
68702
68702
|
},
|
|
68703
68703
|
id: {
|
|
68704
68704
|
default: "",
|
|
68705
68705
|
parseHTML: (element) => element.getAttribute("data-id"),
|
|
68706
68706
|
renderHTML: (attributes) => ({
|
|
68707
|
-
"data-id": attributes
|
|
68707
|
+
"data-id": attributes["id"]
|
|
68708
68708
|
})
|
|
68709
68709
|
},
|
|
68710
68710
|
name: {
|
|
68711
68711
|
default: "",
|
|
68712
68712
|
parseHTML: (element) => element.getAttribute("data-name"),
|
|
68713
68713
|
renderHTML: (attributes) => ({
|
|
68714
|
-
"data-name": attributes
|
|
68714
|
+
"data-name": attributes["name"]
|
|
68715
68715
|
})
|
|
68716
68716
|
},
|
|
68717
68717
|
icon: {
|
|
68718
68718
|
default: null,
|
|
68719
68719
|
parseHTML: (element) => element.getAttribute("data-icon"),
|
|
68720
68720
|
renderHTML: (attributes) => {
|
|
68721
|
-
if (!attributes
|
|
68722
|
-
return { "data-icon": attributes
|
|
68721
|
+
if (!attributes["icon"]) return {};
|
|
68722
|
+
return { "data-icon": attributes["icon"] };
|
|
68723
68723
|
}
|
|
68724
68724
|
}
|
|
68725
68725
|
};
|
|
@@ -69131,8 +69131,10 @@ const SlashMenu = forwardRef(
|
|
|
69131
69131
|
// Default: plain text
|
|
69132
69132
|
range: range3,
|
|
69133
69133
|
// The range of the slash command trigger (to delete it)
|
|
69134
|
-
hiddenCategories = []
|
|
69134
|
+
hiddenCategories = [],
|
|
69135
69135
|
// Categories to hide
|
|
69136
|
+
suggestionsLoading = false
|
|
69137
|
+
// Loading state for suggestions
|
|
69136
69138
|
}, ref) => {
|
|
69137
69139
|
const [activeCategory, setActiveCategory] = useState(null);
|
|
69138
69140
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
@@ -69448,6 +69450,12 @@ const SlashMenu = forwardRef(
|
|
|
69448
69450
|
const filteredCategoryItems = query ? visibleCategories.filter((cat) => cat.label.toLowerCase().includes(query.toLowerCase())) : visibleCategories;
|
|
69449
69451
|
const hasBlockItems = !activeCategory && filteredBlockItems.length > 0;
|
|
69450
69452
|
const hasCategoryItems = !activeCategory && filteredCategoryItems.length > 0;
|
|
69453
|
+
if (suggestionsLoading && !activeCategory && !hasBlockItems && !hasCategoryItems) {
|
|
69454
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "k-md-editor-slash-menu p-4 text-center text-gray-400 text-[13px] bg-white rounded-lg shadow-lg", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
69455
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-4 h-4 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin" }),
|
|
69456
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Loading suggestions..." })
|
|
69457
|
+
] }) });
|
|
69458
|
+
}
|
|
69451
69459
|
if (!hasBlockItems && !hasCategoryItems && !activeCategory) {
|
|
69452
69460
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "k-md-editor-slash-menu p-4 text-center text-gray-400 text-[13px] bg-white rounded-lg shadow-lg", children: "No results found" });
|
|
69453
69461
|
}
|
|
@@ -69592,8 +69600,10 @@ const SlashCommandExtension = Extension.create({
|
|
|
69592
69600
|
systemVariables: [],
|
|
69593
69601
|
contentVariables: [],
|
|
69594
69602
|
onSelectItem: void 0,
|
|
69595
|
-
highlightMentions: false
|
|
69603
|
+
highlightMentions: false,
|
|
69596
69604
|
// Default: insert as plain text
|
|
69605
|
+
suggestionsLoading: false,
|
|
69606
|
+
getSuggestions: void 0
|
|
69597
69607
|
};
|
|
69598
69608
|
},
|
|
69599
69609
|
addProseMirrorPlugins() {
|
|
@@ -69618,19 +69628,46 @@ const SlashCommandExtension = Extension.create({
|
|
|
69618
69628
|
render: () => {
|
|
69619
69629
|
let component = null;
|
|
69620
69630
|
let popup = null;
|
|
69631
|
+
const getCurrentSuggestions = () => {
|
|
69632
|
+
var _a, _b;
|
|
69633
|
+
if (this.options.getSuggestions) {
|
|
69634
|
+
const data = this.options.getSuggestions();
|
|
69635
|
+
console.log("SlashCommand: getSuggestions() returned:", {
|
|
69636
|
+
hasGetter: true,
|
|
69637
|
+
agentsCount: ((_a = data.agents) == null ? void 0 : _a.length) || 0,
|
|
69638
|
+
toolsCount: ((_b = data.tools) == null ? void 0 : _b.length) || 0,
|
|
69639
|
+
data
|
|
69640
|
+
});
|
|
69641
|
+
return data;
|
|
69642
|
+
}
|
|
69643
|
+
console.log("SlashCommand: Using static options (no getter)");
|
|
69644
|
+
return {
|
|
69645
|
+
agents: this.options.agents || [],
|
|
69646
|
+
tools: this.options.tools || [],
|
|
69647
|
+
knowledge: this.options.knowledge || [],
|
|
69648
|
+
envVariables: this.options.envVariables || [],
|
|
69649
|
+
memoryVariables: this.options.memoryVariables || [],
|
|
69650
|
+
systemVariables: this.options.systemVariables || [],
|
|
69651
|
+
contentVariables: this.options.contentVariables || [],
|
|
69652
|
+
loading: this.options.suggestionsLoading || false
|
|
69653
|
+
};
|
|
69654
|
+
};
|
|
69621
69655
|
return {
|
|
69622
69656
|
onStart: (props) => {
|
|
69657
|
+
const suggestions = getCurrentSuggestions();
|
|
69658
|
+
console.log("SlashCommand onStart: suggestions =", suggestions);
|
|
69623
69659
|
component = new ReactRenderer(SlashMenu, {
|
|
69624
69660
|
props: {
|
|
69625
69661
|
...props,
|
|
69626
|
-
agents:
|
|
69627
|
-
tools:
|
|
69628
|
-
knowledge:
|
|
69629
|
-
envVariables:
|
|
69630
|
-
memoryVariables:
|
|
69631
|
-
systemVariables:
|
|
69632
|
-
contentVariables:
|
|
69662
|
+
agents: suggestions.agents,
|
|
69663
|
+
tools: suggestions.tools,
|
|
69664
|
+
knowledge: suggestions.knowledge,
|
|
69665
|
+
envVariables: suggestions.envVariables,
|
|
69666
|
+
memoryVariables: suggestions.memoryVariables,
|
|
69667
|
+
systemVariables: suggestions.systemVariables,
|
|
69668
|
+
contentVariables: suggestions.contentVariables,
|
|
69633
69669
|
highlightMentions: this.options.highlightMentions,
|
|
69670
|
+
suggestionsLoading: suggestions.loading,
|
|
69634
69671
|
range: props.range,
|
|
69635
69672
|
// Pass the range for deletion
|
|
69636
69673
|
command: (item) => {
|
|
@@ -69658,16 +69695,18 @@ const SlashCommandExtension = Extension.create({
|
|
|
69658
69695
|
},
|
|
69659
69696
|
onUpdate: (props) => {
|
|
69660
69697
|
var _a;
|
|
69698
|
+
const suggestions = getCurrentSuggestions();
|
|
69661
69699
|
component == null ? void 0 : component.updateProps({
|
|
69662
69700
|
...props,
|
|
69663
|
-
agents:
|
|
69664
|
-
tools:
|
|
69665
|
-
knowledge:
|
|
69666
|
-
envVariables:
|
|
69667
|
-
memoryVariables:
|
|
69668
|
-
systemVariables:
|
|
69669
|
-
contentVariables:
|
|
69701
|
+
agents: suggestions.agents,
|
|
69702
|
+
tools: suggestions.tools,
|
|
69703
|
+
knowledge: suggestions.knowledge,
|
|
69704
|
+
envVariables: suggestions.envVariables,
|
|
69705
|
+
memoryVariables: suggestions.memoryVariables,
|
|
69706
|
+
systemVariables: suggestions.systemVariables,
|
|
69707
|
+
contentVariables: suggestions.contentVariables,
|
|
69670
69708
|
highlightMentions: this.options.highlightMentions,
|
|
69709
|
+
suggestionsLoading: suggestions.loading,
|
|
69671
69710
|
range: props.range
|
|
69672
69711
|
// Update the range
|
|
69673
69712
|
});
|
|
@@ -69721,7 +69760,9 @@ const MentionCommandExtension = Extension.create({
|
|
|
69721
69760
|
agents: [],
|
|
69722
69761
|
tools: [],
|
|
69723
69762
|
knowledge: [],
|
|
69724
|
-
onSelectItem: void 0
|
|
69763
|
+
onSelectItem: void 0,
|
|
69764
|
+
suggestionsLoading: false,
|
|
69765
|
+
getSuggestions: void 0
|
|
69725
69766
|
};
|
|
69726
69767
|
},
|
|
69727
69768
|
addProseMirrorPlugins() {
|
|
@@ -69743,14 +69784,26 @@ const MentionCommandExtension = Extension.create({
|
|
|
69743
69784
|
render: () => {
|
|
69744
69785
|
let component = null;
|
|
69745
69786
|
let popup = null;
|
|
69787
|
+
const getCurrentSuggestions = () => {
|
|
69788
|
+
if (this.options.getSuggestions) {
|
|
69789
|
+
return this.options.getSuggestions();
|
|
69790
|
+
}
|
|
69791
|
+
return {
|
|
69792
|
+
agents: this.options.agents || [],
|
|
69793
|
+
tools: this.options.tools || [],
|
|
69794
|
+
knowledge: this.options.knowledge || [],
|
|
69795
|
+
loading: this.options.suggestionsLoading || false
|
|
69796
|
+
};
|
|
69797
|
+
};
|
|
69746
69798
|
return {
|
|
69747
69799
|
onStart: (props) => {
|
|
69800
|
+
const suggestions = getCurrentSuggestions();
|
|
69748
69801
|
component = new ReactRenderer(SlashMenu, {
|
|
69749
69802
|
props: {
|
|
69750
69803
|
...props,
|
|
69751
|
-
agents:
|
|
69752
|
-
tools:
|
|
69753
|
-
knowledge:
|
|
69804
|
+
agents: suggestions.agents,
|
|
69805
|
+
tools: suggestions.tools,
|
|
69806
|
+
knowledge: suggestions.knowledge,
|
|
69754
69807
|
// No variables or blocks for @ mentions
|
|
69755
69808
|
envVariables: [],
|
|
69756
69809
|
memoryVariables: [],
|
|
@@ -69760,6 +69813,7 @@ const MentionCommandExtension = Extension.create({
|
|
|
69760
69813
|
// Insert as plain bold text
|
|
69761
69814
|
hiddenCategories: ["blocks"],
|
|
69762
69815
|
// Hide blocks category
|
|
69816
|
+
suggestionsLoading: suggestions.loading,
|
|
69763
69817
|
range: props.range,
|
|
69764
69818
|
command: (item) => {
|
|
69765
69819
|
props.editor.chain().focus().deleteRange(props.range).run();
|
|
@@ -69787,16 +69841,18 @@ const MentionCommandExtension = Extension.create({
|
|
|
69787
69841
|
},
|
|
69788
69842
|
onUpdate: (props) => {
|
|
69789
69843
|
var _a;
|
|
69844
|
+
const suggestions = getCurrentSuggestions();
|
|
69790
69845
|
component == null ? void 0 : component.updateProps({
|
|
69791
69846
|
...props,
|
|
69792
|
-
agents:
|
|
69793
|
-
tools:
|
|
69794
|
-
knowledge:
|
|
69847
|
+
agents: suggestions.agents,
|
|
69848
|
+
tools: suggestions.tools,
|
|
69849
|
+
knowledge: suggestions.knowledge,
|
|
69795
69850
|
envVariables: [],
|
|
69796
69851
|
memoryVariables: [],
|
|
69797
69852
|
systemVariables: [],
|
|
69798
69853
|
contentVariables: [],
|
|
69799
69854
|
highlightMentions: false,
|
|
69855
|
+
suggestionsLoading: suggestions.loading,
|
|
69800
69856
|
hiddenCategories: ["blocks"],
|
|
69801
69857
|
range: props.range
|
|
69802
69858
|
});
|
|
@@ -70420,7 +70476,7 @@ const InlineToolbar = ({
|
|
|
70420
70476
|
}) => {
|
|
70421
70477
|
const [showLinkEditor, setShowLinkEditor] = useState(false);
|
|
70422
70478
|
const isLinkActive = editor.isActive("link");
|
|
70423
|
-
const currentLinkUrl = isLinkActive ? editor.getAttributes("link")
|
|
70479
|
+
const currentLinkUrl = isLinkActive ? editor.getAttributes("link")["href"] : "";
|
|
70424
70480
|
const toolbarItems = [
|
|
70425
70481
|
// Text style icons
|
|
70426
70482
|
{
|
|
@@ -72149,7 +72205,9 @@ const MDEditor = forwardRef(
|
|
|
72149
72205
|
readOnly = false,
|
|
72150
72206
|
autoFocus = false,
|
|
72151
72207
|
onFocus,
|
|
72152
|
-
onBlur
|
|
72208
|
+
onBlur,
|
|
72209
|
+
onLoadSuggestions,
|
|
72210
|
+
suggestionsLoading: propSuggestionsLoading = false
|
|
72153
72211
|
} = props;
|
|
72154
72212
|
const mergedSlashConfig = { ...DEFAULT_SLASH_COMMAND_CONFIG, ...slashCommandConfig };
|
|
72155
72213
|
const mergedAIConfig = { ...DEFAULT_AI_CONFIG, ...aiConfig };
|
|
@@ -72157,6 +72215,8 @@ const MDEditor = forwardRef(
|
|
|
72157
72215
|
const lastEmittedMarkdownRef = useRef("");
|
|
72158
72216
|
const isInternalUpdateRef = useRef(false);
|
|
72159
72217
|
const editorContainerRef = useRef(null);
|
|
72218
|
+
const [asyncSuggestions, setAsyncSuggestions] = useState(null);
|
|
72219
|
+
const [suggestionsLoading, setSuggestionsLoading] = useState(false);
|
|
72160
72220
|
const [variableMenuOpen, setVariableMenuOpen] = useState(false);
|
|
72161
72221
|
const [variableMenuPosition, setVariableMenuPosition] = useState({ top: 0, left: 0 });
|
|
72162
72222
|
const [variableMenuQuery, setVariableMenuQuery] = useState("");
|
|
@@ -72167,9 +72227,55 @@ const MDEditor = forwardRef(
|
|
|
72167
72227
|
const variableTriggerPosRef = useRef(null);
|
|
72168
72228
|
const [isRawMode, setIsRawMode] = useState(false);
|
|
72169
72229
|
const [rawMarkdown, setRawMarkdown] = useState("");
|
|
72230
|
+
useEffect(() => {
|
|
72231
|
+
if (onLoadSuggestions) {
|
|
72232
|
+
setSuggestionsLoading(true);
|
|
72233
|
+
onLoadSuggestions().then((data) => {
|
|
72234
|
+
setAsyncSuggestions(data);
|
|
72235
|
+
setSuggestionsLoading(false);
|
|
72236
|
+
}).catch((error) => {
|
|
72237
|
+
console.error("Failed to load suggestions:", error);
|
|
72238
|
+
setSuggestionsLoading(false);
|
|
72239
|
+
});
|
|
72240
|
+
}
|
|
72241
|
+
}, [onLoadSuggestions]);
|
|
72242
|
+
const mergedAgents = (asyncSuggestions == null ? void 0 : asyncSuggestions.agents) ?? agents2;
|
|
72243
|
+
const mergedTools = (asyncSuggestions == null ? void 0 : asyncSuggestions.tools) ?? tools2;
|
|
72244
|
+
const mergedKnowledge = (asyncSuggestions == null ? void 0 : asyncSuggestions.knowledge) ?? knowledge2;
|
|
72245
|
+
const mergedEnvVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.envVariables) ?? envVariables2;
|
|
72246
|
+
const mergedMemoryVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.memoryVariables) ?? memoryVariables;
|
|
72247
|
+
const mergedSystemVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.systemVariables) ?? systemVariables2;
|
|
72248
|
+
const mergedContentVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.contentVariables) ?? contentVariables;
|
|
72249
|
+
const finalSuggestionsLoading = propSuggestionsLoading || suggestionsLoading;
|
|
72250
|
+
const suggestionsRef = useRef({
|
|
72251
|
+
agents: mergedAgents,
|
|
72252
|
+
tools: mergedTools,
|
|
72253
|
+
knowledge: mergedKnowledge,
|
|
72254
|
+
envVariables: mergedEnvVariables,
|
|
72255
|
+
memoryVariables: mergedMemoryVariables,
|
|
72256
|
+
systemVariables: mergedSystemVariables,
|
|
72257
|
+
contentVariables: mergedContentVariables,
|
|
72258
|
+
loading: finalSuggestionsLoading
|
|
72259
|
+
});
|
|
72260
|
+
suggestionsRef.current = {
|
|
72261
|
+
agents: mergedAgents,
|
|
72262
|
+
tools: mergedTools,
|
|
72263
|
+
knowledge: mergedKnowledge,
|
|
72264
|
+
envVariables: mergedEnvVariables,
|
|
72265
|
+
memoryVariables: mergedMemoryVariables,
|
|
72266
|
+
systemVariables: mergedSystemVariables,
|
|
72267
|
+
contentVariables: mergedContentVariables,
|
|
72268
|
+
loading: finalSuggestionsLoading
|
|
72269
|
+
};
|
|
72270
|
+
console.log("MDEditor render: suggestionsRef updated with:", {
|
|
72271
|
+
agentsCount: mergedAgents.length,
|
|
72272
|
+
toolsCount: mergedTools.length,
|
|
72273
|
+
knowledgeCount: mergedKnowledge.length,
|
|
72274
|
+
hasAsyncSuggestions: !!asyncSuggestions
|
|
72275
|
+
});
|
|
72170
72276
|
const defaultCategories = useMemo(() => {
|
|
72171
72277
|
const categories = [];
|
|
72172
|
-
if (
|
|
72278
|
+
if (mergedAgents.length > 0) {
|
|
72173
72279
|
categories.push({
|
|
72174
72280
|
id: "agents",
|
|
72175
72281
|
label: "Agents",
|
|
@@ -72177,7 +72283,7 @@ const MDEditor = forwardRef(
|
|
|
72177
72283
|
hasSubmenu: true
|
|
72178
72284
|
});
|
|
72179
72285
|
}
|
|
72180
|
-
if (
|
|
72286
|
+
if (mergedKnowledge.length > 0) {
|
|
72181
72287
|
categories.push({
|
|
72182
72288
|
id: "knowledge",
|
|
72183
72289
|
label: "Knowledge",
|
|
@@ -72185,7 +72291,7 @@ const MDEditor = forwardRef(
|
|
|
72185
72291
|
hasSubmenu: true
|
|
72186
72292
|
});
|
|
72187
72293
|
}
|
|
72188
|
-
if (
|
|
72294
|
+
if (mergedTools.length > 0) {
|
|
72189
72295
|
categories.push({
|
|
72190
72296
|
id: "tools",
|
|
72191
72297
|
label: "Tools",
|
|
@@ -72193,7 +72299,7 @@ const MDEditor = forwardRef(
|
|
|
72193
72299
|
hasSubmenu: true
|
|
72194
72300
|
});
|
|
72195
72301
|
}
|
|
72196
|
-
if (
|
|
72302
|
+
if (mergedMemoryVariables.length > 0) {
|
|
72197
72303
|
categories.push({
|
|
72198
72304
|
id: "memory",
|
|
72199
72305
|
label: "Memory",
|
|
@@ -72201,7 +72307,7 @@ const MDEditor = forwardRef(
|
|
|
72201
72307
|
hasSubmenu: true
|
|
72202
72308
|
});
|
|
72203
72309
|
}
|
|
72204
|
-
if (
|
|
72310
|
+
if (mergedEnvVariables.length > 0) {
|
|
72205
72311
|
categories.push({
|
|
72206
72312
|
id: "env",
|
|
72207
72313
|
label: "Environment Variables",
|
|
@@ -72209,7 +72315,7 @@ const MDEditor = forwardRef(
|
|
|
72209
72315
|
hasSubmenu: true
|
|
72210
72316
|
});
|
|
72211
72317
|
}
|
|
72212
|
-
if (
|
|
72318
|
+
if (mergedSystemVariables.length > 0) {
|
|
72213
72319
|
categories.push({
|
|
72214
72320
|
id: "system",
|
|
72215
72321
|
label: "System Variables",
|
|
@@ -72217,7 +72323,7 @@ const MDEditor = forwardRef(
|
|
|
72217
72323
|
hasSubmenu: true
|
|
72218
72324
|
});
|
|
72219
72325
|
}
|
|
72220
|
-
if (
|
|
72326
|
+
if (mergedContentVariables.length > 0) {
|
|
72221
72327
|
categories.push({
|
|
72222
72328
|
id: "content",
|
|
72223
72329
|
label: "Content Variables",
|
|
@@ -72226,7 +72332,7 @@ const MDEditor = forwardRef(
|
|
|
72226
72332
|
});
|
|
72227
72333
|
}
|
|
72228
72334
|
return categories;
|
|
72229
|
-
}, [
|
|
72335
|
+
}, [mergedAgents, mergedTools, mergedKnowledge, mergedMemoryVariables, mergedEnvVariables, mergedSystemVariables, mergedContentVariables]);
|
|
72230
72336
|
const insertVariable = useCallback(
|
|
72231
72337
|
(variable, triggerPos) => {
|
|
72232
72338
|
if (!editorRef.current) return;
|
|
@@ -72471,7 +72577,7 @@ const MDEditor = forwardRef(
|
|
|
72471
72577
|
Placeholder.configure({
|
|
72472
72578
|
placeholder: ({ node }) => {
|
|
72473
72579
|
if (node.type.name === "heading") {
|
|
72474
|
-
const level = node.attrs
|
|
72580
|
+
const level = node.attrs["level"];
|
|
72475
72581
|
return `Heading ${level}`;
|
|
72476
72582
|
}
|
|
72477
72583
|
if (node.type.name === "paragraph") {
|
|
@@ -72512,6 +72618,10 @@ const MDEditor = forwardRef(
|
|
|
72512
72618
|
exts.push(MentionChipExtension);
|
|
72513
72619
|
}
|
|
72514
72620
|
if (mergedFeatures.slashCommands) {
|
|
72621
|
+
const getSuggestionsCallback = () => {
|
|
72622
|
+
console.log("MDEditor: getSuggestions callback invoked, ref.current =", suggestionsRef.current);
|
|
72623
|
+
return suggestionsRef.current;
|
|
72624
|
+
};
|
|
72515
72625
|
exts.push(
|
|
72516
72626
|
SlashCommandExtension.configure({
|
|
72517
72627
|
suggestion: {
|
|
@@ -72519,24 +72629,18 @@ const MDEditor = forwardRef(
|
|
|
72519
72629
|
startOfLine: false,
|
|
72520
72630
|
items: () => defaultCategories
|
|
72521
72631
|
},
|
|
72522
|
-
|
|
72523
|
-
|
|
72524
|
-
knowledge: knowledge2,
|
|
72525
|
-
envVariables: envVariables2,
|
|
72526
|
-
memoryVariables,
|
|
72527
|
-
systemVariables: systemVariables2,
|
|
72528
|
-
contentVariables,
|
|
72632
|
+
// Pass getter function to always get latest data from ref
|
|
72633
|
+
getSuggestions: getSuggestionsCallback,
|
|
72529
72634
|
onSelectItem: handleSlashCommandSelect,
|
|
72530
72635
|
highlightMentions: mergedSlashConfig.highlightMentions
|
|
72531
72636
|
})
|
|
72532
72637
|
);
|
|
72533
72638
|
}
|
|
72534
|
-
if (mergedFeatures.mentions
|
|
72639
|
+
if (mergedFeatures.mentions) {
|
|
72535
72640
|
exts.push(
|
|
72536
72641
|
MentionCommandExtension.configure({
|
|
72537
|
-
|
|
72538
|
-
|
|
72539
|
-
knowledge: knowledge2,
|
|
72642
|
+
// Pass getter function to always get latest data from ref
|
|
72643
|
+
getSuggestions: () => suggestionsRef.current,
|
|
72540
72644
|
onSelectItem: handleSlashCommandSelect
|
|
72541
72645
|
})
|
|
72542
72646
|
);
|
|
@@ -72550,7 +72654,7 @@ const MDEditor = forwardRef(
|
|
|
72550
72654
|
);
|
|
72551
72655
|
}
|
|
72552
72656
|
return exts;
|
|
72553
|
-
}, [mergedFeatures, placeholder, defaultCategories,
|
|
72657
|
+
}, [mergedFeatures, placeholder, defaultCategories, handleSlashCommandSelect, mergedSlashConfig.highlightMentions, mergedAIConfig.enabled, mergedAIConfig.keyboardShortcut, onAIRefine, handleAIRefineTrigger]);
|
|
72554
72658
|
const editorRef = useRef(null);
|
|
72555
72659
|
const editor = useEditor({
|
|
72556
72660
|
extensions,
|
|
@@ -72936,10 +73040,10 @@ const MDEditor = forwardRef(
|
|
|
72936
73040
|
setEditingVariableChip(null);
|
|
72937
73041
|
variableTriggerPosRef.current = null;
|
|
72938
73042
|
},
|
|
72939
|
-
envVariables:
|
|
72940
|
-
memoryVariables,
|
|
72941
|
-
systemVariables:
|
|
72942
|
-
contentVariables,
|
|
73043
|
+
envVariables: mergedEnvVariables,
|
|
73044
|
+
memoryVariables: mergedMemoryVariables,
|
|
73045
|
+
systemVariables: mergedSystemVariables,
|
|
73046
|
+
contentVariables: mergedContentVariables,
|
|
72943
73047
|
allowCustomVariables: true,
|
|
72944
73048
|
editorControlled: !customInputMode && !editingVariableChip,
|
|
72945
73049
|
customInputMode,
|
package/dist/ui-libs.umd.js
CHANGED
|
@@ -67699,7 +67699,7 @@ img.ProseMirror-separator {
|
|
|
67699
67699
|
case "paragraph":
|
|
67700
67700
|
return inlineContentToMarkdown(node.content || []);
|
|
67701
67701
|
case "heading":
|
|
67702
|
-
const level = ((_a = node.attrs) == null ? void 0 : _a
|
|
67702
|
+
const level = ((_a = node.attrs) == null ? void 0 : _a["level"]) || 1;
|
|
67703
67703
|
const headingPrefix = "#".repeat(level);
|
|
67704
67704
|
return `${headingPrefix} ${inlineContentToMarkdown(node.content || [])}`;
|
|
67705
67705
|
case "bulletList":
|
|
@@ -67715,11 +67715,11 @@ img.ProseMirror-separator {
|
|
|
67715
67715
|
case "taskList":
|
|
67716
67716
|
return (node.content || []).map((item) => {
|
|
67717
67717
|
var _a2, _b2, _c2;
|
|
67718
|
-
const checked = ((_a2 = item.attrs) == null ? void 0 : _a2
|
|
67718
|
+
const checked = ((_a2 = item.attrs) == null ? void 0 : _a2["checked"]) ? "x" : " ";
|
|
67719
67719
|
return `- [${checked}] ${inlineContentToMarkdown(((_c2 = (_b2 = item.content) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.content) || [])}`;
|
|
67720
67720
|
}).join("\n");
|
|
67721
67721
|
case "codeBlock":
|
|
67722
|
-
const language = ((_b = node.attrs) == null ? void 0 : _b
|
|
67722
|
+
const language = ((_b = node.attrs) == null ? void 0 : _b["language"]) || "";
|
|
67723
67723
|
const code2 = ((_d = (_c = node.content) == null ? void 0 : _c[0]) == null ? void 0 : _d.text) || "";
|
|
67724
67724
|
return `\`\`\`${language}
|
|
67725
67725
|
${code2}
|
|
@@ -67782,7 +67782,7 @@ ${code2}
|
|
|
67782
67782
|
text = `<u>${text}</u>`;
|
|
67783
67783
|
break;
|
|
67784
67784
|
case "link":
|
|
67785
|
-
const href = ((_a = mark.attrs) == null ? void 0 : _a
|
|
67785
|
+
const href = ((_a = mark.attrs) == null ? void 0 : _a["href"]) || "";
|
|
67786
67786
|
text = `[${text}](${href})`;
|
|
67787
67787
|
break;
|
|
67788
67788
|
}
|
|
@@ -68237,7 +68237,7 @@ ${code2}
|
|
|
68237
68237
|
const id = crypto.randomUUID ? crypto.randomUUID() : `block-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
68238
68238
|
switch (node.type) {
|
|
68239
68239
|
case "heading":
|
|
68240
|
-
const level = ((_a = node.attrs) == null ? void 0 : _a
|
|
68240
|
+
const level = ((_a = node.attrs) == null ? void 0 : _a["level"]) || 1;
|
|
68241
68241
|
return {
|
|
68242
68242
|
id,
|
|
68243
68243
|
type: `heading${level}`,
|
|
@@ -68276,7 +68276,7 @@ ${code2}
|
|
|
68276
68276
|
id,
|
|
68277
68277
|
type: "code",
|
|
68278
68278
|
content: [{ type: "text", text: ((_c = (_b = node.content) == null ? void 0 : _b[0]) == null ? void 0 : _c.text) || "" }],
|
|
68279
|
-
meta: { language: (_d = node.attrs) == null ? void 0 : _d
|
|
68279
|
+
meta: { language: (_d = node.attrs) == null ? void 0 : _d["language"] }
|
|
68280
68280
|
};
|
|
68281
68281
|
case "blockquote":
|
|
68282
68282
|
return {
|
|
@@ -68300,18 +68300,18 @@ ${code2}
|
|
|
68300
68300
|
if (node.type === "variableChip") {
|
|
68301
68301
|
return {
|
|
68302
68302
|
type: "variable",
|
|
68303
|
-
variableType: (_a = node.attrs) == null ? void 0 : _a
|
|
68304
|
-
path: (_b = node.attrs) == null ? void 0 : _b
|
|
68305
|
-
displayName: (_c = node.attrs) == null ? void 0 : _c
|
|
68303
|
+
variableType: (_a = node.attrs) == null ? void 0 : _a["variableType"],
|
|
68304
|
+
path: (_b = node.attrs) == null ? void 0 : _b["path"],
|
|
68305
|
+
displayName: (_c = node.attrs) == null ? void 0 : _c["displayName"]
|
|
68306
68306
|
};
|
|
68307
68307
|
}
|
|
68308
68308
|
if (node.type === "mentionChip") {
|
|
68309
68309
|
return {
|
|
68310
68310
|
type: "mention",
|
|
68311
|
-
mentionType: (_d = node.attrs) == null ? void 0 : _d
|
|
68312
|
-
id: (_e = node.attrs) == null ? void 0 : _e
|
|
68313
|
-
name: (_f = node.attrs) == null ? void 0 : _f
|
|
68314
|
-
icon: (_g = node.attrs) == null ? void 0 : _g
|
|
68311
|
+
mentionType: (_d = node.attrs) == null ? void 0 : _d["mentionType"],
|
|
68312
|
+
id: (_e = node.attrs) == null ? void 0 : _e["id"],
|
|
68313
|
+
name: (_f = node.attrs) == null ? void 0 : _f["name"],
|
|
68314
|
+
icon: (_g = node.attrs) == null ? void 0 : _g["icon"]
|
|
68315
68315
|
};
|
|
68316
68316
|
}
|
|
68317
68317
|
const styles = {};
|
|
@@ -68333,7 +68333,7 @@ ${code2}
|
|
|
68333
68333
|
styles.code = true;
|
|
68334
68334
|
break;
|
|
68335
68335
|
case "link":
|
|
68336
|
-
styles.link = (_h = mark.attrs) == null ? void 0 : _h
|
|
68336
|
+
styles.link = (_h = mark.attrs) == null ? void 0 : _h["href"];
|
|
68337
68337
|
break;
|
|
68338
68338
|
}
|
|
68339
68339
|
}
|
|
@@ -68540,22 +68540,22 @@ ${code2}
|
|
|
68540
68540
|
default: "env",
|
|
68541
68541
|
parseHTML: (element) => element.getAttribute("data-variable-type"),
|
|
68542
68542
|
renderHTML: (attributes) => ({
|
|
68543
|
-
"data-variable-type": attributes
|
|
68543
|
+
"data-variable-type": attributes["variableType"]
|
|
68544
68544
|
})
|
|
68545
68545
|
},
|
|
68546
68546
|
path: {
|
|
68547
68547
|
default: "",
|
|
68548
68548
|
parseHTML: (element) => element.getAttribute("data-path"),
|
|
68549
68549
|
renderHTML: (attributes) => ({
|
|
68550
|
-
"data-path": attributes
|
|
68550
|
+
"data-path": attributes["path"]
|
|
68551
68551
|
})
|
|
68552
68552
|
},
|
|
68553
68553
|
displayName: {
|
|
68554
68554
|
default: null,
|
|
68555
68555
|
parseHTML: (element) => element.getAttribute("data-display-name"),
|
|
68556
68556
|
renderHTML: (attributes) => {
|
|
68557
|
-
if (!attributes
|
|
68558
|
-
return { "data-display-name": attributes
|
|
68557
|
+
if (!attributes["displayName"]) return {};
|
|
68558
|
+
return { "data-display-name": attributes["displayName"] };
|
|
68559
68559
|
}
|
|
68560
68560
|
}
|
|
68561
68561
|
};
|
|
@@ -68715,29 +68715,29 @@ ${code2}
|
|
|
68715
68715
|
default: "agent",
|
|
68716
68716
|
parseHTML: (element) => element.getAttribute("data-mention-type"),
|
|
68717
68717
|
renderHTML: (attributes) => ({
|
|
68718
|
-
"data-mention-type": attributes
|
|
68718
|
+
"data-mention-type": attributes["mentionType"]
|
|
68719
68719
|
})
|
|
68720
68720
|
},
|
|
68721
68721
|
id: {
|
|
68722
68722
|
default: "",
|
|
68723
68723
|
parseHTML: (element) => element.getAttribute("data-id"),
|
|
68724
68724
|
renderHTML: (attributes) => ({
|
|
68725
|
-
"data-id": attributes
|
|
68725
|
+
"data-id": attributes["id"]
|
|
68726
68726
|
})
|
|
68727
68727
|
},
|
|
68728
68728
|
name: {
|
|
68729
68729
|
default: "",
|
|
68730
68730
|
parseHTML: (element) => element.getAttribute("data-name"),
|
|
68731
68731
|
renderHTML: (attributes) => ({
|
|
68732
|
-
"data-name": attributes
|
|
68732
|
+
"data-name": attributes["name"]
|
|
68733
68733
|
})
|
|
68734
68734
|
},
|
|
68735
68735
|
icon: {
|
|
68736
68736
|
default: null,
|
|
68737
68737
|
parseHTML: (element) => element.getAttribute("data-icon"),
|
|
68738
68738
|
renderHTML: (attributes) => {
|
|
68739
|
-
if (!attributes
|
|
68740
|
-
return { "data-icon": attributes
|
|
68739
|
+
if (!attributes["icon"]) return {};
|
|
68740
|
+
return { "data-icon": attributes["icon"] };
|
|
68741
68741
|
}
|
|
68742
68742
|
}
|
|
68743
68743
|
};
|
|
@@ -69149,8 +69149,10 @@ ${code2}
|
|
|
69149
69149
|
// Default: plain text
|
|
69150
69150
|
range: range2,
|
|
69151
69151
|
// The range of the slash command trigger (to delete it)
|
|
69152
|
-
hiddenCategories = []
|
|
69152
|
+
hiddenCategories = [],
|
|
69153
69153
|
// Categories to hide
|
|
69154
|
+
suggestionsLoading = false
|
|
69155
|
+
// Loading state for suggestions
|
|
69154
69156
|
}, ref) => {
|
|
69155
69157
|
const [activeCategory, setActiveCategory] = React.useState(null);
|
|
69156
69158
|
const [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
@@ -69466,6 +69468,12 @@ ${code2}
|
|
|
69466
69468
|
const filteredCategoryItems = query ? visibleCategories.filter((cat) => cat.label.toLowerCase().includes(query.toLowerCase())) : visibleCategories;
|
|
69467
69469
|
const hasBlockItems = !activeCategory && filteredBlockItems.length > 0;
|
|
69468
69470
|
const hasCategoryItems = !activeCategory && filteredCategoryItems.length > 0;
|
|
69471
|
+
if (suggestionsLoading && !activeCategory && !hasBlockItems && !hasCategoryItems) {
|
|
69472
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "k-md-editor-slash-menu p-4 text-center text-gray-400 text-[13px] bg-white rounded-lg shadow-lg", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
69473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-4 h-4 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin" }),
|
|
69474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Loading suggestions..." })
|
|
69475
|
+
] }) });
|
|
69476
|
+
}
|
|
69469
69477
|
if (!hasBlockItems && !hasCategoryItems && !activeCategory) {
|
|
69470
69478
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "k-md-editor-slash-menu p-4 text-center text-gray-400 text-[13px] bg-white rounded-lg shadow-lg", children: "No results found" });
|
|
69471
69479
|
}
|
|
@@ -69610,8 +69618,10 @@ ${code2}
|
|
|
69610
69618
|
systemVariables: [],
|
|
69611
69619
|
contentVariables: [],
|
|
69612
69620
|
onSelectItem: void 0,
|
|
69613
|
-
highlightMentions: false
|
|
69621
|
+
highlightMentions: false,
|
|
69614
69622
|
// Default: insert as plain text
|
|
69623
|
+
suggestionsLoading: false,
|
|
69624
|
+
getSuggestions: void 0
|
|
69615
69625
|
};
|
|
69616
69626
|
},
|
|
69617
69627
|
addProseMirrorPlugins() {
|
|
@@ -69636,19 +69646,46 @@ ${code2}
|
|
|
69636
69646
|
render: () => {
|
|
69637
69647
|
let component = null;
|
|
69638
69648
|
let popup = null;
|
|
69649
|
+
const getCurrentSuggestions = () => {
|
|
69650
|
+
var _a, _b;
|
|
69651
|
+
if (this.options.getSuggestions) {
|
|
69652
|
+
const data = this.options.getSuggestions();
|
|
69653
|
+
console.log("SlashCommand: getSuggestions() returned:", {
|
|
69654
|
+
hasGetter: true,
|
|
69655
|
+
agentsCount: ((_a = data.agents) == null ? void 0 : _a.length) || 0,
|
|
69656
|
+
toolsCount: ((_b = data.tools) == null ? void 0 : _b.length) || 0,
|
|
69657
|
+
data
|
|
69658
|
+
});
|
|
69659
|
+
return data;
|
|
69660
|
+
}
|
|
69661
|
+
console.log("SlashCommand: Using static options (no getter)");
|
|
69662
|
+
return {
|
|
69663
|
+
agents: this.options.agents || [],
|
|
69664
|
+
tools: this.options.tools || [],
|
|
69665
|
+
knowledge: this.options.knowledge || [],
|
|
69666
|
+
envVariables: this.options.envVariables || [],
|
|
69667
|
+
memoryVariables: this.options.memoryVariables || [],
|
|
69668
|
+
systemVariables: this.options.systemVariables || [],
|
|
69669
|
+
contentVariables: this.options.contentVariables || [],
|
|
69670
|
+
loading: this.options.suggestionsLoading || false
|
|
69671
|
+
};
|
|
69672
|
+
};
|
|
69639
69673
|
return {
|
|
69640
69674
|
onStart: (props) => {
|
|
69675
|
+
const suggestions = getCurrentSuggestions();
|
|
69676
|
+
console.log("SlashCommand onStart: suggestions =", suggestions);
|
|
69641
69677
|
component = new ReactRenderer(SlashMenu, {
|
|
69642
69678
|
props: {
|
|
69643
69679
|
...props,
|
|
69644
|
-
agents:
|
|
69645
|
-
tools:
|
|
69646
|
-
knowledge:
|
|
69647
|
-
envVariables:
|
|
69648
|
-
memoryVariables:
|
|
69649
|
-
systemVariables:
|
|
69650
|
-
contentVariables:
|
|
69680
|
+
agents: suggestions.agents,
|
|
69681
|
+
tools: suggestions.tools,
|
|
69682
|
+
knowledge: suggestions.knowledge,
|
|
69683
|
+
envVariables: suggestions.envVariables,
|
|
69684
|
+
memoryVariables: suggestions.memoryVariables,
|
|
69685
|
+
systemVariables: suggestions.systemVariables,
|
|
69686
|
+
contentVariables: suggestions.contentVariables,
|
|
69651
69687
|
highlightMentions: this.options.highlightMentions,
|
|
69688
|
+
suggestionsLoading: suggestions.loading,
|
|
69652
69689
|
range: props.range,
|
|
69653
69690
|
// Pass the range for deletion
|
|
69654
69691
|
command: (item) => {
|
|
@@ -69676,16 +69713,18 @@ ${code2}
|
|
|
69676
69713
|
},
|
|
69677
69714
|
onUpdate: (props) => {
|
|
69678
69715
|
var _a;
|
|
69716
|
+
const suggestions = getCurrentSuggestions();
|
|
69679
69717
|
component == null ? void 0 : component.updateProps({
|
|
69680
69718
|
...props,
|
|
69681
|
-
agents:
|
|
69682
|
-
tools:
|
|
69683
|
-
knowledge:
|
|
69684
|
-
envVariables:
|
|
69685
|
-
memoryVariables:
|
|
69686
|
-
systemVariables:
|
|
69687
|
-
contentVariables:
|
|
69719
|
+
agents: suggestions.agents,
|
|
69720
|
+
tools: suggestions.tools,
|
|
69721
|
+
knowledge: suggestions.knowledge,
|
|
69722
|
+
envVariables: suggestions.envVariables,
|
|
69723
|
+
memoryVariables: suggestions.memoryVariables,
|
|
69724
|
+
systemVariables: suggestions.systemVariables,
|
|
69725
|
+
contentVariables: suggestions.contentVariables,
|
|
69688
69726
|
highlightMentions: this.options.highlightMentions,
|
|
69727
|
+
suggestionsLoading: suggestions.loading,
|
|
69689
69728
|
range: props.range
|
|
69690
69729
|
// Update the range
|
|
69691
69730
|
});
|
|
@@ -69739,7 +69778,9 @@ ${code2}
|
|
|
69739
69778
|
agents: [],
|
|
69740
69779
|
tools: [],
|
|
69741
69780
|
knowledge: [],
|
|
69742
|
-
onSelectItem: void 0
|
|
69781
|
+
onSelectItem: void 0,
|
|
69782
|
+
suggestionsLoading: false,
|
|
69783
|
+
getSuggestions: void 0
|
|
69743
69784
|
};
|
|
69744
69785
|
},
|
|
69745
69786
|
addProseMirrorPlugins() {
|
|
@@ -69761,14 +69802,26 @@ ${code2}
|
|
|
69761
69802
|
render: () => {
|
|
69762
69803
|
let component = null;
|
|
69763
69804
|
let popup = null;
|
|
69805
|
+
const getCurrentSuggestions = () => {
|
|
69806
|
+
if (this.options.getSuggestions) {
|
|
69807
|
+
return this.options.getSuggestions();
|
|
69808
|
+
}
|
|
69809
|
+
return {
|
|
69810
|
+
agents: this.options.agents || [],
|
|
69811
|
+
tools: this.options.tools || [],
|
|
69812
|
+
knowledge: this.options.knowledge || [],
|
|
69813
|
+
loading: this.options.suggestionsLoading || false
|
|
69814
|
+
};
|
|
69815
|
+
};
|
|
69764
69816
|
return {
|
|
69765
69817
|
onStart: (props) => {
|
|
69818
|
+
const suggestions = getCurrentSuggestions();
|
|
69766
69819
|
component = new ReactRenderer(SlashMenu, {
|
|
69767
69820
|
props: {
|
|
69768
69821
|
...props,
|
|
69769
|
-
agents:
|
|
69770
|
-
tools:
|
|
69771
|
-
knowledge:
|
|
69822
|
+
agents: suggestions.agents,
|
|
69823
|
+
tools: suggestions.tools,
|
|
69824
|
+
knowledge: suggestions.knowledge,
|
|
69772
69825
|
// No variables or blocks for @ mentions
|
|
69773
69826
|
envVariables: [],
|
|
69774
69827
|
memoryVariables: [],
|
|
@@ -69778,6 +69831,7 @@ ${code2}
|
|
|
69778
69831
|
// Insert as plain bold text
|
|
69779
69832
|
hiddenCategories: ["blocks"],
|
|
69780
69833
|
// Hide blocks category
|
|
69834
|
+
suggestionsLoading: suggestions.loading,
|
|
69781
69835
|
range: props.range,
|
|
69782
69836
|
command: (item) => {
|
|
69783
69837
|
props.editor.chain().focus().deleteRange(props.range).run();
|
|
@@ -69805,16 +69859,18 @@ ${code2}
|
|
|
69805
69859
|
},
|
|
69806
69860
|
onUpdate: (props) => {
|
|
69807
69861
|
var _a;
|
|
69862
|
+
const suggestions = getCurrentSuggestions();
|
|
69808
69863
|
component == null ? void 0 : component.updateProps({
|
|
69809
69864
|
...props,
|
|
69810
|
-
agents:
|
|
69811
|
-
tools:
|
|
69812
|
-
knowledge:
|
|
69865
|
+
agents: suggestions.agents,
|
|
69866
|
+
tools: suggestions.tools,
|
|
69867
|
+
knowledge: suggestions.knowledge,
|
|
69813
69868
|
envVariables: [],
|
|
69814
69869
|
memoryVariables: [],
|
|
69815
69870
|
systemVariables: [],
|
|
69816
69871
|
contentVariables: [],
|
|
69817
69872
|
highlightMentions: false,
|
|
69873
|
+
suggestionsLoading: suggestions.loading,
|
|
69818
69874
|
hiddenCategories: ["blocks"],
|
|
69819
69875
|
range: props.range
|
|
69820
69876
|
});
|
|
@@ -70438,7 +70494,7 @@ ${code2}
|
|
|
70438
70494
|
}) => {
|
|
70439
70495
|
const [showLinkEditor, setShowLinkEditor] = React.useState(false);
|
|
70440
70496
|
const isLinkActive = editor.isActive("link");
|
|
70441
|
-
const currentLinkUrl = isLinkActive ? editor.getAttributes("link")
|
|
70497
|
+
const currentLinkUrl = isLinkActive ? editor.getAttributes("link")["href"] : "";
|
|
70442
70498
|
const toolbarItems = [
|
|
70443
70499
|
// Text style icons
|
|
70444
70500
|
{
|
|
@@ -72167,7 +72223,9 @@ ${code2}
|
|
|
72167
72223
|
readOnly = false,
|
|
72168
72224
|
autoFocus = false,
|
|
72169
72225
|
onFocus,
|
|
72170
|
-
onBlur
|
|
72226
|
+
onBlur,
|
|
72227
|
+
onLoadSuggestions,
|
|
72228
|
+
suggestionsLoading: propSuggestionsLoading = false
|
|
72171
72229
|
} = props;
|
|
72172
72230
|
const mergedSlashConfig = { ...DEFAULT_SLASH_COMMAND_CONFIG, ...slashCommandConfig };
|
|
72173
72231
|
const mergedAIConfig = { ...DEFAULT_AI_CONFIG, ...aiConfig };
|
|
@@ -72175,6 +72233,8 @@ ${code2}
|
|
|
72175
72233
|
const lastEmittedMarkdownRef = React.useRef("");
|
|
72176
72234
|
const isInternalUpdateRef = React.useRef(false);
|
|
72177
72235
|
const editorContainerRef = React.useRef(null);
|
|
72236
|
+
const [asyncSuggestions, setAsyncSuggestions] = React.useState(null);
|
|
72237
|
+
const [suggestionsLoading, setSuggestionsLoading] = React.useState(false);
|
|
72178
72238
|
const [variableMenuOpen, setVariableMenuOpen] = React.useState(false);
|
|
72179
72239
|
const [variableMenuPosition, setVariableMenuPosition] = React.useState({ top: 0, left: 0 });
|
|
72180
72240
|
const [variableMenuQuery, setVariableMenuQuery] = React.useState("");
|
|
@@ -72185,9 +72245,55 @@ ${code2}
|
|
|
72185
72245
|
const variableTriggerPosRef = React.useRef(null);
|
|
72186
72246
|
const [isRawMode, setIsRawMode] = React.useState(false);
|
|
72187
72247
|
const [rawMarkdown, setRawMarkdown] = React.useState("");
|
|
72248
|
+
React.useEffect(() => {
|
|
72249
|
+
if (onLoadSuggestions) {
|
|
72250
|
+
setSuggestionsLoading(true);
|
|
72251
|
+
onLoadSuggestions().then((data) => {
|
|
72252
|
+
setAsyncSuggestions(data);
|
|
72253
|
+
setSuggestionsLoading(false);
|
|
72254
|
+
}).catch((error) => {
|
|
72255
|
+
console.error("Failed to load suggestions:", error);
|
|
72256
|
+
setSuggestionsLoading(false);
|
|
72257
|
+
});
|
|
72258
|
+
}
|
|
72259
|
+
}, [onLoadSuggestions]);
|
|
72260
|
+
const mergedAgents = (asyncSuggestions == null ? void 0 : asyncSuggestions.agents) ?? agents2;
|
|
72261
|
+
const mergedTools = (asyncSuggestions == null ? void 0 : asyncSuggestions.tools) ?? tools2;
|
|
72262
|
+
const mergedKnowledge = (asyncSuggestions == null ? void 0 : asyncSuggestions.knowledge) ?? knowledge2;
|
|
72263
|
+
const mergedEnvVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.envVariables) ?? envVariables2;
|
|
72264
|
+
const mergedMemoryVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.memoryVariables) ?? memoryVariables;
|
|
72265
|
+
const mergedSystemVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.systemVariables) ?? systemVariables2;
|
|
72266
|
+
const mergedContentVariables = (asyncSuggestions == null ? void 0 : asyncSuggestions.contentVariables) ?? contentVariables;
|
|
72267
|
+
const finalSuggestionsLoading = propSuggestionsLoading || suggestionsLoading;
|
|
72268
|
+
const suggestionsRef = React.useRef({
|
|
72269
|
+
agents: mergedAgents,
|
|
72270
|
+
tools: mergedTools,
|
|
72271
|
+
knowledge: mergedKnowledge,
|
|
72272
|
+
envVariables: mergedEnvVariables,
|
|
72273
|
+
memoryVariables: mergedMemoryVariables,
|
|
72274
|
+
systemVariables: mergedSystemVariables,
|
|
72275
|
+
contentVariables: mergedContentVariables,
|
|
72276
|
+
loading: finalSuggestionsLoading
|
|
72277
|
+
});
|
|
72278
|
+
suggestionsRef.current = {
|
|
72279
|
+
agents: mergedAgents,
|
|
72280
|
+
tools: mergedTools,
|
|
72281
|
+
knowledge: mergedKnowledge,
|
|
72282
|
+
envVariables: mergedEnvVariables,
|
|
72283
|
+
memoryVariables: mergedMemoryVariables,
|
|
72284
|
+
systemVariables: mergedSystemVariables,
|
|
72285
|
+
contentVariables: mergedContentVariables,
|
|
72286
|
+
loading: finalSuggestionsLoading
|
|
72287
|
+
};
|
|
72288
|
+
console.log("MDEditor render: suggestionsRef updated with:", {
|
|
72289
|
+
agentsCount: mergedAgents.length,
|
|
72290
|
+
toolsCount: mergedTools.length,
|
|
72291
|
+
knowledgeCount: mergedKnowledge.length,
|
|
72292
|
+
hasAsyncSuggestions: !!asyncSuggestions
|
|
72293
|
+
});
|
|
72188
72294
|
const defaultCategories = React.useMemo(() => {
|
|
72189
72295
|
const categories = [];
|
|
72190
|
-
if (
|
|
72296
|
+
if (mergedAgents.length > 0) {
|
|
72191
72297
|
categories.push({
|
|
72192
72298
|
id: "agents",
|
|
72193
72299
|
label: "Agents",
|
|
@@ -72195,7 +72301,7 @@ ${code2}
|
|
|
72195
72301
|
hasSubmenu: true
|
|
72196
72302
|
});
|
|
72197
72303
|
}
|
|
72198
|
-
if (
|
|
72304
|
+
if (mergedKnowledge.length > 0) {
|
|
72199
72305
|
categories.push({
|
|
72200
72306
|
id: "knowledge",
|
|
72201
72307
|
label: "Knowledge",
|
|
@@ -72203,7 +72309,7 @@ ${code2}
|
|
|
72203
72309
|
hasSubmenu: true
|
|
72204
72310
|
});
|
|
72205
72311
|
}
|
|
72206
|
-
if (
|
|
72312
|
+
if (mergedTools.length > 0) {
|
|
72207
72313
|
categories.push({
|
|
72208
72314
|
id: "tools",
|
|
72209
72315
|
label: "Tools",
|
|
@@ -72211,7 +72317,7 @@ ${code2}
|
|
|
72211
72317
|
hasSubmenu: true
|
|
72212
72318
|
});
|
|
72213
72319
|
}
|
|
72214
|
-
if (
|
|
72320
|
+
if (mergedMemoryVariables.length > 0) {
|
|
72215
72321
|
categories.push({
|
|
72216
72322
|
id: "memory",
|
|
72217
72323
|
label: "Memory",
|
|
@@ -72219,7 +72325,7 @@ ${code2}
|
|
|
72219
72325
|
hasSubmenu: true
|
|
72220
72326
|
});
|
|
72221
72327
|
}
|
|
72222
|
-
if (
|
|
72328
|
+
if (mergedEnvVariables.length > 0) {
|
|
72223
72329
|
categories.push({
|
|
72224
72330
|
id: "env",
|
|
72225
72331
|
label: "Environment Variables",
|
|
@@ -72227,7 +72333,7 @@ ${code2}
|
|
|
72227
72333
|
hasSubmenu: true
|
|
72228
72334
|
});
|
|
72229
72335
|
}
|
|
72230
|
-
if (
|
|
72336
|
+
if (mergedSystemVariables.length > 0) {
|
|
72231
72337
|
categories.push({
|
|
72232
72338
|
id: "system",
|
|
72233
72339
|
label: "System Variables",
|
|
@@ -72235,7 +72341,7 @@ ${code2}
|
|
|
72235
72341
|
hasSubmenu: true
|
|
72236
72342
|
});
|
|
72237
72343
|
}
|
|
72238
|
-
if (
|
|
72344
|
+
if (mergedContentVariables.length > 0) {
|
|
72239
72345
|
categories.push({
|
|
72240
72346
|
id: "content",
|
|
72241
72347
|
label: "Content Variables",
|
|
@@ -72244,7 +72350,7 @@ ${code2}
|
|
|
72244
72350
|
});
|
|
72245
72351
|
}
|
|
72246
72352
|
return categories;
|
|
72247
|
-
}, [
|
|
72353
|
+
}, [mergedAgents, mergedTools, mergedKnowledge, mergedMemoryVariables, mergedEnvVariables, mergedSystemVariables, mergedContentVariables]);
|
|
72248
72354
|
const insertVariable = React.useCallback(
|
|
72249
72355
|
(variable, triggerPos) => {
|
|
72250
72356
|
if (!editorRef.current) return;
|
|
@@ -72489,7 +72595,7 @@ ${code2}
|
|
|
72489
72595
|
Placeholder.configure({
|
|
72490
72596
|
placeholder: ({ node }) => {
|
|
72491
72597
|
if (node.type.name === "heading") {
|
|
72492
|
-
const level = node.attrs
|
|
72598
|
+
const level = node.attrs["level"];
|
|
72493
72599
|
return `Heading ${level}`;
|
|
72494
72600
|
}
|
|
72495
72601
|
if (node.type.name === "paragraph") {
|
|
@@ -72530,6 +72636,10 @@ ${code2}
|
|
|
72530
72636
|
exts.push(MentionChipExtension);
|
|
72531
72637
|
}
|
|
72532
72638
|
if (mergedFeatures.slashCommands) {
|
|
72639
|
+
const getSuggestionsCallback = () => {
|
|
72640
|
+
console.log("MDEditor: getSuggestions callback invoked, ref.current =", suggestionsRef.current);
|
|
72641
|
+
return suggestionsRef.current;
|
|
72642
|
+
};
|
|
72533
72643
|
exts.push(
|
|
72534
72644
|
SlashCommandExtension.configure({
|
|
72535
72645
|
suggestion: {
|
|
@@ -72537,24 +72647,18 @@ ${code2}
|
|
|
72537
72647
|
startOfLine: false,
|
|
72538
72648
|
items: () => defaultCategories
|
|
72539
72649
|
},
|
|
72540
|
-
|
|
72541
|
-
|
|
72542
|
-
knowledge: knowledge2,
|
|
72543
|
-
envVariables: envVariables2,
|
|
72544
|
-
memoryVariables,
|
|
72545
|
-
systemVariables: systemVariables2,
|
|
72546
|
-
contentVariables,
|
|
72650
|
+
// Pass getter function to always get latest data from ref
|
|
72651
|
+
getSuggestions: getSuggestionsCallback,
|
|
72547
72652
|
onSelectItem: handleSlashCommandSelect,
|
|
72548
72653
|
highlightMentions: mergedSlashConfig.highlightMentions
|
|
72549
72654
|
})
|
|
72550
72655
|
);
|
|
72551
72656
|
}
|
|
72552
|
-
if (mergedFeatures.mentions
|
|
72657
|
+
if (mergedFeatures.mentions) {
|
|
72553
72658
|
exts.push(
|
|
72554
72659
|
MentionCommandExtension.configure({
|
|
72555
|
-
|
|
72556
|
-
|
|
72557
|
-
knowledge: knowledge2,
|
|
72660
|
+
// Pass getter function to always get latest data from ref
|
|
72661
|
+
getSuggestions: () => suggestionsRef.current,
|
|
72558
72662
|
onSelectItem: handleSlashCommandSelect
|
|
72559
72663
|
})
|
|
72560
72664
|
);
|
|
@@ -72568,7 +72672,7 @@ ${code2}
|
|
|
72568
72672
|
);
|
|
72569
72673
|
}
|
|
72570
72674
|
return exts;
|
|
72571
|
-
}, [mergedFeatures, placeholder, defaultCategories,
|
|
72675
|
+
}, [mergedFeatures, placeholder, defaultCategories, handleSlashCommandSelect, mergedSlashConfig.highlightMentions, mergedAIConfig.enabled, mergedAIConfig.keyboardShortcut, onAIRefine, handleAIRefineTrigger]);
|
|
72572
72676
|
const editorRef = React.useRef(null);
|
|
72573
72677
|
const editor = useEditor({
|
|
72574
72678
|
extensions,
|
|
@@ -72954,10 +73058,10 @@ ${code2}
|
|
|
72954
73058
|
setEditingVariableChip(null);
|
|
72955
73059
|
variableTriggerPosRef.current = null;
|
|
72956
73060
|
},
|
|
72957
|
-
envVariables:
|
|
72958
|
-
memoryVariables,
|
|
72959
|
-
systemVariables:
|
|
72960
|
-
contentVariables,
|
|
73061
|
+
envVariables: mergedEnvVariables,
|
|
73062
|
+
memoryVariables: mergedMemoryVariables,
|
|
73063
|
+
systemVariables: mergedSystemVariables,
|
|
73064
|
+
contentVariables: mergedContentVariables,
|
|
72961
73065
|
allowCustomVariables: true,
|
|
72962
73066
|
editorControlled: !customInputMode && !editingVariableChip,
|
|
72963
73067
|
customInputMode,
|