@copilotkit/react-core 2.0.0-rc.1 → 2.0.0-rc.3
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/{MarkdownSurfaces-ChSlVYOk.mjs → MarkdownSurfaces-Bd--93O1.mjs} +30 -9
- package/dist/MarkdownSurfaces-Bd--93O1.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-C2XZISKn.cjs → MarkdownSurfaces-S4wfUl3J.cjs} +35 -8
- package/dist/MarkdownSurfaces-S4wfUl3J.cjs.map +1 -0
- package/dist/generative-ui.cjs +1 -1
- package/dist/generative-ui.mjs +1 -1
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.mjs.map +1 -1
- package/dist/index.cjs +426 -432
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +33 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +427 -434
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +451 -432
- package/dist/index.umd.js.map +1 -1
- package/package.json +12 -26
- package/dist/MarkdownSurfaces-C2XZISKn.cjs.map +0 -1
- package/dist/MarkdownSurfaces-ChSlVYOk.mjs.map +0 -1
- package/dist/index.css +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { A as GenerativeUIError, B as renderSlot, C as issueKey, D as getMarkdownSurfaceSource, E as containsDynamicValue, F as toJsonSchema, G as
|
|
4
|
-
import "./index.css";
|
|
3
|
+
import { A as GenerativeUIError, B as renderSlot, C as issueKey, D as getMarkdownSurfaceSource, E as containsDynamicValue, F as toJsonSchema, G as useCopilotChatConfiguration, H as ControlledModalOpenScope, I as defineToolCallRenderer, K as useShallowStableRef, L as MarkdownRendererProvider, M as catalogIdsOf, N as componentCatalogIds, O as BASIC_FUNCTIONS, R as useMarkdownRenderer, S as isAsyncIssue, T as withoutRejectedNulls, U as CopilotChatConfigurationProvider, V as cn, W as CopilotChatDefaultLabels, a as GenerativeUIToolCallRenderer, i as GenerativeUIChatSlotContext, j as isRecord, k as ExpressionError, o as createGenerativeUIActivityRenderer, q as StreamingMarkdownDefaultRenderer, s as createGenerativeUIFunctionCallActivityRenderer, t as MarkdownSurfaces, v as GenerativeUIRuntimeContext, w as validateSchemaSync, x as formatIssues, y as useGenerativeUIRuntime, z as isReactComponentType } from "./MarkdownSurfaces-Bd--93O1.mjs";
|
|
5
4
|
import { A2UI_FENCE_LANGUAGE, AgentRegistry, AgentThreadLockedError, ContextStore, CopilotKitCore, CopilotKitCore as CopilotKitCore$1, CopilotKitCoreErrorCode, CopilotKitCoreErrorCode as CopilotKitCoreErrorCode$1, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreRuntimeConnectionStatus as CopilotKitCoreRuntimeConnectionStatus$1, CopilotKitHeaderResolutionError, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, IntelligenceAgent, MEMORY_ERROR_REGISTRY, MemoryError, ProxiedCopilotRuntimeAgent, ProxiedCopilotRuntimeAgent as ProxiedCopilotRuntimeAgent$1, RunHandler, StateManager, SuggestionEngine, ToolCallStatus, ToolCallStatus as ToolCallStatus$1, WebMCPRegistry, classifySurfaceCards, completePartialMarkdown, createActionGroup, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, emitInspectorActiveThread, emitInspectorActiveThread as emitInspectorActiveThread$1, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, emitInspectorViewThreadResult as emitInspectorViewThreadResult$1, empty, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getMarkdownOperationSurfaceId, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInspectorThreadBridgeEnabled as isInspectorThreadBridgeEnabled$1, isRunCompletionAware, isRunCompletionAware as isRunCompletionAware$1, ofType, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorStopViewing as onInspectorStopViewing$1, onInspectorViewThread, onInspectorViewThread as onInspectorViewThread$1, onInspectorViewThreadResult, parseMarkdown, parseMarkdown as parseMarkdown$1, parseToolArguments, prepareSurfaceOperations, props, segmentSurfaceProse, select, splitA2UIMarkdown, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵInterruptState as ɵInterruptState$1, ɵMAX_SOCKET_RETRIES, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵclearAgentInterruptState as ɵclearAgentInterruptState$1, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵcreateThreadStore as ɵcreateThreadStore$1, ɵgetAgentInterruptState, ɵgetAgentInterruptState as ɵgetAgentInterruptState$1, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisHttpAgent as ɵisHttpAgent$1, ɵisRetryableMemoryStatus, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵselectFetchMoreError, ɵselectFetchMoreError as ɵselectFetchMoreError$1, ɵselectHasNextPage, ɵselectHasNextPage as ɵselectHasNextPage$1, ɵselectIsFetchingNextPage, ɵselectIsFetchingNextPage as ɵselectIsFetchingNextPage$1, ɵselectIsMutating, ɵselectIsMutating as ɵselectIsMutating$1, ɵselectMemories, ɵselectMemories as ɵselectMemories$1, ɵselectMemoriesAvailable, ɵselectMemoriesAvailable as ɵselectMemoriesAvailable$1, ɵselectMemoriesError, ɵselectMemoriesError as ɵselectMemoriesError$1, ɵselectMemoriesIsLoading, ɵselectMemoriesIsLoading as ɵselectMemoriesIsLoading$1, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectMemoriesRealtimeStatus as ɵselectMemoriesRealtimeStatus$1, ɵselectThreads, ɵselectThreads as ɵselectThreads$1, ɵselectThreadsError, ɵselectThreadsError as ɵselectThreadsError$1, ɵselectThreadsIsLoading, ɵselectThreadsIsLoading as ɵselectThreadsIsLoading$1, ɵthreadAdapterEvents, ɵwithHeaderDefaults, ɵwithHeaderDefaults as ɵwithHeaderDefaults$1 } from "@copilotkit/core";
|
|
6
5
|
import { ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, AGUI_METADATA_KEY, AbstractAgent, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, CompatibilityBoundary, DebugLogger, EventType, FilterToolCallsMiddleware, FunctionMiddleware, HttpAgent, Middleware, PROTOCOL_VERSION, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, compactEvents, contentHasMedia, contentToText, convertToLegacyEvents, createDebugLogger, defaultApplyEvents, enforceEvents, enforceOutgoingInput, getRunOutcome, isInterruptExpired, isRecognizedEvent, mergeMetadata, omitOptionalNulls, parseProtoStream, parseSSEStream, randomUUID, randomUUID as randomUUID$1, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, verifyEvents, withAuthoritativeActivityTypes } from "@ag-ui/client";
|
|
7
6
|
import { ActivityDeltaEventSchema, ActivityMessageSchema, ActivitySnapshotEventSchema, AddOperationSchema, AgentCapabilitiesSchema, AssistantMessageSchema, AttributableSchema, AudioInputContentSchema, AudioInputPartSchema, AudioPartSchema, BaseEventSchema, BaseMessageSchema, ContentPartSchema, ContextSchema, CopyOperationSchema, CustomEventSchema, DataSourceSchema, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FunctionCallSchema, HumanInTheLoopCapabilitiesSchema, IdentityCapabilitiesSchema, ImageInputContentSchema, ImageInputPartSchema, ImagePartSchema, InputContentDataSourceSchema, InputContentSchema, InputContentSourceSchema, InputContentUrlSourceSchema, InterruptSchema, JsonPatchOperationSchema, JsonPatchSchema, JsonPointerSchema, MessageSchema, MessagesSnapshotEventSchema, MetadataSchema, MoveOperationSchema, MultiAgentCapabilitiesSchema, MultimodalCapabilitiesSchema, MultimodalInputCapabilitiesSchema, MultimodalOutputCapabilitiesSchema, OptionalMetadataSchema, OutputCapabilitiesSchema, PartSourceSchema, RawEventSchema, ReasoningCapabilitiesSchema, ReasoningEncryptedValueEventSchema, ReasoningEncryptedValueSubtypeSchema, ReasoningEndEventSchema, ReasoningMessageChunkEventSchema, ReasoningMessageContentEventSchema, ReasoningMessageEndEventSchema, ReasoningMessageSchema, ReasoningMessageStartEventSchema, ReasoningStartEventSchema, RemoveOperationSchema, ReplaceOperationSchema, ResumeEntrySchema, RoleSchema, RunAgentInputSchema, RunErrorEventSchema, RunFinishedCancelledOutcomeSchema, RunFinishedEventSchema, RunFinishedInterruptOutcomeSchema, RunFinishedOutcomeSchema, RunFinishedSuccessOutcomeSchema, RunStartedEventSchema, StateCapabilitiesSchema, StateDeltaEventSchema, StateSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, SubagentErrorEventSchema, SubagentFinishedEventSchema, SubagentFinishedOutcomeSchema, SubagentFinishedSuccessOutcomeSchema, SubagentFinishedSuspendedOutcomeSchema, SubagentInfoSchema, SubagentRunIdSchema, SubagentStartedEventSchema, SystemMessageSchema, TestOperationSchema, TextInputContentSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageRoleSchema, TextMessageStartEventSchema, TextPartSchema, TokenUsageSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallSchema, ToolCallStartEventSchema, ToolMessageSchema, ToolSchema, ToolsCapabilitiesSchema, TransportCapabilitiesSchema, UrlSourceSchema, UserMessageSchema, VideoInputContentSchema, VideoInputPartSchema, VideoPartSchema } from "@ag-ui/core/schemas";
|
|
8
7
|
import * as React$1 from "react";
|
|
9
|
-
import React, { Fragment, createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
8
|
+
import React, { Fragment, createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, version } from "react";
|
|
10
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { extendTailwindMerge, twMerge } from "tailwind-merge";
|
|
12
10
|
import { ArrowUp, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronRightIcon, Circle, Copy, Edit, EyeOff, Loader2, MessageCircle, Mic, PanelLeftOpen, Play, Plus, RefreshCw, Square, ThumbsDown, ThumbsUp, Upload, Volume2, Wrench, X } from "lucide-react";
|
|
13
11
|
import { A2UI_COMPONENT_ENVELOPE_KEYS, A2UI_DEFAULT_DESIGN_GUIDELINES, A2UI_DEFAULT_GENERATION_GUIDELINES, A2UI_VERSION, COPILOTKIT_FORWARDED_PROPS_KEY, COPILOTKIT_UI_ENVELOPE_FORMAT, DEFAULT_AGENT_ID, GENERATE_SANDBOXED_UI_DESCRIPTION, GENERATIVE_UI_ACTIVITY_TYPE, GENERATIVE_UI_AGENT_FUNCTION_CALLS, GENERATIVE_UI_AGENT_FUNCTION_CALLS_OFF_REASON, GENERATIVE_UI_CHAT_TARGET, GENERATIVE_UI_FUNCTIONS, GENERATIVE_UI_FUNCTION_CALL_ACTIVITY_TYPE, GENERATIVE_UI_MARKDOWN_GUIDELINES_DESCRIPTION, GENERATIVE_UI_MARKDOWN_SCHEMA_CONTEXT_DESCRIPTION, GENERATIVE_UI_MAX_REJECTION_LENGTH, GENERATIVE_UI_MAX_SUMMARY_REJECTIONS, TranscriptionErrorCode, TranscriptionErrorCode as TranscriptionErrorCode$1, buildGenerativeUIMarkdownGuidelines, buildGenerativeUIPrompt, callerProblem, childRefKind, commitRowKeyStore, copyToClipboard, createAttachmentContent, createLicenseContextValue, createRowKeyStore, envelopeToManifest, exceedsMaxSize, formatFileSize, functionCallers, generateVideoThumbnail, generativeUIGuideFeatures, getDocumentIcon, getModalityFromMimeType, getOperationKind, getOperationSurfaceId, getSourceUrl, matchesAcceptFilter, partialJSONParse, randomUUID as randomUUID$2, readFileAsBase64, resolveRowRenderKeysById, schemaToJsonSchema, shouldEnableInspector, toA2UIActionMessage, validateOperation } from "@copilotkit/shared";
|
|
14
12
|
import { CopilotKitAgentIdContext, CopilotKitContext, LicenseContext, useCopilotKit, useCopilotKit as useCopilotKit$1, useDefaultAgentId, useLicenseContext, useLicenseContext as useLicenseContext$1 } from "@copilotkit/react-core/context";
|
|
15
13
|
import { Slot } from "@radix-ui/react-slot";
|
|
16
|
-
import { cva } from "class-variance-authority";
|
|
17
|
-
import { clsx } from "clsx";
|
|
18
14
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
19
15
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
20
16
|
import { contentToText as contentToText$1 } from "@ag-ui/core";
|
|
@@ -23,6 +19,7 @@ import { MCPAppsActivityContentSchema, MCPAppsActivityType, ɵrunMcpFollowUp } f
|
|
|
23
19
|
import { A2UIProvider, A2UIRenderer, A2UI_SCHEMA_CONTEXT_DESCRIPTION, Catalog, DEFAULT_SURFACE_ID, ROOT_COMPONENT_ID, buildCatalogContextValue, defaultTheme as a2uiDefaultTheme, extractCatalogComponentSchemas, filterCatalog, initializeDefaultCatalog, injectStyles, useA2UIActions, useA2UIError, viewerTheme } from "@copilotkit/a2ui-renderer";
|
|
24
20
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
25
21
|
import { Catalog as Catalog$1, ComponentModel, DataModel, SurfaceModel } from "@a2ui/web_core/v0_9";
|
|
22
|
+
import { stylesheet } from "@copilotkit/core/styles";
|
|
26
23
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
27
24
|
import { createPortal, flushSync } from "react-dom";
|
|
28
25
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
@@ -63,7 +60,7 @@ function renderInline(tokens) {
|
|
|
63
60
|
case "em": return /* @__PURE__ */ jsx("em", { children: renderInline(token.tokens) }, i);
|
|
64
61
|
case "del": return /* @__PURE__ */ jsx("del", { children: renderInline(token.tokens) }, i);
|
|
65
62
|
case "codespan": return /* @__PURE__ */ jsx("code", {
|
|
66
|
-
className: "cpk
|
|
63
|
+
className: "cpk-markdown-inline-code",
|
|
67
64
|
children: token.text
|
|
68
65
|
}, i);
|
|
69
66
|
case "br": return /* @__PURE__ */ jsx("br", {}, i);
|
|
@@ -81,7 +78,7 @@ function renderInline(tokens) {
|
|
|
81
78
|
return /* @__PURE__ */ jsx("img", {
|
|
82
79
|
src: sanitizeImgSrc(img.href),
|
|
83
80
|
alt: img.text,
|
|
84
|
-
className: "cpk
|
|
81
|
+
className: "cpk-markdown-image"
|
|
85
82
|
}, i);
|
|
86
83
|
}
|
|
87
84
|
case "escape": return token.text;
|
|
@@ -101,7 +98,7 @@ function BlockToken({ token }) {
|
|
|
101
98
|
case "code": {
|
|
102
99
|
const c = token;
|
|
103
100
|
return /* @__PURE__ */ jsx("pre", {
|
|
104
|
-
className: "cpk
|
|
101
|
+
className: "cpk-markdown-code-block",
|
|
105
102
|
children: /* @__PURE__ */ jsx("code", {
|
|
106
103
|
"data-language": c.lang || void 0,
|
|
107
104
|
children: c.text
|
|
@@ -120,7 +117,7 @@ function BlockToken({ token }) {
|
|
|
120
117
|
case "table": {
|
|
121
118
|
const tbl = token;
|
|
122
119
|
return /* @__PURE__ */ jsx("div", {
|
|
123
|
-
className: "cpk
|
|
120
|
+
className: "cpk-markdown-table-container",
|
|
124
121
|
children: /* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: tbl.header.map((cell, i) => /* @__PURE__ */ jsx("th", { children: renderInline(cell.tokens) }, i)) }) }), /* @__PURE__ */ jsx("tbody", { children: tbl.rows.map((row, i) => /* @__PURE__ */ jsx("tr", { children: row.map((cell, j) => /* @__PURE__ */ jsx("td", { children: renderInline(cell.tokens) }, j)) }, i)) })] })
|
|
125
122
|
});
|
|
126
123
|
}
|
|
@@ -133,85 +130,43 @@ function BlockToken({ token }) {
|
|
|
133
130
|
}
|
|
134
131
|
BasicMarkdownRenderer.displayName = "BasicMarkdownRenderer";
|
|
135
132
|
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/lib/utils.ts
|
|
138
|
-
const twMerge$1 = extendTailwindMerge({ prefix: "cpk" });
|
|
139
|
-
function cn(...inputs) {
|
|
140
|
-
return twMerge$1(clsx(inputs));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
133
|
//#endregion
|
|
144
134
|
//#region src/components/ui/button.tsx
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"cpk:disabled:cursor-not-allowed cpk:disabled:bg-[#00000014] cpk:disabled:text-[rgb(13,13,13)]",
|
|
172
|
-
"cpk:dark:disabled:bg-[#454545] cpk:dark:disabled:text-white "
|
|
173
|
-
],
|
|
174
|
-
chatInputToolbarSecondary: [
|
|
175
|
-
"cpk:cursor-pointer",
|
|
176
|
-
"cpk:bg-transparent cpk:text-[#444444]",
|
|
177
|
-
"cpk:dark:text-white cpk:dark:border-[#404040]",
|
|
178
|
-
"cpk:rounded-full",
|
|
179
|
-
"cpk:transition-colors",
|
|
180
|
-
"cpk:focus:outline-none",
|
|
181
|
-
"cpk:hover:bg-[#f8f8f8] cpk:hover:text-[#333333]",
|
|
182
|
-
"cpk:dark:hover:bg-[#404040] cpk:dark:hover:text-[#FFFFFF]",
|
|
183
|
-
"cpk:disabled:cursor-not-allowed cpk:disabled:opacity-50",
|
|
184
|
-
"cpk:disabled:hover:bg-transparent cpk:disabled:hover:text-[#444444]",
|
|
185
|
-
"cpk:dark:disabled:hover:bg-transparent cpk:dark:disabled:hover:text-[#CCCCCC]"
|
|
186
|
-
]
|
|
187
|
-
},
|
|
188
|
-
size: {
|
|
189
|
-
default: "cpk:h-9 cpk:px-4 cpk:py-2 cpk:has-[>svg]:px-3",
|
|
190
|
-
sm: "cpk:h-8 cpk:rounded-md cpk:gap-1.5 cpk:px-3 cpk:has-[>svg]:px-2.5",
|
|
191
|
-
lg: "cpk:h-10 cpk:rounded-md cpk:px-6 cpk:has-[>svg]:px-4",
|
|
192
|
-
icon: "cpk:size-9",
|
|
193
|
-
chatInputToolbarIcon: ["cpk:h-9 cpk:w-9 cpk:rounded-full"],
|
|
194
|
-
chatInputToolbarIconLabel: [
|
|
195
|
-
"cpk:h-9 cpk:px-3 cpk:rounded-full",
|
|
196
|
-
"cpk:gap-2",
|
|
197
|
-
"cpk:font-normal"
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
defaultVariants: {
|
|
202
|
-
variant: "default",
|
|
203
|
-
size: "default"
|
|
204
|
-
}
|
|
205
|
-
});
|
|
135
|
+
const variantClasses = {
|
|
136
|
+
default: "cpk-button-default",
|
|
137
|
+
destructive: "cpk-button-destructive",
|
|
138
|
+
outline: "cpk-button-outline",
|
|
139
|
+
secondary: "cpk-button-secondary",
|
|
140
|
+
ghost: "cpk-button-ghost",
|
|
141
|
+
link: "cpk-button-link",
|
|
142
|
+
assistantMessageToolbarButton: "cpk-button-assistant-message-toolbar",
|
|
143
|
+
chatInputToolbarPrimary: "cpk-button-chat-input-toolbar-primary",
|
|
144
|
+
chatInputToolbarSecondary: "cpk-button-chat-input-toolbar-secondary"
|
|
145
|
+
};
|
|
146
|
+
const sizeClasses = {
|
|
147
|
+
default: "cpk-button-size-default",
|
|
148
|
+
sm: "cpk-button-size-sm",
|
|
149
|
+
lg: "cpk-button-size-lg",
|
|
150
|
+
icon: "cpk-button-size-icon",
|
|
151
|
+
chatInputToolbarIcon: "cpk-button-size-chat-input-toolbar-icon",
|
|
152
|
+
chatInputToolbarIconLabel: "cpk-button-size-chat-input-toolbar-icon-label"
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Returns the class names for a button with the given variant and size,
|
|
156
|
+
* followed by `className`.
|
|
157
|
+
*/
|
|
158
|
+
function buttonVariants({ variant, size, className, class: classProp } = {}) {
|
|
159
|
+
return cn("cpk-button", variant !== null && variantClasses[variant ?? "default"], size !== null && sizeClasses[size ?? "default"], classProp, className);
|
|
160
|
+
}
|
|
206
161
|
const Button = React$1.forwardRef(function Button({ className, variant, size, asChild = false, ...props }, ref) {
|
|
207
162
|
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
208
163
|
ref,
|
|
209
164
|
"data-slot": "button",
|
|
210
|
-
className:
|
|
165
|
+
className: buttonVariants({
|
|
211
166
|
variant,
|
|
212
167
|
size,
|
|
213
168
|
className
|
|
214
|
-
})
|
|
169
|
+
}),
|
|
215
170
|
...props
|
|
216
171
|
});
|
|
217
172
|
});
|
|
@@ -243,9 +198,9 @@ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
|
243
198
|
"data-copilotkit": true,
|
|
244
199
|
"data-slot": "tooltip-content",
|
|
245
200
|
sideOffset,
|
|
246
|
-
className: cn("cpk
|
|
201
|
+
className: cn("cpk-tooltip", className),
|
|
247
202
|
...props,
|
|
248
|
-
children: [children, /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "cpk
|
|
203
|
+
children: [children, /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "cpk-tooltip-arrow" })]
|
|
249
204
|
}) });
|
|
250
205
|
}
|
|
251
206
|
|
|
@@ -269,7 +224,7 @@ function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
|
269
224
|
"data-copilotkit": true,
|
|
270
225
|
"data-slot": "dropdown-menu-content",
|
|
271
226
|
sideOffset,
|
|
272
|
-
className: cn("cpk
|
|
227
|
+
className: cn("cpk-dropdown-menu-content", className),
|
|
273
228
|
...props
|
|
274
229
|
}) });
|
|
275
230
|
}
|
|
@@ -278,7 +233,7 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
278
233
|
"data-slot": "dropdown-menu-item",
|
|
279
234
|
"data-inset": inset,
|
|
280
235
|
"data-variant": variant,
|
|
281
|
-
className: cn("cpk
|
|
236
|
+
className: cn("cpk-dropdown-menu-item", className),
|
|
282
237
|
...props
|
|
283
238
|
});
|
|
284
239
|
}
|
|
@@ -286,14 +241,14 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
286
241
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
287
242
|
"data-slot": "dropdown-menu-label",
|
|
288
243
|
"data-inset": inset,
|
|
289
|
-
className: cn("cpk
|
|
244
|
+
className: cn("cpk-dropdown-menu-label", className),
|
|
290
245
|
...props
|
|
291
246
|
});
|
|
292
247
|
}
|
|
293
248
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
294
249
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
|
|
295
250
|
"data-slot": "dropdown-menu-separator",
|
|
296
|
-
className: cn("cpk
|
|
251
|
+
className: cn("cpk-dropdown-menu-separator", className),
|
|
297
252
|
...props
|
|
298
253
|
});
|
|
299
254
|
}
|
|
@@ -307,15 +262,15 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
307
262
|
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
|
|
308
263
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
309
264
|
"data-inset": inset,
|
|
310
|
-
className: cn("cpk
|
|
265
|
+
className: cn("cpk-dropdown-menu-sub-trigger", className),
|
|
311
266
|
...props,
|
|
312
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "cpk
|
|
267
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "cpk-dropdown-menu-sub-trigger-icon" })]
|
|
313
268
|
});
|
|
314
269
|
}
|
|
315
270
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
316
271
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
317
272
|
"data-slot": "dropdown-menu-sub-content",
|
|
318
|
-
className: cn("cpk
|
|
273
|
+
className: cn("cpk-dropdown-menu-sub-content", className),
|
|
319
274
|
...props
|
|
320
275
|
});
|
|
321
276
|
}
|
|
@@ -510,11 +465,11 @@ const CopilotChatAudioRecorder = forwardRef((props, ref) => {
|
|
|
510
465
|
cleanup
|
|
511
466
|
]);
|
|
512
467
|
return /* @__PURE__ */ jsx("div", {
|
|
513
|
-
className:
|
|
468
|
+
className: cn("cpk-audio-recorder", className),
|
|
514
469
|
...divProps,
|
|
515
470
|
children: /* @__PURE__ */ jsx("canvas", {
|
|
516
471
|
ref: canvasRef,
|
|
517
|
-
className: "cpk
|
|
472
|
+
className: "cpk-audio-recorder-canvas"
|
|
518
473
|
})
|
|
519
474
|
});
|
|
520
475
|
});
|
|
@@ -735,7 +690,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
735
690
|
isComposingRef.current = false;
|
|
736
691
|
},
|
|
737
692
|
autoFocus,
|
|
738
|
-
className:
|
|
693
|
+
className: isExpanded ? "cpk-chat-input-textarea-expanded" : "cpk-chat-input-textarea-compact"
|
|
739
694
|
});
|
|
740
695
|
const isProcessing = mode !== "transcribe" && isRunning;
|
|
741
696
|
const canSend = resolvedValue.trim().length > 0 && !!onSubmitMessage;
|
|
@@ -753,7 +708,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
753
708
|
onClick: handleSendButtonClick,
|
|
754
709
|
disabled: isProcessing ? !canStop : !canSend,
|
|
755
710
|
"aria-label": showsStop ? labels.chatInputToolbarStopButtonLabel : labels.chatInputToolbarSendButtonLabel,
|
|
756
|
-
children: showsStop ? /* @__PURE__ */ jsx(Square, { className: "cpk
|
|
711
|
+
children: showsStop ? /* @__PURE__ */ jsx(Square, { className: "cpk-chat-input-stop-icon" }) : void 0
|
|
757
712
|
});
|
|
758
713
|
const BoundStartTranscribeButton = renderSlot(startTranscribeButton, CopilotChatInput.StartTranscribeButton, { onClick: onStartTranscribe });
|
|
759
714
|
const BoundCancelTranscribeButton = renderSlot(cancelTranscribeButton, CopilotChatInput.CancelTranscribeButton, { onClick: onCancelTranscribe });
|
|
@@ -968,10 +923,10 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
968
923
|
role: "listbox",
|
|
969
924
|
"aria-label": labels.chatInputSlashMenuLabel,
|
|
970
925
|
ref: slashMenuRef,
|
|
971
|
-
className: "cpk
|
|
926
|
+
className: "cpk-chat-input-slash-menu",
|
|
972
927
|
style: { maxHeight: `${SLASH_MENU_MAX_VISIBLE_ITEMS * SLASH_MENU_ITEM_HEIGHT_PX}px` },
|
|
973
928
|
children: filteredCommands.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
974
|
-
className: "cpk
|
|
929
|
+
className: "cpk-chat-input-slash-menu-empty",
|
|
975
930
|
children: labels.chatInputSlashMenuEmptyText
|
|
976
931
|
}) : filteredCommands.map((item, index) => {
|
|
977
932
|
const isActive = index === slashHighlightIndex;
|
|
@@ -981,7 +936,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
981
936
|
"aria-selected": isActive,
|
|
982
937
|
"data-active": isActive ? "true" : void 0,
|
|
983
938
|
"data-slash-index": index,
|
|
984
|
-
className:
|
|
939
|
+
className: "cpk-chat-input-slash-menu-item",
|
|
985
940
|
onMouseEnter: () => setSlashHighlightIndex(index),
|
|
986
941
|
onMouseDown: (event) => {
|
|
987
942
|
event.preventDefault();
|
|
@@ -993,29 +948,29 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
993
948
|
}) : null;
|
|
994
949
|
const inputPill = /* @__PURE__ */ jsx("div", {
|
|
995
950
|
"data-testid": "copilot-chat-input",
|
|
996
|
-
className:
|
|
951
|
+
className: "copilotKitInput cpk-chat-input-pill",
|
|
997
952
|
onClick: handleContainerClick,
|
|
998
953
|
"data-layout": isExpanded ? "expanded" : "compact",
|
|
999
954
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1000
955
|
ref: gridRef,
|
|
1001
|
-
className:
|
|
956
|
+
className: "cpk-chat-input-grid",
|
|
1002
957
|
"data-layout": isExpanded ? "expanded" : "compact",
|
|
1003
958
|
children: [
|
|
1004
959
|
/* @__PURE__ */ jsx("div", {
|
|
1005
960
|
ref: addButtonContainerRef,
|
|
1006
|
-
className:
|
|
961
|
+
className: "cpk-chat-input-start",
|
|
1007
962
|
children: BoundAddMenuButton
|
|
1008
963
|
}),
|
|
1009
964
|
/* @__PURE__ */ jsx("div", {
|
|
1010
|
-
className:
|
|
965
|
+
className: "cpk-chat-input-field",
|
|
1011
966
|
children: mode === "transcribe" ? BoundAudioRecorder : mode === "processing" ? /* @__PURE__ */ jsx("div", {
|
|
1012
|
-
className: "cpk
|
|
1013
|
-
children: /* @__PURE__ */ jsx(Loader2, { className: "cpk
|
|
967
|
+
className: "cpk-chat-input-processing",
|
|
968
|
+
children: /* @__PURE__ */ jsx(Loader2, { className: "cpk-chat-input-processing-spinner" })
|
|
1014
969
|
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [BoundTextArea, slashMenu] })
|
|
1015
970
|
}),
|
|
1016
971
|
/* @__PURE__ */ jsx("div", {
|
|
1017
972
|
ref: actionsContainerRef,
|
|
1018
|
-
className:
|
|
973
|
+
className: "cpk-chat-input-actions",
|
|
1019
974
|
children: mode === "transcribe" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [onCancelTranscribe && BoundCancelTranscribeButton, onFinishTranscribe && BoundFinishTranscribeButton] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [onStartTranscribe && BoundStartTranscribeButton, BoundSendButton] })
|
|
1020
975
|
})
|
|
1021
976
|
]
|
|
@@ -1055,7 +1010,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1055
1010
|
return /* @__PURE__ */ jsxs("div", {
|
|
1056
1011
|
"data-copilotkit": true,
|
|
1057
1012
|
ref: containerRef,
|
|
1058
|
-
className: cn("cpk
|
|
1013
|
+
className: cn("cpk-chat-input", positioning === "absolute" && "cpk-chat-input-absolute", className),
|
|
1059
1014
|
style: {
|
|
1060
1015
|
transform: keyboardHeight > 0 ? `translateY(-${keyboardHeight}px)` : void 0,
|
|
1061
1016
|
transition: "transform 0.2s ease-out",
|
|
@@ -1063,7 +1018,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1063
1018
|
},
|
|
1064
1019
|
...props,
|
|
1065
1020
|
children: [/* @__PURE__ */ jsx("div", {
|
|
1066
|
-
className: "cpk
|
|
1021
|
+
className: "cpk-chat-input-wrapper",
|
|
1067
1022
|
children: inputPill
|
|
1068
1023
|
}), shouldShowDisclaimer && BoundDisclaimer]
|
|
1069
1024
|
});
|
|
@@ -1072,16 +1027,16 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1072
1027
|
_CopilotChatInput.SendButton = ({ className, children, ...props }) => {
|
|
1073
1028
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
|
|
1074
1029
|
return /* @__PURE__ */ jsx("div", {
|
|
1075
|
-
className: "cpk
|
|
1030
|
+
className: "cpk-chat-input-send",
|
|
1076
1031
|
children: /* @__PURE__ */ jsx(Button, {
|
|
1077
1032
|
type: "button",
|
|
1078
1033
|
"data-testid": "copilot-send-button",
|
|
1079
1034
|
variant: "chatInputToolbarPrimary",
|
|
1080
1035
|
size: "chatInputToolbarIcon",
|
|
1081
|
-
className,
|
|
1036
|
+
className: cn("cpk-chat-input-send-button", className),
|
|
1082
1037
|
"aria-label": labels.chatInputToolbarSendButtonLabel,
|
|
1083
1038
|
...props,
|
|
1084
|
-
children: children ?? /* @__PURE__ */ jsx(ArrowUp, { className: "cpk
|
|
1039
|
+
children: children ?? /* @__PURE__ */ jsx(ArrowUp, { className: "cpk-chat-input-send-icon" })
|
|
1085
1040
|
})
|
|
1086
1041
|
});
|
|
1087
1042
|
};
|
|
@@ -1093,7 +1048,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1093
1048
|
type: "button",
|
|
1094
1049
|
variant: "chatInputToolbarSecondary",
|
|
1095
1050
|
size: "chatInputToolbarIcon",
|
|
1096
|
-
className:
|
|
1051
|
+
className: cn(defaultClassName, className),
|
|
1097
1052
|
"aria-label": labels[labelKey],
|
|
1098
1053
|
...props,
|
|
1099
1054
|
children: icon
|
|
@@ -1105,23 +1060,23 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1105
1060
|
};
|
|
1106
1061
|
_CopilotChatInput.StartTranscribeButton = (props) => /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1107
1062
|
"data-testid": "copilot-start-transcribe-button",
|
|
1108
|
-
icon: /* @__PURE__ */ jsx(Mic, { className: "cpk
|
|
1063
|
+
icon: /* @__PURE__ */ jsx(Mic, { className: "cpk-chat-input-toolbar-icon" }),
|
|
1109
1064
|
labelKey: "chatInputToolbarStartTranscribeButtonLabel",
|
|
1110
|
-
defaultClassName: "cpk
|
|
1065
|
+
defaultClassName: "cpk-chat-input-start-transcribe-button",
|
|
1111
1066
|
...props
|
|
1112
1067
|
});
|
|
1113
1068
|
_CopilotChatInput.CancelTranscribeButton = (props) => /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1114
1069
|
"data-testid": "copilot-cancel-transcribe-button",
|
|
1115
|
-
icon: /* @__PURE__ */ jsx(X, { className: "cpk
|
|
1070
|
+
icon: /* @__PURE__ */ jsx(X, { className: "cpk-chat-input-toolbar-icon" }),
|
|
1116
1071
|
labelKey: "chatInputToolbarCancelTranscribeButtonLabel",
|
|
1117
|
-
defaultClassName: "cpk
|
|
1072
|
+
defaultClassName: "cpk-chat-input-cancel-transcribe-button",
|
|
1118
1073
|
...props
|
|
1119
1074
|
});
|
|
1120
1075
|
_CopilotChatInput.FinishTranscribeButton = (props) => /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1121
1076
|
"data-testid": "copilot-finish-transcribe-button",
|
|
1122
|
-
icon: /* @__PURE__ */ jsx(Check, { className: "cpk
|
|
1077
|
+
icon: /* @__PURE__ */ jsx(Check, { className: "cpk-chat-input-toolbar-icon" }),
|
|
1123
1078
|
labelKey: "chatInputToolbarFinishTranscribeButtonLabel",
|
|
1124
|
-
defaultClassName: "cpk
|
|
1079
|
+
defaultClassName: "cpk-chat-input-finish-transcribe-button",
|
|
1125
1080
|
...props
|
|
1126
1081
|
});
|
|
1127
1082
|
_CopilotChatInput.AddMenuButton = ({ className, toolsMenu, onAddFile, disabled, ...props }) => {
|
|
@@ -1163,11 +1118,11 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1163
1118
|
"data-testid": "copilot-add-menu-button",
|
|
1164
1119
|
variant: "chatInputToolbarSecondary",
|
|
1165
1120
|
size: "chatInputToolbarIcon",
|
|
1166
|
-
className:
|
|
1121
|
+
className: cn("cpk-chat-input-add-menu-button", className),
|
|
1167
1122
|
disabled: isDisabled,
|
|
1168
1123
|
"aria-label": labels.chatInputToolbarAddButtonLabel,
|
|
1169
1124
|
...props,
|
|
1170
|
-
children: /* @__PURE__ */ jsx(Plus, { className: "cpk
|
|
1125
|
+
children: /* @__PURE__ */ jsx(Plus, { className: "cpk-chat-input-add-menu-icon" })
|
|
1171
1126
|
});
|
|
1172
1127
|
if (!mounted) return button;
|
|
1173
1128
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
@@ -1179,9 +1134,9 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1179
1134
|
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
1180
1135
|
side: "bottom",
|
|
1181
1136
|
children: /* @__PURE__ */ jsxs("p", {
|
|
1182
|
-
className: "cpk
|
|
1137
|
+
className: "cpk-chat-input-add-menu-tooltip",
|
|
1183
1138
|
children: [/* @__PURE__ */ jsx("span", { children: labels.chatInputToolbarAddButtonLabel }), /* @__PURE__ */ jsx("code", {
|
|
1184
|
-
className: "cpk
|
|
1139
|
+
className: "cpk-chat-input-add-menu-shortcut",
|
|
1185
1140
|
children: "/"
|
|
1186
1141
|
})]
|
|
1187
1142
|
})
|
|
@@ -1202,7 +1157,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1202
1157
|
ref: internalTextareaRef,
|
|
1203
1158
|
"data-testid": "copilot-chat-textarea",
|
|
1204
1159
|
placeholder: placeholder ?? labels.chatInputPlaceholder,
|
|
1205
|
-
className:
|
|
1160
|
+
className: cn("cpk-chat-input-textarea", className),
|
|
1206
1161
|
style: {
|
|
1207
1162
|
overflow: "auto",
|
|
1208
1163
|
resize: "none",
|
|
@@ -1216,7 +1171,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
1216
1171
|
_CopilotChatInput.Disclaimer = ({ className, ...props }) => {
|
|
1217
1172
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
|
|
1218
1173
|
return /* @__PURE__ */ jsx("div", {
|
|
1219
|
-
className: cn("cpk
|
|
1174
|
+
className: cn("cpk-chat-input-disclaimer", className),
|
|
1220
1175
|
...props,
|
|
1221
1176
|
children: labels.chatDisclaimerText
|
|
1222
1177
|
});
|
|
@@ -1367,7 +1322,7 @@ function useRenderToolCall() {
|
|
|
1367
1322
|
|
|
1368
1323
|
//#endregion
|
|
1369
1324
|
//#region package.json
|
|
1370
|
-
var version = "2.0.0-rc.
|
|
1325
|
+
var version$1 = "2.0.0-rc.3";
|
|
1371
1326
|
|
|
1372
1327
|
//#endregion
|
|
1373
1328
|
//#region src/components/CopilotKitInspector.tsx
|
|
@@ -1394,7 +1349,7 @@ const CopilotKitInspector = ({ core, openRequest, onVisibilityChange }) => {
|
|
|
1394
1349
|
mod.configureWebInspectorElement(inspector, latestCoreRef.current, {
|
|
1395
1350
|
development: process.env.NODE_ENV === "development",
|
|
1396
1351
|
framework: "react",
|
|
1397
|
-
sdkVersion: version
|
|
1352
|
+
sdkVersion: version$1
|
|
1398
1353
|
});
|
|
1399
1354
|
inspector.addEventListener("cpk-inspector-visibility-change", handleVisibilityChange);
|
|
1400
1355
|
mountRef.current.appendChild(inspector);
|
|
@@ -2218,14 +2173,14 @@ function A2UIRetryingState({ content, showAfterMs, showAfterAttempts, debugExpos
|
|
|
2218
2173
|
/** failed: a clean hard-failure card that replaces the skeleton in place. */
|
|
2219
2174
|
function A2UIRecoveryFailure({ content, debugExposure }) {
|
|
2220
2175
|
return /* @__PURE__ */ jsxs("div", {
|
|
2221
|
-
className: "cpk
|
|
2176
|
+
className: "cpk-a2ui-recovery-failure",
|
|
2222
2177
|
children: [
|
|
2223
2178
|
/* @__PURE__ */ jsx("div", {
|
|
2224
|
-
className: "cpk
|
|
2179
|
+
className: "cpk-a2ui-recovery-failure-title",
|
|
2225
2180
|
children: "Couldn't generate the UI"
|
|
2226
2181
|
}),
|
|
2227
2182
|
/* @__PURE__ */ jsx("div", {
|
|
2228
|
-
className: "cpk
|
|
2183
|
+
className: "cpk-a2ui-recovery-failure-description",
|
|
2229
2184
|
children: "Something went wrong rendering this. You can keep chatting and try again."
|
|
2230
2185
|
}),
|
|
2231
2186
|
debugExposure !== "hidden" && /* @__PURE__ */ jsx(A2UIDebugDetails, {
|
|
@@ -2484,12 +2439,12 @@ function A2UIGeneratingSkeleton({ label, tokens, children }) {
|
|
|
2484
2439
|
function A2UIDebugDetails({ label, open, payload }) {
|
|
2485
2440
|
return /* @__PURE__ */ jsxs("details", {
|
|
2486
2441
|
open,
|
|
2487
|
-
className: "cpk
|
|
2442
|
+
className: "cpk-a2ui-debug-details",
|
|
2488
2443
|
children: [/* @__PURE__ */ jsx("summary", {
|
|
2489
|
-
className: "cpk
|
|
2444
|
+
className: "cpk-a2ui-debug-details-summary",
|
|
2490
2445
|
children: label
|
|
2491
2446
|
}), /* @__PURE__ */ jsx("pre", {
|
|
2492
|
-
className: "cpk
|
|
2447
|
+
className: "cpk-a2ui-debug-details-payload",
|
|
2493
2448
|
style: { fontSize: 11 },
|
|
2494
2449
|
children: JSON.stringify(payload, null, 2)
|
|
2495
2450
|
})]
|
|
@@ -2720,7 +2675,7 @@ function createA2UIMessageRenderer(options) {
|
|
|
2720
2675
|
}, [hasOps]);
|
|
2721
2676
|
if (!hasOps) return renderLifecycle(content);
|
|
2722
2677
|
const surfaces = /* @__PURE__ */ jsx("div", {
|
|
2723
|
-
className: "cpk
|
|
2678
|
+
className: "cpk-a2ui-message-surfaces",
|
|
2724
2679
|
children: Array.from(groupedOperations.entries()).map(([surfaceId, ops]) => /* @__PURE__ */ jsx(ReactSurfaceHost, {
|
|
2725
2680
|
surfaceId,
|
|
2726
2681
|
operations: ops,
|
|
@@ -2791,7 +2746,7 @@ async function runA2UIAction({ message, agent, copilotkit, onAction }) {
|
|
|
2791
2746
|
*/
|
|
2792
2747
|
function ReactSurfaceHost({ surfaceId, operations, theme, agent, copilotkit, catalog, onAction, onReady }) {
|
|
2793
2748
|
return /* @__PURE__ */ jsx("div", {
|
|
2794
|
-
className: "cpk
|
|
2749
|
+
className: "cpk-a2ui-message-surface-host",
|
|
2795
2750
|
children: /* @__PURE__ */ jsxs(A2UIProvider, {
|
|
2796
2751
|
onAction: useCallback((message) => runA2UIAction({
|
|
2797
2752
|
message,
|
|
@@ -2820,12 +2775,12 @@ function ReactSurfaceHost({ surfaceId, operations, theme, agent, copilotkit, cat
|
|
|
2820
2775
|
function A2UISurfaceOrError({ surfaceId }) {
|
|
2821
2776
|
const error = useA2UIError();
|
|
2822
2777
|
if (error) return /* @__PURE__ */ jsxs("div", {
|
|
2823
|
-
className: "cpk
|
|
2778
|
+
className: "cpk-a2ui-message-error",
|
|
2824
2779
|
children: ["A2UI render error: ", error]
|
|
2825
2780
|
});
|
|
2826
2781
|
return /* @__PURE__ */ jsx(A2UIRenderer, {
|
|
2827
2782
|
surfaceId,
|
|
2828
|
-
className: "cpk
|
|
2783
|
+
className: "cpk-a2ui-message-surface"
|
|
2829
2784
|
});
|
|
2830
2785
|
}
|
|
2831
2786
|
/**
|
|
@@ -4903,6 +4858,43 @@ var CopilotKitCoreReact = class extends CopilotKitCore$1 {
|
|
|
4903
4858
|
}
|
|
4904
4859
|
};
|
|
4905
4860
|
|
|
4861
|
+
//#endregion
|
|
4862
|
+
//#region src/styles/copilot-kit-styles.tsx
|
|
4863
|
+
const StyleOptionsContext = createContext({ inject: true });
|
|
4864
|
+
/** React 19 moves a `<style precedence>` into `<head>` and keeps one copy. */
|
|
4865
|
+
const hoistsStyles = Number.parseInt(version, 10) >= 19;
|
|
4866
|
+
/** Passes the provider's style options to `<CopilotKitStyles>`. */
|
|
4867
|
+
const CopilotStyleOptionsProvider = StyleOptionsContext.Provider;
|
|
4868
|
+
/**
|
|
4869
|
+
* Renders the CSS for CopilotKit's UI, so apps never import a stylesheet.
|
|
4870
|
+
* `CopilotChat` (and so `CopilotPopup` and `CopilotSidebar`) renders it for
|
|
4871
|
+
* you. Render it yourself only when you build a layout from the chat parts
|
|
4872
|
+
* without `CopilotChat`.
|
|
4873
|
+
*
|
|
4874
|
+
* React 19 moves the tag into `<head>` and keeps one copy, including in the
|
|
4875
|
+
* server HTML. React 18 renders it in place, one copy per `CopilotChat`.
|
|
4876
|
+
* Each copy holds the same CSS, so a second copy changes nothing.
|
|
4877
|
+
*
|
|
4878
|
+
* With a CSP nonce the tag always renders in place. React only adds a nonce to
|
|
4879
|
+
* a hoisted style when the app renders with `nonce: { style }`, and Next.js
|
|
4880
|
+
* passes a plain string, so a hoisted tag would be blocked.
|
|
4881
|
+
*
|
|
4882
|
+
* Renders nothing when `CopilotKitProvider` has `injectStyles={false}`.
|
|
4883
|
+
*/
|
|
4884
|
+
function CopilotKitStyles() {
|
|
4885
|
+
const { nonce, inject } = useContext(StyleOptionsContext);
|
|
4886
|
+
if (!inject) return null;
|
|
4887
|
+
if (nonce || !hoistsStyles) return /* @__PURE__ */ jsx("style", {
|
|
4888
|
+
nonce,
|
|
4889
|
+
dangerouslySetInnerHTML: { __html: stylesheet }
|
|
4890
|
+
});
|
|
4891
|
+
return /* @__PURE__ */ jsx("style", {
|
|
4892
|
+
href: "copilotkit",
|
|
4893
|
+
precedence: "copilotkit",
|
|
4894
|
+
children: stylesheet
|
|
4895
|
+
});
|
|
4896
|
+
}
|
|
4897
|
+
|
|
4906
4898
|
//#endregion
|
|
4907
4899
|
//#region src/providers/CopilotKitProvider.tsx
|
|
4908
4900
|
const zodToJsonSchemaAdapter = (schema, options) => {
|
|
@@ -4949,7 +4941,7 @@ function useStableArrayProp(prop, warningMessage, isMeaningfulChange) {
|
|
|
4949
4941
|
return value;
|
|
4950
4942
|
}
|
|
4951
4943
|
/** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
|
|
4952
|
-
const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, messageFilter, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, a2ui, generativeUI, mcpApps, defaultThrottleMs, debug, learning }) => {
|
|
4944
|
+
const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, a2ui, generativeUI, mcpApps, defaultThrottleMs, debug, learning }) => {
|
|
4953
4945
|
const learningConfig = useMemo(() => toLearningConfig(learning), [learning]);
|
|
4954
4946
|
const [shouldRenderInspector, setShouldRenderInspector] = useState(false);
|
|
4955
4947
|
const [inspectorVisible, setInspectorVisible] = useState(false);
|
|
@@ -5428,41 +5420,47 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
5428
5420
|
runtimeLicenseStatus
|
|
5429
5421
|
]);
|
|
5430
5422
|
const runtimeLicenseWarningStatus = runtimeEntitlementRetryInProgress ? void 0 : licenseContextValue.status ?? void 0;
|
|
5431
|
-
return /* @__PURE__ */ jsx(
|
|
5432
|
-
value:
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5423
|
+
return /* @__PURE__ */ jsx(CopilotStyleOptionsProvider, {
|
|
5424
|
+
value: useMemo(() => ({
|
|
5425
|
+
nonce,
|
|
5426
|
+
inject: injectStyles
|
|
5427
|
+
}), [nonce, injectStyles]),
|
|
5428
|
+
children: /* @__PURE__ */ jsx(SandboxFunctionsContext.Provider, {
|
|
5429
|
+
value: sandboxFunctionsList,
|
|
5430
|
+
children: /* @__PURE__ */ jsx(CopilotKitContext.Provider, {
|
|
5431
|
+
value: contextValue,
|
|
5432
|
+
children: /* @__PURE__ */ jsxs(LicenseContext.Provider, {
|
|
5433
|
+
value: licenseContextValue,
|
|
5434
|
+
children: [
|
|
5435
|
+
a2uiActive && /* @__PURE__ */ jsx(A2UIBuiltInToolCallRenderer, {}),
|
|
5436
|
+
generativeUIActive && /* @__PURE__ */ jsx(GenerativeUIToolCallRenderer, {}),
|
|
5437
|
+
a2uiActive && /* @__PURE__ */ jsx(A2UICatalogContext, {
|
|
5438
|
+
catalog: filteredCatalog,
|
|
5439
|
+
includeSchema: a2ui?.includeSchema
|
|
5440
|
+
}),
|
|
5441
|
+
/* @__PURE__ */ jsx(MarkdownRendererProvider, {
|
|
5442
|
+
renderer: markdownRenderer,
|
|
5443
|
+
children: /* @__PURE__ */ jsxs(CopilotKitInspectorContextProvider, {
|
|
5444
|
+
value: inspectorContextValue,
|
|
5445
|
+
children: [/* @__PURE__ */ jsx(CopilotKitAgentIdContext.Provider, {
|
|
5446
|
+
value: agentId,
|
|
5447
|
+
children: /* @__PURE__ */ jsx(GenerativeUIRuntimeContext.Provider, {
|
|
5448
|
+
value: generativeUIRuntime,
|
|
5449
|
+
children
|
|
5450
|
+
})
|
|
5451
|
+
}), shouldRenderInspector ? /* @__PURE__ */ jsx(CopilotKitInspector, {
|
|
5452
|
+
core: copilotkit,
|
|
5453
|
+
openRequest: inspectorOpenRequest,
|
|
5454
|
+
onVisibilityChange: setInspectorVisible
|
|
5455
|
+
}) : null]
|
|
5456
|
+
})
|
|
5457
|
+
}),
|
|
5458
|
+
runtimeLicenseWarningStatus === "none" && !resolvedPublicKey && /* @__PURE__ */ jsx(LicenseWarningBanner, { type: "no_license" }),
|
|
5459
|
+
runtimeLicenseWarningStatus === "expired" && /* @__PURE__ */ jsx(LicenseWarningBanner, { type: "expired" }),
|
|
5460
|
+
runtimeLicenseWarningStatus === "invalid" && /* @__PURE__ */ jsx(LicenseWarningBanner, { type: "invalid" }),
|
|
5461
|
+
runtimeLicenseWarningStatus === "expiring" && /* @__PURE__ */ jsx(LicenseWarningBanner, { type: "expiring" })
|
|
5462
|
+
]
|
|
5463
|
+
})
|
|
5466
5464
|
})
|
|
5467
5465
|
})
|
|
5468
5466
|
});
|
|
@@ -5961,10 +5959,10 @@ function Collapsible({ open, id, className, children }) {
|
|
|
5961
5959
|
return /* @__PURE__ */ jsx("div", {
|
|
5962
5960
|
ref,
|
|
5963
5961
|
id,
|
|
5964
|
-
className:
|
|
5962
|
+
className: cn("cpk-collapsible", className),
|
|
5965
5963
|
style: { gridTemplateRows: open ? "1fr" : "0fr" },
|
|
5966
5964
|
children: /* @__PURE__ */ jsx("div", {
|
|
5967
|
-
className: "cpk
|
|
5965
|
+
className: "cpk-collapsible-content",
|
|
5968
5966
|
children
|
|
5969
5967
|
})
|
|
5970
5968
|
});
|
|
@@ -5978,20 +5976,20 @@ function StatusIcon({ status, className }) {
|
|
|
5978
5976
|
}[status];
|
|
5979
5977
|
return /* @__PURE__ */ jsx(Icon, {
|
|
5980
5978
|
"aria-hidden": "true",
|
|
5981
|
-
className:
|
|
5979
|
+
className: cn("cpk-tool-call-status-icon", status === "running" && "cpk-tool-call-status-icon-running", status === "failed" && "cpk-tool-call-status-icon-failed", className)
|
|
5982
5980
|
});
|
|
5983
5981
|
}
|
|
5984
5982
|
function Chevron({ open, className }) {
|
|
5985
5983
|
return /* @__PURE__ */ jsx(ChevronRight, {
|
|
5986
5984
|
"aria-hidden": "true",
|
|
5987
|
-
className:
|
|
5985
|
+
className: cn("cpk-tool-call-chevron", open && "cpk-tool-call-chevron-open", className)
|
|
5988
5986
|
});
|
|
5989
5987
|
}
|
|
5990
5988
|
function FailedCount({ calls }) {
|
|
5991
5989
|
const failed = calls.filter((call) => call.toolMessage?.error).length;
|
|
5992
5990
|
if (!failed) return null;
|
|
5993
5991
|
return /* @__PURE__ */ jsxs("span", {
|
|
5994
|
-
className: "cpk
|
|
5992
|
+
className: "cpk-tool-call-failed-count",
|
|
5995
5993
|
children: [failed, " failed"]
|
|
5996
5994
|
});
|
|
5997
5995
|
}
|
|
@@ -6014,10 +6012,10 @@ function stringifyPayload(value) {
|
|
|
6014
6012
|
}
|
|
6015
6013
|
function Payload({ label, value }) {
|
|
6016
6014
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
6017
|
-
className: "cpk
|
|
6015
|
+
className: "cpk-tool-call-payload-label",
|
|
6018
6016
|
children: label
|
|
6019
6017
|
}), /* @__PURE__ */ jsx("pre", {
|
|
6020
|
-
className: "cpk
|
|
6018
|
+
className: "cpk-tool-call-payload-code",
|
|
6021
6019
|
children: stringifyPayload(value)
|
|
6022
6020
|
})] });
|
|
6023
6021
|
}
|
|
@@ -6027,7 +6025,7 @@ function Payload({ label, value }) {
|
|
|
6027
6025
|
*/
|
|
6028
6026
|
function ToolCallPayloads({ parameters, result, className }) {
|
|
6029
6027
|
return /* @__PURE__ */ jsxs("div", {
|
|
6030
|
-
className:
|
|
6028
|
+
className: cn("cpk-tool-call-payloads", className),
|
|
6031
6029
|
children: [/* @__PURE__ */ jsx(Payload, {
|
|
6032
6030
|
label: "Arguments",
|
|
6033
6031
|
value: parameters ?? {}
|
|
@@ -6046,36 +6044,35 @@ function ToolCallRow({ name, parameters, result, status, appearance, className,
|
|
|
6046
6044
|
const [open, setOpen] = useState(false);
|
|
6047
6045
|
const detailsId = useId();
|
|
6048
6046
|
const preview = argumentPreview(parameters);
|
|
6049
|
-
const line = appearance === "line";
|
|
6050
6047
|
return /* @__PURE__ */ jsxs("div", {
|
|
6051
6048
|
"data-copilotkit": true,
|
|
6052
|
-
className:
|
|
6049
|
+
className: cn("cpk-tool-call-row", `cpk-tool-call-row-${appearance}`, className),
|
|
6053
6050
|
...props,
|
|
6054
6051
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
6055
6052
|
type: "button",
|
|
6056
6053
|
"aria-expanded": open,
|
|
6057
6054
|
"aria-controls": detailsId,
|
|
6058
6055
|
onClick: () => setOpen((value) => !value),
|
|
6059
|
-
className:
|
|
6056
|
+
className: "cpk-tool-call-row-button",
|
|
6060
6057
|
children: [
|
|
6061
6058
|
/* @__PURE__ */ jsx(StatusIcon, { status }),
|
|
6062
6059
|
/* @__PURE__ */ jsx("span", {
|
|
6063
6060
|
"data-testid": "copilot-tool-render-name",
|
|
6064
|
-
className:
|
|
6061
|
+
className: cn("cpk-tool-call-row-name", status === "running" && "cpk-shimmer"),
|
|
6065
6062
|
children: name
|
|
6066
6063
|
}),
|
|
6067
6064
|
preview && /* @__PURE__ */ jsx("span", {
|
|
6068
|
-
className: "cpk
|
|
6065
|
+
className: "cpk-tool-call-row-preview",
|
|
6069
6066
|
children: preview
|
|
6070
6067
|
}),
|
|
6071
6068
|
/* @__PURE__ */ jsx("span", {
|
|
6072
6069
|
"data-testid": "copilot-tool-render-status",
|
|
6073
|
-
className: "cpk
|
|
6070
|
+
className: "cpk-tool-call-row-status",
|
|
6074
6071
|
children: statusLabels[status]
|
|
6075
6072
|
}),
|
|
6076
6073
|
/* @__PURE__ */ jsx(Chevron, {
|
|
6077
6074
|
open,
|
|
6078
|
-
className:
|
|
6075
|
+
className: "cpk-tool-call-row-chevron"
|
|
6079
6076
|
})
|
|
6080
6077
|
]
|
|
6081
6078
|
}), /* @__PURE__ */ jsx(Collapsible, {
|
|
@@ -6084,7 +6081,7 @@ function ToolCallRow({ name, parameters, result, status, appearance, className,
|
|
|
6084
6081
|
children: /* @__PURE__ */ jsx(ToolCallPayloads, {
|
|
6085
6082
|
parameters,
|
|
6086
6083
|
result,
|
|
6087
|
-
className:
|
|
6084
|
+
className: "cpk-tool-call-row-payloads"
|
|
6088
6085
|
})
|
|
6089
6086
|
})]
|
|
6090
6087
|
});
|
|
@@ -6126,16 +6123,16 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
|
|
|
6126
6123
|
...props
|
|
6127
6124
|
};
|
|
6128
6125
|
const runningLabel = current && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
6129
|
-
className: "cpk
|
|
6126
|
+
className: "cpk-tool-call-group-running cpk-shimmer",
|
|
6130
6127
|
children: ["Running ", current.toolCall.function.name]
|
|
6131
6128
|
}), preview && /* @__PURE__ */ jsx("span", {
|
|
6132
|
-
className: "cpk
|
|
6129
|
+
className: "cpk-tool-call-group-preview",
|
|
6133
6130
|
children: preview
|
|
6134
6131
|
})] });
|
|
6135
6132
|
if (appearance === "line") {
|
|
6136
6133
|
if (calls.length === 1 && !current) return /* @__PURE__ */ jsx("div", {
|
|
6137
6134
|
...groupProps,
|
|
6138
|
-
className:
|
|
6135
|
+
className: cn("cpk-tool-call-group cpk-tool-call-group-line cpk-tool-call-group-single", className),
|
|
6139
6136
|
children: /* @__PURE__ */ jsx(ToolCallGroupContext.Provider, {
|
|
6140
6137
|
value: {
|
|
6141
6138
|
appearance: "line",
|
|
@@ -6147,20 +6144,20 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
|
|
|
6147
6144
|
});
|
|
6148
6145
|
return /* @__PURE__ */ jsxs("div", {
|
|
6149
6146
|
...groupProps,
|
|
6150
|
-
className:
|
|
6147
|
+
className: cn("cpk-tool-call-group cpk-tool-call-group-line", className),
|
|
6151
6148
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
6152
6149
|
type: "button",
|
|
6153
6150
|
"aria-expanded": open,
|
|
6154
6151
|
"aria-controls": bodyId,
|
|
6155
6152
|
onClick: () => setOpen((value) => !value),
|
|
6156
|
-
className: "cpk
|
|
6153
|
+
className: "cpk-tool-call-group-line-toggle",
|
|
6157
6154
|
children: [runningLabel || /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
6158
6155
|
/* @__PURE__ */ jsxs("span", {
|
|
6159
|
-
className: "cpk
|
|
6156
|
+
className: "cpk-tool-call-group-line-summary",
|
|
6160
6157
|
children: ["Used ", pluralize(calls.length, "tool")]
|
|
6161
6158
|
}),
|
|
6162
6159
|
/* @__PURE__ */ jsx("span", {
|
|
6163
|
-
className: "cpk
|
|
6160
|
+
className: "cpk-tool-call-group-line-names",
|
|
6164
6161
|
children: toolNames(calls)
|
|
6165
6162
|
}),
|
|
6166
6163
|
/* @__PURE__ */ jsx(FailedCount, { calls })
|
|
@@ -6169,7 +6166,7 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
|
|
|
6169
6166
|
open,
|
|
6170
6167
|
id: bodyId,
|
|
6171
6168
|
children: /* @__PURE__ */ jsx("div", {
|
|
6172
|
-
className: "cpk
|
|
6169
|
+
className: "cpk-tool-call-group-line-body",
|
|
6173
6170
|
children: rows("line")
|
|
6174
6171
|
})
|
|
6175
6172
|
})]
|
|
@@ -6177,22 +6174,22 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
|
|
|
6177
6174
|
}
|
|
6178
6175
|
if (appearance === "stack") {
|
|
6179
6176
|
const behind = open ? 0 : Math.min(calls.length - 1, 2);
|
|
6180
|
-
const layer = "cpk
|
|
6177
|
+
const layer = "cpk-tool-call-group-stack-layer";
|
|
6181
6178
|
const latestStatus = entryStatus(latest, isActive);
|
|
6182
6179
|
const latestPreview = entryPreview(latest);
|
|
6183
6180
|
return /* @__PURE__ */ jsxs("div", {
|
|
6184
6181
|
...groupProps,
|
|
6185
|
-
className:
|
|
6182
|
+
className: cn("cpk-tool-call-group cpk-tool-call-group-stack", className),
|
|
6186
6183
|
style: {
|
|
6187
6184
|
paddingBottom: behind * 6,
|
|
6188
6185
|
...props.style
|
|
6189
6186
|
},
|
|
6190
6187
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
6191
|
-
className: "cpk
|
|
6188
|
+
className: "cpk-tool-call-group-stack-pile",
|
|
6192
6189
|
children: [
|
|
6193
6190
|
Array.from({ length: behind }, (_, index) => /* @__PURE__ */ jsx("div", {
|
|
6194
6191
|
"aria-hidden": "true",
|
|
6195
|
-
className:
|
|
6192
|
+
className: cn(layer, "cpk-tool-call-group-stack-behind"),
|
|
6196
6193
|
style: {
|
|
6197
6194
|
transform: `translateY(${(index + 1) * 6}px) scaleX(${1 - (index + 1) * .045})`,
|
|
6198
6195
|
zIndex: -1 - index,
|
|
@@ -6204,58 +6201,58 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
|
|
|
6204
6201
|
"aria-expanded": open,
|
|
6205
6202
|
"aria-controls": open ? bodyId : void 0,
|
|
6206
6203
|
onClick: () => setOpen((value) => !value),
|
|
6207
|
-
className:
|
|
6204
|
+
className: cn("cpk-tool-call-group-stack-toggle", open ? "cpk-tool-call-group-stack-toggle-open" : [layer, "cpk-tool-call-group-stack-toggle-closed"]),
|
|
6208
6205
|
children: open ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
6209
6206
|
pluralize(calls.length, "tool call"),
|
|
6210
6207
|
/* @__PURE__ */ jsx(FailedCount, { calls }),
|
|
6211
6208
|
/* @__PURE__ */ jsxs("span", {
|
|
6212
|
-
className: "cpk
|
|
6209
|
+
className: "cpk-tool-call-group-stack-collapse",
|
|
6213
6210
|
children: ["Collapse", /* @__PURE__ */ jsx(Chevron, {
|
|
6214
6211
|
open: true,
|
|
6215
|
-
className: "cpk
|
|
6212
|
+
className: "cpk-tool-call-group-stack-collapse-icon"
|
|
6216
6213
|
})]
|
|
6217
6214
|
})
|
|
6218
6215
|
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
6219
|
-
className: "cpk
|
|
6216
|
+
className: "cpk-tool-call-group-stack-latest",
|
|
6220
6217
|
children: [
|
|
6221
6218
|
/* @__PURE__ */ jsx(StatusIcon, { status: latestStatus }),
|
|
6222
6219
|
/* @__PURE__ */ jsx("span", {
|
|
6223
|
-
className:
|
|
6220
|
+
className: cn("cpk-tool-call-group-stack-name", latestStatus === "running" && "cpk-shimmer"),
|
|
6224
6221
|
children: latest.toolCall.function.name
|
|
6225
6222
|
}),
|
|
6226
6223
|
latestPreview && /* @__PURE__ */ jsx("span", {
|
|
6227
|
-
className: "cpk
|
|
6224
|
+
className: "cpk-tool-call-group-stack-preview",
|
|
6228
6225
|
children: latestPreview
|
|
6229
6226
|
}),
|
|
6230
6227
|
/* @__PURE__ */ jsx("span", {
|
|
6231
|
-
className: "cpk
|
|
6228
|
+
className: "cpk-tool-call-group-stack-status",
|
|
6232
6229
|
children: statusLabels[latestStatus]
|
|
6233
6230
|
})
|
|
6234
6231
|
]
|
|
6235
6232
|
}, latest.toolCall.id), /* @__PURE__ */ jsxs("span", {
|
|
6236
|
-
className: "cpk
|
|
6233
|
+
className: "cpk-tool-call-group-stack-meta",
|
|
6237
6234
|
children: [
|
|
6238
6235
|
/* @__PURE__ */ jsx(FailedCount, { calls }),
|
|
6239
6236
|
/* @__PURE__ */ jsx("span", {
|
|
6240
|
-
className: "cpk
|
|
6237
|
+
className: "cpk-tool-call-group-stack-count",
|
|
6241
6238
|
children: pluralize(calls.length, "call")
|
|
6242
6239
|
}),
|
|
6243
6240
|
/* @__PURE__ */ jsx(Chevron, {
|
|
6244
6241
|
open: false,
|
|
6245
|
-
className: "cpk
|
|
6242
|
+
className: "cpk-tool-call-group-stack-expand-icon"
|
|
6246
6243
|
})
|
|
6247
6244
|
]
|
|
6248
6245
|
})] })
|
|
6249
6246
|
}),
|
|
6250
6247
|
/* @__PURE__ */ jsx("span", {
|
|
6251
6248
|
"aria-live": "polite",
|
|
6252
|
-
className: "cpk
|
|
6249
|
+
className: "cpk-tool-call-group-stack-live",
|
|
6253
6250
|
children: open ? "" : `${latest.toolCall.function.name}: ${statusLabels[latestStatus]}`
|
|
6254
6251
|
})
|
|
6255
6252
|
]
|
|
6256
6253
|
}), open && /* @__PURE__ */ jsx("div", {
|
|
6257
6254
|
id: bodyId,
|
|
6258
|
-
className: "cpk
|
|
6255
|
+
className: "cpk-tool-call-group-stack-items",
|
|
6259
6256
|
children: /* @__PURE__ */ jsx(ToolCallGroupContext.Provider, {
|
|
6260
6257
|
value: {
|
|
6261
6258
|
appearance: "stack",
|
|
@@ -6263,7 +6260,7 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
|
|
|
6263
6260
|
active: isActive
|
|
6264
6261
|
},
|
|
6265
6262
|
children: calls.map((call, index) => /* @__PURE__ */ jsx("div", {
|
|
6266
|
-
className:
|
|
6263
|
+
className: cn(layer, "cpk-tool-call-group-stack-item"),
|
|
6267
6264
|
style: { animationDelay: `${index * 30}ms` },
|
|
6268
6265
|
children: renderCall(call)
|
|
6269
6266
|
}, call.toolCall.id))
|
|
@@ -6273,26 +6270,26 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
|
|
|
6273
6270
|
}
|
|
6274
6271
|
return /* @__PURE__ */ jsxs("div", {
|
|
6275
6272
|
...groupProps,
|
|
6276
|
-
className:
|
|
6273
|
+
className: cn("cpk-tool-call-group cpk-tool-call-group-card", className),
|
|
6277
6274
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
6278
6275
|
type: "button",
|
|
6279
6276
|
"aria-expanded": open,
|
|
6280
6277
|
"aria-controls": bodyId,
|
|
6281
6278
|
onClick: () => setOpen((value) => !value),
|
|
6282
|
-
className: "cpk
|
|
6279
|
+
className: "cpk-tool-call-group-card-toggle",
|
|
6283
6280
|
children: [
|
|
6284
6281
|
/* @__PURE__ */ jsx(StatusIcon, { status }),
|
|
6285
6282
|
runningLabel || /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
6286
|
-
className: "cpk
|
|
6283
|
+
className: "cpk-tool-call-group-card-summary",
|
|
6287
6284
|
children: ["Used ", pluralize(calls.length, "tool")]
|
|
6288
6285
|
}), /* @__PURE__ */ jsx("span", {
|
|
6289
|
-
className: "cpk
|
|
6286
|
+
className: "cpk-tool-call-group-card-names",
|
|
6290
6287
|
children: toolNames(calls)
|
|
6291
6288
|
})] }),
|
|
6292
6289
|
/* @__PURE__ */ jsxs("span", {
|
|
6293
|
-
className: "cpk
|
|
6290
|
+
className: "cpk-tool-call-group-card-meta",
|
|
6294
6291
|
children: [status === "failed" ? /* @__PURE__ */ jsx(FailedCount, { calls }) : /* @__PURE__ */ jsx("span", {
|
|
6295
|
-
className: "cpk
|
|
6292
|
+
className: "cpk-tool-call-group-card-status",
|
|
6296
6293
|
children: status !== "running" ? statusLabels[status] : done > 0 && `${done} done`
|
|
6297
6294
|
}), /* @__PURE__ */ jsx(Chevron, { open })]
|
|
6298
6295
|
})
|
|
@@ -6428,8 +6425,7 @@ function DefaultToolCallRenderer({ name, toolCallId, parameters, status, result
|
|
|
6428
6425
|
appearance: group.appearance
|
|
6429
6426
|
});
|
|
6430
6427
|
const statusLabel = isActive ? "Running" : isComplete ? "Done" : status;
|
|
6431
|
-
const
|
|
6432
|
-
const badgeClassName = isActive ? "cpk:bg-amber-100 cpk:text-amber-800 cpk:dark:bg-amber-500/15 cpk:dark:text-amber-400" : isComplete ? "cpk:bg-emerald-100 cpk:text-emerald-800 cpk:dark:bg-emerald-500/15 cpk:dark:text-emerald-400" : "cpk:bg-zinc-100 cpk:text-zinc-800 cpk:dark:bg-zinc-700/40 cpk:dark:text-zinc-300";
|
|
6428
|
+
const tone = isActive ? "running" : isComplete ? "done" : "other";
|
|
6433
6429
|
return /* @__PURE__ */ jsx("div", {
|
|
6434
6430
|
"data-testid": "copilot-tool-render",
|
|
6435
6431
|
"data-tool-name": name,
|
|
@@ -6437,20 +6433,20 @@ function DefaultToolCallRenderer({ name, toolCallId, parameters, status, result
|
|
|
6437
6433
|
"data-status": status,
|
|
6438
6434
|
"data-args": safeStringifyForAttr(parameters),
|
|
6439
6435
|
"data-result": safeStringifyForAttr(result),
|
|
6440
|
-
className: "cpk
|
|
6436
|
+
className: "cpk-default-tool-call",
|
|
6441
6437
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6442
|
-
className: "cpk
|
|
6438
|
+
className: "cpk-default-tool-call-card",
|
|
6443
6439
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
6444
6440
|
type: "button",
|
|
6445
6441
|
"aria-expanded": isExpanded,
|
|
6446
6442
|
onClick: () => setIsExpanded(!isExpanded),
|
|
6447
|
-
className: "cpk
|
|
6443
|
+
className: "cpk-default-tool-call-header",
|
|
6448
6444
|
style: { font: "inherit" },
|
|
6449
6445
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
6450
|
-
className: "cpk
|
|
6446
|
+
className: "cpk-default-tool-call-title",
|
|
6451
6447
|
children: [
|
|
6452
6448
|
/* @__PURE__ */ jsx("svg", {
|
|
6453
|
-
className:
|
|
6449
|
+
className: cn("cpk-default-tool-call-chevron", isExpanded && "cpk-default-tool-call-chevron-open"),
|
|
6454
6450
|
fill: "none",
|
|
6455
6451
|
viewBox: "0 0 24 24",
|
|
6456
6452
|
strokeWidth: 2,
|
|
@@ -6461,31 +6457,31 @@ function DefaultToolCallRenderer({ name, toolCallId, parameters, status, result
|
|
|
6461
6457
|
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
6462
6458
|
})
|
|
6463
6459
|
}),
|
|
6464
|
-
/* @__PURE__ */ jsx("span", { className: `cpk
|
|
6460
|
+
/* @__PURE__ */ jsx("span", { className: `cpk-default-tool-call-dot cpk-default-tool-call-dot-${tone}` }),
|
|
6465
6461
|
/* @__PURE__ */ jsx("span", {
|
|
6466
6462
|
"data-testid": "copilot-tool-render-name",
|
|
6467
|
-
className: "cpk
|
|
6463
|
+
className: "cpk-default-tool-call-name",
|
|
6468
6464
|
children: name
|
|
6469
6465
|
})
|
|
6470
6466
|
]
|
|
6471
6467
|
}), /* @__PURE__ */ jsx("span", {
|
|
6472
6468
|
"data-testid": "copilot-tool-render-status",
|
|
6473
|
-
className: `cpk
|
|
6469
|
+
className: `cpk-default-tool-call-badge cpk-default-tool-call-badge-${tone}`,
|
|
6474
6470
|
children: statusLabel
|
|
6475
6471
|
})]
|
|
6476
6472
|
}), isExpanded && /* @__PURE__ */ jsxs("div", {
|
|
6477
|
-
className: "cpk
|
|
6473
|
+
className: "cpk-default-tool-call-details",
|
|
6478
6474
|
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
6479
|
-
className: "cpk
|
|
6475
|
+
className: "cpk-default-tool-call-label",
|
|
6480
6476
|
children: "Arguments"
|
|
6481
6477
|
}), /* @__PURE__ */ jsx("pre", {
|
|
6482
|
-
className: "cpk
|
|
6478
|
+
className: "cpk-default-tool-call-code",
|
|
6483
6479
|
children: safeStringifyForPre(parameters ?? {})
|
|
6484
6480
|
})] }), result !== void 0 && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
6485
|
-
className: "cpk
|
|
6481
|
+
className: "cpk-default-tool-call-label",
|
|
6486
6482
|
children: "Result"
|
|
6487
6483
|
}), /* @__PURE__ */ jsx("pre", {
|
|
6488
|
-
className: "cpk
|
|
6484
|
+
className: "cpk-default-tool-call-code",
|
|
6489
6485
|
children: typeof result === "string" ? result : safeStringifyForPre(result)
|
|
6490
6486
|
})] })]
|
|
6491
6487
|
})]
|
|
@@ -8328,9 +8324,9 @@ function CopilotChatToolCallsView({ message, messages = [], display: displayProp
|
|
|
8328
8324
|
const failedIds = new Set(segment.calls.filter((call) => call.toolMessage?.error).map((call) => call.toolCall.id));
|
|
8329
8325
|
return /* @__PURE__ */ jsx(Collapsible, {
|
|
8330
8326
|
open: workOpen ?? true,
|
|
8331
|
-
className: "cpk
|
|
8327
|
+
className: "cpk-tool-calls-view-turn",
|
|
8332
8328
|
children: /* @__PURE__ */ jsx("div", {
|
|
8333
|
-
className: "cpk
|
|
8329
|
+
className: "cpk-tool-calls-view-turn-rows",
|
|
8334
8330
|
children: /* @__PURE__ */ jsx(ToolCallGroupContext.Provider, {
|
|
8335
8331
|
value: {
|
|
8336
8332
|
appearance: "line",
|
|
@@ -8375,7 +8371,7 @@ function InspectorKiteIcon({ className, ...props }) {
|
|
|
8375
8371
|
return /* @__PURE__ */ jsxs("svg", {
|
|
8376
8372
|
...props,
|
|
8377
8373
|
"aria-hidden": "true",
|
|
8378
|
-
className:
|
|
8374
|
+
className: cn("cpk-inspector-button-kite-icon", className),
|
|
8379
8375
|
viewBox: "4.57 3.36 17.8 17.8",
|
|
8380
8376
|
fill: "none",
|
|
8381
8377
|
children: [
|
|
@@ -8523,7 +8519,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
8523
8519
|
size: "icon",
|
|
8524
8520
|
"data-testid": "copilot-inspector-button",
|
|
8525
8521
|
"aria-label": `${labels.assistantMessageToolbarInspectorTitle} (${labels.assistantMessageToolbarInspectorLocalOnlyLabel.toLowerCase()})`,
|
|
8526
|
-
className:
|
|
8522
|
+
className: cn("cpk-inspector-button", className),
|
|
8527
8523
|
onPointerEnter: (event) => {
|
|
8528
8524
|
onPointerEnter?.(event);
|
|
8529
8525
|
if (!disabled && event.pointerType !== "touch") {
|
|
@@ -8553,7 +8549,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
8553
8549
|
},
|
|
8554
8550
|
children: /* @__PURE__ */ jsx(Wrench, {
|
|
8555
8551
|
"aria-hidden": "true",
|
|
8556
|
-
className: "cpk
|
|
8552
|
+
className: "cpk-inspector-button-icon",
|
|
8557
8553
|
"data-testid": "copilot-inspector-icon"
|
|
8558
8554
|
})
|
|
8559
8555
|
})
|
|
@@ -8561,7 +8557,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
8561
8557
|
align: "start",
|
|
8562
8558
|
side: "top",
|
|
8563
8559
|
sideOffset: 6,
|
|
8564
|
-
className:
|
|
8560
|
+
className: cn("cpk-inspector-button-menu", dark && "dark"),
|
|
8565
8561
|
onPointerEnter: cancelClose,
|
|
8566
8562
|
onPointerLeave: scheduleClose,
|
|
8567
8563
|
onKeyDown: () => {
|
|
@@ -8576,9 +8572,9 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
8576
8572
|
onFocusOutside: () => changeOpen(false),
|
|
8577
8573
|
children: [
|
|
8578
8574
|
/* @__PURE__ */ jsxs(DropdownMenuLabel, {
|
|
8579
|
-
className: "cpk
|
|
8575
|
+
className: "cpk-inspector-button-menu-header",
|
|
8580
8576
|
children: [/* @__PURE__ */ jsx("span", {
|
|
8581
|
-
className: "cpk
|
|
8577
|
+
className: "cpk-inspector-button-menu-title",
|
|
8582
8578
|
children: labels.assistantMessageToolbarInspectorTitle
|
|
8583
8579
|
}), /* @__PURE__ */ jsxs(Tooltip, {
|
|
8584
8580
|
delayDuration: 1e3,
|
|
@@ -8586,13 +8582,13 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
8586
8582
|
asChild: true,
|
|
8587
8583
|
children: /* @__PURE__ */ jsx("span", {
|
|
8588
8584
|
tabIndex: 0,
|
|
8589
|
-
className: "cpk
|
|
8585
|
+
className: "cpk-inspector-button-local-badge",
|
|
8590
8586
|
children: labels.assistantMessageToolbarInspectorLocalOnlyLabel
|
|
8591
8587
|
})
|
|
8592
8588
|
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
8593
8589
|
side: "top",
|
|
8594
8590
|
sideOffset: 6,
|
|
8595
|
-
className:
|
|
8591
|
+
className: cn("cpk-inspector-button-local-tooltip", dark && "dark"),
|
|
8596
8592
|
onPointerEnter: cancelClose,
|
|
8597
8593
|
onPointerLeave: scheduleClose,
|
|
8598
8594
|
children: labels.assistantMessageToolbarInspectorLocalOnlyDescription
|
|
@@ -8605,27 +8601,27 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
8605
8601
|
children: /* @__PURE__ */ jsxs("button", {
|
|
8606
8602
|
type: "button",
|
|
8607
8603
|
onClick,
|
|
8608
|
-
className: "cpk
|
|
8609
|
-
children: [/* @__PURE__ */ jsx(InspectorKiteIcon, { className: "cpk
|
|
8610
|
-
className: "cpk
|
|
8604
|
+
className: "cpk-inspector-button-menu-item cpk-inspector-button-inspect-item",
|
|
8605
|
+
children: [/* @__PURE__ */ jsx(InspectorKiteIcon, { className: "cpk-inspector-button-menu-item-icon" }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
|
|
8606
|
+
className: "cpk-inspector-button-menu-item-label",
|
|
8611
8607
|
children: primaryLabel
|
|
8612
8608
|
}), /* @__PURE__ */ jsx("span", {
|
|
8613
|
-
className: "cpk
|
|
8609
|
+
className: "cpk-inspector-button-menu-item-description",
|
|
8614
8610
|
children: labels.assistantMessageToolbarInspectorDescription
|
|
8615
8611
|
})] })]
|
|
8616
8612
|
})
|
|
8617
8613
|
}),
|
|
8618
8614
|
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
8619
8615
|
onSelect: hideShortcuts,
|
|
8620
|
-
className: "cpk
|
|
8616
|
+
className: "cpk-inspector-button-menu-item cpk-inspector-button-hide-item",
|
|
8621
8617
|
children: [/* @__PURE__ */ jsx(EyeOff, {
|
|
8622
8618
|
"aria-hidden": "true",
|
|
8623
|
-
className: "cpk
|
|
8619
|
+
className: "cpk-inspector-button-menu-item-icon"
|
|
8624
8620
|
}), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
|
|
8625
|
-
className: "cpk
|
|
8621
|
+
className: "cpk-inspector-button-menu-item-label",
|
|
8626
8622
|
children: labels.assistantMessageToolbarInspectorHideLabel
|
|
8627
8623
|
}), /* @__PURE__ */ jsx("span", {
|
|
8628
|
-
className: "cpk
|
|
8624
|
+
className: "cpk-inspector-button-menu-item-description",
|
|
8629
8625
|
children: labels.assistantMessageToolbarInspectorHideDescription
|
|
8630
8626
|
})] })]
|
|
8631
8627
|
})
|
|
@@ -8659,7 +8655,7 @@ const PopoverContent = React$1.forwardRef(({ className, align = "start", sideOff
|
|
|
8659
8655
|
"data-slot": "popover-content",
|
|
8660
8656
|
align,
|
|
8661
8657
|
sideOffset,
|
|
8662
|
-
className: cn("cpk
|
|
8658
|
+
className: cn("cpk-popover", className),
|
|
8663
8659
|
...props
|
|
8664
8660
|
}) }));
|
|
8665
8661
|
PopoverContent.displayName = "PopoverContent";
|
|
@@ -8954,9 +8950,9 @@ function WorkText({ messageId, children }) {
|
|
|
8954
8950
|
const open = context.workTextOpen.get(messageId);
|
|
8955
8951
|
return /* @__PURE__ */ jsx(Collapsible, {
|
|
8956
8952
|
open: open ?? true,
|
|
8957
|
-
className: "cpk
|
|
8953
|
+
className: "cpk-assistant-message-work-text",
|
|
8958
8954
|
children: /* @__PURE__ */ jsx("div", {
|
|
8959
|
-
className: "cpk
|
|
8955
|
+
className: "cpk-assistant-message-work-text-content",
|
|
8960
8956
|
"data-work-text": open === void 0 ? "reply" : "narration",
|
|
8961
8957
|
children
|
|
8962
8958
|
})
|
|
@@ -9062,7 +9058,7 @@ function FeedbackCommentPopover({ feedbackComment, comment, savedComment, rating
|
|
|
9062
9058
|
},
|
|
9063
9059
|
onPointerEnter: () => comment.enter("pointer"),
|
|
9064
9060
|
onPointerLeave: () => comment.leave("pointer"),
|
|
9065
|
-
className: "cpk
|
|
9061
|
+
className: "cpk-assistant-message-feedback-popover",
|
|
9066
9062
|
children: /* @__PURE__ */ jsx(Fragment, { children: renderSlot(feedbackComment, CopilotChatAssistantMessage.FeedbackComment, {
|
|
9067
9063
|
value: comment.draft,
|
|
9068
9064
|
savedComment,
|
|
@@ -9189,7 +9185,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9189
9185
|
const boundReadAloudButton = renderSlot(readAloudButton, CopilotChatAssistantMessage.ReadAloudButton, { onClick: onReadAloud ? () => onReadAloud(message) : void 0 });
|
|
9190
9186
|
const boundRegenerateButton = renderSlot(regenerateButton, CopilotChatAssistantMessage.RegenerateButton, { onClick: onRegenerate ? () => onRegenerate(message) : void 0 });
|
|
9191
9187
|
const boundToolbar = renderSlot(toolbar, CopilotChatAssistantMessage.Toolbar, { children: /* @__PURE__ */ jsxs("div", {
|
|
9192
|
-
className: "cpk
|
|
9188
|
+
className: "cpk-assistant-message-toolbar-items",
|
|
9193
9189
|
children: [
|
|
9194
9190
|
boundCopyButton,
|
|
9195
9191
|
(onThumbsUp || thumbsUpButton || feedback) && boundThumbsUpButton,
|
|
@@ -9254,14 +9250,14 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9254
9250
|
ref: root,
|
|
9255
9251
|
"data-copilotkit": true,
|
|
9256
9252
|
"data-testid": "copilot-assistant-message",
|
|
9257
|
-
className:
|
|
9253
|
+
className: cn("copilotKitMessage copilotKitAssistantMessage", className),
|
|
9258
9254
|
...props,
|
|
9259
9255
|
"data-message-id": message.id,
|
|
9260
9256
|
children: [
|
|
9261
9257
|
/* @__PURE__ */ jsx(WorkText, {
|
|
9262
9258
|
messageId: message.id,
|
|
9263
9259
|
children: /* @__PURE__ */ jsx("div", {
|
|
9264
|
-
className: "cpk
|
|
9260
|
+
className: "cpk-markdown cpk-assistant-message-markdown",
|
|
9265
9261
|
children: boundMarkdownRenderer
|
|
9266
9262
|
})
|
|
9267
9263
|
}),
|
|
@@ -9289,7 +9285,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9289
9285
|
};
|
|
9290
9286
|
_CopilotChatAssistantMessage.Toolbar = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
9291
9287
|
"data-testid": "copilot-assistant-toolbar",
|
|
9292
|
-
className:
|
|
9288
|
+
className: cn("cpk-assistant-message-toolbar", className),
|
|
9293
9289
|
...props
|
|
9294
9290
|
});
|
|
9295
9291
|
const ToolbarButton = _CopilotChatAssistantMessage.ToolbarButton = ({ title, tooltip, tooltipClassName, children, ...props }) => {
|
|
@@ -9342,7 +9338,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9342
9338
|
onClick: handleClick,
|
|
9343
9339
|
className,
|
|
9344
9340
|
...props,
|
|
9345
|
-
children: copied ? /* @__PURE__ */ jsx(Check, { className: "cpk
|
|
9341
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { className: "cpk-assistant-message-toolbar-icon" }) : /* @__PURE__ */ jsx(Copy, { className: "cpk-assistant-message-toolbar-icon" })
|
|
9346
9342
|
});
|
|
9347
9343
|
};
|
|
9348
9344
|
_CopilotChatAssistantMessage.InspectorButton = CopilotChatInspectorButton;
|
|
@@ -9353,7 +9349,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9353
9349
|
title: title || labels.assistantMessageToolbarThumbsUpLabel,
|
|
9354
9350
|
...props,
|
|
9355
9351
|
children: /* @__PURE__ */ jsx(ThumbsUp, {
|
|
9356
|
-
className: "cpk
|
|
9352
|
+
className: "cpk-assistant-message-toolbar-icon",
|
|
9357
9353
|
fill: props["aria-pressed"] === true ? "currentColor" : "none"
|
|
9358
9354
|
})
|
|
9359
9355
|
});
|
|
@@ -9365,7 +9361,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9365
9361
|
title: title || labels.assistantMessageToolbarThumbsDownLabel,
|
|
9366
9362
|
...props,
|
|
9367
9363
|
children: /* @__PURE__ */ jsx(ThumbsDown, {
|
|
9368
|
-
className: "cpk
|
|
9364
|
+
className: "cpk-assistant-message-toolbar-icon",
|
|
9369
9365
|
fill: props["aria-pressed"] === true ? "currentColor" : "none"
|
|
9370
9366
|
})
|
|
9371
9367
|
});
|
|
@@ -9375,7 +9371,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9375
9371
|
const changed = value.trim() !== savedComment;
|
|
9376
9372
|
return /* @__PURE__ */ jsxs("form", {
|
|
9377
9373
|
"data-testid": "copilot-feedback-comment",
|
|
9378
|
-
className:
|
|
9374
|
+
className: cn("cpk-assistant-message-feedback-comment", className),
|
|
9379
9375
|
onSubmit: (event) => {
|
|
9380
9376
|
event.preventDefault();
|
|
9381
9377
|
onSubmit();
|
|
@@ -9395,13 +9391,13 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9395
9391
|
onChange: (event) => onChange(event.target.value),
|
|
9396
9392
|
placeholder: labels.assistantMessageFeedbackCommentPlaceholder,
|
|
9397
9393
|
"aria-label": labels.assistantMessageFeedbackCommentPlaceholder,
|
|
9398
|
-
className: "cpk
|
|
9394
|
+
className: "cpk-assistant-message-feedback-comment-input"
|
|
9399
9395
|
}), changed && /* @__PURE__ */ jsx(Button, {
|
|
9400
9396
|
type: "submit",
|
|
9401
9397
|
variant: "assistantMessageToolbarButton",
|
|
9402
9398
|
"aria-label": labels.assistantMessageFeedbackCommentSubmitLabel,
|
|
9403
9399
|
title: labels.assistantMessageFeedbackCommentSubmitLabel,
|
|
9404
|
-
children: /* @__PURE__ */ jsx(ArrowUp, { className: "cpk
|
|
9400
|
+
children: /* @__PURE__ */ jsx(ArrowUp, { className: "cpk-assistant-message-feedback-comment-submit-icon" })
|
|
9405
9401
|
})]
|
|
9406
9402
|
});
|
|
9407
9403
|
};
|
|
@@ -9411,7 +9407,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9411
9407
|
"data-testid": "copilot-read-aloud-button",
|
|
9412
9408
|
title: title || labels.assistantMessageToolbarReadAloudLabel,
|
|
9413
9409
|
...props,
|
|
9414
|
-
children: /* @__PURE__ */ jsx(Volume2, { className: "cpk
|
|
9410
|
+
children: /* @__PURE__ */ jsx(Volume2, { className: "cpk-assistant-message-read-aloud-icon" })
|
|
9415
9411
|
});
|
|
9416
9412
|
};
|
|
9417
9413
|
_CopilotChatAssistantMessage.RegenerateButton = ({ title, ...props }) => {
|
|
@@ -9420,7 +9416,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
9420
9416
|
"data-testid": "copilot-regenerate-button",
|
|
9421
9417
|
title: title || labels.assistantMessageToolbarRegenerateLabel,
|
|
9422
9418
|
...props,
|
|
9423
|
-
children: /* @__PURE__ */ jsx(RefreshCw, { className: "cpk
|
|
9419
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { className: "cpk-assistant-message-toolbar-icon" })
|
|
9424
9420
|
});
|
|
9425
9421
|
};
|
|
9426
9422
|
})(CopilotChatAssistantMessage || (CopilotChatAssistantMessage = {}));
|
|
@@ -9453,13 +9449,13 @@ function Lightbox({ onClose, children }) {
|
|
|
9453
9449
|
}, [onClose]);
|
|
9454
9450
|
if (typeof document === "undefined") return null;
|
|
9455
9451
|
return createPortal(/* @__PURE__ */ jsxs("div", {
|
|
9456
|
-
className: "cpk
|
|
9452
|
+
className: "cpk-attachment-lightbox",
|
|
9457
9453
|
onClick: onClose,
|
|
9458
9454
|
children: [/* @__PURE__ */ jsx("button", {
|
|
9459
9455
|
onClick: onClose,
|
|
9460
|
-
className: "cpk
|
|
9456
|
+
className: "cpk-attachment-lightbox-close-button",
|
|
9461
9457
|
"aria-label": labels.attachmentPreviewCloseButtonLabel,
|
|
9462
|
-
children: /* @__PURE__ */ jsx(X, { className: "cpk
|
|
9458
|
+
children: /* @__PURE__ */ jsx(X, { className: "cpk-attachment-lightbox-close-icon" })
|
|
9463
9459
|
}), /* @__PURE__ */ jsx("div", {
|
|
9464
9460
|
onClick: (e) => e.stopPropagation(),
|
|
9465
9461
|
children
|
|
@@ -9517,14 +9513,14 @@ const ImageAttachment = memo(function ImageAttachment({ src, className }) {
|
|
|
9517
9513
|
const [error, setError] = useState(false);
|
|
9518
9514
|
const { thumbnailRef, vtName, open, openLightbox, closeLightbox } = useLightbox();
|
|
9519
9515
|
if (error) return /* @__PURE__ */ jsx("div", {
|
|
9520
|
-
className: cn("cpk
|
|
9516
|
+
className: cn("cpk-attachment-renderer cpk-attachment-renderer-image-error", className),
|
|
9521
9517
|
children: /* @__PURE__ */ jsx("span", { children: "Failed to load image" })
|
|
9522
9518
|
});
|
|
9523
9519
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("img", {
|
|
9524
9520
|
ref: thumbnailRef,
|
|
9525
9521
|
src,
|
|
9526
9522
|
alt: "Image attachment",
|
|
9527
|
-
className: cn("cpk
|
|
9523
|
+
className: cn("cpk-attachment-renderer cpk-attachment-renderer-image", className),
|
|
9528
9524
|
onClick: openLightbox,
|
|
9529
9525
|
onError: () => setError(true)
|
|
9530
9526
|
}), open && /* @__PURE__ */ jsx(Lightbox, {
|
|
@@ -9533,20 +9529,20 @@ const ImageAttachment = memo(function ImageAttachment({ src, className }) {
|
|
|
9533
9529
|
style: { viewTransitionName: vtName },
|
|
9534
9530
|
src,
|
|
9535
9531
|
alt: "Image attachment",
|
|
9536
|
-
className: "cpk
|
|
9532
|
+
className: "cpk-attachment-renderer-lightbox-image"
|
|
9537
9533
|
})
|
|
9538
9534
|
})] });
|
|
9539
9535
|
});
|
|
9540
9536
|
const AudioAttachment = memo(function AudioAttachment({ src, filename, className }) {
|
|
9541
9537
|
return /* @__PURE__ */ jsxs("div", {
|
|
9542
|
-
className: cn("cpk
|
|
9538
|
+
className: cn("cpk-attachment-renderer cpk-attachment-renderer-audio", className),
|
|
9543
9539
|
children: [/* @__PURE__ */ jsx("audio", {
|
|
9544
9540
|
src,
|
|
9545
9541
|
controls: true,
|
|
9546
9542
|
preload: "metadata",
|
|
9547
|
-
className: "cpk
|
|
9543
|
+
className: "cpk-attachment-renderer-audio-player"
|
|
9548
9544
|
}), filename && /* @__PURE__ */ jsx("span", {
|
|
9549
|
-
className: "cpk
|
|
9545
|
+
className: "cpk-attachment-renderer-audio-filename",
|
|
9550
9546
|
children: filename
|
|
9551
9547
|
})]
|
|
9552
9548
|
});
|
|
@@ -9556,7 +9552,7 @@ const VideoAttachment = memo(function VideoAttachment({ src, className }) {
|
|
|
9556
9552
|
src,
|
|
9557
9553
|
controls: true,
|
|
9558
9554
|
preload: "metadata",
|
|
9559
|
-
className: cn("cpk
|
|
9555
|
+
className: cn("cpk-attachment-renderer cpk-attachment-renderer-video", className)
|
|
9560
9556
|
});
|
|
9561
9557
|
});
|
|
9562
9558
|
const DocumentAttachment = memo(function DocumentAttachment({ src, source, filename, className }) {
|
|
@@ -9567,12 +9563,12 @@ const DocumentAttachment = memo(function DocumentAttachment({ src, source, filen
|
|
|
9567
9563
|
target: "_blank",
|
|
9568
9564
|
rel: "noopener noreferrer",
|
|
9569
9565
|
"aria-label": label,
|
|
9570
|
-
className: cn("cpk
|
|
9566
|
+
className: cn("cpk-attachment-renderer cpk-attachment-renderer-document", className),
|
|
9571
9567
|
children: [/* @__PURE__ */ jsx("span", {
|
|
9572
|
-
className: "cpk
|
|
9568
|
+
className: "cpk-attachment-renderer-document-icon",
|
|
9573
9569
|
children: getDocumentIcon(source.mimeType ?? "")
|
|
9574
9570
|
}), /* @__PURE__ */ jsx("span", {
|
|
9575
|
-
className: "cpk
|
|
9571
|
+
className: "cpk-attachment-renderer-document-name",
|
|
9576
9572
|
children: filename || source.mimeType || "Unknown type"
|
|
9577
9573
|
})]
|
|
9578
9574
|
});
|
|
@@ -9637,7 +9633,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9637
9633
|
});
|
|
9638
9634
|
const showBranchNavigation = numberOfBranches && numberOfBranches > 1 && onSwitchToBranch;
|
|
9639
9635
|
const BoundToolbar = renderSlot(toolbar, CopilotChatUserMessage.Toolbar, { children: /* @__PURE__ */ jsxs("div", {
|
|
9640
|
-
className: "cpk
|
|
9636
|
+
className: "cpk-user-message-toolbar-items",
|
|
9641
9637
|
children: [
|
|
9642
9638
|
additionalToolbarItems,
|
|
9643
9639
|
BoundCopyButton,
|
|
@@ -9663,12 +9659,12 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9663
9659
|
return /* @__PURE__ */ jsxs("div", {
|
|
9664
9660
|
"data-copilotkit": true,
|
|
9665
9661
|
"data-testid": "copilot-user-message",
|
|
9666
|
-
className:
|
|
9662
|
+
className: cn("copilotKitMessage copilotKitUserMessage cpk-user-message", className),
|
|
9667
9663
|
"data-message-id": message.id,
|
|
9668
9664
|
...props,
|
|
9669
9665
|
children: [
|
|
9670
9666
|
mediaParts.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
9671
|
-
className: "cpk
|
|
9667
|
+
className: "cpk-user-message-attachments",
|
|
9672
9668
|
children: mediaParts.map((part, index) => /* @__PURE__ */ jsx(CopilotChatAttachmentRenderer, {
|
|
9673
9669
|
type: part.type,
|
|
9674
9670
|
source: part.source,
|
|
@@ -9682,17 +9678,17 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9682
9678
|
}
|
|
9683
9679
|
(function(_CopilotChatUserMessage) {
|
|
9684
9680
|
_CopilotChatUserMessage.Container = ({ children, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
9685
|
-
className:
|
|
9681
|
+
className: cn("cpk-user-message-container", className),
|
|
9686
9682
|
...props,
|
|
9687
9683
|
children
|
|
9688
9684
|
});
|
|
9689
9685
|
_CopilotChatUserMessage.MessageRenderer = ({ content, className }) => /* @__PURE__ */ jsx("div", {
|
|
9690
|
-
className:
|
|
9686
|
+
className: cn("cpk-user-message-bubble", className),
|
|
9691
9687
|
children: content
|
|
9692
9688
|
});
|
|
9693
9689
|
_CopilotChatUserMessage.Toolbar = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
9694
9690
|
"data-testid": "copilot-user-toolbar",
|
|
9695
|
-
className:
|
|
9691
|
+
className: cn("cpk-user-message-toolbar", className),
|
|
9696
9692
|
...props
|
|
9697
9693
|
});
|
|
9698
9694
|
const ToolbarButton = _CopilotChatUserMessage.ToolbarButton = ({ title, children, className, ...props }) => {
|
|
@@ -9702,7 +9698,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9702
9698
|
type: "button",
|
|
9703
9699
|
variant: "assistantMessageToolbarButton",
|
|
9704
9700
|
"aria-label": title,
|
|
9705
|
-
className
|
|
9701
|
+
className,
|
|
9706
9702
|
...props,
|
|
9707
9703
|
children
|
|
9708
9704
|
})
|
|
@@ -9728,7 +9724,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9728
9724
|
onClick: handleClick,
|
|
9729
9725
|
className,
|
|
9730
9726
|
...props,
|
|
9731
|
-
children: copied ? /* @__PURE__ */ jsx(Check, { className: "cpk
|
|
9727
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { className: "cpk-user-message-toolbar-icon" }) : /* @__PURE__ */ jsx(Copy, { className: "cpk-user-message-toolbar-icon" })
|
|
9732
9728
|
});
|
|
9733
9729
|
};
|
|
9734
9730
|
_CopilotChatUserMessage.EditButton = ({ className, title, ...props }) => {
|
|
@@ -9738,7 +9734,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9738
9734
|
title: title || labels.userMessageToolbarEditMessageLabel,
|
|
9739
9735
|
className,
|
|
9740
9736
|
...props,
|
|
9741
|
-
children: /* @__PURE__ */ jsx(Edit, { className: "cpk
|
|
9737
|
+
children: /* @__PURE__ */ jsx(Edit, { className: "cpk-user-message-toolbar-icon" })
|
|
9742
9738
|
});
|
|
9743
9739
|
};
|
|
9744
9740
|
_CopilotChatUserMessage.BranchNavigation = ({ className, currentBranch = 0, numberOfBranches = 1, onSwitchToBranch, message, ...props }) => {
|
|
@@ -9748,7 +9744,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9748
9744
|
const canGoNext = currentBranch < numberOfBranches - 1;
|
|
9749
9745
|
return /* @__PURE__ */ jsxs("div", {
|
|
9750
9746
|
"data-testid": "copilot-branch-navigation",
|
|
9751
|
-
className:
|
|
9747
|
+
className: cn("cpk-user-message-branch-navigation", className),
|
|
9752
9748
|
...props,
|
|
9753
9749
|
children: [
|
|
9754
9750
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -9760,12 +9756,12 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9760
9756
|
message
|
|
9761
9757
|
}),
|
|
9762
9758
|
disabled: !canGoPrev,
|
|
9763
|
-
className: "cpk
|
|
9759
|
+
className: "cpk-user-message-branch-button",
|
|
9764
9760
|
"aria-label": labels.userMessageToolbarPreviousBranchLabel,
|
|
9765
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "cpk
|
|
9761
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "cpk-user-message-branch-icon" })
|
|
9766
9762
|
}),
|
|
9767
9763
|
/* @__PURE__ */ jsxs("span", {
|
|
9768
|
-
className: "cpk
|
|
9764
|
+
className: "cpk-user-message-branch-counter",
|
|
9769
9765
|
children: [
|
|
9770
9766
|
currentBranch + 1,
|
|
9771
9767
|
"/",
|
|
@@ -9781,9 +9777,9 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9781
9777
|
message
|
|
9782
9778
|
}),
|
|
9783
9779
|
disabled: !canGoNext,
|
|
9784
|
-
className: "cpk
|
|
9780
|
+
className: "cpk-user-message-branch-button",
|
|
9785
9781
|
"aria-label": labels.userMessageToolbarNextBranchLabel,
|
|
9786
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: "cpk
|
|
9782
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "cpk-user-message-branch-icon" })
|
|
9787
9783
|
})
|
|
9788
9784
|
]
|
|
9789
9785
|
});
|
|
@@ -9879,7 +9875,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
|
|
|
9879
9875
|
})
|
|
9880
9876
|
});
|
|
9881
9877
|
return /* @__PURE__ */ jsxs("div", {
|
|
9882
|
-
className:
|
|
9878
|
+
className: cn("cpk-reasoning-message", className),
|
|
9883
9879
|
"data-message-id": message.id,
|
|
9884
9880
|
...props,
|
|
9885
9881
|
children: [boundHeader, boundToggle]
|
|
@@ -9890,47 +9886,47 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
|
|
|
9890
9886
|
const isExpandable = !!hasContent;
|
|
9891
9887
|
return /* @__PURE__ */ jsxs("button", {
|
|
9892
9888
|
type: "button",
|
|
9893
|
-
className:
|
|
9889
|
+
className: cn("cpk-reasoning-message-header", isExpandable && "cpk-reasoning-message-header-expandable", className),
|
|
9894
9890
|
"aria-expanded": isExpandable ? isOpen : void 0,
|
|
9895
9891
|
...headerProps,
|
|
9896
9892
|
children: [
|
|
9897
9893
|
/* @__PURE__ */ jsx("span", {
|
|
9898
|
-
className: "cpk
|
|
9894
|
+
className: "cpk-reasoning-message-label",
|
|
9899
9895
|
children: label
|
|
9900
9896
|
}),
|
|
9901
9897
|
isStreaming && !hasContent && /* @__PURE__ */ jsx("span", {
|
|
9902
|
-
className: "cpk
|
|
9903
|
-
children: /* @__PURE__ */ jsx("span", { className: "cpk
|
|
9898
|
+
className: "cpk-reasoning-message-indicator",
|
|
9899
|
+
children: /* @__PURE__ */ jsx("span", { className: "cpk-reasoning-message-indicator-dot" })
|
|
9904
9900
|
}),
|
|
9905
9901
|
headerChildren,
|
|
9906
|
-
isExpandable && /* @__PURE__ */ jsx(ChevronRight, { className:
|
|
9902
|
+
isExpandable && /* @__PURE__ */ jsx(ChevronRight, { className: cn("cpk-reasoning-message-chevron", isOpen && "cpk-reasoning-message-chevron-open") })
|
|
9907
9903
|
]
|
|
9908
9904
|
});
|
|
9909
9905
|
};
|
|
9910
9906
|
_CopilotChatReasoningMessage.Content = ({ isStreaming, hasContent, className, children: contentChildren, ...contentProps }) => {
|
|
9911
9907
|
if (!hasContent && !isStreaming) return null;
|
|
9912
9908
|
return /* @__PURE__ */ jsx("div", {
|
|
9913
|
-
className:
|
|
9909
|
+
className: cn("cpk-reasoning-message-content", className),
|
|
9914
9910
|
...contentProps,
|
|
9915
9911
|
children: /* @__PURE__ */ jsxs("div", {
|
|
9916
|
-
className: "cpk
|
|
9912
|
+
className: "cpk-reasoning-message-text",
|
|
9917
9913
|
children: [/* @__PURE__ */ jsx(StreamingMarkdownDefaultRenderer, {
|
|
9918
9914
|
content: typeof contentChildren === "string" ? contentChildren : "",
|
|
9919
9915
|
isStreaming
|
|
9920
9916
|
}), isStreaming && hasContent && /* @__PURE__ */ jsx("span", {
|
|
9921
|
-
className: "cpk
|
|
9922
|
-
children: /* @__PURE__ */ jsx("span", { className: "cpk
|
|
9917
|
+
className: "cpk-reasoning-message-cursor",
|
|
9918
|
+
children: /* @__PURE__ */ jsx("span", { className: "cpk-reasoning-message-cursor-dot" })
|
|
9923
9919
|
})]
|
|
9924
9920
|
})
|
|
9925
9921
|
});
|
|
9926
9922
|
};
|
|
9927
9923
|
_CopilotChatReasoningMessage.Toggle = ({ isOpen, className, children: toggleChildren, ...toggleProps }) => {
|
|
9928
9924
|
return /* @__PURE__ */ jsx("div", {
|
|
9929
|
-
className:
|
|
9925
|
+
className: cn("cpk-reasoning-message-toggle", className),
|
|
9930
9926
|
style: { gridTemplateRows: isOpen ? "1fr" : "0fr" },
|
|
9931
9927
|
...toggleProps,
|
|
9932
9928
|
children: /* @__PURE__ */ jsx("div", {
|
|
9933
|
-
className: "cpk
|
|
9929
|
+
className: "cpk-reasoning-message-toggle-content",
|
|
9934
9930
|
children: toggleChildren
|
|
9935
9931
|
})
|
|
9936
9932
|
});
|
|
@@ -9943,8 +9939,6 @@ var CopilotChatReasoningMessage_default = CopilotChatReasoningMessage;
|
|
|
9943
9939
|
|
|
9944
9940
|
//#endregion
|
|
9945
9941
|
//#region src/components/chat/CopilotChatSuggestionPill.tsx
|
|
9946
|
-
const baseClasses = "group cpk:inline-flex cpk:h-7 cpk:sm:h-8 cpk:items-center cpk:gap-1 cpk:sm:gap-1.5 cpk:rounded-full cpk:border cpk:border-border/60 cpk:bg-background cpk:px-2.5 cpk:sm:px-3 cpk:text-[11px] cpk:sm:text-xs cpk:leading-none cpk:text-foreground cpk:transition-colors cpk:cursor-pointer cpk:hover:bg-accent/60 cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring cpk:focus-visible:ring-offset-2 cpk:focus-visible:ring-offset-background cpk:disabled:cursor-not-allowed cpk:disabled:text-muted-foreground cpk:disabled:hover:bg-background cpk:disabled:hover:text-muted-foreground cpk:pointer-events-auto";
|
|
9947
|
-
const labelClasses = "cpk:whitespace-nowrap cpk:font-medium cpk:leading-none";
|
|
9948
9942
|
const CopilotChatSuggestionPill = React.forwardRef(function CopilotChatSuggestionPill({ className, children, icon, isLoading, type, ...props }, ref) {
|
|
9949
9943
|
const showIcon = !isLoading && icon;
|
|
9950
9944
|
return /* @__PURE__ */ jsxs("button", {
|
|
@@ -9952,22 +9946,22 @@ const CopilotChatSuggestionPill = React.forwardRef(function CopilotChatSuggestio
|
|
|
9952
9946
|
"data-copilotkit": true,
|
|
9953
9947
|
"data-testid": "copilot-suggestion",
|
|
9954
9948
|
"data-slot": "suggestion-pill",
|
|
9955
|
-
className:
|
|
9949
|
+
className: className ? `cpk-suggestion-pill ${className}` : "cpk-suggestion-pill",
|
|
9956
9950
|
type: type ?? "button",
|
|
9957
9951
|
"aria-busy": isLoading || void 0,
|
|
9958
9952
|
disabled: isLoading || props.disabled,
|
|
9959
9953
|
...props,
|
|
9960
9954
|
children: [isLoading ? /* @__PURE__ */ jsx("span", {
|
|
9961
|
-
className: "cpk
|
|
9955
|
+
className: "cpk-suggestion-pill-icon",
|
|
9962
9956
|
children: /* @__PURE__ */ jsx(Loader2, {
|
|
9963
|
-
className: "cpk
|
|
9957
|
+
className: "cpk-suggestion-pill-spinner",
|
|
9964
9958
|
"aria-hidden": "true"
|
|
9965
9959
|
})
|
|
9966
9960
|
}) : showIcon && /* @__PURE__ */ jsx("span", {
|
|
9967
|
-
className: "cpk
|
|
9961
|
+
className: "cpk-suggestion-pill-icon",
|
|
9968
9962
|
children: icon
|
|
9969
9963
|
}), /* @__PURE__ */ jsx("span", {
|
|
9970
|
-
className:
|
|
9964
|
+
className: "cpk-suggestion-pill-label",
|
|
9971
9965
|
children
|
|
9972
9966
|
})]
|
|
9973
9967
|
});
|
|
@@ -9981,7 +9975,7 @@ const DefaultContainer = React.forwardRef(function DefaultContainer({ className,
|
|
|
9981
9975
|
ref,
|
|
9982
9976
|
"data-copilotkit": true,
|
|
9983
9977
|
"data-testid": "copilot-suggestions",
|
|
9984
|
-
className: cn("cpk
|
|
9978
|
+
className: cn("cpk-suggestion-view", className),
|
|
9985
9979
|
...props
|
|
9986
9980
|
});
|
|
9987
9981
|
});
|
|
@@ -10111,30 +10105,30 @@ function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSi
|
|
|
10111
10105
|
"data-testid": "copilot-work-summary",
|
|
10112
10106
|
"data-state": isWorking ? "working" : "done",
|
|
10113
10107
|
"aria-expanded": isOpen,
|
|
10114
|
-
className:
|
|
10108
|
+
className: cn("cpk-work-summary", className),
|
|
10115
10109
|
...props,
|
|
10116
10110
|
children: [isWorking ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
10117
|
-
className: "cpk
|
|
10111
|
+
className: "cpk-work-summary-label cpk-shimmer",
|
|
10118
10112
|
children: "Working"
|
|
10119
10113
|
}), liveMs !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
10120
|
-
className: "cpk
|
|
10114
|
+
className: "cpk-work-summary-detail cpk-work-summary-timer",
|
|
10121
10115
|
children: formatDuration(liveMs)
|
|
10122
10116
|
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10123
10117
|
/* @__PURE__ */ jsx("span", {
|
|
10124
|
-
className: "cpk
|
|
10118
|
+
className: "cpk-work-summary-label",
|
|
10125
10119
|
children: duration ? `Worked for ${duration}` : `Used ${pluralize(calls.length, "tool")}`
|
|
10126
10120
|
}),
|
|
10127
10121
|
duration && /* @__PURE__ */ jsx("span", {
|
|
10128
|
-
className: "cpk
|
|
10122
|
+
className: "cpk-work-summary-detail",
|
|
10129
10123
|
children: pluralize(calls.length, "tool")
|
|
10130
10124
|
}),
|
|
10131
10125
|
failed > 0 && /* @__PURE__ */ jsxs("span", {
|
|
10132
|
-
className: "cpk
|
|
10126
|
+
className: "cpk-work-summary-failed",
|
|
10133
10127
|
children: [failed, " failed"]
|
|
10134
10128
|
})
|
|
10135
10129
|
] }), /* @__PURE__ */ jsx(ChevronRight, {
|
|
10136
10130
|
"aria-hidden": "true",
|
|
10137
|
-
className:
|
|
10131
|
+
className: cn("cpk-work-summary-chevron", isOpen && "cpk-work-summary-chevron-open")
|
|
10138
10132
|
})]
|
|
10139
10133
|
});
|
|
10140
10134
|
}
|
|
@@ -10151,7 +10145,7 @@ function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSi
|
|
|
10151
10145
|
* checkmark — whose geometry lives in each path's `d` ATTRIBUTE so it
|
|
10152
10146
|
* renders in every browser (the CSS `d:` property is Chrome-only).
|
|
10153
10147
|
*
|
|
10154
|
-
* Two states, driven by the `data-status` attribute (see
|
|
10148
|
+
* Two states, driven by the `data-status` attribute (see styles/css/intelligence-indicator.css
|
|
10155
10149
|
* for the exact timing):
|
|
10156
10150
|
* 1. **In-progress.** The arc spins (CSS rotation) inside the pill and
|
|
10157
10151
|
* the checkmark is hidden. Label + icon are a saturated purple.
|
|
@@ -10165,7 +10159,7 @@ function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSi
|
|
|
10165
10159
|
* — the static check plus the color/slant shift carry the "done"
|
|
10166
10160
|
* meaning, so no wording change is needed.
|
|
10167
10161
|
*
|
|
10168
|
-
* All motion is gated behind `prefers-reduced-motion` (
|
|
10162
|
+
* All motion is gated behind `prefers-reduced-motion` (styles/css/intelligence-indicator.css):
|
|
10169
10163
|
* when reduced motion is requested the arc does not spin and the two
|
|
10170
10164
|
* states swap instantly, without transitions.
|
|
10171
10165
|
*
|
|
@@ -10176,7 +10170,7 @@ function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSi
|
|
|
10176
10170
|
*/
|
|
10177
10171
|
function IntelligenceIndicatorView({ message, status, label, className, ...rest }) {
|
|
10178
10172
|
return /* @__PURE__ */ jsxs("span", {
|
|
10179
|
-
className:
|
|
10173
|
+
className: cn("cpk-intelligence-indicator", className),
|
|
10180
10174
|
role: "status",
|
|
10181
10175
|
"aria-live": "polite",
|
|
10182
10176
|
"data-testid": `cpk-intelligence-indicator-${message.id}`,
|
|
@@ -10748,7 +10742,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
|
|
|
10748
10742
|
return /* @__PURE__ */ jsx(Collapsible, {
|
|
10749
10743
|
open: working || calls.length > 0,
|
|
10750
10744
|
children: /* @__PURE__ */ jsx("div", {
|
|
10751
|
-
className: "cpk
|
|
10745
|
+
className: "cpk-message-view-work-summary",
|
|
10752
10746
|
children: renderSlot(workSummary, CopilotChatWorkSummary, {
|
|
10753
10747
|
isWorking: working,
|
|
10754
10748
|
isOpen: open,
|
|
@@ -11119,7 +11113,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
|
|
|
11119
11113
|
children: /* @__PURE__ */ jsxs("div", {
|
|
11120
11114
|
"data-copilotkit": true,
|
|
11121
11115
|
"data-testid": "copilot-message-list",
|
|
11122
|
-
className:
|
|
11116
|
+
className: cn("copilotKitMessages cpk-message-view", className),
|
|
11123
11117
|
...props,
|
|
11124
11118
|
children: [
|
|
11125
11119
|
shouldVirtualize ? /* @__PURE__ */ jsx("div", {
|
|
@@ -11147,7 +11141,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
|
|
|
11147
11141
|
interruptElement,
|
|
11148
11142
|
pendingWorkSummary && renderWorkSummary(latestTurnKey, []),
|
|
11149
11143
|
showCursor && /* @__PURE__ */ jsx("div", {
|
|
11150
|
-
className: "cpk
|
|
11144
|
+
className: "cpk-message-view-cursor-container",
|
|
11151
11145
|
children: renderSlot(cursor, CopilotChatMessageView.Cursor, {})
|
|
11152
11146
|
})
|
|
11153
11147
|
]
|
|
@@ -11158,7 +11152,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
|
|
|
11158
11152
|
CopilotChatMessageView.Cursor = function Cursor({ className, ...props }) {
|
|
11159
11153
|
return /* @__PURE__ */ jsx("div", {
|
|
11160
11154
|
"data-testid": "copilot-loading-cursor",
|
|
11161
|
-
className:
|
|
11155
|
+
className: cn("cpk-message-view-cursor", className),
|
|
11162
11156
|
...props
|
|
11163
11157
|
});
|
|
11164
11158
|
};
|
|
@@ -11174,17 +11168,16 @@ const CopilotChatAttachmentQueue = ({ attachments, onRemoveAttachment, className
|
|
|
11174
11168
|
if (attachments.length === 0) return null;
|
|
11175
11169
|
return /* @__PURE__ */ jsx("div", {
|
|
11176
11170
|
"data-testid": "copilot-attachment-queue",
|
|
11177
|
-
className: cn("cpk
|
|
11171
|
+
className: cn("cpk-attachment-queue", className),
|
|
11178
11172
|
children: attachments.map((attachment) => {
|
|
11179
|
-
const isMedia = attachment.type === "image" || attachment.type === "video";
|
|
11180
11173
|
return /* @__PURE__ */ jsxs("div", {
|
|
11181
|
-
className: cn("cpk
|
|
11174
|
+
className: cn("cpk-attachment-queue-item", attachment.type === "image" || attachment.type === "video" ? "cpk-attachment-queue-item-media" : attachment.type === "audio" ? "cpk-attachment-queue-item-audio" : "cpk-attachment-queue-item-document"),
|
|
11182
11175
|
children: [
|
|
11183
11176
|
attachment.status === "uploading" && /* @__PURE__ */ jsx(UploadingOverlay, {}),
|
|
11184
11177
|
/* @__PURE__ */ jsx(AttachmentPreview, { attachment }),
|
|
11185
11178
|
/* @__PURE__ */ jsx("button", {
|
|
11186
11179
|
onClick: () => onRemoveAttachment(attachment.id),
|
|
11187
|
-
className:
|
|
11180
|
+
className: "cpk-attachment-queue-remove-button",
|
|
11188
11181
|
"aria-label": labels.attachmentRemoveButtonLabel,
|
|
11189
11182
|
children: "✕"
|
|
11190
11183
|
})
|
|
@@ -11195,12 +11188,12 @@ const CopilotChatAttachmentQueue = ({ attachments, onRemoveAttachment, className
|
|
|
11195
11188
|
};
|
|
11196
11189
|
function UploadingOverlay() {
|
|
11197
11190
|
return /* @__PURE__ */ jsx("div", {
|
|
11198
|
-
className: "cpk
|
|
11199
|
-
children: /* @__PURE__ */ jsx("div", { className: "cpk
|
|
11191
|
+
className: "cpk-attachment-queue-uploading-overlay",
|
|
11192
|
+
children: /* @__PURE__ */ jsx("div", { className: "cpk-attachment-queue-uploading-spinner" })
|
|
11200
11193
|
});
|
|
11201
11194
|
}
|
|
11202
11195
|
function AttachmentPreview({ attachment }) {
|
|
11203
|
-
if (attachment.status === "uploading") return /* @__PURE__ */ jsx("div", { className: "cpk
|
|
11196
|
+
if (attachment.status === "uploading") return /* @__PURE__ */ jsx("div", { className: "cpk-attachment-queue-placeholder" });
|
|
11204
11197
|
switch (attachment.type) {
|
|
11205
11198
|
case "image": return /* @__PURE__ */ jsx(ImagePreview, { attachment });
|
|
11206
11199
|
case "audio": return /* @__PURE__ */ jsx(AudioPreview, { attachment });
|
|
@@ -11215,7 +11208,7 @@ function ImagePreview({ attachment }) {
|
|
|
11215
11208
|
ref: thumbnailRef,
|
|
11216
11209
|
src,
|
|
11217
11210
|
alt: attachment.filename || "Image attachment",
|
|
11218
|
-
className: "cpk
|
|
11211
|
+
className: "cpk-attachment-queue-image",
|
|
11219
11212
|
onClick: openLightbox
|
|
11220
11213
|
}), open && /* @__PURE__ */ jsx(Lightbox, {
|
|
11221
11214
|
onClose: closeLightbox,
|
|
@@ -11223,20 +11216,20 @@ function ImagePreview({ attachment }) {
|
|
|
11223
11216
|
style: { viewTransitionName: vtName },
|
|
11224
11217
|
src,
|
|
11225
11218
|
alt: attachment.filename || "Image attachment",
|
|
11226
|
-
className: "cpk
|
|
11219
|
+
className: "cpk-attachment-queue-lightbox-image"
|
|
11227
11220
|
})
|
|
11228
11221
|
})] });
|
|
11229
11222
|
}
|
|
11230
11223
|
function AudioPreview({ attachment }) {
|
|
11231
11224
|
return /* @__PURE__ */ jsxs("div", {
|
|
11232
|
-
className: "cpk
|
|
11225
|
+
className: "cpk-attachment-queue-audio",
|
|
11233
11226
|
children: [/* @__PURE__ */ jsx("audio", {
|
|
11234
11227
|
src: getSourceUrl(attachment.source),
|
|
11235
11228
|
controls: true,
|
|
11236
11229
|
preload: "metadata",
|
|
11237
|
-
className: "cpk
|
|
11230
|
+
className: "cpk-attachment-queue-audio-player"
|
|
11238
11231
|
}), attachment.filename && /* @__PURE__ */ jsx("span", {
|
|
11239
|
-
className: "cpk
|
|
11232
|
+
className: "cpk-attachment-queue-audio-filename",
|
|
11240
11233
|
children: attachment.filename
|
|
11241
11234
|
})]
|
|
11242
11235
|
});
|
|
@@ -11253,25 +11246,25 @@ function VideoPreview({ attachment }) {
|
|
|
11253
11246
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
11254
11247
|
/* @__PURE__ */ jsx("div", {
|
|
11255
11248
|
ref: thumbnailRef,
|
|
11256
|
-
className: "cpk
|
|
11249
|
+
className: "cpk-attachment-queue-video",
|
|
11257
11250
|
children: attachment.thumbnail ? /* @__PURE__ */ jsx("img", {
|
|
11258
11251
|
src: attachment.thumbnail,
|
|
11259
11252
|
alt: attachment.filename || "Video thumbnail",
|
|
11260
|
-
className: "cpk
|
|
11253
|
+
className: "cpk-attachment-queue-video-thumbnail"
|
|
11261
11254
|
}) : /* @__PURE__ */ jsx("video", {
|
|
11262
11255
|
src,
|
|
11263
11256
|
preload: "metadata",
|
|
11264
11257
|
muted: true,
|
|
11265
|
-
className: "cpk
|
|
11258
|
+
className: "cpk-attachment-queue-video-thumbnail"
|
|
11266
11259
|
})
|
|
11267
11260
|
}),
|
|
11268
11261
|
/* @__PURE__ */ jsx("button", {
|
|
11269
11262
|
onClick: openLightbox,
|
|
11270
|
-
className: "cpk
|
|
11263
|
+
className: "cpk-attachment-queue-video-play-button",
|
|
11271
11264
|
"aria-label": labels.attachmentPlayVideoButtonLabel,
|
|
11272
11265
|
children: /* @__PURE__ */ jsx("div", {
|
|
11273
|
-
className: "cpk
|
|
11274
|
-
children: /* @__PURE__ */ jsx(Play, { className: "cpk
|
|
11266
|
+
className: "cpk-attachment-queue-video-play-badge",
|
|
11267
|
+
children: /* @__PURE__ */ jsx(Play, { className: "cpk-attachment-queue-video-play-icon" })
|
|
11275
11268
|
})
|
|
11276
11269
|
}),
|
|
11277
11270
|
open && /* @__PURE__ */ jsx(Lightbox, {
|
|
@@ -11281,7 +11274,7 @@ function VideoPreview({ attachment }) {
|
|
|
11281
11274
|
src,
|
|
11282
11275
|
controls: true,
|
|
11283
11276
|
autoPlay: true,
|
|
11284
|
-
className: "cpk
|
|
11277
|
+
className: "cpk-attachment-queue-lightbox-video"
|
|
11285
11278
|
})
|
|
11286
11279
|
})
|
|
11287
11280
|
] });
|
|
@@ -11332,7 +11325,7 @@ function DocumentLightboxContent({ attachment, vtName }) {
|
|
|
11332
11325
|
style: { viewTransitionName: vtName },
|
|
11333
11326
|
src: blobUrl,
|
|
11334
11327
|
title: attachment.filename || "PDF preview",
|
|
11335
|
-
className: "cpk
|
|
11328
|
+
className: "cpk-attachment-queue-pdf-preview"
|
|
11336
11329
|
});
|
|
11337
11330
|
}
|
|
11338
11331
|
if (isText(mimeType)) {
|
|
@@ -11345,40 +11338,40 @@ function DocumentLightboxContent({ attachment, vtName }) {
|
|
|
11345
11338
|
})() : null;
|
|
11346
11339
|
return /* @__PURE__ */ jsxs("div", {
|
|
11347
11340
|
style: { viewTransitionName: vtName },
|
|
11348
|
-
className: "cpk
|
|
11341
|
+
className: "cpk-attachment-queue-text-preview",
|
|
11349
11342
|
children: [attachment.filename && /* @__PURE__ */ jsx("div", {
|
|
11350
|
-
className: "cpk
|
|
11343
|
+
className: "cpk-attachment-queue-text-preview-filename",
|
|
11351
11344
|
children: attachment.filename
|
|
11352
11345
|
}), textContent ? /* @__PURE__ */ jsx("pre", {
|
|
11353
|
-
className: "cpk
|
|
11346
|
+
className: "cpk-attachment-queue-text-preview-content",
|
|
11354
11347
|
children: textContent
|
|
11355
11348
|
}) : blobUrl ? /* @__PURE__ */ jsx("iframe", {
|
|
11356
11349
|
src: blobUrl,
|
|
11357
11350
|
title: attachment.filename || "Text preview",
|
|
11358
|
-
className: "cpk
|
|
11351
|
+
className: "cpk-attachment-queue-text-preview-frame"
|
|
11359
11352
|
}) : null]
|
|
11360
11353
|
});
|
|
11361
11354
|
}
|
|
11362
11355
|
return /* @__PURE__ */ jsxs("div", {
|
|
11363
11356
|
style: { viewTransitionName: vtName },
|
|
11364
|
-
className: "cpk
|
|
11357
|
+
className: "cpk-attachment-queue-document-card",
|
|
11365
11358
|
children: [
|
|
11366
11359
|
/* @__PURE__ */ jsx("div", {
|
|
11367
|
-
className: "cpk
|
|
11360
|
+
className: "cpk-attachment-queue-document-card-icon",
|
|
11368
11361
|
children: getDocumentIcon(mimeType ?? "")
|
|
11369
11362
|
}),
|
|
11370
11363
|
/* @__PURE__ */ jsxs("div", {
|
|
11371
|
-
className: "cpk
|
|
11364
|
+
className: "cpk-attachment-queue-document-card-details",
|
|
11372
11365
|
children: [/* @__PURE__ */ jsx("div", {
|
|
11373
|
-
className: "cpk
|
|
11366
|
+
className: "cpk-attachment-queue-document-card-name",
|
|
11374
11367
|
children: attachment.filename || "Document"
|
|
11375
11368
|
}), /* @__PURE__ */ jsxs("div", {
|
|
11376
|
-
className: "cpk
|
|
11369
|
+
className: "cpk-attachment-queue-document-card-meta",
|
|
11377
11370
|
children: [mimeType || "Unknown type", attachment.size != null && ` · ${formatFileSize(attachment.size)}`]
|
|
11378
11371
|
})]
|
|
11379
11372
|
}),
|
|
11380
11373
|
/* @__PURE__ */ jsx("div", {
|
|
11381
|
-
className: "cpk
|
|
11374
|
+
className: "cpk-attachment-queue-document-card-note",
|
|
11382
11375
|
children: "No preview available for this file type"
|
|
11383
11376
|
})
|
|
11384
11377
|
]
|
|
@@ -11390,18 +11383,18 @@ function DocumentPreview({ attachment }) {
|
|
|
11390
11383
|
const previewable = canPreviewInBrowser(mimeType);
|
|
11391
11384
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
11392
11385
|
ref: thumbnailRef,
|
|
11393
|
-
className: cn("cpk
|
|
11386
|
+
className: cn("cpk-attachment-queue-document", previewable && "cpk-attachment-queue-document-previewable"),
|
|
11394
11387
|
onClick: previewable ? openLightbox : void 0,
|
|
11395
11388
|
children: [/* @__PURE__ */ jsx("div", {
|
|
11396
|
-
className: "cpk
|
|
11389
|
+
className: "cpk-attachment-queue-document-icon",
|
|
11397
11390
|
children: getDocumentIcon(mimeType ?? "")
|
|
11398
11391
|
}), /* @__PURE__ */ jsxs("div", {
|
|
11399
|
-
className: "cpk
|
|
11392
|
+
className: "cpk-attachment-queue-document-info",
|
|
11400
11393
|
children: [/* @__PURE__ */ jsx("span", {
|
|
11401
|
-
className: "cpk
|
|
11394
|
+
className: "cpk-attachment-queue-document-name",
|
|
11402
11395
|
children: attachment.filename || "Document"
|
|
11403
11396
|
}), attachment.size != null && /* @__PURE__ */ jsx("span", {
|
|
11404
|
-
className: "cpk
|
|
11397
|
+
className: "cpk-attachment-queue-document-size",
|
|
11405
11398
|
children: formatFileSize(attachment.size)
|
|
11406
11399
|
})]
|
|
11407
11400
|
})]
|
|
@@ -11537,11 +11530,11 @@ function computeOffsetTop(el, stopAt) {
|
|
|
11537
11530
|
const SCROLL_BUTTON_OFFSET = 16;
|
|
11538
11531
|
function DropOverlay() {
|
|
11539
11532
|
return /* @__PURE__ */ jsx("div", {
|
|
11540
|
-
className:
|
|
11533
|
+
className: "cpk-chat-view-drop-overlay",
|
|
11541
11534
|
children: /* @__PURE__ */ jsxs("div", {
|
|
11542
|
-
className: "cpk
|
|
11543
|
-
children: [/* @__PURE__ */ jsx(Upload, { className: "cpk
|
|
11544
|
-
className: "cpk
|
|
11535
|
+
className: "cpk-chat-view-drop-overlay-content",
|
|
11536
|
+
children: [/* @__PURE__ */ jsx(Upload, { className: "cpk-chat-view-drop-overlay-icon" }), /* @__PURE__ */ jsx("span", {
|
|
11537
|
+
className: "cpk-chat-view-drop-overlay-label",
|
|
11545
11538
|
children: "Drop files here"
|
|
11546
11539
|
})]
|
|
11547
11540
|
})
|
|
@@ -11620,7 +11613,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11620
11613
|
suggestions,
|
|
11621
11614
|
loadingIndexes: suggestionLoadingIndexes,
|
|
11622
11615
|
onSelectSuggestion,
|
|
11623
|
-
className: "cpk
|
|
11616
|
+
className: "cpk-chat-view-suggestion-view"
|
|
11624
11617
|
}) : null;
|
|
11625
11618
|
const BoundScrollView = renderSlot(scrollView, CopilotChatView.ScrollView, {
|
|
11626
11619
|
autoScroll,
|
|
@@ -11631,9 +11624,9 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11631
11624
|
"data-testid": "copilot-scroll-content",
|
|
11632
11625
|
style: { paddingBottom: `${inputContainerHeight + (hasSuggestions ? 4 : 32)}px` },
|
|
11633
11626
|
children: /* @__PURE__ */ jsxs("div", {
|
|
11634
|
-
className: "cpk
|
|
11627
|
+
className: "cpk-chat-view-feed",
|
|
11635
11628
|
children: [BoundMessageView, hasSuggestions ? /* @__PURE__ */ jsx("div", {
|
|
11636
|
-
className: "cpk
|
|
11629
|
+
className: "cpk-chat-view-suggestions",
|
|
11637
11630
|
children: BoundSuggestionView
|
|
11638
11631
|
}) : null]
|
|
11639
11632
|
})
|
|
@@ -11658,11 +11651,11 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11658
11651
|
});
|
|
11659
11652
|
const welcomeScreenSlot = welcomeScreen === true ? void 0 : welcomeScreen;
|
|
11660
11653
|
const inputWithAttachments = /* @__PURE__ */ jsxs("div", {
|
|
11661
|
-
className: "cpk
|
|
11654
|
+
className: "cpk-chat-view-welcome-input-group",
|
|
11662
11655
|
children: [attachments && attachments.length > 0 && /* @__PURE__ */ jsx(CopilotChatAttachmentQueue, {
|
|
11663
11656
|
attachments,
|
|
11664
11657
|
onRemoveAttachment: (id) => onRemoveAttachment?.(id),
|
|
11665
|
-
className: "cpk
|
|
11658
|
+
className: "cpk-chat-view-welcome-attachment-queue"
|
|
11666
11659
|
}), BoundInputForWelcome]
|
|
11667
11660
|
});
|
|
11668
11661
|
const BoundWelcomeScreen = renderSlot(welcomeScreenSlot, CopilotChatView.WelcomeScreen, {
|
|
@@ -11676,7 +11669,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11676
11669
|
onDragOver,
|
|
11677
11670
|
onDragLeave,
|
|
11678
11671
|
onDrop,
|
|
11679
|
-
className: cn("copilotKitChat cpk
|
|
11672
|
+
className: cn("copilotKitChat cpk-chat-view", className),
|
|
11680
11673
|
...props,
|
|
11681
11674
|
children: [dragOver && /* @__PURE__ */ jsx(DropOverlay, {}), BoundWelcomeScreen]
|
|
11682
11675
|
});
|
|
@@ -11698,7 +11691,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11698
11691
|
onDragOver,
|
|
11699
11692
|
onDragLeave,
|
|
11700
11693
|
onDrop,
|
|
11701
|
-
className: cn("copilotKitChat cpk
|
|
11694
|
+
className: cn("copilotKitChat cpk-chat-view", className),
|
|
11702
11695
|
...props,
|
|
11703
11696
|
children: [
|
|
11704
11697
|
dragOver && /* @__PURE__ */ jsx(DropOverlay, {}),
|
|
@@ -11706,13 +11699,13 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11706
11699
|
/* @__PURE__ */ jsxs("div", {
|
|
11707
11700
|
ref: setInputContainerEl,
|
|
11708
11701
|
"data-testid": "copilot-input-overlay",
|
|
11709
|
-
className: "cpk
|
|
11702
|
+
className: "cpk-chat-view-input-overlay",
|
|
11710
11703
|
children: [attachments && attachments.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
11711
|
-
className: "cpk
|
|
11704
|
+
className: "cpk-chat-view-attachments",
|
|
11712
11705
|
children: /* @__PURE__ */ jsx(CopilotChatAttachmentQueue, {
|
|
11713
11706
|
attachments,
|
|
11714
11707
|
onRemoveAttachment: (id) => onRemoveAttachment?.(id),
|
|
11715
|
-
className: "cpk
|
|
11708
|
+
className: "cpk-chat-view-attachment-queue"
|
|
11716
11709
|
})
|
|
11717
11710
|
}), BoundInput]
|
|
11718
11711
|
})
|
|
@@ -11823,19 +11816,19 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11823
11816
|
value: state.isAtBottom,
|
|
11824
11817
|
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
11825
11818
|
/* @__PURE__ */ jsx(StickToBottom.Content, {
|
|
11826
|
-
className: "cpk
|
|
11819
|
+
className: "cpk-chat-view-scroll-viewport",
|
|
11827
11820
|
style: {
|
|
11828
11821
|
flex: "1 1 0%",
|
|
11829
11822
|
minHeight: 0
|
|
11830
11823
|
},
|
|
11831
11824
|
children: /* @__PURE__ */ jsx("div", {
|
|
11832
|
-
className: "cpk
|
|
11825
|
+
className: "cpk-chat-view-scroll-content",
|
|
11833
11826
|
children
|
|
11834
11827
|
})
|
|
11835
11828
|
}),
|
|
11836
11829
|
BoundFeather,
|
|
11837
11830
|
!isAtBottom && !isResizing && /* @__PURE__ */ jsx("div", {
|
|
11838
|
-
className: "cpk
|
|
11831
|
+
className: "cpk-chat-view-scroll-to-bottom",
|
|
11839
11832
|
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
11840
11833
|
children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => startBottomPin() })
|
|
11841
11834
|
})
|
|
@@ -11855,15 +11848,15 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11855
11848
|
return /* @__PURE__ */ jsx(ScrollElementContext.Provider, {
|
|
11856
11849
|
value: nonAutoScrollEl,
|
|
11857
11850
|
children: /* @__PURE__ */ jsxs("div", {
|
|
11858
|
-
className: cn("cpk
|
|
11851
|
+
className: cn("cpk-chat-view-scroll-area", className),
|
|
11859
11852
|
children: [
|
|
11860
11853
|
/* @__PURE__ */ jsxs("div", {
|
|
11861
11854
|
ref: nonAutoScrollRefCallback,
|
|
11862
|
-
className: "cpk
|
|
11855
|
+
className: "cpk-chat-view-scroll-viewport",
|
|
11863
11856
|
...props,
|
|
11864
11857
|
children: [/* @__PURE__ */ jsx("div", {
|
|
11865
11858
|
ref: contentRef,
|
|
11866
|
-
className: "cpk
|
|
11859
|
+
className: "cpk-chat-view-scroll-content",
|
|
11867
11860
|
children
|
|
11868
11861
|
}), /* @__PURE__ */ jsx("div", {
|
|
11869
11862
|
ref: spacerRef,
|
|
@@ -11877,7 +11870,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11877
11870
|
}),
|
|
11878
11871
|
BoundFeather,
|
|
11879
11872
|
showScrollButton && !isResizing && /* @__PURE__ */ jsx("div", {
|
|
11880
|
-
className: "cpk
|
|
11873
|
+
className: "cpk-chat-view-scroll-to-bottom",
|
|
11881
11874
|
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
11882
11875
|
children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
|
|
11883
11876
|
})
|
|
@@ -11923,9 +11916,9 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11923
11916
|
};
|
|
11924
11917
|
}, [nonAutoScrollEl, mode]);
|
|
11925
11918
|
if (!hasMounted) return /* @__PURE__ */ jsx("div", {
|
|
11926
|
-
className: "cpk
|
|
11919
|
+
className: "cpk-chat-view-scroll-area cpk-chat-view-scroll-viewport",
|
|
11927
11920
|
children: /* @__PURE__ */ jsx("div", {
|
|
11928
|
-
className: "cpk
|
|
11921
|
+
className: "cpk-chat-view-scroll-content",
|
|
11929
11922
|
children
|
|
11930
11923
|
})
|
|
11931
11924
|
});
|
|
@@ -11935,17 +11928,17 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11935
11928
|
value: nonAutoScrollEl,
|
|
11936
11929
|
children: /* @__PURE__ */ jsxs("div", {
|
|
11937
11930
|
ref: nonAutoScrollRefCallback,
|
|
11938
|
-
className: cn("cpk
|
|
11931
|
+
className: cn("cpk-chat-view-scroll-area cpk-chat-view-scroll-viewport", className),
|
|
11939
11932
|
...props,
|
|
11940
11933
|
children: [
|
|
11941
11934
|
/* @__PURE__ */ jsx("div", {
|
|
11942
11935
|
ref: contentRef,
|
|
11943
|
-
className: "cpk
|
|
11936
|
+
className: "cpk-chat-view-scroll-content",
|
|
11944
11937
|
children
|
|
11945
11938
|
}),
|
|
11946
11939
|
BoundFeather,
|
|
11947
11940
|
showScrollButton && !isResizing && /* @__PURE__ */ jsx("div", {
|
|
11948
|
-
className: "cpk
|
|
11941
|
+
className: "cpk-chat-view-scroll-to-bottom",
|
|
11949
11942
|
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
11950
11943
|
children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
|
|
11951
11944
|
})
|
|
@@ -11969,7 +11962,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11969
11962
|
children
|
|
11970
11963
|
});
|
|
11971
11964
|
return /* @__PURE__ */ jsx(StickToBottom, {
|
|
11972
|
-
className: cn("cpk
|
|
11965
|
+
className: cn("cpk-chat-view-scroll-view", className),
|
|
11973
11966
|
resize: "smooth",
|
|
11974
11967
|
initial: "smooth",
|
|
11975
11968
|
...props,
|
|
@@ -11989,10 +11982,10 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
11989
11982
|
"data-testid": "copilot-scroll-to-bottom",
|
|
11990
11983
|
variant: "outline",
|
|
11991
11984
|
size: "sm",
|
|
11992
|
-
className:
|
|
11985
|
+
className: cn("cpk-chat-view-scroll-to-bottom-button", className),
|
|
11993
11986
|
"aria-label": labels.chatScrollToBottomLabel,
|
|
11994
11987
|
...props,
|
|
11995
|
-
children: /* @__PURE__ */ jsx(ChevronDown, { className: "cpk
|
|
11988
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "cpk-chat-view-scroll-to-bottom-icon" })
|
|
11996
11989
|
});
|
|
11997
11990
|
};
|
|
11998
11991
|
_CopilotChatView.Feather = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
@@ -12002,7 +11995,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
12002
11995
|
_CopilotChatView.WelcomeMessage = ({ className, ...props }) => {
|
|
12003
11996
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
|
|
12004
11997
|
return /* @__PURE__ */ jsx("h1", {
|
|
12005
|
-
className: cn("cpk
|
|
11998
|
+
className: cn("cpk-chat-view-welcome-message", className),
|
|
12006
11999
|
...props,
|
|
12007
12000
|
children: labels.welcomeMessageText
|
|
12008
12001
|
});
|
|
@@ -12022,21 +12015,21 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
12022
12015
|
});
|
|
12023
12016
|
return /* @__PURE__ */ jsx("div", {
|
|
12024
12017
|
"data-testid": "copilot-welcome-screen",
|
|
12025
|
-
className: cn("cpk
|
|
12018
|
+
className: cn("cpk-chat-view-welcome-screen", className),
|
|
12026
12019
|
...props,
|
|
12027
12020
|
children: /* @__PURE__ */ jsxs("div", {
|
|
12028
|
-
className: "cpk
|
|
12021
|
+
className: "cpk-chat-view-welcome-screen-content",
|
|
12029
12022
|
children: [
|
|
12030
12023
|
/* @__PURE__ */ jsx("div", {
|
|
12031
|
-
className: "cpk
|
|
12024
|
+
className: "cpk-chat-view-welcome-screen-message",
|
|
12032
12025
|
children: BoundWelcomeMessage
|
|
12033
12026
|
}),
|
|
12034
12027
|
/* @__PURE__ */ jsx("div", {
|
|
12035
|
-
className: "cpk
|
|
12028
|
+
className: "cpk-chat-view-welcome-screen-input",
|
|
12036
12029
|
children: input
|
|
12037
12030
|
}),
|
|
12038
12031
|
/* @__PURE__ */ jsx("div", {
|
|
12039
|
-
className: "cpk
|
|
12032
|
+
className: "cpk-chat-view-welcome-screen-suggestions",
|
|
12040
12033
|
children: suggestionView
|
|
12041
12034
|
})
|
|
12042
12035
|
]
|
|
@@ -12914,6 +12907,7 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
|
|
|
12914
12907
|
ref: chatContainerRef,
|
|
12915
12908
|
style: { display: "contents" },
|
|
12916
12909
|
children: [
|
|
12910
|
+
/* @__PURE__ */ jsx(CopilotKitStyles, {}),
|
|
12917
12911
|
attachmentsEnabled && /* @__PURE__ */ jsx("input", {
|
|
12918
12912
|
type: "file",
|
|
12919
12913
|
multiple: true,
|
|
@@ -12958,22 +12952,22 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
|
|
|
12958
12952
|
|
|
12959
12953
|
//#endregion
|
|
12960
12954
|
//#region src/components/chat/CopilotChatToggleButton.tsx
|
|
12955
|
+
const ICON_CLASS = "cpk-chat-toggle-button-icon";
|
|
12961
12956
|
const DefaultOpenIcon = ({ className, ...props }) => /* @__PURE__ */ jsx(MessageCircle, {
|
|
12962
|
-
className:
|
|
12957
|
+
className: className ?? ICON_CLASS,
|
|
12963
12958
|
strokeWidth: 1.75,
|
|
12964
12959
|
fill: "currentColor",
|
|
12965
12960
|
...props
|
|
12966
12961
|
});
|
|
12967
12962
|
const DefaultCloseIcon = ({ className, ...props }) => /* @__PURE__ */ jsx(X, {
|
|
12968
|
-
className:
|
|
12963
|
+
className: className ?? ICON_CLASS,
|
|
12969
12964
|
strokeWidth: 1.75,
|
|
12970
12965
|
...props
|
|
12971
12966
|
});
|
|
12972
12967
|
DefaultOpenIcon.displayName = "CopilotChatToggleButton.OpenIcon";
|
|
12973
12968
|
DefaultCloseIcon.displayName = "CopilotChatToggleButton.CloseIcon";
|
|
12974
12969
|
const ICON_TRANSITION_STYLE = Object.freeze({ transition: "opacity 120ms ease-out, transform 260ms cubic-bezier(0.22, 1, 0.36, 1)" });
|
|
12975
|
-
const
|
|
12976
|
-
const BUTTON_BASE_CLASSES = cn("copilotKitButton", "cpk:fixed cpk:bottom-6 cpk:right-6 cpk:z-[1100] cpk:flex cpk:h-14 cpk:w-14 cpk:items-center cpk:justify-center", "cpk:rounded-full cpk:border cpk:border-primary cpk:bg-primary cpk:text-primary-foreground", "cpk:shadow-sm cpk:transition-all cpk:duration-200 cpk:ease-out", "cpk:hover:scale-[1.04] cpk:hover:shadow-md", "cpk:cursor-pointer", "cpk:active:scale-[0.96]", "cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-primary/50 cpk:focus-visible:ring-offset-2 cpk:focus-visible:ring-offset-background", "cpk:disabled:pointer-events-none cpk:disabled:opacity-60");
|
|
12970
|
+
const ICON_WRAPPER_CLASS = "cpk-chat-toggle-button-icon-wrapper";
|
|
12977
12971
|
const CopilotChatToggleButton = React.forwardRef(function CopilotChatToggleButton({ openIcon, closeIcon, className, ...buttonProps }, ref) {
|
|
12978
12972
|
const { onClick, type, disabled, ...restProps } = buttonProps;
|
|
12979
12973
|
const configuration = useCopilotChatConfiguration();
|
|
@@ -12988,19 +12982,19 @@ const CopilotChatToggleButton = React.forwardRef(function CopilotChatToggleButto
|
|
|
12988
12982
|
setModalOpen(!isOpen);
|
|
12989
12983
|
};
|
|
12990
12984
|
const renderedOpenIcon = renderSlot(openIcon, DefaultOpenIcon, {
|
|
12991
|
-
className:
|
|
12985
|
+
className: ICON_CLASS,
|
|
12992
12986
|
"aria-hidden": true,
|
|
12993
12987
|
focusable: false
|
|
12994
12988
|
});
|
|
12995
12989
|
const renderedCloseIcon = renderSlot(closeIcon, DefaultCloseIcon, {
|
|
12996
|
-
className:
|
|
12990
|
+
className: ICON_CLASS,
|
|
12997
12991
|
"aria-hidden": true,
|
|
12998
12992
|
focusable: false
|
|
12999
12993
|
});
|
|
13000
12994
|
const openIconElement = /* @__PURE__ */ jsx("span", {
|
|
13001
12995
|
"aria-hidden": "true",
|
|
13002
12996
|
"data-slot": "chat-toggle-button-open-icon",
|
|
13003
|
-
className:
|
|
12997
|
+
className: ICON_WRAPPER_CLASS,
|
|
13004
12998
|
style: {
|
|
13005
12999
|
...ICON_TRANSITION_STYLE,
|
|
13006
13000
|
opacity: isOpen ? 0 : 1,
|
|
@@ -13011,7 +13005,7 @@ const CopilotChatToggleButton = React.forwardRef(function CopilotChatToggleButto
|
|
|
13011
13005
|
const closeIconElement = /* @__PURE__ */ jsx("span", {
|
|
13012
13006
|
"aria-hidden": "true",
|
|
13013
13007
|
"data-slot": "chat-toggle-button-close-icon",
|
|
13014
|
-
className:
|
|
13008
|
+
className: ICON_WRAPPER_CLASS,
|
|
13015
13009
|
style: {
|
|
13016
13010
|
...ICON_TRANSITION_STYLE,
|
|
13017
13011
|
opacity: isOpen ? 1 : 0,
|
|
@@ -13026,7 +13020,7 @@ const CopilotChatToggleButton = React.forwardRef(function CopilotChatToggleButto
|
|
|
13026
13020
|
"data-testid": "copilot-chat-toggle",
|
|
13027
13021
|
"data-slot": "chat-toggle-button",
|
|
13028
13022
|
"data-state": isOpen ? "open" : "closed",
|
|
13029
|
-
className: cn(
|
|
13023
|
+
className: cn("copilotKitButton cpk-chat-toggle-button", className),
|
|
13030
13024
|
"aria-label": isOpen ? labels.chatToggleCloseLabel : labels.chatToggleOpenLabel,
|
|
13031
13025
|
"aria-pressed": isOpen,
|
|
13032
13026
|
disabled,
|
|
@@ -13120,21 +13114,21 @@ function CopilotModalHeader({ title, titleContent, closeButton, drawerLauncher,
|
|
|
13120
13114
|
return /* @__PURE__ */ jsx("header", {
|
|
13121
13115
|
"data-testid": "copilot-modal-header",
|
|
13122
13116
|
"data-slot": "copilot-modal-header",
|
|
13123
|
-
className: cn("copilotKitHeader
|
|
13117
|
+
className: cn("copilotKitHeader cpk-modal-header", className),
|
|
13124
13118
|
...rest,
|
|
13125
13119
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13126
|
-
className: "cpk
|
|
13120
|
+
className: "cpk-modal-header-content",
|
|
13127
13121
|
children: [
|
|
13128
13122
|
/* @__PURE__ */ jsx("div", {
|
|
13129
|
-
className: "cpk
|
|
13123
|
+
className: "cpk-modal-header-start",
|
|
13130
13124
|
children: BoundDrawerLauncher ?? /* @__PURE__ */ jsx("span", { "aria-hidden": "true" })
|
|
13131
13125
|
}),
|
|
13132
13126
|
/* @__PURE__ */ jsx("div", {
|
|
13133
|
-
className: "cpk
|
|
13127
|
+
className: "cpk-modal-header-center",
|
|
13134
13128
|
children: BoundTitle
|
|
13135
13129
|
}),
|
|
13136
13130
|
/* @__PURE__ */ jsx("div", {
|
|
13137
|
-
className: "cpk
|
|
13131
|
+
className: "cpk-modal-header-end",
|
|
13138
13132
|
children: BoundCloseButton
|
|
13139
13133
|
})
|
|
13140
13134
|
]
|
|
@@ -13145,7 +13139,7 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
|
|
|
13145
13139
|
(function(_CopilotModalHeader) {
|
|
13146
13140
|
_CopilotModalHeader.Title = ({ children, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
13147
13141
|
"data-testid": "copilot-header-title",
|
|
13148
|
-
className: cn("cpk
|
|
13142
|
+
className: cn("cpk-modal-header-title", className),
|
|
13149
13143
|
...props,
|
|
13150
13144
|
children
|
|
13151
13145
|
});
|
|
@@ -13154,11 +13148,11 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
|
|
|
13154
13148
|
return /* @__PURE__ */ jsx("button", {
|
|
13155
13149
|
type: "button",
|
|
13156
13150
|
"data-testid": "copilot-close-button",
|
|
13157
|
-
className: cn("cpk
|
|
13151
|
+
className: cn("cpk-modal-header-close-button", className),
|
|
13158
13152
|
"aria-label": labels.modalHeaderCloseButtonLabel,
|
|
13159
13153
|
...props,
|
|
13160
13154
|
children: /* @__PURE__ */ jsx(X, {
|
|
13161
|
-
className: "cpk
|
|
13155
|
+
className: "cpk-modal-header-close-icon",
|
|
13162
13156
|
"aria-hidden": "true"
|
|
13163
13157
|
})
|
|
13164
13158
|
});
|
|
@@ -13168,11 +13162,11 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
|
|
|
13168
13162
|
return /* @__PURE__ */ jsx("button", {
|
|
13169
13163
|
type: "button",
|
|
13170
13164
|
"data-testid": "copilot-threads-drawer-launcher",
|
|
13171
|
-
className: cn("cpk
|
|
13165
|
+
className: cn("cpk-modal-header-drawer-launcher", className),
|
|
13172
13166
|
"aria-label": labels.modalHeaderThreadsButtonLabel,
|
|
13173
13167
|
...props,
|
|
13174
13168
|
children: /* @__PURE__ */ jsx(PanelLeftOpen, {
|
|
13175
|
-
className: "cpk
|
|
13169
|
+
className: "cpk-modal-header-drawer-launcher-icon",
|
|
13176
13170
|
"aria-hidden": "true"
|
|
13177
13171
|
})
|
|
13178
13172
|
});
|
|
@@ -13263,13 +13257,13 @@ function CopilotSidebarViewInternal({ header, toggleButton, width, position = "r
|
|
|
13263
13257
|
position
|
|
13264
13258
|
]);
|
|
13265
13259
|
const headerElement = renderSlot(header, CopilotModalHeader, {});
|
|
13266
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [renderSlot(toggleButton, CopilotChatToggleButton, position === "left" ? { className: "cpk
|
|
13260
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [renderSlot(toggleButton, CopilotChatToggleButton, position === "left" ? { className: "cpk-sidebar-view-toggle-button-left" } : {}), /* @__PURE__ */ jsx("aside", {
|
|
13267
13261
|
ref: sidebarRef,
|
|
13268
13262
|
"data-copilotkit": true,
|
|
13269
13263
|
"data-testid": "copilot-sidebar",
|
|
13270
13264
|
"data-copilot-sidebar": true,
|
|
13271
13265
|
"data-position": position,
|
|
13272
|
-
className: cn("copilotKitSidebar copilotKitWindow
|
|
13266
|
+
className: cn("copilotKitSidebar copilotKitWindow cpk-sidebar-view", !isSidebarOpen && "cpk-sidebar-view-closed"),
|
|
13273
13267
|
style: {
|
|
13274
13268
|
"--sidebar-width": widthToCss(sidebarWidth),
|
|
13275
13269
|
paddingTop: "env(safe-area-inset-top)",
|
|
@@ -13279,9 +13273,9 @@ function CopilotSidebarViewInternal({ header, toggleButton, width, position = "r
|
|
|
13279
13273
|
"aria-label": configuration?.labels.sidebarLabel ?? CopilotChatDefaultLabels.sidebarLabel,
|
|
13280
13274
|
role: "complementary",
|
|
13281
13275
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13282
|
-
className: "cpk
|
|
13276
|
+
className: "cpk-sidebar-view-panel",
|
|
13283
13277
|
children: [headerElement, /* @__PURE__ */ jsx("div", {
|
|
13284
|
-
className: "cpk
|
|
13278
|
+
className: "cpk-sidebar-view-chat",
|
|
13285
13279
|
"data-sidebar-chat": true,
|
|
13286
13280
|
children: /* @__PURE__ */ jsx(CopilotChatView_default, { ...props })
|
|
13287
13281
|
})]
|
|
@@ -13304,17 +13298,17 @@ CopilotSidebarView.displayName = "CopilotSidebarView";
|
|
|
13304
13298
|
})
|
|
13305
13299
|
});
|
|
13306
13300
|
return /* @__PURE__ */ jsxs("div", {
|
|
13307
|
-
className: cn("cpk
|
|
13301
|
+
className: cn("cpk-sidebar-view-welcome-screen", className),
|
|
13308
13302
|
...props,
|
|
13309
13303
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13310
|
-
className: "cpk
|
|
13304
|
+
className: "cpk-sidebar-view-welcome-screen-message",
|
|
13311
13305
|
children: BoundWelcomeMessage
|
|
13312
13306
|
}), /* @__PURE__ */ jsx("div", {
|
|
13313
|
-
className: "cpk
|
|
13307
|
+
className: "cpk-sidebar-view-welcome-screen-footer",
|
|
13314
13308
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13315
|
-
className: "cpk
|
|
13309
|
+
className: "cpk-sidebar-view-welcome-screen-content",
|
|
13316
13310
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13317
|
-
className: "cpk
|
|
13311
|
+
className: "cpk-sidebar-view-welcome-screen-suggestions",
|
|
13318
13312
|
children: suggestionView
|
|
13319
13313
|
}), input]
|
|
13320
13314
|
})
|
|
@@ -13428,10 +13422,9 @@ function CopilotPopupViewInternal({ header, toggleButton, width, height, clickOu
|
|
|
13428
13422
|
paddingLeft: "env(safe-area-inset-left)",
|
|
13429
13423
|
paddingRight: "env(safe-area-inset-right)"
|
|
13430
13424
|
}), [resolvedHeight, resolvedWidth]);
|
|
13431
|
-
const popupAnimationClass = isPopupOpen && !isAnimatingOut ? "cpk:pointer-events-auto cpk:translate-y-0 cpk:opacity-100 cpk:md:scale-100" : "cpk:pointer-events-none cpk:translate-y-4 cpk:opacity-0 cpk:md:translate-y-5 cpk:md:scale-[0.95]";
|
|
13432
13425
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [toggleButtonElement, isRendered ? /* @__PURE__ */ jsx("div", {
|
|
13433
13426
|
"data-copilotkit": true,
|
|
13434
|
-
className:
|
|
13427
|
+
className: "cpk-popup-view",
|
|
13435
13428
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13436
13429
|
ref: containerRef,
|
|
13437
13430
|
tabIndex: -1,
|
|
@@ -13439,14 +13432,14 @@ function CopilotPopupViewInternal({ header, toggleButton, width, height, clickOu
|
|
|
13439
13432
|
"aria-label": labels.modalHeaderTitle,
|
|
13440
13433
|
"data-testid": "copilot-popup",
|
|
13441
13434
|
"data-copilot-popup": true,
|
|
13442
|
-
className: cn("copilotKitPopup copilotKitWindow
|
|
13435
|
+
className: cn("copilotKitPopup copilotKitWindow cpk-popup-view-window", isPopupOpen && !isAnimatingOut && "cpk-popup-view-window-open"),
|
|
13443
13436
|
style: popupStyle,
|
|
13444
13437
|
children: [headerElement, /* @__PURE__ */ jsx("div", {
|
|
13445
|
-
className: "cpk
|
|
13438
|
+
className: "cpk-popup-view-chat",
|
|
13446
13439
|
"data-popup-chat": true,
|
|
13447
13440
|
children: /* @__PURE__ */ jsx(CopilotChatView_default, {
|
|
13448
13441
|
...restProps,
|
|
13449
|
-
className: cn("cpk
|
|
13442
|
+
className: cn("cpk-popup-view-chat-view", className)
|
|
13450
13443
|
})
|
|
13451
13444
|
})]
|
|
13452
13445
|
})
|
|
@@ -13468,13 +13461,13 @@ CopilotPopupView.displayName = "CopilotPopupView";
|
|
|
13468
13461
|
})
|
|
13469
13462
|
});
|
|
13470
13463
|
return /* @__PURE__ */ jsxs("div", {
|
|
13471
|
-
className: cn("cpk
|
|
13464
|
+
className: cn("cpk-popup-view-welcome-screen", className),
|
|
13472
13465
|
...props,
|
|
13473
13466
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13474
|
-
className: "cpk
|
|
13467
|
+
className: "cpk-popup-view-welcome-screen-message",
|
|
13475
13468
|
children: BoundWelcomeMessage
|
|
13476
13469
|
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
13477
|
-
className: "cpk
|
|
13470
|
+
className: "cpk-popup-view-welcome-screen-suggestions",
|
|
13478
13471
|
children: suggestionView
|
|
13479
13472
|
}), input] })]
|
|
13480
13473
|
});
|
|
@@ -13926,5 +13919,5 @@ const WildcardToolCallRender = defineToolCallRenderer({
|
|
|
13926
13919
|
});
|
|
13927
13920
|
|
|
13928
13921
|
//#endregion
|
|
13929
|
-
export { A2UI_FENCE_LANGUAGE, ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, AGUI_METADATA_KEY, AbstractAgent, ActivityDeltaEventSchema, ActivityMessageSchema, ActivitySnapshotEventSchema, AddOperationSchema, AgentCapabilitiesSchema, AgentRegistry, AgentThreadLockedError, AssistantMessageSchema, AttributableSchema, AudioInputContentSchema, AudioInputPartSchema, AudioPartSchema, AudioRecorderError, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, BaseEventSchema, BaseMessageSchema, BasicMarkdownRenderer, CompatibilityBoundary, ContentPartSchema, ContextSchema, ContextStore, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallGroup, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotChatWorkSummary, CopilotKitCore, CopilotKitCoreErrorCode, CopilotKitCoreReact, CopilotKitCoreRuntimeConnectionStatus, CopilotKitHeaderResolutionError, CopilotKitInspector, CopilotKitProvider, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, CopyOperationSchema, CustomEventSchema, DataSourceSchema, DebugLogger, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventType, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FilterToolCallsMiddleware, FunctionCallSchema, FunctionMiddleware, GenerateSandboxedUiArgsSchema, HttpAgent, HumanInTheLoopCapabilitiesSchema, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTELLIGENCE_TURN_HEAD, INTERRUPT_EVENT_NAME, IdentityCapabilitiesSchema, ImageInputContentSchema, ImageInputPartSchema, ImagePartSchema, InputContentDataSourceSchema, InputContentSchema, InputContentSourceSchema, InputContentUrlSourceSchema, IntelligenceAgent, IntelligenceIndicator, IntelligenceIndicatorView, InterruptSchema, JsonPatchOperationSchema, JsonPatchSchema, JsonPointerSchema, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, MEMORY_ERROR_REGISTRY, MarkdownRendererProvider, MemoryError, MessageSchema, MessagesSnapshotEventSchema, MetadataSchema, Middleware, MoveOperationSchema, MultiAgentCapabilitiesSchema, MultimodalCapabilitiesSchema, MultimodalInputCapabilitiesSchema, MultimodalOutputCapabilitiesSchema, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, OptionalMetadataSchema, OutputCapabilitiesSchema, PROTOCOL_VERSION, PartSourceSchema, ProxiedCopilotRuntimeAgent, RawEventSchema, ReasoningCapabilitiesSchema, ReasoningEncryptedValueEventSchema, ReasoningEncryptedValueSubtypeSchema, ReasoningEndEventSchema, ReasoningMessageChunkEventSchema, ReasoningMessageContentEventSchema, ReasoningMessageEndEventSchema, ReasoningMessageSchema, ReasoningMessageStartEventSchema, ReasoningStartEventSchema, RemoveOperationSchema, ReplaceOperationSchema, ResumeEntrySchema, RoleSchema, RunAgentInputSchema, RunErrorEventSchema, RunFinishedCancelledOutcomeSchema, RunFinishedEventSchema, RunFinishedInterruptOutcomeSchema, RunFinishedOutcomeSchema, RunFinishedSuccessOutcomeSchema, RunHandler, RunStartedEventSchema, SandboxFunctionsContext, StateCapabilitiesSchema, StateDeltaEventSchema, StateManager, StateSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, StreamingMarkdownDefaultRenderer, SubagentErrorEventSchema, SubagentFinishedEventSchema, SubagentFinishedOutcomeSchema, SubagentFinishedSuccessOutcomeSchema, SubagentFinishedSuspendedOutcomeSchema, SubagentInfoSchema, SubagentRunIdSchema, SubagentStartedEventSchema, SuggestionEngine, SystemMessageSchema, TestOperationSchema, TextInputContentSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageRoleSchema, TextMessageStartEventSchema, TextPartSchema, TokenUsageSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallSchema, ToolCallStartEventSchema, ToolCallStatus, ToolMessageSchema, ToolSchema, ToolsCapabilitiesSchema, TransportCapabilitiesSchema, UrlSourceSchema, UseAgentUpdate, UserMessageSchema, VideoInputContentSchema, VideoInputPartSchema, VideoPartSchema, WebMCPRegistry, WildcardToolCallRender, a2uiDefaultTheme, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, classifySurfaceCards, compactEvents, completePartialMarkdown, contentHasMedia, contentToText, convertToLegacyEvents, createA2UIMessageRenderer, createActionGroup, createDebugLogger, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, defaultApplyEvents, defineToolCallRenderer, emitInspectorActiveThread, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, empty, enforceEvents, enforceOutgoingInput, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getIntelligenceTurnAnchors, getMarkdownOperationSurfaceId, getRunOutcome, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInterruptExpired, isRecognizedEvent, isRunCompletionAware, mergeMetadata, messageGroup, messageRow, ofType, omitOptionalNulls, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorViewThread, onInspectorViewThreadResult, parseMarkdown, parseProtoStream, parseSSEStream, parseToolArguments, prepareSurfaceOperations, props, randomUUID, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, segmentSurfaceProse, select, splitA2UIMarkdown, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useFrontendTools, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMarkdownRenderer, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, verifyEvents, withAuthoritativeActivityTypes, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵMAX_SOCKET_RETRIES, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵgetAgentInterruptState, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisRetryableMemoryStatus, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵrunMcpFollowUp, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵthreadAdapterEvents, ɵwithHeaderDefaults };
|
|
13922
|
+
export { A2UI_FENCE_LANGUAGE, ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, AGUI_METADATA_KEY, AbstractAgent, ActivityDeltaEventSchema, ActivityMessageSchema, ActivitySnapshotEventSchema, AddOperationSchema, AgentCapabilitiesSchema, AgentRegistry, AgentThreadLockedError, AssistantMessageSchema, AttributableSchema, AudioInputContentSchema, AudioInputPartSchema, AudioPartSchema, AudioRecorderError, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, BaseEventSchema, BaseMessageSchema, BasicMarkdownRenderer, CompatibilityBoundary, ContentPartSchema, ContextSchema, ContextStore, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallGroup, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotChatWorkSummary, CopilotKitCore, CopilotKitCoreErrorCode, CopilotKitCoreReact, CopilotKitCoreRuntimeConnectionStatus, CopilotKitHeaderResolutionError, CopilotKitInspector, CopilotKitProvider, CopilotKitStyles, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, CopyOperationSchema, CustomEventSchema, DataSourceSchema, DebugLogger, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventType, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FilterToolCallsMiddleware, FunctionCallSchema, FunctionMiddleware, GenerateSandboxedUiArgsSchema, HttpAgent, HumanInTheLoopCapabilitiesSchema, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTELLIGENCE_TURN_HEAD, INTERRUPT_EVENT_NAME, IdentityCapabilitiesSchema, ImageInputContentSchema, ImageInputPartSchema, ImagePartSchema, InputContentDataSourceSchema, InputContentSchema, InputContentSourceSchema, InputContentUrlSourceSchema, IntelligenceAgent, IntelligenceIndicator, IntelligenceIndicatorView, InterruptSchema, JsonPatchOperationSchema, JsonPatchSchema, JsonPointerSchema, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, MEMORY_ERROR_REGISTRY, MarkdownRendererProvider, MemoryError, MessageSchema, MessagesSnapshotEventSchema, MetadataSchema, Middleware, MoveOperationSchema, MultiAgentCapabilitiesSchema, MultimodalCapabilitiesSchema, MultimodalInputCapabilitiesSchema, MultimodalOutputCapabilitiesSchema, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, OptionalMetadataSchema, OutputCapabilitiesSchema, PROTOCOL_VERSION, PartSourceSchema, ProxiedCopilotRuntimeAgent, RawEventSchema, ReasoningCapabilitiesSchema, ReasoningEncryptedValueEventSchema, ReasoningEncryptedValueSubtypeSchema, ReasoningEndEventSchema, ReasoningMessageChunkEventSchema, ReasoningMessageContentEventSchema, ReasoningMessageEndEventSchema, ReasoningMessageSchema, ReasoningMessageStartEventSchema, ReasoningStartEventSchema, RemoveOperationSchema, ReplaceOperationSchema, ResumeEntrySchema, RoleSchema, RunAgentInputSchema, RunErrorEventSchema, RunFinishedCancelledOutcomeSchema, RunFinishedEventSchema, RunFinishedInterruptOutcomeSchema, RunFinishedOutcomeSchema, RunFinishedSuccessOutcomeSchema, RunHandler, RunStartedEventSchema, SandboxFunctionsContext, StateCapabilitiesSchema, StateDeltaEventSchema, StateManager, StateSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, StreamingMarkdownDefaultRenderer, SubagentErrorEventSchema, SubagentFinishedEventSchema, SubagentFinishedOutcomeSchema, SubagentFinishedSuccessOutcomeSchema, SubagentFinishedSuspendedOutcomeSchema, SubagentInfoSchema, SubagentRunIdSchema, SubagentStartedEventSchema, SuggestionEngine, SystemMessageSchema, TestOperationSchema, TextInputContentSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageRoleSchema, TextMessageStartEventSchema, TextPartSchema, TokenUsageSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallSchema, ToolCallStartEventSchema, ToolCallStatus, ToolMessageSchema, ToolSchema, ToolsCapabilitiesSchema, TransportCapabilitiesSchema, UrlSourceSchema, UseAgentUpdate, UserMessageSchema, VideoInputContentSchema, VideoInputPartSchema, VideoPartSchema, WebMCPRegistry, WildcardToolCallRender, a2uiDefaultTheme, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, classifySurfaceCards, compactEvents, completePartialMarkdown, contentHasMedia, contentToText, convertToLegacyEvents, createA2UIMessageRenderer, createActionGroup, createDebugLogger, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, defaultApplyEvents, defineToolCallRenderer, emitInspectorActiveThread, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, empty, enforceEvents, enforceOutgoingInput, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getIntelligenceTurnAnchors, getMarkdownOperationSurfaceId, getRunOutcome, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInterruptExpired, isRecognizedEvent, isRunCompletionAware, mergeMetadata, messageGroup, messageRow, ofType, omitOptionalNulls, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorViewThread, onInspectorViewThreadResult, parseMarkdown, parseProtoStream, parseSSEStream, parseToolArguments, prepareSurfaceOperations, props, randomUUID, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, segmentSurfaceProse, select, splitA2UIMarkdown, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useFrontendTools, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMarkdownRenderer, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, verifyEvents, withAuthoritativeActivityTypes, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵMAX_SOCKET_RETRIES, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵgetAgentInterruptState, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisRetryableMemoryStatus, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵrunMcpFollowUp, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵthreadAdapterEvents, ɵwithHeaderDefaults };
|
|
13930
13923
|
//# sourceMappingURL=index.mjs.map
|