agentic-ui-libs 0.4.0-beta.2 → 1.0.0-beta.2

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.
Files changed (45) hide show
  1. package/dist/assets/style.css +2603 -1
  2. package/dist/features/debug-logs/DebugPanel.d.ts.map +1 -1
  3. package/dist/features/prompt-editor/PromptEditor.d.ts +14 -0
  4. package/dist/features/prompt-editor/PromptEditor.d.ts.map +1 -0
  5. package/dist/features/prompt-editor/RefinePanel.d.ts +41 -0
  6. package/dist/features/prompt-editor/RefinePanel.d.ts.map +1 -0
  7. package/dist/features/prompt-editor/components/AddToolbar.d.ts +8 -0
  8. package/dist/features/prompt-editor/components/AddToolbar.d.ts.map +1 -0
  9. package/dist/features/prompt-editor/components/ChatMessage.d.ts +13 -0
  10. package/dist/features/prompt-editor/components/ChatMessage.d.ts.map +1 -0
  11. package/dist/features/prompt-editor/components/CodeEditor.d.ts +8 -0
  12. package/dist/features/prompt-editor/components/CodeEditor.d.ts.map +1 -0
  13. package/dist/features/prompt-editor/components/ContentBlock.d.ts +23 -0
  14. package/dist/features/prompt-editor/components/ContentBlock.d.ts.map +1 -0
  15. package/dist/features/prompt-editor/components/EditableContent.d.ts +16 -0
  16. package/dist/features/prompt-editor/components/EditableContent.d.ts.map +1 -0
  17. package/dist/features/prompt-editor/components/FormattingToolbar.d.ts +10 -0
  18. package/dist/features/prompt-editor/components/FormattingToolbar.d.ts.map +1 -0
  19. package/dist/features/prompt-editor/components/Header.d.ts +2 -0
  20. package/dist/features/prompt-editor/components/Header.d.ts.map +1 -0
  21. package/dist/features/prompt-editor/components/InsertMenu.d.ts +14 -0
  22. package/dist/features/prompt-editor/components/InsertMenu.d.ts.map +1 -0
  23. package/dist/features/prompt-editor/components/RefineDropdown.d.ts +14 -0
  24. package/dist/features/prompt-editor/components/RefineDropdown.d.ts.map +1 -0
  25. package/dist/features/prompt-editor/components/Section.d.ts +27 -0
  26. package/dist/features/prompt-editor/components/Section.d.ts.map +1 -0
  27. package/dist/features/prompt-editor/components/SectionHeader.d.ts +15 -0
  28. package/dist/features/prompt-editor/components/SectionHeader.d.ts.map +1 -0
  29. package/dist/features/prompt-editor/components/icons.d.ts +16 -0
  30. package/dist/features/prompt-editor/components/icons.d.ts.map +1 -0
  31. package/dist/features/prompt-editor/data/insertableItems.d.ts +17 -0
  32. package/dist/features/prompt-editor/data/insertableItems.d.ts.map +1 -0
  33. package/dist/features/prompt-editor/index.d.ts +19 -0
  34. package/dist/features/prompt-editor/index.d.ts.map +1 -0
  35. package/dist/features/prompt-editor/services/EditorUtils.d.ts +48 -0
  36. package/dist/features/prompt-editor/services/EditorUtils.d.ts.map +1 -0
  37. package/dist/features/prompt-editor/services/PromptApiService.d.ts +22 -0
  38. package/dist/features/prompt-editor/services/PromptApiService.d.ts.map +1 -0
  39. package/dist/features/prompt-editor/types.d.ts +101 -0
  40. package/dist/features/prompt-editor/types.d.ts.map +1 -0
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +31381 -19590
  44. package/dist/ui-libs.umd.js +42201 -305
  45. package/package.json +10 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DebugPanel.d.ts","sourceRoot":"","sources":["../../../src/features/debug-logs/DebugPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAA4B,MAAM,SAAS,CAAC;AAMnF,eAAO,MAAM,UAAU,2GAktBrB,CAAC;AAIH,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"DebugPanel.d.ts","sourceRoot":"","sources":["../../../src/features/debug-logs/DebugPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAA4B,MAAM,SAAS,CAAC;AAMnF,eAAO,MAAM,UAAU,2GAouBrB,CAAC;AAIH,eAAe,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { PromptEditorProps } from "./types";
2
+ export declare function PromptEditor({ value, markdownValue, onChange, onMarkdownChange, title, onTitleChange, mode, onModeChange, onRefine, className, validateContent, showHeader, promptType, agentContext, suggestions, }: PromptEditorProps & {
3
+ promptType?: string;
4
+ agentContext?: {
5
+ userId?: string;
6
+ accountId?: string;
7
+ appId?: string;
8
+ appName?: string;
9
+ agentName?: string;
10
+ variables?: Record<string, string>;
11
+ metadata?: Record<string, unknown>;
12
+ };
13
+ }): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=PromptEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptEditor.d.ts","sourceRoot":"","sources":["../../../src/features/prompt-editor/PromptEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAA2D,MAAM,SAAS,CAAC;AAG1G,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,KAAgB,EAChB,aAAa,EACb,IAAe,EACf,YAAY,EACZ,QAAQ,EACR,SAAc,EACd,eAAe,EACf,UAAkB,EAClB,UAAU,EACV,YAAY,EACZ,WAAW,GACZ,EAAE,iBAAiB,GAAG;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;CACH,2CAqrBA"}
@@ -0,0 +1,41 @@
1
+ import type { RefineContext, RefineResponse } from "./types";
2
+ interface RefinePanelProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ originalText: string;
6
+ initialInstruction: string;
7
+ onReplace: (refinedText: string, originalText: string, contentId?: string, selectionRange?: {
8
+ start: number;
9
+ end: number;
10
+ }) => void;
11
+ onInsert: (refinedText: string, originalText: string, contentId?: string, selectionRange?: {
12
+ start: number;
13
+ end: number;
14
+ }) => void;
15
+ context: "whole" | "selection";
16
+ onRefine: (context: RefineContext) => Promise<RefineResponse>;
17
+ promptType?: string;
18
+ agentContext?: {
19
+ userId?: string;
20
+ accountId?: string;
21
+ appId?: string;
22
+ appName?: string;
23
+ agentName?: string;
24
+ variables?: Record<string, string>;
25
+ metadata?: Record<string, unknown>;
26
+ };
27
+ contentId?: string;
28
+ selectionRange?: {
29
+ start: number;
30
+ end: number;
31
+ };
32
+ surroundingContext?: string;
33
+ fullPromptContext?: string;
34
+ refinementMode?: 'selection-only' | 'contextual-segment' | 'full-prompt' | 'smart-auto';
35
+ selectionStartIndex?: number;
36
+ selectionEndIndex?: number;
37
+ actionType?: string;
38
+ }
39
+ export declare function RefinePanel({ isOpen, onClose, originalText, initialInstruction, onReplace, onInsert, context, onRefine, promptType, agentContext, contentId, selectionRange, surroundingContext, fullPromptContext, refinementMode, selectionStartIndex, selectionEndIndex, actionType, }: RefinePanelProps): import("react/jsx-runtime").JSX.Element | null;
40
+ export {};
41
+ //# sourceMappingURL=RefinePanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefinePanel.d.ts","sourceRoot":"","sources":["../../../src/features/prompt-editor/RefinePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQ7D,UAAU,gBAAgB;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC,EAA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;CACrB;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,GACX,EAAE,gBAAgB,kDAqYlB"}
@@ -0,0 +1,8 @@
1
+ interface AddToolbarProps {
2
+ onAdd: (type: "subsection" | "text") => void;
3
+ isNested?: boolean;
4
+ isRootLevel?: boolean;
5
+ }
6
+ export declare function AddToolbar({ onAdd, isNested, isRootLevel }: AddToolbarProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=AddToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddToolbar.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/AddToolbar.tsx"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,KAAK,EAAE,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAgB,EAAE,WAAmB,EAAE,EAAE,eAAe,2CAgC3F"}
@@ -0,0 +1,13 @@
1
+ interface ChatMessageProps {
2
+ role: "user" | "assistant";
3
+ content: string;
4
+ quotedText?: string;
5
+ onInsert?: (content: string) => void;
6
+ onReplace?: (content: string) => void;
7
+ showActions?: boolean;
8
+ isUsed?: boolean;
9
+ }
10
+ export declare function ChatMessage({ role, content, quotedText, onInsert, onReplace, showActions, isUsed }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function SkeletonMessage(): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=ChatMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/ChatMessage.tsx"],"names":[],"mappings":"AAAA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAmB,EAAE,MAAc,EAAE,EAAE,gBAAgB,2CAyDpI;AAED,wBAAgB,eAAe,4CAW9B"}
@@ -0,0 +1,8 @@
1
+ interface CodeEditorProps {
2
+ value: string;
3
+ onChange: (value: string) => void;
4
+ language: "json" | "markdown" | "text";
5
+ }
6
+ export declare function CodeEditor({ value, onChange, language }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=CodeEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/CodeEditor.tsx"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;CACxC;AAwJD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,eAAe,2CA2IxE"}
@@ -0,0 +1,23 @@
1
+ import type { ContentBlock } from "../types";
2
+ interface ContentBlockProps {
3
+ block: ContentBlock;
4
+ sectionId: string;
5
+ onUpdate: (content: string) => void;
6
+ onDelete?: () => void;
7
+ onAddToSubsection: (type: "subsection" | "text", parentId: string, initialContent?: string, listType?: "bulleted" | "numbered") => void;
8
+ onUpdateContentBlock: (contentId: string, content: string) => void;
9
+ onDeleteContentBlock: (contentId: string) => void;
10
+ depth?: number;
11
+ isAutoCreated?: boolean;
12
+ onOpenRefineModal?: (type: "whole" | "selection", originalText: string, instruction: string, contentId?: string, selectionRange?: {
13
+ start: number;
14
+ end: number;
15
+ }) => void;
16
+ activeContentId: string | null;
17
+ onSetActive: (id: string | null) => void;
18
+ parentId: string;
19
+ suggestions?: any[];
20
+ }
21
+ export declare function ContentBlock({ block, sectionId, onUpdate, onDelete, onAddToSubsection, onUpdateContentBlock, onDeleteContentBlock, depth, onOpenRefineModal, activeContentId, onSetActive, parentId, suggestions, }: ContentBlockProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=ContentBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentBlock.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/ContentBlock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAO7C,UAAU,iBAAiB;IACzB,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,EAAE,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,CAAC;IACxI,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1K,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,KAAS,EACT,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,QAAQ,EACR,WAAW,GACZ,EAAE,iBAAiB,2CA+InB"}
@@ -0,0 +1,16 @@
1
+ import { InsertableItem } from "../data/insertableItems";
2
+ interface EditableContentProps {
3
+ content: string;
4
+ onChange: (content: string) => void;
5
+ onEnter?: () => void;
6
+ placeholder?: string;
7
+ showPlaceholder?: boolean;
8
+ className?: string;
9
+ onFormat?: (command: string) => void;
10
+ listType?: "bulleted" | "numbered";
11
+ availableVariables?: string[];
12
+ suggestions?: InsertableItem[];
13
+ }
14
+ export declare function EditableContent({ content, onChange, onEnter, placeholder, showPlaceholder, className, onFormat, listType, suggestions, }: EditableContentProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=EditableContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditableContent.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/EditableContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,WAA+B,EAC/B,eAAsB,EACtB,SAAc,EACd,QAAQ,EACR,QAAQ,EACR,WAAW,GACZ,EAAE,oBAAoB,2CA4YtB"}
@@ -0,0 +1,10 @@
1
+ interface FormattingToolbarProps {
2
+ onFormat: (command: string, value?: string) => void;
3
+ onOpenRefineModal?: (type: "whole" | "selection", originalText: string, instruction: string, contentId?: string, selectionRange?: {
4
+ start: number;
5
+ end: number;
6
+ }, surroundingContext?: string, actionType?: string) => void;
7
+ }
8
+ export declare function FormattingToolbar({ onFormat, onOpenRefineModal }: FormattingToolbarProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
10
+ //# sourceMappingURL=FormattingToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormattingToolbar.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/FormattingToolbar.tsx"],"names":[],"mappings":"AAMA,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7N;AAOD,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,EAAE,sBAAsB,kDA+TxF"}
@@ -0,0 +1,2 @@
1
+ export declare function Header(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/Header.tsx"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,4CAsCrB"}
@@ -0,0 +1,14 @@
1
+ import { InsertableItem } from "../data/insertableItems";
2
+ interface InsertMenuProps {
3
+ position: {
4
+ top: number;
5
+ left: number;
6
+ };
7
+ searchQuery: string;
8
+ onSelect: (item: InsertableItem) => void;
9
+ onClose: () => void;
10
+ suggestions?: InsertableItem[];
11
+ }
12
+ export declare function InsertMenu({ position, searchQuery, onSelect, onClose, suggestions, }: InsertMenuProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=InsertMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsertMenu.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/InsertMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAA6B,MAAM,yBAAyB,CAAC;AAGpF,UAAU,eAAe;IACvB,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC;AAID,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE,eAAe,2CA6RjB"}
@@ -0,0 +1,14 @@
1
+ interface DropdownPosition {
2
+ top: number;
3
+ left: number;
4
+ }
5
+ interface RefineDropdownProps {
6
+ isOpen: boolean;
7
+ onClose: () => void;
8
+ onRefine: (instruction: string, actionType?: string) => void;
9
+ position: DropdownPosition;
10
+ context?: "whole" | "selection";
11
+ }
12
+ export declare function RefineDropdown({ isOpen, onClose, onRefine, position, }: RefineDropdownProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
14
+ //# sourceMappingURL=RefineDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefineDropdown.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/RefineDropdown.tsx"],"names":[],"mappings":"AAUA,UAAU,gBAAgB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CACjC;AAUD,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,mBAAmB,kDA4IrB"}
@@ -0,0 +1,27 @@
1
+ import type { SectionData, FormatType, ContentBlock } from "../types";
2
+ interface SectionProps {
3
+ section: SectionData;
4
+ index: number;
5
+ moveSection: (dragIndex: number, hoverIndex: number) => void;
6
+ moveSectionUp: () => void;
7
+ moveSectionDown: () => void;
8
+ deleteSection: (id: string) => void;
9
+ updateSectionTitle: (id: string, title: string) => void;
10
+ updateSectionFormat: (id: string, format: FormatType) => void;
11
+ addContentBlock: (sectionId: string, type: ContentBlock["type"], parentId?: string, afterBlockId?: string, initialContent?: string, listType?: "bulleted" | "numbered") => string;
12
+ updateContentBlock: (sectionId: string, contentId: string, content: string) => void;
13
+ deleteContentBlock: (sectionId: string, contentId: string) => void;
14
+ replaceAllContent: (sectionId: string, newContent: ContentBlock[]) => void;
15
+ isFirst: boolean;
16
+ isLast: boolean;
17
+ onOpenRefineModal?: (type: "whole" | "selection", originalText: string, instruction: string, contentId?: string, selectionRange?: {
18
+ start: number;
19
+ end: number;
20
+ }) => void;
21
+ activeContentId: string | null;
22
+ onSetActive: (id: string | null) => void;
23
+ suggestions?: any[];
24
+ }
25
+ export declare function Section({ section, moveSectionUp, moveSectionDown, deleteSection, updateSectionFormat, addContentBlock, updateContentBlock, deleteContentBlock, replaceAllContent, isFirst, isLast, onOpenRefineModal, activeContentId, onSetActive, suggestions, }: SectionProps): import("react/jsx-runtime").JSX.Element | null;
26
+ export {};
27
+ //# sourceMappingURL=Section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/Section.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAOtE,UAAU,YAAY;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB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KAAE,KAAK,IAAI,CAAC;IAC1K,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;CACrB;AA2BD,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,aAAa,EACb,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,WAAW,GACZ,EAAE,YAAY,kDAkJd"}
@@ -0,0 +1,15 @@
1
+ import type { FormatType } from "../types";
2
+ interface SectionHeaderProps {
3
+ activeFormat: FormatType;
4
+ onFormatChange: (format: FormatType) => void;
5
+ onMoveUp?: () => void;
6
+ onMoveDown?: () => void;
7
+ onDelete?: () => void;
8
+ canMoveUp?: boolean;
9
+ canMoveDown?: boolean;
10
+ onOpenRefineModal: (type: "whole" | "selection", originalText: string, instruction: string) => void;
11
+ sectionContent: string;
12
+ }
13
+ export declare function SectionHeader({ activeFormat, onFormatChange, onOpenRefineModal, sectionContent, }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=SectionHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAU3C,UAAU,kBAAkB;IAC1B,YAAY,EAAE,UAAU,CAAC;IACzB,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpG,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAC5B,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,cAAc,GACf,EAAE,kBAAkB,2CAqHpB"}
@@ -0,0 +1,16 @@
1
+ export declare function PencilAi(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function GenerateIcon(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ArrowCircleUpIcon({ isActive }: {
4
+ isActive: boolean;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export declare function MagicWandIcon(): import("react/jsx-runtime").JSX.Element;
7
+ export declare function CollapseAllIcon(): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ExpandAllIcon(): import("react/jsx-runtime").JSX.Element;
9
+ export declare function FileCodeIcon(): import("react/jsx-runtime").JSX.Element;
10
+ export declare function AgentIcon(): import("react/jsx-runtime").JSX.Element;
11
+ export declare function KnowledgeIcon(): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ToolIcon(): import("react/jsx-runtime").JSX.Element;
13
+ export declare function MemoryIcon(): import("react/jsx-runtime").JSX.Element;
14
+ export declare function EnvVariableIcon(): import("react/jsx-runtime").JSX.Element;
15
+ export declare function SystemVariableIcon(): import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/components/icons.tsx"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,4CAYvB;AAED,wBAAgB,YAAY,4CAiC3B;AAED,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,2CAiBpE;AAED,wBAAgB,aAAa,4CAY5B;AAED,wBAAgB,eAAe,4CAY9B;AAED,wBAAgB,aAAa,4CAY5B;AAED,wBAAgB,YAAY,4CAY3B;AAGD,wBAAgB,SAAS,4CAgBxB;AAED,wBAAgB,aAAa,4CAgB5B;AAED,wBAAgB,QAAQ,4CAgBvB;AAED,wBAAgB,UAAU,4CAiBzB;AAED,wBAAgB,eAAe,4CAgB9B;AAED,wBAAgB,kBAAkB,4CAEjC"}
@@ -0,0 +1,17 @@
1
+ export type ItemType = "agent" | "tool" | "knowledge" | "memory" | "envVariable" | "systemVariable";
2
+ export interface InsertableItem {
3
+ id: string;
4
+ name: string;
5
+ displayName: string;
6
+ type: ItemType;
7
+ }
8
+ export declare const agents: InsertableItem[];
9
+ export declare const knowledge: InsertableItem[];
10
+ export declare const tools: InsertableItem[];
11
+ export declare const memory: InsertableItem[];
12
+ export declare const envVariables: InsertableItem[];
13
+ export declare const systemVariables: InsertableItem[];
14
+ export declare const allItems: InsertableItem[];
15
+ export declare const getItemsByType: (type: ItemType, suggestions?: InsertableItem[]) => InsertableItem[];
16
+ export declare const searchItems: (query: string, suggestions?: InsertableItem[]) => InsertableItem[];
17
+ //# sourceMappingURL=insertableItems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insertableItems.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/data/insertableItems.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAEpG,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAGD,eAAO,MAAM,MAAM,EAAE,cAAc,EAAO,CAAC;AAC3C,eAAO,MAAM,SAAS,EAAE,cAAc,EAAO,CAAC;AAC9C,eAAO,MAAM,KAAK,EAAE,cAAc,EAAO,CAAC;AAC1C,eAAO,MAAM,MAAM,EAAE,cAAc,EAAO,CAAC;AAC3C,eAAO,MAAM,YAAY,EAAE,cAAc,EAAO,CAAC;AAEjD,eAAO,MAAM,eAAe,EAAE,cAAc,EAa3C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,cAAc,EAAwF,CAAC;AAE9H,eAAO,MAAM,cAAc,GAAI,MAAM,QAAQ,EAAE,cAAc,cAAc,EAAE,KAAG,cAAc,EAkB7F,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,cAAc,cAAc,EAAE,KAAG,cAAc,EAUzF,CAAC"}
@@ -0,0 +1,19 @@
1
+ export { PromptEditor } from './PromptEditor';
2
+ export { RefinePanel } from './RefinePanel';
3
+ export { Section } from './components/Section';
4
+ export { ContentBlock as ContentBlockComponent } from './components/ContentBlock';
5
+ export { EditableContent } from './components/EditableContent';
6
+ export { AddToolbar } from './components/AddToolbar';
7
+ export { FormattingToolbar } from './components/FormattingToolbar';
8
+ export { SectionHeader } from './components/SectionHeader';
9
+ export { InsertMenu } from './components/InsertMenu';
10
+ export { RefineDropdown } from './components/RefineDropdown';
11
+ export { CodeEditor as PromptCodeEditor } from './components/CodeEditor';
12
+ export { ChatMessage, SkeletonMessage } from './components/ChatMessage';
13
+ export { Header as PromptEditorHeader } from './components/Header';
14
+ export * from './components/icons';
15
+ export { PromptApiService } from './services/PromptApiService';
16
+ export * from './services/EditorUtils';
17
+ export type { FormatType, ContentBlock, SectionData, PromptEditorProps, RefineContext, RefineResponse, PromptApiConfig, RefineRequest, RefinementMode, } from './types';
18
+ export * from './data/insertableItems';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/prompt-editor/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGnE,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,cAAc,wBAAwB,CAAC;AAGvC,YAAY,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC;AAGjB,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,48 @@
1
+ import type { ContentBlock } from '../types';
2
+ export declare function markdownToHtml(markdown: string): string;
3
+ export declare function htmlToMarkdown(html: string): string;
4
+ export declare function htmlToPlainText(html: string): string;
5
+ /**
6
+ * Extract surrounding context for a selection
7
+ * @param selectedText The selected text
8
+ * @param contentBlockHtml The HTML content of the block containing the selection
9
+ * @param selectionRange The character range of the selection within the block
10
+ * @param contextChars Number of characters to include before/after (default: 200)
11
+ * @returns Object with textBefore, textAfter, and fullSentence/paragraph
12
+ */
13
+ export declare function extractSurroundingContext(_selectedText: string, contentBlockHtml: string, selectionRange: {
14
+ start: number;
15
+ end: number;
16
+ }, contextChars?: number): {
17
+ textBefore: string;
18
+ textAfter: string;
19
+ fullSentence?: string;
20
+ fullParagraph?: string;
21
+ };
22
+ /**
23
+ * Determine refinement mode based on selection characteristics
24
+ * @param selectedText The selected text
25
+ * @param selectionLength Optional explicit length (if not provided, calculates from selectedText)
26
+ * @returns Recommended refinement mode
27
+ */
28
+ export declare function determineRefinementMode(selectedText: string, selectionLength?: number): 'selection-only' | 'contextual-segment' | 'full-prompt' | 'smart-auto';
29
+ export declare function validateSelectionRange(currentHtmlContent: string, storedRange: {
30
+ start: number;
31
+ end: number;
32
+ }, originalText: string): {
33
+ isValid: boolean;
34
+ extractedText?: string;
35
+ confidence: number;
36
+ };
37
+ export declare function findTextInContent(searchText: string, contentText: string, options?: {
38
+ minConfidence?: number;
39
+ }): {
40
+ found: boolean;
41
+ startIndex: number;
42
+ endIndex: number;
43
+ confidence: number;
44
+ };
45
+ export declare function parseMarkdownToBlocks(markdown: string, depth?: number): ContentBlock[];
46
+ export declare function blocksToMarkdown(blocks: ContentBlock[], depth?: number): string;
47
+ export declare function migrateVariables(html: string): string;
48
+ //# sourceMappingURL=EditorUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorUtils.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/services/EditorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqBvD;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA0CnD;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,G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AE,KAAK,GAAE,MAAU,GAAG,MAAM,CA8BlF;AAGD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASrD"}
@@ -0,0 +1,22 @@
1
+ import type { PromptApiConfig, RefineRequest, RefineResponse } from '../types';
2
+ /**
3
+ * API Service for Prompt Refinement
4
+ * Follows the pattern from debug-logs/services/ApiService.ts
5
+ */
6
+ export declare class PromptApiService {
7
+ private config;
8
+ constructor(config: PromptApiConfig);
9
+ /**
10
+ * Refine a prompt using the backend AI service
11
+ */
12
+ refinePrompt(request: RefineRequest): Promise<RefineResponse>;
13
+ /**
14
+ * Update API configuration
15
+ */
16
+ updateConfig(config: PromptApiConfig): void;
17
+ /**
18
+ * Get current configuration
19
+ */
20
+ getConfig(): PromptApiConfig;
21
+ }
22
+ //# sourceMappingURL=PromptApiService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptApiService.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/services/PromptApiService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/E;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAkB;gBAEpB,MAAM,EAAE,eAAe;IAInC;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAsDnE;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAI3C;;OAEG;IACH,SAAS,IAAI,eAAe;CAG7B"}
@@ -0,0 +1,101 @@
1
+ export type FormatType = "editor" | "preview";
2
+ export type ContentBlock = {
3
+ id: string;
4
+ type: "text" | "subsection";
5
+ content: string;
6
+ listType?: "bulleted" | "numbered";
7
+ headingLevel?: 1 | 2 | 3;
8
+ children?: ContentBlock[];
9
+ };
10
+ export type SectionData = {
11
+ id: string;
12
+ title: string;
13
+ order: number;
14
+ activeFormat: FormatType;
15
+ content: ContentBlock[];
16
+ };
17
+ export interface PromptEditorProps {
18
+ value?: ContentBlock[];
19
+ markdownValue?: string;
20
+ onChange?: (value: ContentBlock[]) => void;
21
+ onMarkdownChange?: (markdown: string) => void;
22
+ title?: string;
23
+ onTitleChange?: (title: string) => void;
24
+ mode?: FormatType;
25
+ onModeChange?: (mode: FormatType) => void;
26
+ onRefine?: (context: RefineContext) => Promise<RefineResponse>;
27
+ className?: string;
28
+ readOnly?: boolean;
29
+ validateContent?: (blocks: ContentBlock[]) => boolean | string;
30
+ showHeader?: boolean;
31
+ suggestions?: InsertableItem[];
32
+ }
33
+ export interface InsertableItem {
34
+ id: string;
35
+ name: string;
36
+ displayName: string;
37
+ type: 'agent' | 'tool' | 'knowledge' | 'memory' | 'envVariable' | 'systemVariable';
38
+ }
39
+ export type RefinementMode = 'selection-only' | 'contextual-segment' | 'full-prompt' | 'smart-auto';
40
+ export interface RefineContext {
41
+ type: "whole" | "selection";
42
+ originalText: string;
43
+ instruction: string;
44
+ contentId?: string;
45
+ selectionRange?: {
46
+ start: number;
47
+ end: number;
48
+ };
49
+ conversationHistory?: Message[];
50
+ promptType?: string;
51
+ agentContext?: {
52
+ userId?: string;
53
+ accountId?: string;
54
+ appId?: string;
55
+ appName?: string;
56
+ agentName?: string;
57
+ variables?: Record<string, string>;
58
+ metadata?: Record<string, unknown>;
59
+ };
60
+ surroundingContext?: string;
61
+ fullPromptContext?: string;
62
+ refinementMode?: RefinementMode;
63
+ selectionStartIndex?: number;
64
+ selectionEndIndex?: number;
65
+ actionType?: string;
66
+ }
67
+ export interface RefineResponse {
68
+ refinedText: string;
69
+ conversationId?: string;
70
+ }
71
+ export interface PromptApiConfig {
72
+ baseUrl: string;
73
+ endpoint: string;
74
+ headers: Record<string, string>;
75
+ }
76
+ export interface Message {
77
+ role: 'user' | 'assistant';
78
+ content: string;
79
+ }
80
+ export interface RefineRequest {
81
+ originalText: string;
82
+ instruction: string;
83
+ conversationHistory?: Message[];
84
+ promptType?: string;
85
+ agentContext?: {
86
+ userId?: string;
87
+ accountId?: string;
88
+ appId?: string;
89
+ appName?: string;
90
+ agentName?: string;
91
+ variables?: Record<string, string>;
92
+ metadata?: Record<string, unknown>;
93
+ };
94
+ surroundingContext?: string;
95
+ fullPromptContext?: string;
96
+ refinementMode?: RefinementMode;
97
+ selectionStartIndex?: number;
98
+ selectionEndIndex?: number;
99
+ actionType?: string;
100
+ }
101
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/prompt-editor/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,UAAU,CAAC;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB,CAAC;AAGF,MAAM,WAAW,iBAAiB;IAEhC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC3C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE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AC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import './styles/globals.css';
2
2
  export * from './features/dashboard';
3
3
  export * from './features/debug-logs';
4
+ export * from './features/prompt-editor';
4
5
  export * from './shared/ui';
5
6
  export { Dashboard } from './features/dashboard/Dashboard';
6
7
  export { MetricCard } from './features/dashboard/MetricCard';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,sBAAsB,CAAC;AAW9B,cAAc,sBAAsB,CAAC;AAKrC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAU5B,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACz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