@aintela/chat 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +161 -0
- package/dist/ClientMessage-EKgfuTp8.js +40 -0
- package/dist/ClientMessage-EKgfuTp8.js.map +1 -0
- package/dist/Memory-DjLZqgbF.js +84 -0
- package/dist/Memory-DjLZqgbF.js.map +1 -0
- package/dist/Prompt-DZb7OaPp.js +37 -0
- package/dist/Prompt-DZb7OaPp.js.map +1 -0
- package/dist/artifactHtmlHandler-CMQJf1cX.js +41 -0
- package/dist/artifactHtmlHandler-CMQJf1cX.js.map +1 -0
- package/dist/auth-CcTgInbY.js +524 -0
- package/dist/auth-CcTgInbY.js.map +1 -0
- package/dist/components.d.ts +2 -0
- package/dist/components.js +14159 -0
- package/dist/components.js.map +1 -0
- package/dist/environmentUtils-BaKw5_VD.js +462 -0
- package/dist/environmentUtils-BaKw5_VD.js.map +1 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +9 -0
- package/dist/hooks.js.map +1 -0
- package/dist/httpArtifactService-BAR60Gu1.js +1802 -0
- package/dist/httpArtifactService-BAR60Gu1.js.map +1 -0
- package/dist/httpSessionService-5Kr__oQL.js +279 -0
- package/dist/httpSessionService-5Kr__oQL.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +226 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces.d.ts +2 -0
- package/dist/interfaces.js +11 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/models.d.ts +2 -0
- package/dist/models.js +54 -0
- package/dist/models.js.map +1 -0
- package/dist/serializer-DyHZxlAG.js +1276 -0
- package/dist/serializer-DyHZxlAG.js.map +1 -0
- package/dist/services.d.ts +2 -0
- package/dist/services.js +16 -0
- package/dist/services.js.map +1 -0
- package/dist/sortable-table-DgQHxWIh.js +819 -0
- package/dist/sortable-table-DgQHxWIh.js.map +1 -0
- package/dist/src/ErrorBondary.d.ts +10 -0
- package/dist/src/components/AiChat/AiChat.d.ts +3 -0
- package/dist/src/components/AiChat/AiChatContext.d.ts +76 -0
- package/dist/src/components/AiChat/AiChatDrawer.d.ts +3 -0
- package/dist/src/components/AiChat/AiChatFloating.d.ts +3 -0
- package/dist/src/components/AiChat/AiChatProvider.d.ts +7 -0
- package/dist/src/components/AiChat/AiChatSessionStore.d.ts +1 -0
- package/dist/src/components/AiChat/AiChatTypes.d.ts +227 -0
- package/dist/src/components/AiChat/ChatPane/AlertDialog.d.ts +12 -0
- package/dist/src/components/AiChat/ChatPane/AskUserSheet.d.ts +25 -0
- package/dist/src/components/AiChat/ChatPane/ChatPane.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/ConnectionState.d.ts +2 -0
- package/dist/src/components/AiChat/ChatPane/CurrentMessage.d.ts +12 -0
- package/dist/src/components/AiChat/ChatPane/Event.d.ts +6 -0
- package/dist/src/components/AiChat/ChatPane/FloatingConnectionStatus.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/FriendlyPartDisplay.d.ts +13 -0
- package/dist/src/components/AiChat/ChatPane/LastPrompts.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/Message.d.ts +11 -0
- package/dist/src/components/AiChat/ChatPane/MessageAgent.d.ts +16 -0
- package/dist/src/components/AiChat/ChatPane/MessageNonTextDisplay.d.ts +16 -0
- package/dist/src/components/AiChat/ChatPane/MessagePart.d.ts +15 -0
- package/dist/src/components/AiChat/ChatPane/MessagePersona.d.ts +13 -0
- package/dist/src/components/AiChat/ChatPane/MessageUser.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/ModelSelector.d.ts +11 -0
- package/dist/src/components/AiChat/ChatPane/Prompt.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/SessionDataDialog.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/StickyQuestionHeader.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/StreamStatistics.d.ts +32 -0
- package/dist/src/components/AiChat/ChatPane/SubAgentBox.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/TaskList.d.ts +6 -0
- package/dist/src/components/AiChat/ChatPane/friendlyToolConfig.d.ts +11 -0
- package/dist/src/components/AiChat/ChatPane/parts/AskUserPart.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/parts/BoxedPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/FunctionPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/SuspendedPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/TextPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/ThoughtPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/UiToolDispatcher.d.ts +16 -0
- package/dist/src/components/AiChat/ChatPane/parts/WaitingPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/index.d.ts +20 -0
- package/dist/src/components/AiChat/ChatPane/parts/index.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +22 -0
- package/dist/src/components/AiChat/ChatPane/parts/uiToolRegistry.d.ts +121 -0
- package/dist/src/components/AiChat/index.d.ts +13 -0
- package/dist/src/components/AiChat/sessionStateManagerService.d.ts +47 -0
- package/dist/src/components/AiChat/stateConfiguration.d.ts +80 -0
- package/dist/src/components/Library/ArtifactRender.d.ts +18 -0
- package/dist/src/components/Library/DelayTextComponent.d.ts +9 -0
- package/dist/src/components/Library/LinearBackgroundProgress.d.ts +8 -0
- package/dist/src/components/Library/LinearProgressBarWithMarkers.d.ts +14 -0
- package/dist/src/components/Library/LoadingDots.d.ts +8 -0
- package/dist/src/components/Library/MarkdowmExtended.d.ts +32 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/ChartSkeleton.d.ts +3 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/IFrameSkeleton.d.ts +3 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/MetricGroupSkeleton.d.ts +8 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/MetricSkeleton.d.ts +7 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/TableSkeleton.d.ts +7 -0
- package/dist/src/components/Library/VizLibrary/index.d.ts +5 -0
- package/dist/src/components/LlmResponseRender/EnvironmentContext.d.ts +33 -0
- package/dist/src/components/LlmResponseRender/GeneratingVisualization.d.ts +13 -0
- package/dist/src/components/LlmResponseRender/LiveJsxBlock.d.ts +55 -0
- package/dist/src/components/LlmResponseRender/LlmResponseRender.d.ts +29 -0
- package/dist/src/components/LlmResponseRender/index.d.ts +6 -0
- package/dist/src/components/LlmResponseRender/jsxScope.d.ts +41 -0
- package/dist/src/components/LlmResponseRender/liveTsxConfig.d.ts +18 -0
- package/dist/src/components/LlmResponseRender/parseBlocks.d.ts +39 -0
- package/dist/src/components/Stopwatch.d.ts +12 -0
- package/dist/src/components/index.d.ts +30 -0
- package/dist/src/components/v2/AgentActivityV2.d.ts +32 -0
- package/dist/src/components/v2/AiChatFloatingV2.d.ts +3 -0
- package/dist/src/components/v2/AiChatV2Pane.d.ts +20 -0
- package/dist/src/components/v2/AppBarV2.d.ts +38 -0
- package/dist/src/components/v2/AppRailV2.d.ts +21 -0
- package/dist/src/components/v2/AppShellV2.d.ts +13 -0
- package/dist/src/components/v2/ChatsHistoryV2.d.ts +47 -0
- package/dist/src/components/v2/LastPromptsV2.d.ts +6 -0
- package/dist/src/components/v2/MobileDrawerV2.d.ts +43 -0
- package/dist/src/components/v2/PromptV2.d.ts +164 -0
- package/dist/src/components/v2/RunProgressPanelV2.d.ts +28 -0
- package/dist/src/components/v2/RunProgressStripV2.d.ts +2 -0
- package/dist/src/components/v2/Sparkline.d.ts +10 -0
- package/dist/src/components/v2/SubAgentBoxV2.d.ts +15 -0
- package/dist/src/components/v2/TaskListV2.d.ts +8 -0
- package/dist/src/components/v2/icons.d.ts +42 -0
- package/dist/src/components/v2/index.d.ts +34 -0
- package/dist/src/components/v2/styles.d.ts +6 -0
- package/dist/src/components/v2/toolCategories.d.ts +18 -0
- package/dist/src/components/v2/useResponsiveLayout.d.ts +9 -0
- package/dist/src/hooks/index.d.ts +4 -0
- package/dist/src/hooks/useChatSessions.d.ts +68 -0
- package/dist/src/hooks/useContainerWidth.d.ts +2 -0
- package/dist/src/hooks/useIntervalHook.d.ts +2 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/interfaces/IHeartbeatPort.d.ts +4 -0
- package/dist/src/interfaces/INotificationPort.d.ts +4 -0
- package/dist/src/interfaces/index.d.ts +4 -0
- package/dist/src/interfaces/memoryService.d.ts +37 -0
- package/dist/src/interfaces/schedulingService.d.ts +64 -0
- package/dist/src/models/Agent.d.ts +32 -0
- package/dist/src/models/Artifact.d.ts +21 -0
- package/dist/src/models/ArtifactData.d.ts +30 -0
- package/dist/src/models/ChatSession.d.ts +57 -0
- package/dist/src/models/ClientMessage.d.ts +38 -0
- package/dist/src/models/Customer.d.ts +7 -0
- package/dist/src/models/EndMessageData.d.ts +6 -0
- package/dist/src/models/IAbiContext.d.ts +8 -0
- package/dist/src/models/IDBStorable.d.ts +14 -0
- package/dist/src/models/Interaction.d.ts +36 -0
- package/dist/src/models/InteractionPart.d.ts +69 -0
- package/dist/src/models/LlmSession.d.ts +10 -0
- package/dist/src/models/Memory.d.ts +48 -0
- package/dist/src/models/Notification.d.ts +11 -0
- package/dist/src/models/Prompt.d.ts +20 -0
- package/dist/src/models/SendMessageResponse.d.ts +21 -0
- package/dist/src/models/ServerEvent.d.ts +130 -0
- package/dist/src/models/connectionState.d.ts +9 -0
- package/dist/src/models/contexts.d.ts +33 -0
- package/dist/src/models/enums.d.ts +333 -0
- package/dist/src/models/index.d.ts +36 -0
- package/dist/src/models/semanticKernelModel/index.d.ts +2 -0
- package/dist/src/models/semanticKernelModel/init.d.ts +1 -0
- package/dist/src/models/semanticKernelModel/models.d.ts +208 -0
- package/dist/src/models/semanticKernelModel/serializer.d.ts +40 -0
- package/dist/src/models/serverReponse.d.ts +5 -0
- package/dist/src/models/subAgentModel.d.ts +48 -0
- package/dist/src/models/todoListModel.d.ts +18 -0
- package/dist/src/services/WebSocketConnection/WebSocketConnectionV2.d.ts +163 -0
- package/dist/src/services/WebSocketConnection/webSocketConnection.d.ts +75 -0
- package/dist/src/services/artifactHtmlHandler.d.ts +6 -0
- package/dist/src/services/eventBusService.d.ts +119 -0
- package/dist/src/services/httpArtifactService.d.ts +25 -0
- package/dist/src/services/httpSessionService.d.ts +31 -0
- package/dist/src/services/index.d.ts +16 -0
- package/dist/src/services/interactionService.d.ts +28 -0
- package/dist/src/services/interactionService.test.d.ts +1 -0
- package/dist/src/services/interfaces/artifactService.d.ts +13 -0
- package/dist/src/services/servers/AgentGatewayService.d.ts +167 -0
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +44 -0
- package/dist/src/services/servers/agentGatewayWSAsync.test.d.ts +1 -0
- package/dist/src/services/servers/sessionService/ISessionService.d.ts +20 -0
- package/dist/src/services/sessionEventDecoder.d.ts +22 -0
- package/dist/src/services/sessionEventDecoder.test.d.ts +1 -0
- package/dist/src/services/storageService.d.ts +73 -0
- package/dist/src/themes/index.d.ts +3 -0
- package/dist/src/themes/v2-chart-palette.d.ts +1 -0
- package/dist/src/themes/v2.d.ts +71 -0
- package/dist/src/utils/auth.d.ts +9 -0
- package/dist/src/utils/envOverrides.d.ts +23 -0
- package/dist/src/utils/envUtils.d.ts +13 -0
- package/dist/src/utils/environmentUtils.d.ts +43 -0
- package/dist/src/utils/fileUtils.d.ts +6 -0
- package/dist/src/utils/getAgentArtifactsBaseUrl.d.ts +1 -0
- package/dist/src/utils/getAgentBaseUrl.d.ts +1 -0
- package/dist/src/utils/getDotNetBaseUrl.d.ts +5 -0
- package/dist/src/utils/index.d.ts +17 -0
- package/dist/src/utils/interactionIdChecker.d.ts +27 -0
- package/dist/src/utils/jsonDetector.d.ts +50 -0
- package/dist/src/utils/jsonUtils.d.ts +1 -0
- package/dist/src/utils/materialIconsList.d.ts +42 -0
- package/dist/src/utils/materialIconsSvg.d.ts +51 -0
- package/dist/src/utils/objectUtils.d.ts +31 -0
- package/dist/src/utils/parseArtifact.d.ts +3 -0
- package/dist/src/utils/sessionWindowParameters.d.ts +3 -0
- package/dist/src/utils/sortable-table.d.ts +31 -0
- package/dist/src/utils/stringUtils.d.ts +8 -0
- package/dist/src/utils/uriUtils.d.ts +39 -0
- package/dist/src/utils/urlParser.d.ts +8 -0
- package/dist/style.css +94 -0
- package/dist/tests/fakes/fakeWebSocket.d.ts +32 -0
- package/dist/tests/fakes/makeGateway.d.ts +24 -0
- package/dist/tests/fixtures.d.ts +73 -0
- package/dist/useChatSessions-DttlifVk.js +107 -0
- package/dist/useChatSessions-DttlifVk.js.map +1 -0
- package/dist/useContainerWidth-Df2PmSoC.js +52 -0
- package/dist/useContainerWidth-Df2PmSoC.js.map +1 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +49 -0
- package/dist/utils.js.map +1 -0
- package/package.json +127 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Autocomplete item returned by `onSlashQuery` / `onAtQuery`. The
|
|
4
|
+
* `value` is spliced verbatim into the textarea, replacing the entire
|
|
5
|
+
* trigger token (the `/` or `@` plus whatever the user had typed after
|
|
6
|
+
* it). Hosts can return `@username`, `/summarize`, `@[Name](id123)` —
|
|
7
|
+
* whatever serialization fits their downstream parsing.
|
|
8
|
+
*/
|
|
9
|
+
export type PromptTriggerItem = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
hint?: string;
|
|
14
|
+
};
|
|
15
|
+
interface PromptV2Props {
|
|
16
|
+
forceMessage?: string | null;
|
|
17
|
+
onHeightChange?: (newHeight: number) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Optional uncontrolled-style seeder. When the value changes
|
|
20
|
+
* PromptV2 replaces its internal draft with the new string
|
|
21
|
+
* (without auto-sending — that's `forceMessage`'s job). Used by
|
|
22
|
+
* suggestion clicks in the v2 composer's empty state.
|
|
23
|
+
*/
|
|
24
|
+
seedDraft?: string | null;
|
|
25
|
+
/** Show the prompt-history popover trigger inside the pill. Default true. */
|
|
26
|
+
showLastPrompts?: boolean;
|
|
27
|
+
showConfigOptions?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Placeholder text for the textarea. Defaults to the data-explorer
|
|
30
|
+
* phrasing ("Pergunte sobre seus dados…"); hosts in other domains
|
|
31
|
+
* (e.g. a booking flow) pass their own. Ignored while an expanded
|
|
32
|
+
* `topSlot` is shown — that surface owns the visual hierarchy and the
|
|
33
|
+
* placeholder is suppressed regardless.
|
|
34
|
+
*/
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional node rendered at the start of the input row, immediately
|
|
38
|
+
* before the textarea (after the options / history controls). A slot
|
|
39
|
+
* for a leading adornment — e.g. a shell-style `›` prompt glyph — that
|
|
40
|
+
* tracks the input. Defaults to nothing.
|
|
41
|
+
*/
|
|
42
|
+
inputPrefix?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Optional surface rendered at the top of the pill. The composer
|
|
45
|
+
* uses this to host its sketch (chip when collapsed / no sketch,
|
|
46
|
+
* full toolbar+pad when expanded). The data explorer omits it.
|
|
47
|
+
*/
|
|
48
|
+
topSlot?: React.ReactNode;
|
|
49
|
+
/** When true, PromptV2 overlays a chevron at the top-right of `topSlot`. */
|
|
50
|
+
topSlotCollapsible?: boolean;
|
|
51
|
+
/** Controlled expanded state for `topSlot` (default true). */
|
|
52
|
+
topSlotExpanded?: boolean;
|
|
53
|
+
onTopSlotExpandedChange?: (next: boolean) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Override the textarea's minimum height. Defaults to a compact
|
|
56
|
+
* single-row look. The composer bumps this on the splash screen
|
|
57
|
+
* (no sketch yet) so the prompt reads as the dominant surface.
|
|
58
|
+
*/
|
|
59
|
+
inputMinHeight?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Optional async hook that runs *before* the message hits the
|
|
62
|
+
* gateway. The composer uses this to ensure a server-side
|
|
63
|
+
* dashboard draft exists (so the agent's subsequent partials
|
|
64
|
+
* carry the right `originalSessionId` for autosave).
|
|
65
|
+
*/
|
|
66
|
+
onBeforeSend?: (text: string) => void | Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Full submit override. When provided, replaces the gateway send
|
|
69
|
+
* entirely — the prompt does not call `agentGatewayService.sendMessage`
|
|
70
|
+
* and `onBeforeSend` is not invoked. Used by the home empty-state to
|
|
71
|
+
* route the typed text into a fresh /data-explorer session instead
|
|
72
|
+
* of sending it on whatever provider happens to be mounted around
|
|
73
|
+
* the splash. Connection / turn-open gating still applies (the send
|
|
74
|
+
* button stays disabled while a turn is in flight); the empty-text
|
|
75
|
+
* gate honors `allowEmptyDraft` as usual.
|
|
76
|
+
*/
|
|
77
|
+
onSubmit?: (text: string) => void | Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Pass-through HTML attributes spread onto the send button. Used
|
|
80
|
+
* by the dashboard composer to attach `data-env-id` /
|
|
81
|
+
* `className="llm-env-target …"` so the LLM-driven spotlight tour
|
|
82
|
+
* can address the V2 send button (the V1 `dashboard-pad-compose`
|
|
83
|
+
* identifier). Spread BEFORE the component's own handlers/styles
|
|
84
|
+
* so behavioural props (`onClick`, `disabled`, `aria-label`,
|
|
85
|
+
* `sx`) always win.
|
|
86
|
+
*
|
|
87
|
+
* `color` is omitted because MUI's IconButton has a typed `color`
|
|
88
|
+
* union that conflicts with HTML's free-string color attribute —
|
|
89
|
+
* styling stays the responsibility of the component's own `sx`.
|
|
90
|
+
*/
|
|
91
|
+
sendButtonProps?: Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
92
|
+
/**
|
|
93
|
+
* Allow submitting with an empty textarea. Defaults to `false`,
|
|
94
|
+
* which is the right behaviour for the data-explorer (the user's
|
|
95
|
+
* intent IS the text). The dashboard composer flips this on when
|
|
96
|
+
* the sketch has uncommitted edits — in that case the sketch
|
|
97
|
+
* itself is the message content, and forcing the user to type
|
|
98
|
+
* something would be busywork.
|
|
99
|
+
*/
|
|
100
|
+
allowEmptyDraft?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Optional node rendered inline in the action row, right before
|
|
103
|
+
* the send button (only while no turn is open). The dashboard
|
|
104
|
+
* composer uses this to surface a "+1 card · 1 filtro" chip when
|
|
105
|
+
* the sketch has queued changes, so the user can see what's
|
|
106
|
+
* about to be sent without us writing into their textarea.
|
|
107
|
+
*/
|
|
108
|
+
submitAdornment?: React.ReactNode;
|
|
109
|
+
/**
|
|
110
|
+
* Async fetcher invoked while the user is typing a `/`-prefixed
|
|
111
|
+
* token at the start of a word (i.e. preceded by whitespace or
|
|
112
|
+
* line start — guards against false hits inside URLs). Called
|
|
113
|
+
* with the query (everything after the `/` up to the caret) and
|
|
114
|
+
* expected to return autocomplete items. Returning an empty array
|
|
115
|
+
* suppresses the popover. Calls are debounced (~120ms) and stale
|
|
116
|
+
* responses are discarded, so the host can implement this as a
|
|
117
|
+
* naive `await fetch(...)` without worrying about ordering.
|
|
118
|
+
*/
|
|
119
|
+
onSlashQuery?: (query: string) => Promise<PromptTriggerItem[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Sibling of `onSlashQuery` for the `@` trigger — typically used
|
|
122
|
+
* for mentions. Kept as a separate prop (rather than one
|
|
123
|
+
* trigger-aware callback) so hosts that only wire one of the two
|
|
124
|
+
* don't have to branch internally.
|
|
125
|
+
*/
|
|
126
|
+
onAtQuery?: (query: string) => Promise<PromptTriggerItem[]>;
|
|
127
|
+
/**
|
|
128
|
+
* When set, `/command` tokens inside the prompt render as a chip
|
|
129
|
+
* (soft tinted background + 1px inset border + matching text)
|
|
130
|
+
* using this color as the dominant hue. Implemented via a
|
|
131
|
+
* transparent-text textarea + a sibling mirror that paints the
|
|
132
|
+
* styled tokens behind it, so the native caret / selection / IME
|
|
133
|
+
* stay intact. Pass `theme.palette.primary.main` (or any palette
|
|
134
|
+
* entry) for theme-coherent rendering.
|
|
135
|
+
*
|
|
136
|
+
* `slashColor` and `atColor` are independent: setting one
|
|
137
|
+
* enables the overlay; the unset trigger renders as plain text.
|
|
138
|
+
* Omitting both keeps the textarea in its non-highlighted state.
|
|
139
|
+
*/
|
|
140
|
+
slashColor?: string;
|
|
141
|
+
/** Sibling of `slashColor` for `@`-led tokens. */
|
|
142
|
+
atColor?: string;
|
|
143
|
+
/** Sibling of `slashColor` for `#`-led tokens (rendered after the
|
|
144
|
+
* user picks a date — `#YYYY-MM-DD` by default). */
|
|
145
|
+
hashColor?: string;
|
|
146
|
+
/**
|
|
147
|
+
* When true, typing `#` at a word boundary opens an inline date
|
|
148
|
+
* picker (anchored to the caret) instead of an autocomplete list.
|
|
149
|
+
* Picking a date splices `#${formattedDate}` into the textarea,
|
|
150
|
+
* replacing the trigger token. Defaults off — `#` stays as plain
|
|
151
|
+
* text unless this is set.
|
|
152
|
+
*/
|
|
153
|
+
enableHashDatePicker?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* dayjs format string used when inserting the picked date.
|
|
156
|
+
* Defaults to `'YYYY-MM-DD'` (ISO — unambiguous and trivially
|
|
157
|
+
* parseable on the receiving end). Hosts that want a localized
|
|
158
|
+
* display can pass e.g. `'DD/MM/YYYY'`.
|
|
159
|
+
*/
|
|
160
|
+
hashDateFormat?: string;
|
|
161
|
+
borderRadius?: number;
|
|
162
|
+
}
|
|
163
|
+
export declare const PromptV2: React.ForwardRefExoticComponent<PromptV2Props & React.RefAttributes<HTMLDivElement>>;
|
|
164
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface RunProgressPanelV2Props {
|
|
3
|
+
/** Width of the panel when expanded. Defaults to 20vw. Accepts any CSS width value. */
|
|
4
|
+
width?: number | string;
|
|
5
|
+
/** Title shown in the header. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional override for the Pause action. By default the panel calls
|
|
9
|
+
* `agentGatewayService.suspend()` on the gateway it pulls from
|
|
10
|
+
* `useAiChatServices()`. Pass `null` to hide the button entirely.
|
|
11
|
+
*/
|
|
12
|
+
onPause?: (() => void) | null;
|
|
13
|
+
/**
|
|
14
|
+
* Optional override for the Cancel action. By default the panel calls
|
|
15
|
+
* `agentGatewayService.stopStream(true)` to terminate the active turn.
|
|
16
|
+
* Pass `null` to hide the button entirely.
|
|
17
|
+
*/
|
|
18
|
+
onCancel?: (() => void) | null;
|
|
19
|
+
/** Hide reasoning chunks in the activity timeline. Defaults to `true`. */
|
|
20
|
+
hideReasoning?: boolean;
|
|
21
|
+
/** Controlled collapsed state. When `undefined` the panel manages it itself. */
|
|
22
|
+
collapsed?: boolean;
|
|
23
|
+
/** Called when the user toggles collapse. */
|
|
24
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
25
|
+
/** Default collapsed state when uncontrolled. */
|
|
26
|
+
defaultCollapsed?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const RunProgressPanelV2: React.FC<RunProgressPanelV2Props>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SubAgentState } from '../AiChat/stateConfiguration';
|
|
3
|
+
export type SubAgentBoxV2Level = 0 | 1 | 2;
|
|
4
|
+
export interface SubAgentBoxV2Props {
|
|
5
|
+
subAgent: SubAgentState;
|
|
6
|
+
/**
|
|
7
|
+
* Initial collapse level. When omitted, defaults to `1` (compact —
|
|
8
|
+
* matches the right-rail panel default).
|
|
9
|
+
*/
|
|
10
|
+
defaultLevel?: SubAgentBoxV2Level;
|
|
11
|
+
/** Suppress level 2 (inline messages) — useful when rendered inside the right rail. */
|
|
12
|
+
hideMessageLevel?: boolean;
|
|
13
|
+
onLinkClicked?: (link: string, content: string | null) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const SubAgentBoxV2: React.FC<SubAgentBoxV2Props>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TodoList } from '../../models/todoListModel';
|
|
3
|
+
export interface TaskListV2Props {
|
|
4
|
+
todoList: TodoList | null | undefined;
|
|
5
|
+
/** Compact mode: smaller paddings. */
|
|
6
|
+
dense?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TaskListV2: React.FC<TaskListV2Props>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type IconProps = React.SVGProps<SVGSVGElement> & {
|
|
3
|
+
size?: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const SendIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
6
|
+
export declare const SearchIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
export declare const ChatIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
8
|
+
export declare const ChartIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
9
|
+
export declare const TableIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
10
|
+
export declare const PlusIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
11
|
+
export declare const PanelIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
export declare const SparkleIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
export declare const CheckIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
14
|
+
export declare const ChevronIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
export declare const ChevronRightIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
export declare const TrashIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
17
|
+
export declare const PinIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
18
|
+
export declare const BrainIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
19
|
+
export declare const DashboardIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
20
|
+
export declare const DataExplorerIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
21
|
+
export declare const ComposerIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
22
|
+
export declare const CloseIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
23
|
+
export declare const PauseIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
24
|
+
export declare const StopIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
25
|
+
export declare const HistoryIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
26
|
+
export declare const MenuIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
export declare const FileIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
28
|
+
export declare const TerminalIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
29
|
+
export declare const CodeIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
30
|
+
export declare const GlobeIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
31
|
+
export declare const UsersIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
32
|
+
export declare const ListCheckIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
33
|
+
export declare const LockOpenIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
34
|
+
export declare const LockClosedIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
35
|
+
export declare const ToolIcon: {
|
|
36
|
+
readonly list_tables: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
37
|
+
readonly describe_schema: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
38
|
+
readonly run_query: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
39
|
+
readonly render_chart: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
40
|
+
readonly generic: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export { v2Theme, V2_CHART_PALETTE } from '../../themes';
|
|
2
|
+
export type { V2Theme } from '../../themes';
|
|
3
|
+
export * from './icons';
|
|
4
|
+
export * from './styles';
|
|
5
|
+
export { Sparkline } from './Sparkline';
|
|
6
|
+
export type { SparklineProps } from './Sparkline';
|
|
7
|
+
export { AppShellV2 } from './AppShellV2';
|
|
8
|
+
export type { AppShellV2Props } from './AppShellV2';
|
|
9
|
+
export { AppRailV2 } from './AppRailV2';
|
|
10
|
+
export type { AppRailV2Props, AppRailV2View } from './AppRailV2';
|
|
11
|
+
export { AppBarV2, APPBAR_V2_HEIGHT } from './AppBarV2';
|
|
12
|
+
export type { AppBarV2Props } from './AppBarV2';
|
|
13
|
+
export { MobileDrawerV2, MOBILE_NAV_DEFAULT, } from './MobileDrawerV2';
|
|
14
|
+
export type { MobileDrawerV2Props, MobileDrawerV2NavItem } from './MobileDrawerV2';
|
|
15
|
+
export { useResponsiveLayout } from './useResponsiveLayout';
|
|
16
|
+
export type { ResponsiveLayout } from './useResponsiveLayout';
|
|
17
|
+
export { AiChatFloatingV2 } from './AiChatFloatingV2';
|
|
18
|
+
export { AiChatV2Pane } from './AiChatV2Pane';
|
|
19
|
+
export type { AiChatV2PaneProps } from './AiChatV2Pane';
|
|
20
|
+
export { PromptV2 } from './PromptV2';
|
|
21
|
+
export type { PromptTriggerItem } from './PromptV2';
|
|
22
|
+
export { LastPromptsV2 } from './LastPromptsV2';
|
|
23
|
+
export type { LastPromptsV2Props } from './LastPromptsV2';
|
|
24
|
+
export { ChatsHistoryV2 } from './ChatsHistoryV2';
|
|
25
|
+
export type { ChatsHistoryV2Props, ChatsHistoryV2Item, } from './ChatsHistoryV2';
|
|
26
|
+
export { TaskListV2 } from './TaskListV2';
|
|
27
|
+
export type { TaskListV2Props } from './TaskListV2';
|
|
28
|
+
export { SubAgentBoxV2 } from './SubAgentBoxV2';
|
|
29
|
+
export type { SubAgentBoxV2Props, SubAgentBoxV2Level } from './SubAgentBoxV2';
|
|
30
|
+
export { AgentActivityV2 } from './AgentActivityV2';
|
|
31
|
+
export type { AgentActivityV2Props } from './AgentActivityV2';
|
|
32
|
+
export { RunProgressPanelV2 } from './RunProgressPanelV2';
|
|
33
|
+
export type { RunProgressPanelV2Props } from './RunProgressPanelV2';
|
|
34
|
+
export { RunProgressStripV2 } from './RunProgressStripV2';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
export declare const v2Chip: SxProps<Theme>;
|
|
3
|
+
export declare const v2IconBtn: SxProps<Theme>;
|
|
4
|
+
export declare const v2Card: SxProps<Theme>;
|
|
5
|
+
export declare const v2MonoMeta: SxProps<Theme>;
|
|
6
|
+
export declare const v2SectionLabel: SxProps<Theme>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ToolCategoryId = 'sql' | 'files' | 'shell' | 'python' | 'dashboard' | 'web' | 'memory' | 'subagent' | 'tasks' | 'scripts' | 'other';
|
|
3
|
+
export interface ToolCategoryMeta {
|
|
4
|
+
id: ToolCategoryId;
|
|
5
|
+
label: string;
|
|
6
|
+
Icon: React.FC<React.SVGProps<SVGSVGElement> & {
|
|
7
|
+
size?: number;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare const TOOL_CATEGORIES: Record<ToolCategoryId, ToolCategoryMeta>;
|
|
11
|
+
export declare const CATEGORY_ORDER: ToolCategoryId[];
|
|
12
|
+
/**
|
|
13
|
+
* Resolve a tool name to its visual category. Mirrors the skill-prefix
|
|
14
|
+
* stripping that `getFriendlyLabel` performs (e.g.
|
|
15
|
+
* "imagedescription-analyze_image"), so plugin-namespaced tools still
|
|
16
|
+
* land in the right bucket even when only the short form is registered.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getToolCategory(toolName: string | undefined): ToolCategoryId;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ResponsiveLayout {
|
|
2
|
+
/** xs only — phones. */
|
|
3
|
+
mobile: boolean;
|
|
4
|
+
/** sm or md — tablets / small laptops. */
|
|
5
|
+
tablet: boolean;
|
|
6
|
+
/** lg and up — desktop chrome. */
|
|
7
|
+
desktop: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function useResponsiveLayout(): ResponsiveLayout;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as useInterval } from './useIntervalHook';
|
|
2
|
+
export { useContainerWidth, useContainerRectangle } from './useContainerWidth';
|
|
3
|
+
export { useChatSessions } from './useChatSessions';
|
|
4
|
+
export type { UseChatSessionsOptions, UseChatSessionsResult, ChatSessionListItem, ChatSessionGroup, } from './useChatSessions';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ChatSession } from '../models/ChatSession';
|
|
2
|
+
import { ISessionService } from '../services/servers/sessionService/ISessionService';
|
|
3
|
+
/**
|
|
4
|
+
* One row in a session-picker UI. `raw` is the original ChatSession the
|
|
5
|
+
* server returned; everything else is a derived label the hook computed
|
|
6
|
+
* (and the host's `decorate` callback may have overridden).
|
|
7
|
+
*/
|
|
8
|
+
export interface ChatSessionListItem {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
snippet?: string;
|
|
12
|
+
/** Compact relative-time label ("now", "5m", "2h", "Mar 14"). */
|
|
13
|
+
timeLabel?: string;
|
|
14
|
+
/** Optional per-row tag — host-supplied via the `decorate` callback. */
|
|
15
|
+
kind?: string;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
raw: ChatSession;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Sessions bucketed by recency. The order of `label` reflects display
|
|
21
|
+
* order top-down ("Today" first, "Older" last).
|
|
22
|
+
*/
|
|
23
|
+
export interface ChatSessionGroup {
|
|
24
|
+
label: string;
|
|
25
|
+
items: ChatSessionListItem[];
|
|
26
|
+
}
|
|
27
|
+
export interface UseChatSessionsOptions {
|
|
28
|
+
sessionService?: ISessionService;
|
|
29
|
+
/**
|
|
30
|
+
* If provided, the live (current) session is merged into the list —
|
|
31
|
+
* replacing an existing entry by id, or prepended if not yet on the
|
|
32
|
+
* server. Lets a "New chat" row appear instantly without waiting for
|
|
33
|
+
* the server roundtrip.
|
|
34
|
+
*/
|
|
35
|
+
liveSession?: ChatSession | null;
|
|
36
|
+
accessToken: string;
|
|
37
|
+
serverBaseUrl: string;
|
|
38
|
+
/**
|
|
39
|
+
* Per-row override hook. Whatever fields you return are merged on top
|
|
40
|
+
* of the hook's computed item — typical use is adding a `kind` tag for
|
|
41
|
+
* application-specific session types (`'chat' | 'composer' | ...`) the
|
|
42
|
+
* library doesn't know about.
|
|
43
|
+
*/
|
|
44
|
+
decorate?: (session: ChatSession) => Partial<ChatSessionListItem>;
|
|
45
|
+
}
|
|
46
|
+
export interface UseChatSessionsResult {
|
|
47
|
+
/** Flat list (live session merged in, server order preserved). */
|
|
48
|
+
sessions: ChatSession[];
|
|
49
|
+
/** Same data bucketed by recency. */
|
|
50
|
+
groups: ChatSessionGroup[];
|
|
51
|
+
isLoading: boolean;
|
|
52
|
+
error: Error | null;
|
|
53
|
+
refresh: () => Promise<void>;
|
|
54
|
+
/** Optimistic rename — patches local state immediately, rolls back on failure. */
|
|
55
|
+
rename: (id: string, title: string) => Promise<void>;
|
|
56
|
+
/** Optimistic remove — drops from local state immediately, rolls back on failure. */
|
|
57
|
+
remove: (id: string) => Promise<void>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Fetch + organise the user's chat sessions for a picker UI. Backend-agnostic
|
|
61
|
+
* — the host injects an `ISessionService` so the same hook drives an HTTP
|
|
62
|
+
* client, an in-memory fake, or whatever else.
|
|
63
|
+
*
|
|
64
|
+
* Replaces the duplicated `useEffect(async () => sessionService.getAllSessions())`
|
|
65
|
+
* + grouping logic that lived in DataExplorerViewV2 and MobileSessionsList,
|
|
66
|
+
* and consolidates the optimistic rename/delete pattern.
|
|
67
|
+
*/
|
|
68
|
+
export declare function useChatSessions(opts: UseChatSessionsOptions): UseChatSessionsResult;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function useContainerWidth(ref: React.RefObject<HTMLElement | null>, renderId: string, initialWidth?: number): number;
|
|
2
|
+
export declare function useContainerRectangle(ref: React.RefObject<HTMLElement | null>, renderId: string, initialWidth?: number, initialHeight?: number): number[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface Memory {
|
|
2
|
+
id: string;
|
|
3
|
+
text: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
displayName?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
createTime?: Date;
|
|
8
|
+
updateTime?: Date;
|
|
9
|
+
fact?: string;
|
|
10
|
+
userOwner?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IMemoryService {
|
|
13
|
+
/**
|
|
14
|
+
* Lists all memories ordered by creation date
|
|
15
|
+
* @returns Promise<Memory[]> - Array of memory objects
|
|
16
|
+
*/
|
|
17
|
+
list(): Promise<Memory[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Searches memories by query string
|
|
20
|
+
* @param query - Search query string
|
|
21
|
+
* @returns Promise<Memory[]> - Array of matching memory objects
|
|
22
|
+
*/
|
|
23
|
+
search(query: string): Promise<Memory[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Updates an existing memory with new fact text
|
|
26
|
+
* @param memory - The memory to update
|
|
27
|
+
* @param fact - New fact text to update
|
|
28
|
+
* @returns Promise<Memory> - The updated memory
|
|
29
|
+
*/
|
|
30
|
+
update(memory: Memory): Promise<Memory>;
|
|
31
|
+
/**
|
|
32
|
+
* Removes a memory by its ID
|
|
33
|
+
* @param id - The ID of the memory to remove
|
|
34
|
+
* @returns Promise<boolean> - True if successfully removed
|
|
35
|
+
*/
|
|
36
|
+
delete(id: string): Promise<boolean>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { User } from '../models/contexts';
|
|
2
|
+
import { IDBStorable } from '../models/IDBStorable';
|
|
3
|
+
export type ScheduleType = "EveryHour" | "SpecificHours";
|
|
4
|
+
export type Score = 'Péssimo' | 'Ruim' | 'Atendeu as expectativas' | 'Muito Bom' | 'Extraordinário';
|
|
5
|
+
export declare const Score: {
|
|
6
|
+
readonly Pessimo: "Péssimo";
|
|
7
|
+
readonly Ruim: "Ruim";
|
|
8
|
+
readonly Atendeu_as_expectativas: "Atendeu as expectativas";
|
|
9
|
+
readonly Muito_Bom: "Muito Bom";
|
|
10
|
+
readonly Extraordinario: "Extraordinário";
|
|
11
|
+
};
|
|
12
|
+
export interface ScheduledAgentRun {
|
|
13
|
+
created: Date;
|
|
14
|
+
vizGenerated: number;
|
|
15
|
+
imagesGenerated: number;
|
|
16
|
+
score: Score;
|
|
17
|
+
response: string;
|
|
18
|
+
review?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ScheduledAgent extends IDBStorable {
|
|
21
|
+
name: string;
|
|
22
|
+
analyticsScriptId?: string;
|
|
23
|
+
dashboardId?: string;
|
|
24
|
+
historyLimit?: number;
|
|
25
|
+
telegramChatId: string | null;
|
|
26
|
+
prompt?: string;
|
|
27
|
+
modelName: string;
|
|
28
|
+
creationDate: Date;
|
|
29
|
+
cronDefinition?: string;
|
|
30
|
+
phoneNumber?: string;
|
|
31
|
+
email: string;
|
|
32
|
+
owner: User | null;
|
|
33
|
+
historyRuns?: ScheduledAgentRun[];
|
|
34
|
+
agentId?: string;
|
|
35
|
+
modelId?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ISchedulingService {
|
|
38
|
+
/**
|
|
39
|
+
* Lists all scheduled agents
|
|
40
|
+
* @returns Promise<ScheduledAgent[]> - Array of scheduled agent objects
|
|
41
|
+
*/
|
|
42
|
+
list(): Promise<ScheduledAgent[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Lists scheduled agents filtered by dashboardId
|
|
45
|
+
*/
|
|
46
|
+
listByDashboard(dashboardId: string): Promise<ScheduledAgent[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new scheduled agent or edits an existing one
|
|
49
|
+
* @param agent - ScheduledAgent object to create or update
|
|
50
|
+
* @returns Promise<ScheduledAgent> - The created or updated scheduled agent
|
|
51
|
+
*/
|
|
52
|
+
createOrEdit(agent: ScheduledAgent): Promise<ScheduledAgent>;
|
|
53
|
+
/**
|
|
54
|
+
* Removes a scheduled agent by its ID
|
|
55
|
+
* @param id - The ID of the scheduled agent to remove
|
|
56
|
+
* @returns Promise<boolean> - True if successfully removed
|
|
57
|
+
*/
|
|
58
|
+
remove(id: string): Promise<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Initializes the scheduled agents service
|
|
61
|
+
* @returns Promise<void> - Promise to initialize the scheduled agents service
|
|
62
|
+
*/
|
|
63
|
+
init(): Promise<void>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type AgentKind = 'ExplorerAgent' | 'DashboardAgent' | 'Unknown';
|
|
2
|
+
export declare const AgentKind: {
|
|
3
|
+
readonly ExplorerAgent: AgentKind;
|
|
4
|
+
readonly DashboardAgent: AgentKind;
|
|
5
|
+
readonly Unknown: AgentKind;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Agent model - represents an AI agent configuration
|
|
9
|
+
* Mirrors the .NET Agent entity in Envision.SemanticKernel.Models.Agent
|
|
10
|
+
*/
|
|
11
|
+
export interface Agent {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
type?: AgentKind;
|
|
15
|
+
defaultModelId?: string;
|
|
16
|
+
defaultQuickModelId?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
muiIconName?: string;
|
|
19
|
+
embeddingConfigurationId: string;
|
|
20
|
+
agentImplementation?: string;
|
|
21
|
+
agentBootStrapImplementation?: string;
|
|
22
|
+
parameters?: Record<string, string>;
|
|
23
|
+
plugins: string[];
|
|
24
|
+
/** List of additional main instruction IDs (Category: Main or Generic) for this agent */
|
|
25
|
+
mainInstructionIds?: string[];
|
|
26
|
+
lastUpdated?: Date;
|
|
27
|
+
created?: Date;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Partial agent for listing purposes (only essential fields)
|
|
31
|
+
*/
|
|
32
|
+
export type AgentSummary = Pick<Agent, 'id' | 'name' | 'description' | 'muiIconName' | 'type'>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { IDBStorable } from './IDBStorable';
|
|
3
|
+
export type ArtifactType = 'Chart' | 'Code' | 'Dashboard';
|
|
4
|
+
export declare const ArtifactType: {
|
|
5
|
+
readonly Dashboard: "Dashboard";
|
|
6
|
+
readonly Chart: "Chart";
|
|
7
|
+
readonly Code: "Code";
|
|
8
|
+
};
|
|
9
|
+
export interface Artifact extends IDBStorable {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
src?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
mimeType?: string;
|
|
16
|
+
data?: any;
|
|
17
|
+
dataAsString?: string;
|
|
18
|
+
html?: string | null;
|
|
19
|
+
loadingPromise?: Promise<Artifact | null> | null;
|
|
20
|
+
component?: JSX.Element;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Artifact } from './Artifact';
|
|
2
|
+
import { ArtifactType } from './enums';
|
|
3
|
+
export interface ArtifactImage {
|
|
4
|
+
mime_type: string;
|
|
5
|
+
data: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ArtifactData {
|
|
8
|
+
agentServerBaseUrl?: string;
|
|
9
|
+
mime_type: string;
|
|
10
|
+
id: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
original_file_name?: string;
|
|
13
|
+
identifierToReplace: string;
|
|
14
|
+
inline_data?: ArtifactImage;
|
|
15
|
+
html?: string;
|
|
16
|
+
reasoning?: string;
|
|
17
|
+
type: ArtifactType;
|
|
18
|
+
created: string;
|
|
19
|
+
sectionId: string;
|
|
20
|
+
interactionId: string;
|
|
21
|
+
interactionQuestion?: string;
|
|
22
|
+
loadingPromise: Promise<Artifact | null> | null;
|
|
23
|
+
}
|
|
24
|
+
export interface Section {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
isDefault: boolean;
|
|
28
|
+
created: string;
|
|
29
|
+
iconType?: 'dashboard' | 'chart' | 'folder';
|
|
30
|
+
}
|