@copilotkit/react-core 2.0.0-rc.19 → 2.0.0-rc.20
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-kfFfyx5V.mjs → MarkdownSurfaces-Bt7TD_U1.mjs} +5 -30
- package/dist/MarkdownSurfaces-Bt7TD_U1.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-Ci0E7XKw.cjs → MarkdownSurfaces-CoUoPhR9.cjs} +6 -37
- package/dist/MarkdownSurfaces-CoUoPhR9.cjs.map +1 -0
- package/dist/generative-ui.cjs +1 -1
- package/dist/generative-ui.mjs +1 -1
- package/dist/headless.cjs +3 -6
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.mjs +4 -7
- package/dist/headless.mjs.map +1 -1
- package/dist/index.cjs +509 -786
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +172 -707
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +513 -815
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/dist/MarkdownSurfaces-Ci0E7XKw.cjs.map +0 -1
- package/dist/MarkdownSurfaces-kfFfyx5V.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { A as ExpressionError, B as renderSlot, C as issueKey, D as getMarkdownSurfaceSource, E as containsDynamicValue, F as toJsonSchema, G as CopilotIcon, H as CopilotChatConfigurationProvider, I as defineToolCallRenderer, J as StreamingMarkdownDefaultRenderer, L as MarkdownRendererProvider, M as catalogIdsOf, N as componentCatalogIds, R as useMarkdownRenderer, S as isAsyncIssue, T as withoutRejectedNulls, U as useCopilotChatConfiguration, V as ControlledModalOpenScope, W as useShallowStableRef, a as GenerativeUIToolCallRenderer, i as GenerativeUIChatSlotContext, j as GenerativeUIError, k as BASIC_FUNCTIONS, o as createGenerativeUIActivityRenderer, q as cn, s as createGenerativeUIFunctionCallActivityRenderer, t as MarkdownSurfaces, v as GenerativeUIRuntimeContext, w as validateSchemaSync, x as formatIssues, y as useGenerativeUIRuntime, z as isReactComponentType } from "./MarkdownSurfaces-
|
|
4
|
-
import { A2UI_FENCE_LANGUAGE, AgentRegistry, AgentThreadLockedError, ContextStore, CopilotChatDefaultLabels, CopilotChatDefaultLabels as CopilotChatDefaultLabels$1, CopilotKitCore, CopilotKitCore as CopilotKitCore$1, CopilotKitCoreErrorCode, CopilotKitCoreErrorCode as CopilotKitCoreErrorCode$1, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreRuntimeConnectionStatus as CopilotKitCoreRuntimeConnectionStatus$1, CopilotKitHeaderResolutionError, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL as DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL$1, GENERATE_SANDBOXED_UI_TOOL_NAME, GENERATE_SANDBOXED_UI_TOOL_NAME as GENERATE_SANDBOXED_UI_TOOL_NAME$1, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTERRUPT_EVENT_NAME, IntelligenceAgent, MEMORY_ERROR_REGISTRY, MemoryError, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, OPEN_GENERATIVE_UI_ACTIVITY_TYPE as OPEN_GENERATIVE_UI_ACTIVITY_TYPE$1, ProxiedCopilotRuntimeAgent, ProxiedCopilotRuntimeAgent as ProxiedCopilotRuntimeAgent$1, RunHandler, StateManager, SuggestionEngine, ToolCallStatus, ToolCallStatus as ToolCallStatus$1, TranscriptionError, TranscriptionError as TranscriptionError$1, TranscriptionErrorCode, 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, parseToolArguments, prepareSurfaceOperations, props, segmentSurfaceProse, select, splitA2UIMarkdown, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵInterruptState as ɵInterruptState$1, ɵMAX_SOCKET_RETRIES, ɵOpenGenerativeUIController, ɵOpenGenerativeUIController as ɵOpenGenerativeUIController$1, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵclearAgentInterruptState as ɵclearAgentInterruptState$1, ɵcomposerButtonState, ɵcomposerButtonState as ɵcomposerButtonState$1, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcountFailedToolCalls as ɵcountFailedToolCalls$1, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵcreateThreadStore as ɵcreateThreadStore$1, ɵdeduplicateMessages, ɵdeduplicateMessages as ɵdeduplicateMessages$1, ɵextractCompleteStyles, ɵformatCountLabel, ɵformatCountLabel as ɵformatCountLabel$1, ɵformatLabel, ɵformatLabel as ɵformatLabel$1, ɵformatReasoningDuration,
|
|
3
|
+
import { A as ExpressionError, B as renderSlot, C as issueKey, D as getMarkdownSurfaceSource, E as containsDynamicValue, F as toJsonSchema, G as CopilotIcon, H as CopilotChatConfigurationProvider, I as defineToolCallRenderer, J as StreamingMarkdownDefaultRenderer, L as MarkdownRendererProvider, M as catalogIdsOf, N as componentCatalogIds, R as useMarkdownRenderer, S as isAsyncIssue, T as withoutRejectedNulls, U as useCopilotChatConfiguration, V as ControlledModalOpenScope, W as useShallowStableRef, a as GenerativeUIToolCallRenderer, i as GenerativeUIChatSlotContext, j as GenerativeUIError, k as BASIC_FUNCTIONS, o as createGenerativeUIActivityRenderer, q as cn, s as createGenerativeUIFunctionCallActivityRenderer, t as MarkdownSurfaces, v as GenerativeUIRuntimeContext, w as validateSchemaSync, x as formatIssues, y as useGenerativeUIRuntime, z as isReactComponentType } from "./MarkdownSurfaces-Bt7TD_U1.mjs";
|
|
4
|
+
import { A2UI_FENCE_LANGUAGE, AgentRegistry, AgentThreadLockedError, ContextStore, CopilotChatDefaultLabels, CopilotChatDefaultLabels as CopilotChatDefaultLabels$1, CopilotKitCore, CopilotKitCore as CopilotKitCore$1, CopilotKitCoreErrorCode, CopilotKitCoreErrorCode as CopilotKitCoreErrorCode$1, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreRuntimeConnectionStatus as CopilotKitCoreRuntimeConnectionStatus$1, CopilotKitHeaderResolutionError, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL as DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL$1, GENERATE_SANDBOXED_UI_TOOL_NAME, GENERATE_SANDBOXED_UI_TOOL_NAME as GENERATE_SANDBOXED_UI_TOOL_NAME$1, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTERRUPT_EVENT_NAME, IntelligenceAgent, MEMORY_ERROR_REGISTRY, MemoryError, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, OPEN_GENERATIVE_UI_ACTIVITY_TYPE as OPEN_GENERATIVE_UI_ACTIVITY_TYPE$1, ProxiedCopilotRuntimeAgent, ProxiedCopilotRuntimeAgent as ProxiedCopilotRuntimeAgent$1, RunHandler, StateManager, SuggestionEngine, ToolCallStatus, ToolCallStatus as ToolCallStatus$1, TranscriptionError, TranscriptionError as TranscriptionError$1, TranscriptionErrorCode, 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, parseToolArguments, prepareSurfaceOperations, props, segmentSurfaceProse, select, splitA2UIMarkdown, ɵCOPILOTKIT_FEATURES, ɵCOPY_FEEDBACK_RESET_MS, ɵCopyFeedback, ɵCopyFeedback as ɵCopyFeedback$1, ɵFEEDBACK_COMMENT_CLOSE_DELAY_MS, ɵFeedbackCommentController, ɵFeedbackCommentController as ɵFeedbackCommentController$1, ɵHOVER_MENU_CLOSE_DELAY_MS, ɵHoverMenuController, ɵHoverMenuController as ɵHoverMenuController$1, ɵINLINE_FEATURE_WARNING_STYLE, ɵINLINE_FEATURE_WARNING_STYLE as ɵINLINE_FEATURE_WARNING_STYLE$1, ɵInterruptState, ɵInterruptState as ɵInterruptState$1, ɵKEYBOARD_OPEN_THRESHOLD_PX, ɵLICENSE_BANNER_OFFSET, ɵLICENSE_BANNER_STYLE, ɵLICENSE_BANNER_STYLE as ɵLICENSE_BANNER_STYLE$1, ɵMAX_SOCKET_RETRIES, ɵMESSAGE_FEEDBACK_EVENT_NAME, ɵMESSAGE_FEEDBACK_MAX_COMMENT_LENGTH, ɵMESSAGE_FEEDBACK_MAX_COMMENT_LENGTH as ɵMESSAGE_FEEDBACK_MAX_COMMENT_LENGTH$1, ɵMOBILE_MAX_WIDTH_QUERY, ɵOpenGenerativeUIController, ɵOpenGenerativeUIController as ɵOpenGenerativeUIController$1, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵclearAgentInterruptState as ɵclearAgentInterruptState$1, ɵcn, ɵcomposerButtonState, ɵcomposerButtonState as ɵcomposerButtonState$1, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcountFailedToolCalls as ɵcountFailedToolCalls$1, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵcreateThreadStore as ɵcreateThreadStore$1, ɵdeduplicateMessages, ɵdeduplicateMessages as ɵdeduplicateMessages$1, ɵextractCompleteStyles, ɵflattenUserMessageContent, ɵflattenUserMessageContent as ɵflattenUserMessageContent$1, ɵformatCountLabel, ɵformatCountLabel as ɵformatCountLabel$1, ɵformatLabel, ɵformatLabel as ɵformatLabel$1, ɵformatReasoningDuration, ɵformatReasoningDurationLabel, ɵformatReasoningDurationLabel as ɵformatReasoningDurationLabel$1, ɵformatToolNames, ɵformatToolNames as ɵformatToolNames$1, ɵformatWorkDuration, ɵgetAgentInterruptState, ɵgetAgentInterruptState as ɵgetAgentInterruptState$1, ɵgetArgumentPreview, ɵgetArgumentPreview as ɵgetArgumentPreview$1, ɵgetBranchNavState, ɵgetBranchNavState as ɵgetBranchNavState$1, ɵgetInlineFeatureWarningSpec, ɵgetInlineFeatureWarningSpec as ɵgetInlineFeatureWarningSpec$1, ɵgetLatestTurnKey, ɵgetLatestTurnKey as ɵgetLatestTurnKey$1, ɵgetLicenseBannerSpec, ɵgetLicenseBannerSpec as ɵgetLicenseBannerSpec$1, ɵgetMessageFeedback, ɵgetMessageFeedback as ɵgetMessageFeedback$1, ɵgetMessageFeedbackControls, ɵgetMessageFeedbackControls as ɵgetMessageFeedbackControls$1, ɵgetToolCallLayouts, ɵgetToolCallLayouts as ɵgetToolCallLayouts$1, ɵgetToolCallPreview, ɵgetToolCallPreview as ɵgetToolCallPreview$1, ɵgetToolCallRendererNames, ɵgetToolCallRendererNames as ɵgetToolCallRendererNames$1, ɵgetToolCallRowStatus, ɵgetToolCallRowStatus as ɵgetToolCallRowStatus$1, ɵgetToolResults, ɵgetTurnWork, ɵgetTurnWork as ɵgetTurnWork$1, ɵgetUserMessageMediaFilename, ɵgetUserMessageMediaFilename as ɵgetUserMessageMediaFilename$1, ɵgetUserMessageMediaParts, ɵgetUserMessageMediaParts as ɵgetUserMessageMediaParts$1, ɵgetWorkOpenState, ɵgetWorkOpenState as ɵgetWorkOpenState$1, ɵgetWorkSummaryText, ɵgetWorkSummaryText as ɵgetWorkSummaryText$1, ɵhasAssistantMessageText, ɵhasAssistantMessageText as ɵhasAssistantMessageText$1, ɵinitialKeyboardState, ɵinitialKeyboardState as ɵinitialKeyboardState$1, ɵinspectorKiteFill, ɵinspectorKiteFill as ɵinspectorKiteFill$1, ɵinspectorKiteIcon, ɵinspectorKiteIcon as ɵinspectorKiteIcon$1, ɵinspectorShortcuts, ɵinspectorShortcuts as ɵinspectorShortcuts$1, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisHttpAgent as ɵisHttpAgent$1, ɵisLearningFeedbackEnabled, ɵisLearningFeedbackEnabled as ɵisLearningFeedbackEnabled$1, ɵisMobileViewport, ɵisRetryableMemoryStatus, ɵisTurnWorkOpen, ɵisTurnWorkOpen as ɵisTurnWorkOpen$1, ɵisTurnWorking, ɵisTurnWorking as ɵisTurnWorking$1, ɵjoinPhoenixChannel$, ɵloadWebsandbox, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵmessagesFingerprint, ɵmessagesFingerprint as ɵmessagesFingerprint$1, ɵnormalizeAutoScroll, ɵnormalizeAutoScroll as normalizeAutoScroll, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵpinMessageToTop, ɵpinMessageToTop as ɵpinMessageToTop$1, ɵpluralize, ɵprocessPartialHtml, ɵreadKeyboardState, ɵrecordWorkTime, ɵrecordWorkTime as ɵrecordWorkTime$1, ɵreserveLicenseBannerOffset, ɵreserveLicenseBannerOffset as ɵreserveLicenseBannerOffset$1, ɵresetMessageFeedbackCache, ɵresolveActivityRenderer, ɵresolveActivityRenderer as ɵresolveActivityRenderer$1, ɵresolveComposerKey, ɵresolveComposerKey as ɵresolveComposerKey$1, ɵresolveCustomMessageRenderers, ɵresolveCustomMessageRenderers as ɵresolveCustomMessageRenderers$1, ɵresolveLicenseState, ɵresolveLicenseState as ɵresolveLicenseState$1, ɵresolveThreadsLicense, ɵresolveToolCallRenderer, ɵresolveToolCallRenderer as ɵresolveToolCallRenderer$1, ɵ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, ɵsetMessageFeedback, ɵshallowEqualRecord, ɵshouldShowAssistantToolbar, ɵshouldShowAssistantToolbar as ɵshouldShowAssistantToolbar$1, ɵstringifyToolCallPayload, ɵstringifyToolCallPayload as ɵstringifyToolCallPayload$1, ɵsubscribeToLearningFeedbackEnabled, ɵsubscribeToLearningFeedbackEnabled as ɵsubscribeToLearningFeedbackEnabled$1, ɵsubscribeToMessageFeedback, ɵsubscribeToMessageFeedback as ɵsubscribeToMessageFeedback$1, ɵthreadAdapterEvents, ɵtranscribeAudio, ɵtranscribeAudio as ɵtranscribeAudio$1, ɵtranscriptionErrorMessageKey, ɵtranscriptionErrorMessageKey as ɵtranscriptionErrorMessageKey$1, ɵwatchKeyboardState, ɵwatchKeyboardState as ɵwatchKeyboardState$1, ɵwatchMobileViewport, ɵwatchMobileViewport as ɵwatchMobileViewport$1, ɵwithHeaderDefaults, ɵwithHeaderDefaults as ɵwithHeaderDefaults$1 } from "@copilotkit/core";
|
|
5
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";
|
|
6
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";
|
|
7
7
|
import * as React$1 from "react";
|
|
@@ -1237,7 +1237,7 @@ function useRenderToolCall() {
|
|
|
1237
1237
|
|
|
1238
1238
|
//#endregion
|
|
1239
1239
|
//#region package.json
|
|
1240
|
-
var version$1 = "2.0.0-rc.
|
|
1240
|
+
var version$1 = "2.0.0-rc.20";
|
|
1241
1241
|
|
|
1242
1242
|
//#endregion
|
|
1243
1243
|
//#region src/components/CopilotKitInspector.tsx
|
|
@@ -1308,164 +1308,51 @@ function useCopilotKitInspector() {
|
|
|
1308
1308
|
|
|
1309
1309
|
//#endregion
|
|
1310
1310
|
//#region src/components/license-warning-banner.tsx
|
|
1311
|
-
|
|
1311
|
+
/** The chat labels in effect, or the default ones outside a chat. */
|
|
1312
|
+
function useLabels$2() {
|
|
1313
|
+
return useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels$1;
|
|
1314
|
+
}
|
|
1312
1315
|
/**
|
|
1313
|
-
* The
|
|
1314
|
-
*
|
|
1316
|
+
* The fixed license banner. Core's `ɵgetLicenseBannerSpec` picks its text,
|
|
1317
|
+
* link, and severity; this component renders them.
|
|
1315
1318
|
*/
|
|
1316
|
-
function
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
}
|
|
1320
|
-
const LICENSE_BANNER_OFFSET_PX = 52;
|
|
1321
|
-
const LICENSE_BANNER_OFFSET_VAR = "--copilotkit-license-banner-offset";
|
|
1322
|
-
const BANNER_STYLES = {
|
|
1323
|
-
base: {
|
|
1324
|
-
position: "fixed",
|
|
1325
|
-
bottom: "8px",
|
|
1326
|
-
left: "50%",
|
|
1327
|
-
transform: "translateX(-50%)",
|
|
1328
|
-
zIndex: 99999,
|
|
1329
|
-
display: "inline-flex",
|
|
1330
|
-
alignItems: "center",
|
|
1331
|
-
gap: "12px",
|
|
1332
|
-
whiteSpace: "nowrap",
|
|
1333
|
-
padding: "8px 16px",
|
|
1334
|
-
fontSize: "13px",
|
|
1335
|
-
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
|
|
1336
|
-
borderRadius: "6px",
|
|
1337
|
-
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
1338
|
-
},
|
|
1339
|
-
info: {
|
|
1340
|
-
backgroundColor: "#eff6ff",
|
|
1341
|
-
border: "1px solid #93c5fd",
|
|
1342
|
-
color: "#1e40af"
|
|
1343
|
-
},
|
|
1344
|
-
warning: {
|
|
1345
|
-
backgroundColor: "#fffbeb",
|
|
1346
|
-
border: "1px solid #fbbf24",
|
|
1347
|
-
color: "#92400e"
|
|
1348
|
-
},
|
|
1349
|
-
critical: {
|
|
1350
|
-
backgroundColor: "#fef2f2",
|
|
1351
|
-
border: "1px solid #fca5a5",
|
|
1352
|
-
color: "#991b1b"
|
|
1353
|
-
}
|
|
1354
|
-
};
|
|
1355
|
-
function getSeverityStyle(severity) {
|
|
1356
|
-
switch (severity) {
|
|
1357
|
-
case "warning": return BANNER_STYLES.warning;
|
|
1358
|
-
case "critical": return BANNER_STYLES.critical;
|
|
1359
|
-
default: return BANNER_STYLES.info;
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
function BannerShell({ severity, message, actionLabel, actionUrl, onDismiss }) {
|
|
1363
|
-
useEffect(() => {
|
|
1364
|
-
if (typeof document === "undefined") return;
|
|
1365
|
-
const root = document.documentElement;
|
|
1366
|
-
root.style.setProperty(LICENSE_BANNER_OFFSET_VAR, `${LICENSE_BANNER_OFFSET_PX}px`);
|
|
1367
|
-
return () => {
|
|
1368
|
-
root.style.removeProperty(LICENSE_BANNER_OFFSET_VAR);
|
|
1369
|
-
};
|
|
1370
|
-
}, []);
|
|
1319
|
+
function LicenseWarningBanner({ type, onDismiss, ...details }) {
|
|
1320
|
+
const spec = ɵgetLicenseBannerSpec$1(type, useLabels$2(), details);
|
|
1321
|
+
useEffect(() => ɵreserveLicenseBannerOffset$1(), []);
|
|
1371
1322
|
return /* @__PURE__ */ jsxs("div", {
|
|
1372
1323
|
style: {
|
|
1373
|
-
|
|
1374
|
-
|
|
1324
|
+
...ɵLICENSE_BANNER_STYLE$1.base,
|
|
1325
|
+
...ɵLICENSE_BANNER_STYLE$1.severity[spec.severity]
|
|
1375
1326
|
},
|
|
1376
|
-
children: [/* @__PURE__ */ jsx("span", { children: message }), /* @__PURE__ */ jsxs("div", {
|
|
1377
|
-
style:
|
|
1378
|
-
display: "flex",
|
|
1379
|
-
gap: "8px",
|
|
1380
|
-
alignItems: "center"
|
|
1381
|
-
},
|
|
1327
|
+
children: [/* @__PURE__ */ jsx("span", { children: spec.message }), /* @__PURE__ */ jsxs("div", {
|
|
1328
|
+
style: ɵLICENSE_BANNER_STYLE$1.actions,
|
|
1382
1329
|
children: [/* @__PURE__ */ jsx("a", {
|
|
1383
|
-
href: actionUrl,
|
|
1330
|
+
href: spec.actionUrl,
|
|
1384
1331
|
target: "_blank",
|
|
1385
1332
|
rel: "noopener noreferrer",
|
|
1386
|
-
style:
|
|
1387
|
-
|
|
1388
|
-
textDecoration: "underline",
|
|
1389
|
-
color: "inherit"
|
|
1390
|
-
},
|
|
1391
|
-
children: actionLabel
|
|
1333
|
+
style: ɵLICENSE_BANNER_STYLE$1.link,
|
|
1334
|
+
children: spec.actionLabel
|
|
1392
1335
|
}), onDismiss && /* @__PURE__ */ jsx("button", {
|
|
1393
1336
|
onClick: onDismiss,
|
|
1394
|
-
style:
|
|
1395
|
-
background: "none",
|
|
1396
|
-
border: "none",
|
|
1397
|
-
cursor: "pointer",
|
|
1398
|
-
color: "inherit",
|
|
1399
|
-
fontSize: "16px"
|
|
1400
|
-
},
|
|
1337
|
+
style: ɵLICENSE_BANNER_STYLE$1.dismiss,
|
|
1401
1338
|
children: "×"
|
|
1402
1339
|
})]
|
|
1403
1340
|
})]
|
|
1404
1341
|
});
|
|
1405
1342
|
}
|
|
1406
|
-
function LicenseWarningBanner({ type, featureName, expiryDate, graceRemaining, onDismiss }) {
|
|
1407
|
-
switch (type) {
|
|
1408
|
-
case "no_license": return /* @__PURE__ */ jsx(BannerShell, {
|
|
1409
|
-
severity: "info",
|
|
1410
|
-
message: labels.licensePoweredByText,
|
|
1411
|
-
actionLabel: labels.licenseGetLicenseLabel,
|
|
1412
|
-
actionUrl: "https://copilotkit.ai/pricing",
|
|
1413
|
-
onDismiss
|
|
1414
|
-
});
|
|
1415
|
-
case "feature_unlicensed": return /* @__PURE__ */ jsx(BannerShell, {
|
|
1416
|
-
severity: "warning",
|
|
1417
|
-
message: ɵformatLabel$1(labels.licenseFeatureUnlicensedText, { feature: featureName ?? "" }),
|
|
1418
|
-
actionLabel: labels.licenseGetLicenseLabel,
|
|
1419
|
-
actionUrl: "https://copilotkit.ai/pricing",
|
|
1420
|
-
onDismiss
|
|
1421
|
-
});
|
|
1422
|
-
case "expiring": return /* @__PURE__ */ jsx(BannerShell, {
|
|
1423
|
-
severity: "warning",
|
|
1424
|
-
message: expiringMessage(graceRemaining),
|
|
1425
|
-
actionLabel: labels.licenseRenewLabel,
|
|
1426
|
-
actionUrl: "https://dashboard.operations.copilotkit.ai",
|
|
1427
|
-
onDismiss
|
|
1428
|
-
});
|
|
1429
|
-
case "expired": return /* @__PURE__ */ jsx(BannerShell, {
|
|
1430
|
-
severity: "critical",
|
|
1431
|
-
message: expiryDate ? ɵformatLabel$1(labels.licenseExpiredOnDateText, { date: expiryDate }) : labels.licenseExpiredText,
|
|
1432
|
-
actionLabel: labels.licenseRenewNowLabel,
|
|
1433
|
-
actionUrl: "https://copilotkit.ai/pricing",
|
|
1434
|
-
onDismiss
|
|
1435
|
-
});
|
|
1436
|
-
case "invalid": return /* @__PURE__ */ jsx(BannerShell, {
|
|
1437
|
-
severity: "critical",
|
|
1438
|
-
message: labels.licenseInvalidText,
|
|
1439
|
-
actionLabel: labels.licenseGetLicenseLabel,
|
|
1440
|
-
actionUrl: "https://copilotkit.ai/pricing",
|
|
1441
|
-
onDismiss
|
|
1442
|
-
});
|
|
1443
|
-
default: return null;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
1343
|
function InlineFeatureWarning({ featureName }) {
|
|
1344
|
+
const spec = ɵgetInlineFeatureWarningSpec$1(featureName, useLabels$2());
|
|
1447
1345
|
return /* @__PURE__ */ jsxs("div", {
|
|
1448
|
-
style:
|
|
1449
|
-
padding: "8px 12px",
|
|
1450
|
-
backgroundColor: "#fffbeb",
|
|
1451
|
-
border: "1px solid #fbbf24",
|
|
1452
|
-
borderRadius: "6px",
|
|
1453
|
-
fontSize: "13px",
|
|
1454
|
-
color: "#92400e",
|
|
1455
|
-
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif"
|
|
1456
|
-
},
|
|
1346
|
+
style: ɵINLINE_FEATURE_WARNING_STYLE$1.container,
|
|
1457
1347
|
children: [
|
|
1458
|
-
|
|
1348
|
+
spec.message,
|
|
1459
1349
|
" ",
|
|
1460
1350
|
/* @__PURE__ */ jsx("a", {
|
|
1461
|
-
href:
|
|
1351
|
+
href: spec.actionUrl,
|
|
1462
1352
|
target: "_blank",
|
|
1463
1353
|
rel: "noopener noreferrer",
|
|
1464
|
-
style:
|
|
1465
|
-
|
|
1466
|
-
textDecoration: "underline"
|
|
1467
|
-
},
|
|
1468
|
-
children: "Get one at copilotkit.ai/pricing"
|
|
1354
|
+
style: ɵINLINE_FEATURE_WARNING_STYLE$1.link,
|
|
1355
|
+
children: spec.actionLabel
|
|
1469
1356
|
})
|
|
1470
1357
|
]
|
|
1471
1358
|
});
|
|
@@ -7589,160 +7476,53 @@ function CopilotChatToolCallsView({ message, messages = [], display: displayProp
|
|
|
7589
7476
|
|
|
7590
7477
|
//#endregion
|
|
7591
7478
|
//#region src/components/chat/CopilotChatInspectorButton.tsx
|
|
7592
|
-
|
|
7593
|
-
const
|
|
7594
|
-
const
|
|
7595
|
-
|
|
7596
|
-
return () => {
|
|
7597
|
-
listeners$1.delete(listener);
|
|
7598
|
-
};
|
|
7599
|
-
};
|
|
7600
|
-
const getSnapshot = () => shortcutsHidden;
|
|
7601
|
-
const getServerSnapshot = () => false;
|
|
7479
|
+
const subscribeToShortcuts = (listener) => ɵinspectorShortcuts$1.subscribe(listener);
|
|
7480
|
+
const getShortcutsHidden = () => ɵinspectorShortcuts$1.hidden;
|
|
7481
|
+
const getServerShortcutsHidden = () => false;
|
|
7482
|
+
/** Whether the user hid the Inspector shortcuts until the page reloads. */
|
|
7602
7483
|
function useInspectorShortcutsHidden() {
|
|
7603
|
-
return useSyncExternalStore(
|
|
7604
|
-
}
|
|
7605
|
-
function hideShortcuts() {
|
|
7606
|
-
shortcutsHidden = true;
|
|
7607
|
-
listeners$1.forEach((listener) => listener());
|
|
7484
|
+
return useSyncExternalStore(subscribeToShortcuts, getShortcutsHidden, getServerShortcutsHidden);
|
|
7608
7485
|
}
|
|
7486
|
+
const hideShortcuts = () => ɵinspectorShortcuts$1.hide();
|
|
7609
7487
|
function InspectorKiteIcon({ className, ...props }) {
|
|
7610
7488
|
const id = useId();
|
|
7611
7489
|
return /* @__PURE__ */ jsxs("svg", {
|
|
7612
7490
|
...props,
|
|
7613
7491
|
"aria-hidden": "true",
|
|
7614
7492
|
className: cn("cpk-inspector-button-kite-icon", className),
|
|
7615
|
-
viewBox:
|
|
7493
|
+
viewBox: ɵinspectorKiteIcon$1.viewBox,
|
|
7616
7494
|
fill: "none",
|
|
7617
|
-
children: [
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
/* @__PURE__ */ jsx("
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
}),
|
|
7636
|
-
/* @__PURE__ */ jsx("path", {
|
|
7637
|
-
d: "M6.44531 11.0476C6.44531 11.0476 10.375 10.3422 14.0686 9.06804C17.7623 7.7939 20.5122 6.23373 20.5122 6.23373",
|
|
7638
|
-
stroke: "#513C9F",
|
|
7639
|
-
strokeWidth: "0.17284",
|
|
7640
|
-
strokeLinecap: "round"
|
|
7641
|
-
}),
|
|
7642
|
-
/* @__PURE__ */ jsx("path", {
|
|
7643
|
-
d: "M11.6914 5.93518L9.05534 14.7068M9.05534 14.7068H15.3203M9.05534 14.7068L0.15625 26.3646",
|
|
7644
|
-
stroke: "#ABABAB",
|
|
7645
|
-
strokeWidth: "0.302474",
|
|
7646
|
-
strokeLinecap: "round"
|
|
7647
|
-
}),
|
|
7648
|
-
/* @__PURE__ */ jsx("path", {
|
|
7649
|
-
d: "M6.02539 23.9646L4.85806 24.1287C5.46272 25.7287 6.70381 26.4276 8.18528 26.4276C11.8147 26.4276 10.707 22.3227 12.8103 22.3227C14.3358 22.3227 13.7155 25.6498 16.9992 25.6498C19.0029 25.6498 19.2028 23.631 18.8607 22.7625C18.8589 22.7572 18.8568 22.7524 18.8538 22.7476L18.3166 21.9253C18.2817 21.8706 18.1968 21.8912 18.1907 21.9562L18.0908 22.9529C18.0838 23.0222 18.0857 23.0913 18.0936 23.1605C18.1764 23.8491 18.2291 25.5202 16.9992 25.5202C15.7015 25.5202 15.3895 22.2362 12.8103 22.2362C9.78393 22.2362 10.1726 26.298 8.31487 26.298C7.08938 26.298 6.15447 24.9153 6.02539 23.9646Z",
|
|
7650
|
-
fill: `url(#${id}-paint3_linear)`
|
|
7651
|
-
}),
|
|
7652
|
-
/* @__PURE__ */ jsxs("defs", { children: [
|
|
7653
|
-
/* @__PURE__ */ jsxs("linearGradient", {
|
|
7654
|
-
id: `${id}-paint0_linear`,
|
|
7655
|
-
x1: "15.5372",
|
|
7656
|
-
y1: "5.0278",
|
|
7657
|
-
x2: "12.0802",
|
|
7658
|
-
y2: "14.534",
|
|
7659
|
-
gradientUnits: "userSpaceOnUse",
|
|
7660
|
-
children: [/* @__PURE__ */ jsx("stop", { stopColor: "#6430AB" }), /* @__PURE__ */ jsx("stop", {
|
|
7661
|
-
offset: "1",
|
|
7662
|
-
stopColor: "#AA89D8"
|
|
7663
|
-
})]
|
|
7664
|
-
}),
|
|
7665
|
-
/* @__PURE__ */ jsxs("linearGradient", {
|
|
7666
|
-
id: `${id}-paint1_linear`,
|
|
7667
|
-
x1: "12.8583",
|
|
7668
|
-
y1: "10.3858",
|
|
7669
|
-
x2: "8.40764",
|
|
7670
|
-
y2: "18.9846",
|
|
7671
|
-
gradientUnits: "userSpaceOnUse",
|
|
7672
|
-
children: [/* @__PURE__ */ jsx("stop", { stopColor: "#005DBB" }), /* @__PURE__ */ jsx("stop", {
|
|
7673
|
-
offset: "1",
|
|
7674
|
-
stopColor: "#3D92E8"
|
|
7675
|
-
})]
|
|
7676
|
-
}),
|
|
7677
|
-
/* @__PURE__ */ jsxs("linearGradient", {
|
|
7678
|
-
id: `${id}-paint2_linear`,
|
|
7679
|
-
x1: "14.8452",
|
|
7680
|
-
y1: "5.02774",
|
|
7681
|
-
x2: "13.5047",
|
|
7682
|
-
y2: "9.21911",
|
|
7683
|
-
gradientUnits: "userSpaceOnUse",
|
|
7684
|
-
children: [/* @__PURE__ */ jsx("stop", { stopColor: "#1B70C4" }), /* @__PURE__ */ jsx("stop", {
|
|
7685
|
-
offset: "1",
|
|
7686
|
-
stopColor: "#54A4F2"
|
|
7687
|
-
})]
|
|
7688
|
-
}),
|
|
7689
|
-
/* @__PURE__ */ jsxs("linearGradient", {
|
|
7690
|
-
id: `${id}-paint3_linear`,
|
|
7691
|
-
x1: "4.85806",
|
|
7692
|
-
y1: "24.2455",
|
|
7693
|
-
x2: "18.9963",
|
|
7694
|
-
y2: "24.2455",
|
|
7695
|
-
gradientUnits: "userSpaceOnUse",
|
|
7696
|
-
children: [
|
|
7697
|
-
/* @__PURE__ */ jsx("stop", { stopColor: "#4497EA" }),
|
|
7698
|
-
/* @__PURE__ */ jsx("stop", {
|
|
7699
|
-
offset: "0.254755",
|
|
7700
|
-
stopColor: "#1463B2"
|
|
7701
|
-
}),
|
|
7702
|
-
/* @__PURE__ */ jsx("stop", {
|
|
7703
|
-
offset: "0.498725",
|
|
7704
|
-
stopColor: "#0A437D"
|
|
7705
|
-
}),
|
|
7706
|
-
/* @__PURE__ */ jsx("stop", {
|
|
7707
|
-
offset: "0.666667",
|
|
7708
|
-
stopColor: "#2476C8"
|
|
7709
|
-
}),
|
|
7710
|
-
/* @__PURE__ */ jsx("stop", {
|
|
7711
|
-
offset: "0.972542",
|
|
7712
|
-
stopColor: "#0C549A"
|
|
7713
|
-
})
|
|
7714
|
-
]
|
|
7715
|
-
})
|
|
7716
|
-
] })
|
|
7717
|
-
]
|
|
7495
|
+
children: [ɵinspectorKiteIcon$1.paths.map((path) => /* @__PURE__ */ jsx("path", {
|
|
7496
|
+
d: path.d,
|
|
7497
|
+
fill: ɵinspectorKiteFill$1(id, path),
|
|
7498
|
+
stroke: path.stroke,
|
|
7499
|
+
strokeWidth: path.strokeWidth,
|
|
7500
|
+
strokeLinecap: path.strokeLinecap
|
|
7501
|
+
}, path.d)), /* @__PURE__ */ jsx("defs", { children: ɵinspectorKiteIcon$1.gradients.map((gradient) => /* @__PURE__ */ jsx("linearGradient", {
|
|
7502
|
+
id: `${id}-${gradient.id}`,
|
|
7503
|
+
x1: gradient.x1,
|
|
7504
|
+
y1: gradient.y1,
|
|
7505
|
+
x2: gradient.x2,
|
|
7506
|
+
y2: gradient.y2,
|
|
7507
|
+
gradientUnits: "userSpaceOnUse",
|
|
7508
|
+
children: gradient.stops.map((stop) => /* @__PURE__ */ jsx("stop", {
|
|
7509
|
+
offset: stop.offset,
|
|
7510
|
+
stopColor: stop.color
|
|
7511
|
+
}, `${stop.offset ?? "0"}-${stop.color}`))
|
|
7512
|
+
}, gradient.id)) })]
|
|
7718
7513
|
});
|
|
7719
7514
|
}
|
|
7720
7515
|
function CopilotChatInspectorButton({ title, className, onClick, onPointerDown, onPointerEnter, onPointerLeave, onKeyDown, disabled, ...props }) {
|
|
7721
7516
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels$1;
|
|
7722
7517
|
const { isInspectorEnabled } = useCopilotKitInspector();
|
|
7723
7518
|
const hidden = useInspectorShortcutsHidden();
|
|
7724
|
-
const [
|
|
7725
|
-
const
|
|
7519
|
+
const [menu] = useState(() => new ɵHoverMenuController$1());
|
|
7520
|
+
const { open, dark } = useSyncExternalStore(menu.subscribe, menu.getSnapshot, menu.getSnapshot);
|
|
7726
7521
|
const trigger = useRef(null);
|
|
7727
|
-
const closeTimer = useRef(null);
|
|
7728
|
-
const openedByHover = useRef(false);
|
|
7729
7522
|
const primaryLabel = title || labels.assistantMessageToolbarInspectorLabel;
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
};
|
|
7734
|
-
useEffect(() => cancelClose, []);
|
|
7735
|
-
const changeOpen = (next) => {
|
|
7736
|
-
cancelClose();
|
|
7737
|
-
if (next) setDark(!!trigger.current?.closest(".dark"));
|
|
7738
|
-
setOpen(next);
|
|
7739
|
-
};
|
|
7740
|
-
const scheduleClose = () => {
|
|
7741
|
-
cancelClose();
|
|
7742
|
-
closeTimer.current = setTimeout(() => {
|
|
7743
|
-
if (openedByHover.current) setOpen(false);
|
|
7744
|
-
}, 180);
|
|
7745
|
-
};
|
|
7523
|
+
useEffect(() => menu.dispose, [menu]);
|
|
7524
|
+
const { cancelClose, scheduleClose } = menu;
|
|
7525
|
+
const changeOpen = (next) => menu.setOpen(next, trigger.current);
|
|
7746
7526
|
if (!isInspectorEnabled || hidden) return null;
|
|
7747
7527
|
return /* @__PURE__ */ jsxs(DropdownMenu, {
|
|
7748
7528
|
open,
|
|
@@ -7762,10 +7542,11 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
7762
7542
|
className: cn("cpk-inspector-button", className),
|
|
7763
7543
|
onPointerEnter: (event) => {
|
|
7764
7544
|
onPointerEnter?.(event);
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7545
|
+
menu.pointerEnter({
|
|
7546
|
+
pointerType: event.pointerType,
|
|
7547
|
+
disabled,
|
|
7548
|
+
trigger: trigger.current
|
|
7549
|
+
});
|
|
7769
7550
|
},
|
|
7770
7551
|
onPointerLeave: (event) => {
|
|
7771
7552
|
onPointerLeave?.(event);
|
|
@@ -7780,7 +7561,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
7780
7561
|
onClick?.(event);
|
|
7781
7562
|
},
|
|
7782
7563
|
onKeyDown: (event) => {
|
|
7783
|
-
|
|
7564
|
+
menu.keyboardUsed();
|
|
7784
7565
|
onKeyDown?.(event);
|
|
7785
7566
|
if (!event.defaultPrevented && (event.key === "Enter" || event.key === " ")) {
|
|
7786
7567
|
event.preventDefault();
|
|
@@ -7801,14 +7582,12 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
7801
7582
|
className: cn("cpk-inspector-button-menu", dark && "dark"),
|
|
7802
7583
|
onPointerEnter: cancelClose,
|
|
7803
7584
|
onPointerLeave: scheduleClose,
|
|
7804
|
-
onKeyDown:
|
|
7805
|
-
openedByHover.current = false;
|
|
7806
|
-
},
|
|
7585
|
+
onKeyDown: menu.keyboardUsed,
|
|
7807
7586
|
onOpenAutoFocus: (event) => {
|
|
7808
|
-
if (openedByHover
|
|
7587
|
+
if (menu.openedByHover) event.preventDefault();
|
|
7809
7588
|
},
|
|
7810
7589
|
onCloseAutoFocus: (event) => {
|
|
7811
|
-
if (openedByHover
|
|
7590
|
+
if (menu.openedByHover) event.preventDefault();
|
|
7812
7591
|
},
|
|
7813
7592
|
onFocusOutside: () => changeOpen(false),
|
|
7814
7593
|
children: [
|
|
@@ -7902,82 +7681,6 @@ const PopoverContent = React$1.forwardRef(({ className, align = "start", sideOff
|
|
|
7902
7681
|
}) }));
|
|
7903
7682
|
PopoverContent.displayName = "PopoverContent";
|
|
7904
7683
|
|
|
7905
|
-
//#endregion
|
|
7906
|
-
//#region src/lib/message-feedback.ts
|
|
7907
|
-
/** Trajectory event name for a rating of one assistant message. */
|
|
7908
|
-
const MESSAGE_FEEDBACK_EVENT_NAME = "message.feedback";
|
|
7909
|
-
/** Longest comment kept, in characters; the rest is cut so the event stays small. */
|
|
7910
|
-
const MESSAGE_FEEDBACK_MAX_COMMENT_LENGTH = 1e3;
|
|
7911
|
-
/** Longest excerpt of the rated response sent with the rating, in characters. */
|
|
7912
|
-
const RESPONSE_EXCERPT_LENGTH = 500;
|
|
7913
|
-
const ratings = /* @__PURE__ */ new Map();
|
|
7914
|
-
const listeners = /* @__PURE__ */ new Map();
|
|
7915
|
-
const threadKey = (agentId, threadId) => JSON.stringify([agentId, threadId]);
|
|
7916
|
-
const messageKey = (agentId, threadId, messageId) => JSON.stringify([
|
|
7917
|
-
agentId,
|
|
7918
|
-
threadId,
|
|
7919
|
-
messageId
|
|
7920
|
-
]);
|
|
7921
|
-
/** Cuts `text` to `max` characters without splitting a surrogate pair. */
|
|
7922
|
-
const clip = (text, max) => {
|
|
7923
|
-
const characters = Array.from(text);
|
|
7924
|
-
return characters.length > max ? characters.slice(0, max).join("") : text;
|
|
7925
|
-
};
|
|
7926
|
-
/** The comment as kept and sent: trimmed and capped, or none. */
|
|
7927
|
-
const normalizeComment = (comment) => {
|
|
7928
|
-
if (typeof comment !== "string") return void 0;
|
|
7929
|
-
const text = clip(comment.trim(), MESSAGE_FEEDBACK_MAX_COMMENT_LENGTH);
|
|
7930
|
-
return text === "" ? void 0 : text;
|
|
7931
|
-
};
|
|
7932
|
-
/** The rating this page gave one message, if any. */
|
|
7933
|
-
function getMessageFeedback(agentId, threadId, messageId) {
|
|
7934
|
-
return ratings.get(messageKey(agentId, threadId, messageId));
|
|
7935
|
-
}
|
|
7936
|
-
/** Calls `listener` whenever a rating in this Thread changes. */
|
|
7937
|
-
function subscribeToMessageFeedback(agentId, threadId, listener) {
|
|
7938
|
-
const key = threadKey(agentId, threadId);
|
|
7939
|
-
let set = listeners.get(key);
|
|
7940
|
-
if (set === void 0) {
|
|
7941
|
-
set = /* @__PURE__ */ new Set();
|
|
7942
|
-
listeners.set(key, set);
|
|
7943
|
-
}
|
|
7944
|
-
set.add(listener);
|
|
7945
|
-
return () => {
|
|
7946
|
-
set.delete(listener);
|
|
7947
|
-
if (set.size === 0) listeners.delete(key);
|
|
7948
|
-
};
|
|
7949
|
-
}
|
|
7950
|
-
/**
|
|
7951
|
-
* Sets (or, with `null`, clears) this page's rating of one message and sends
|
|
7952
|
-
* it to the active Trajectory. Every change is a new event; the newest event
|
|
7953
|
-
* for a `feedbackId` is the current one. Like any Trajectory event, a change
|
|
7954
|
-
* made while no Trajectory captures, for example during a reconnect, is not
|
|
7955
|
-
* sent; the page still shows it.
|
|
7956
|
-
*/
|
|
7957
|
-
function setMessageFeedback(params) {
|
|
7958
|
-
const { copilotkit, agentId, threadId, message } = params;
|
|
7959
|
-
const comment = normalizeComment(params.feedback?.comment);
|
|
7960
|
-
const feedback = params.feedback && {
|
|
7961
|
-
rating: params.feedback.rating,
|
|
7962
|
-
...comment ? { comment } : {}
|
|
7963
|
-
};
|
|
7964
|
-
const key = messageKey(agentId, threadId, message.id);
|
|
7965
|
-
if (feedback) ratings.set(key, feedback);
|
|
7966
|
-
else ratings.delete(key);
|
|
7967
|
-
for (const listener of listeners.get(threadKey(agentId, threadId)) ?? []) listener();
|
|
7968
|
-
const runId = copilotkit.getRunIdForMessage(agentId, threadId, message.id);
|
|
7969
|
-
copilotkit.emitTrajectoryEvent(MESSAGE_FEEDBACK_EVENT_NAME, {
|
|
7970
|
-
feedbackId: `${threadId}:${message.id}`,
|
|
7971
|
-
threadId,
|
|
7972
|
-
messageId: message.id,
|
|
7973
|
-
agentId,
|
|
7974
|
-
...runId ? { runId } : {},
|
|
7975
|
-
rating: feedback?.rating ?? null,
|
|
7976
|
-
...feedback?.comment ? { comment: feedback.comment } : {},
|
|
7977
|
-
...copilotkit.ɵlearningCapturesAgentText ? { response: clip(message.content ?? "", RESPONSE_EXCERPT_LENGTH) } : {}
|
|
7978
|
-
});
|
|
7979
|
-
}
|
|
7980
|
-
|
|
7981
7684
|
//#endregion
|
|
7982
7685
|
//#region src/components/chat/message-feedback.tsx
|
|
7983
7686
|
/**
|
|
@@ -7986,180 +7689,61 @@ function setMessageFeedback(params) {
|
|
|
7986
7689
|
* or thumb slots.
|
|
7987
7690
|
*/
|
|
7988
7691
|
const MessageFeedbackScopeContext = createContext(null);
|
|
7989
|
-
const capturedCores = /* @__PURE__ */ new WeakSet();
|
|
7990
|
-
const rememberCapture = (copilotkit) => {
|
|
7991
|
-
if (capturedCores.has(copilotkit)) return;
|
|
7992
|
-
capturedCores.add(copilotkit);
|
|
7993
|
-
const unsubscribe = copilotkit.ɵsubscribeToLearningConfigured(() => {
|
|
7994
|
-
if (copilotkit.ɵlearningConfigured) return;
|
|
7995
|
-
capturedCores.delete(copilotkit);
|
|
7996
|
-
unsubscribe();
|
|
7997
|
-
});
|
|
7998
|
-
};
|
|
7999
7692
|
/**
|
|
8000
|
-
* Whether the thumbs record feedback for Learning.
|
|
8001
|
-
*
|
|
8002
|
-
* capture reconnects or is stopped, so the buttons do not flicker. Ratings
|
|
8003
|
-
* given meanwhile still show but, like any Trajectory event, are not
|
|
8004
|
-
* sent. A capture that never starts (for example without a license) leaves it
|
|
8005
|
-
* false.
|
|
7693
|
+
* Whether the thumbs record feedback for Learning. See core's
|
|
7694
|
+
* `ɵisLearningFeedbackEnabled` for the rules.
|
|
8006
7695
|
*/
|
|
8007
7696
|
function useLearningFeedbackEnabled(copilotkit) {
|
|
8008
|
-
|
|
8009
|
-
const capturing = useSyncExternalStore(useCallback((onChange) => copilotkit.subscribe({ onTrajectoryChanged: onChange }).unsubscribe, [copilotkit]), () => copilotkit.trajectoryId !== null, () => false);
|
|
8010
|
-
useEffect(() => {
|
|
8011
|
-
if (capturing) rememberCapture(copilotkit);
|
|
8012
|
-
}, [capturing, copilotkit]);
|
|
8013
|
-
return configured && (capturing || capturedCores.has(copilotkit));
|
|
7697
|
+
return useSyncExternalStore(useCallback((onChange) => ɵsubscribeToLearningFeedbackEnabled$1(copilotkit, onChange), [copilotkit]), () => ɵisLearningFeedbackEnabled$1(copilotkit), () => false);
|
|
8014
7698
|
}
|
|
8015
7699
|
const noSubscription = () => () => {};
|
|
8016
7700
|
/** Feedback controls for `message`, or `null` when this chat collects none. */
|
|
8017
7701
|
function useMessageFeedback(message) {
|
|
8018
7702
|
const scope = useContext(MessageFeedbackScopeContext);
|
|
8019
|
-
const subscribe = useCallback((onChange) => scope ?
|
|
8020
|
-
const getSnapshot = () => scope ?
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
const save = (next) => setMessageFeedback({
|
|
8024
|
-
...scope,
|
|
8025
|
-
message,
|
|
8026
|
-
feedback: next
|
|
8027
|
-
});
|
|
8028
|
-
return {
|
|
8029
|
-
feedback,
|
|
8030
|
-
rate: (rating) => {
|
|
8031
|
-
if (feedback?.rating !== rating) save({ rating });
|
|
8032
|
-
},
|
|
8033
|
-
clear: () => {
|
|
8034
|
-
if (feedback) save(null);
|
|
8035
|
-
},
|
|
8036
|
-
comment: (comment) => {
|
|
8037
|
-
if (feedback) save({
|
|
8038
|
-
rating: feedback.rating,
|
|
8039
|
-
comment
|
|
8040
|
-
});
|
|
8041
|
-
}
|
|
8042
|
-
};
|
|
7703
|
+
const subscribe = useCallback((onChange) => scope ? ɵsubscribeToMessageFeedback$1(scope.agentId, scope.threadId, onChange) : noSubscription(), [scope]);
|
|
7704
|
+
const getSnapshot = () => scope ? ɵgetMessageFeedback$1(scope.agentId, scope.threadId, message.id) : void 0;
|
|
7705
|
+
useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
7706
|
+
return scope ? ɵgetMessageFeedbackControls$1(scope, message) : null;
|
|
8043
7707
|
}
|
|
8044
7708
|
/**
|
|
8045
|
-
*
|
|
8046
|
-
*
|
|
8047
|
-
* passing over a rating does not leave it open.
|
|
8048
|
-
*/
|
|
8049
|
-
const FEEDBACK_COMMENT_CLOSE_DELAY_MS = 150;
|
|
8050
|
-
/**
|
|
8051
|
-
* Drives the comment popover of a rated message.
|
|
8052
|
-
*
|
|
8053
|
-
* It opens when a rating is given and whenever the pointer or keyboard focus
|
|
8054
|
-
* reaches the chosen thumb, with the saved comment in the field. It closes by
|
|
8055
|
-
* itself shortly after the pointer leaves the thumb and the popover, unless
|
|
8056
|
-
* focus is in the field: then it stays until focus moves away, Enter, or
|
|
8057
|
-
* Escape. Closing saves a changed comment; Escape, a click on a thumb, and
|
|
8058
|
-
* removing the rating discard it.
|
|
7709
|
+
* Drives the comment popover of a rated message with core's
|
|
7710
|
+
* `ɵFeedbackCommentController`, which holds the open and close rules.
|
|
8059
7711
|
*/
|
|
8060
7712
|
function useFeedbackComment(controls) {
|
|
8061
|
-
const
|
|
8062
|
-
|
|
8063
|
-
const [
|
|
7713
|
+
const latestControls = useRef(controls);
|
|
7714
|
+
latestControls.current = controls;
|
|
7715
|
+
const [controller] = useState(() => new ɵFeedbackCommentController$1({ getControls: () => latestControls.current }));
|
|
8064
7716
|
const inputRef = useRef(null);
|
|
8065
|
-
const
|
|
8066
|
-
|
|
8067
|
-
const focusWaiting = useRef(false);
|
|
8068
|
-
const pointerOver = useRef(false);
|
|
8069
|
-
const returning = useRef(false);
|
|
8070
|
-
const latest = useRef({
|
|
8071
|
-
controls,
|
|
8072
|
-
draft,
|
|
8073
|
-
open
|
|
8074
|
-
});
|
|
8075
|
-
latest.current = {
|
|
8076
|
-
...latest.current,
|
|
8077
|
-
controls,
|
|
8078
|
-
draft,
|
|
8079
|
-
open
|
|
8080
|
-
};
|
|
8081
|
-
const takeFocusRequest = useCallback(() => {
|
|
8082
|
-
const waiting = focusWaiting.current;
|
|
8083
|
-
focusWaiting.current = false;
|
|
8084
|
-
return waiting;
|
|
8085
|
-
}, []);
|
|
8086
|
-
const cancelClose = useCallback(() => {
|
|
8087
|
-
if (timer.current === void 0) return;
|
|
8088
|
-
clearTimeout(timer.current);
|
|
8089
|
-
timer.current = void 0;
|
|
8090
|
-
}, []);
|
|
8091
|
-
useEffect(() => cancelClose, [cancelClose]);
|
|
8092
|
-
const savedComment = useCallback(() => latest.current.controls?.feedback?.comment ?? "", []);
|
|
8093
|
-
useEffect(() => () => {
|
|
8094
|
-
const { open: wasOpen, controls: current, draft: text } = latest.current;
|
|
8095
|
-
if (wasOpen && current?.feedback && text.trim() !== savedComment()) current.comment(text);
|
|
8096
|
-
}, []);
|
|
8097
|
-
const close = useCallback(({ save = true } = {}) => {
|
|
8098
|
-
cancelClose();
|
|
8099
|
-
focusWaiting.current = false;
|
|
8100
|
-
pointerOver.current = false;
|
|
8101
|
-
if (!latest.current.open) return;
|
|
8102
|
-
const current = latest.current.controls;
|
|
8103
|
-
if (save && current?.feedback && latest.current.draft.trim() !== savedComment()) current.comment(latest.current.draft);
|
|
8104
|
-
editing.current = false;
|
|
8105
|
-
latest.current = {
|
|
8106
|
-
...latest.current,
|
|
8107
|
-
open: false
|
|
8108
|
-
};
|
|
8109
|
-
setOpen(false);
|
|
8110
|
-
}, [cancelClose, savedComment]);
|
|
8111
|
-
const show = ({ comment, focus }) => {
|
|
8112
|
-
cancelClose();
|
|
8113
|
-
latest.current = {
|
|
8114
|
-
...latest.current,
|
|
8115
|
-
open: true,
|
|
8116
|
-
draft: comment
|
|
8117
|
-
};
|
|
8118
|
-
setDraft(comment);
|
|
8119
|
-
if (focus) {
|
|
8120
|
-
focusWaiting.current = true;
|
|
8121
|
-
setFocusRequest((request) => request + 1);
|
|
8122
|
-
}
|
|
8123
|
-
setOpen(true);
|
|
8124
|
-
};
|
|
7717
|
+
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot, controller.getSnapshot);
|
|
7718
|
+
useEffect(() => controller.dispose, [controller]);
|
|
8125
7719
|
return {
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
focusRequest,
|
|
8130
|
-
takeFocusRequest,
|
|
7720
|
+
...state,
|
|
7721
|
+
setDraft: controller.setDraft,
|
|
7722
|
+
takeFocusRequest: controller.takeFocusRequest,
|
|
8131
7723
|
inputRef,
|
|
8132
|
-
show,
|
|
8133
|
-
enter:
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
returnFocus: (target) => {
|
|
8156
|
-
returning.current = true;
|
|
8157
|
-
try {
|
|
8158
|
-
target?.focus();
|
|
8159
|
-
} finally {
|
|
8160
|
-
returning.current = false;
|
|
8161
|
-
}
|
|
8162
|
-
}
|
|
7724
|
+
show: controller.show,
|
|
7725
|
+
enter: controller.enter,
|
|
7726
|
+
leave: controller.leave,
|
|
7727
|
+
setEditing: controller.setEditing,
|
|
7728
|
+
close: controller.close,
|
|
7729
|
+
returnFocus: controller.returnFocus
|
|
7730
|
+
};
|
|
7731
|
+
}
|
|
7732
|
+
|
|
7733
|
+
//#endregion
|
|
7734
|
+
//#region src/components/chat/use-copy-feedback.ts
|
|
7735
|
+
/**
|
|
7736
|
+
* The "copied" check mark of a copy button, from core's `ɵCopyFeedback`: it
|
|
7737
|
+
* shows for two seconds after `markCopied()`, and a second copy restarts the
|
|
7738
|
+
* wait.
|
|
7739
|
+
*/
|
|
7740
|
+
function useCopyFeedback() {
|
|
7741
|
+
const [feedback] = useState(() => new ɵCopyFeedback$1());
|
|
7742
|
+
const copied = useSyncExternalStore(feedback.subscribe, feedback.getSnapshot, feedback.getSnapshot);
|
|
7743
|
+
useEffect(() => feedback.dispose, [feedback]);
|
|
7744
|
+
return {
|
|
7745
|
+
copied,
|
|
7746
|
+
markCopied: feedback.markCopied
|
|
8163
7747
|
};
|
|
8164
7748
|
}
|
|
8165
7749
|
|
|
@@ -8322,7 +7906,7 @@ function FeedbackCommentPopover({ feedbackComment, comment, savedComment, rating
|
|
|
8322
7906
|
function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, onThumbsUp, onThumbsDown, onReadAloud, onRegenerate, additionalToolbarItems, toolbarVisible = true, markdownRenderer, toolbar, copyButton, inspectorButton, thumbsUpButton, thumbsDownButton, readAloudButton, regenerateButton, feedbackComment: feedbackCommentSlot, toolCallsView, children, className, ...props }) {
|
|
8323
7907
|
const providerRenderer = useShallowStableRef(useMarkdownRenderer());
|
|
8324
7908
|
const DefaultMarkdownRenderer = useMemo(() => resolveMarkdownRenderer(providerRenderer), [providerRenderer]);
|
|
8325
|
-
const hasContent =
|
|
7909
|
+
const hasContent = ɵhasAssistantMessageText$1(message.content);
|
|
8326
7910
|
const isLatestAssistantMessage = message.role === "assistant" && (isLatest ?? messages?.[messages.length - 1]?.id === message.id);
|
|
8327
7911
|
const { isInspectorEnabled, openInspector } = useCopilotKitInspector();
|
|
8328
7912
|
const shortcutsHidden = useInspectorShortcutsHidden();
|
|
@@ -8442,7 +8026,13 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
8442
8026
|
message,
|
|
8443
8027
|
messages
|
|
8444
8028
|
});
|
|
8445
|
-
const shouldShowToolbar =
|
|
8029
|
+
const shouldShowToolbar = ɵshouldShowAssistantToolbar$1({
|
|
8030
|
+
toolbarVisible,
|
|
8031
|
+
hasContent,
|
|
8032
|
+
showInspectorShortcut,
|
|
8033
|
+
isRunning: !!isRunning,
|
|
8034
|
+
isLatest: isLatestAssistantMessage
|
|
8035
|
+
});
|
|
8446
8036
|
const { open: commentOpen, close: closeComment } = comment;
|
|
8447
8037
|
useEffect(() => {
|
|
8448
8038
|
if (!commentOpen) return;
|
|
@@ -8555,24 +8145,10 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
8555
8145
|
};
|
|
8556
8146
|
_CopilotChatAssistantMessage.CopyButton = ({ className, title, onClick, ...props }) => {
|
|
8557
8147
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels$1;
|
|
8558
|
-
const
|
|
8559
|
-
const timerRef = useRef(null);
|
|
8560
|
-
useEffect(() => {
|
|
8561
|
-
return () => {
|
|
8562
|
-
if (timerRef.current !== null) clearTimeout(timerRef.current);
|
|
8563
|
-
};
|
|
8564
|
-
}, []);
|
|
8148
|
+
const { copied, markCopied } = useCopyFeedback();
|
|
8565
8149
|
const handleClick = async (event) => {
|
|
8566
|
-
|
|
8567
|
-
if (
|
|
8568
|
-
if (success) {
|
|
8569
|
-
setCopied(true);
|
|
8570
|
-
if (timerRef.current !== null) clearTimeout(timerRef.current);
|
|
8571
|
-
timerRef.current = setTimeout(() => {
|
|
8572
|
-
timerRef.current = null;
|
|
8573
|
-
setCopied(false);
|
|
8574
|
-
}, 2e3);
|
|
8575
|
-
}
|
|
8150
|
+
if (!onClick) return;
|
|
8151
|
+
if (await Promise.resolve(onClick(event)) === true) markCopied();
|
|
8576
8152
|
};
|
|
8577
8153
|
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
8578
8154
|
"data-testid": "copilot-copy-button",
|
|
@@ -8639,7 +8215,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
8639
8215
|
children: [/* @__PURE__ */ jsx("input", {
|
|
8640
8216
|
ref: inputRef,
|
|
8641
8217
|
value,
|
|
8642
|
-
maxLength: MESSAGE_FEEDBACK_MAX_COMMENT_LENGTH,
|
|
8218
|
+
maxLength: ɵMESSAGE_FEEDBACK_MAX_COMMENT_LENGTH$1,
|
|
8643
8219
|
onChange: (event) => onChange(event.target.value),
|
|
8644
8220
|
placeholder: labels.assistantMessageFeedbackCommentPlaceholder,
|
|
8645
8221
|
"aria-label": labels.assistantMessageFeedbackCommentPlaceholder,
|
|
@@ -8870,25 +8446,9 @@ const CopilotChatAttachmentRenderer = ({ type, source, filename, className }) =>
|
|
|
8870
8446
|
|
|
8871
8447
|
//#endregion
|
|
8872
8448
|
//#region src/components/chat/CopilotChatUserMessage.tsx
|
|
8873
|
-
function flattenUserMessageContent(content) {
|
|
8874
|
-
if (!content) return "";
|
|
8875
|
-
if (typeof content === "string") return content;
|
|
8876
|
-
return content.map((part) => {
|
|
8877
|
-
if (part && typeof part === "object" && "type" in part && part.type === "text" && typeof part.text === "string") return part.text;
|
|
8878
|
-
return "";
|
|
8879
|
-
}).filter((text) => text.length > 0).join("\n");
|
|
8880
|
-
}
|
|
8881
|
-
function getMediaParts(content) {
|
|
8882
|
-
if (!content || typeof content === "string") return [];
|
|
8883
|
-
return content.filter((part) => part.type === "image" || part.type === "audio" || part.type === "video" || part.type === "document");
|
|
8884
|
-
}
|
|
8885
|
-
function getFilename(part) {
|
|
8886
|
-
const meta = part.metadata;
|
|
8887
|
-
if (meta != null && typeof meta === "object" && "filename" in meta && typeof meta.filename === "string") return meta.filename;
|
|
8888
|
-
}
|
|
8889
8449
|
function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfBranches, onSwitchToBranch, additionalToolbarItems, messageRenderer, toolbar, copyButton, editButton, branchNavigation, children, className, ...props }) {
|
|
8890
|
-
const flattenedContent = useMemo(() =>
|
|
8891
|
-
const mediaParts = useMemo(() =>
|
|
8450
|
+
const flattenedContent = useMemo(() => ɵflattenUserMessageContent$1(message.content), [message.content]);
|
|
8451
|
+
const mediaParts = useMemo(() => ɵgetUserMessageMediaParts$1(message.content), [message.content]);
|
|
8892
8452
|
const BoundMessageRenderer = renderSlot(messageRenderer, CopilotChatUserMessage.MessageRenderer, { content: flattenedContent });
|
|
8893
8453
|
const BoundCopyButton = renderSlot(copyButton, CopilotChatUserMessage.CopyButton, { onClick: async () => {
|
|
8894
8454
|
if (flattenedContent) return await copyToClipboard(flattenedContent);
|
|
@@ -8901,7 +8461,11 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
8901
8461
|
onSwitchToBranch,
|
|
8902
8462
|
message
|
|
8903
8463
|
});
|
|
8904
|
-
const
|
|
8464
|
+
const { show: showBranchNavigation } = ɵgetBranchNavState$1({
|
|
8465
|
+
branchIndex: branchIndex ?? 0,
|
|
8466
|
+
numberOfBranches: numberOfBranches ?? 1,
|
|
8467
|
+
canSwitch: onSwitchToBranch !== void 0
|
|
8468
|
+
});
|
|
8905
8469
|
const BoundToolbar = renderSlot(toolbar, CopilotChatUserMessage.Toolbar, { children: /* @__PURE__ */ jsxs("div", {
|
|
8906
8470
|
className: "cpk-user-message-toolbar-items",
|
|
8907
8471
|
children: [
|
|
@@ -8938,7 +8502,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
8938
8502
|
children: mediaParts.map((part, index) => /* @__PURE__ */ jsx(CopilotChatAttachmentRenderer, {
|
|
8939
8503
|
type: part.type,
|
|
8940
8504
|
source: part.source,
|
|
8941
|
-
filename:
|
|
8505
|
+
filename: ɵgetUserMessageMediaFilename$1(part)
|
|
8942
8506
|
}, index))
|
|
8943
8507
|
}),
|
|
8944
8508
|
BoundMessageRenderer,
|
|
@@ -8979,14 +8543,10 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
8979
8543
|
};
|
|
8980
8544
|
_CopilotChatUserMessage.CopyButton = ({ className, title, onClick, ...props }) => {
|
|
8981
8545
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels$1;
|
|
8982
|
-
const
|
|
8546
|
+
const { copied, markCopied } = useCopyFeedback();
|
|
8983
8547
|
const handleClick = async (event) => {
|
|
8984
|
-
|
|
8985
|
-
if (
|
|
8986
|
-
if (success) {
|
|
8987
|
-
setCopied(true);
|
|
8988
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
8989
|
-
}
|
|
8548
|
+
if (!onClick) return;
|
|
8549
|
+
if (await Promise.resolve(onClick(event)) === true) markCopied();
|
|
8990
8550
|
};
|
|
8991
8551
|
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
8992
8552
|
"data-testid": "copilot-user-copy-button",
|
|
@@ -9020,9 +8580,12 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
9020
8580
|
};
|
|
9021
8581
|
_CopilotChatUserMessage.BranchNavigation = ({ className, currentBranch = 0, numberOfBranches = 1, onSwitchToBranch, message, ...props }) => {
|
|
9022
8582
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels$1;
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
8583
|
+
const { show, canGoPrev, canGoNext } = ɵgetBranchNavState$1({
|
|
8584
|
+
branchIndex: currentBranch,
|
|
8585
|
+
numberOfBranches,
|
|
8586
|
+
canSwitch: onSwitchToBranch !== void 0
|
|
8587
|
+
});
|
|
8588
|
+
if (!show) return null;
|
|
9026
8589
|
return /* @__PURE__ */ jsxs("div", {
|
|
9027
8590
|
"data-testid": "copilot-branch-navigation",
|
|
9028
8591
|
className: cn("cpk-user-message-branch-navigation", className),
|
|
@@ -9084,27 +8647,6 @@ var CopilotChatUserMessage_default = CopilotChatUserMessage;
|
|
|
9084
8647
|
//#endregion
|
|
9085
8648
|
//#region src/components/chat/CopilotChatReasoningMessage.tsx
|
|
9086
8649
|
/**
|
|
9087
|
-
* The reasoning time as label text, such as "4 seconds" or "1m 5s".
|
|
9088
|
-
*
|
|
9089
|
-
* @param seconds - The elapsed time in seconds. It may have a fraction.
|
|
9090
|
-
* @param labels - The chat labels that hold the duration texts.
|
|
9091
|
-
*/
|
|
9092
|
-
function formatDuration(seconds, labels) {
|
|
9093
|
-
const duration = ɵformatReasoningDuration$1(seconds);
|
|
9094
|
-
switch (duration.unit) {
|
|
9095
|
-
case "fewSeconds": return labels.reasoningMessageDurationFewSeconds;
|
|
9096
|
-
case "seconds": return ɵformatLabel$1(labels.reasoningMessageDurationSeconds, { count: duration.seconds });
|
|
9097
|
-
case "minutes": return ɵformatCountLabel$1(duration.minutes, {
|
|
9098
|
-
one: labels.reasoningMessageDurationMinutesOne,
|
|
9099
|
-
other: labels.reasoningMessageDurationMinutesOther
|
|
9100
|
-
});
|
|
9101
|
-
case "minutesSeconds": return ɵformatLabel$1(labels.reasoningMessageDurationMinutesSeconds, {
|
|
9102
|
-
minutes: duration.minutes,
|
|
9103
|
-
seconds: duration.seconds
|
|
9104
|
-
});
|
|
9105
|
-
}
|
|
9106
|
-
}
|
|
9107
|
-
/**
|
|
9108
8650
|
* A reasoning message as a collapsible block. While the model reasons it is
|
|
9109
8651
|
* open and the header shows `labels.reasoningMessageThinkingLabel`; when
|
|
9110
8652
|
* streaming ends it collapses and the header reads
|
|
@@ -9142,7 +8684,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
|
|
|
9142
8684
|
userToggledRef.current = true;
|
|
9143
8685
|
setIsOpen((prev) => !prev);
|
|
9144
8686
|
} : void 0;
|
|
9145
|
-
const label = isStreaming ? labels.reasoningMessageThinkingLabel : ɵformatLabel$1(labels.reasoningMessageThoughtForLabel, { duration:
|
|
8687
|
+
const label = isStreaming ? labels.reasoningMessageThinkingLabel : ɵformatLabel$1(labels.reasoningMessageThoughtForLabel, { duration: ɵformatReasoningDurationLabel$1(elapsed, labels) });
|
|
9146
8688
|
const boundHeader = renderSlot(header, CopilotChatReasoningMessage.Header, {
|
|
9147
8689
|
isOpen,
|
|
9148
8690
|
label,
|
|
@@ -9391,14 +8933,14 @@ function useNow(active) {
|
|
|
9391
8933
|
*/
|
|
9392
8934
|
function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSince, className, ...props }) {
|
|
9393
8935
|
const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels$1;
|
|
9394
|
-
const
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
8936
|
+
const text = ɵgetWorkSummaryText$1({
|
|
8937
|
+
isWorking,
|
|
8938
|
+
calls,
|
|
8939
|
+
elapsedMs,
|
|
8940
|
+
workingSince,
|
|
8941
|
+
now: useNow(isWorking),
|
|
8942
|
+
labels
|
|
9399
8943
|
});
|
|
9400
|
-
const liveMs = elapsedMs !== void 0 && workingSince !== void 0 ? elapsedMs + Math.max(0, now - workingSince) : void 0;
|
|
9401
|
-
const duration = elapsedMs !== void 0 ? ɵformatWorkDuration$1(Math.max(1e3, elapsedMs)) : void 0;
|
|
9402
8944
|
return /* @__PURE__ */ jsxs("button", {
|
|
9403
8945
|
type: "button",
|
|
9404
8946
|
"data-copilotkit": true,
|
|
@@ -9407,33 +8949,25 @@ function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSi
|
|
|
9407
8949
|
"aria-expanded": isOpen,
|
|
9408
8950
|
className: cn("cpk-work-summary", className),
|
|
9409
8951
|
...props,
|
|
9410
|
-
children: [
|
|
9411
|
-
className: "cpk-work-summary-label cpk-shimmer",
|
|
9412
|
-
children: labels.workSummaryWorkingLabel
|
|
9413
|
-
}), liveMs !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
9414
|
-
className: "cpk-work-summary-detail cpk-work-summary-timer",
|
|
9415
|
-
children: ɵformatWorkDuration$1(liveMs)
|
|
9416
|
-
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
8952
|
+
children: [
|
|
9417
8953
|
/* @__PURE__ */ jsx("span", {
|
|
9418
|
-
className: "cpk-work-summary-label",
|
|
9419
|
-
children:
|
|
9420
|
-
one: labels.toolCallUsedToolsOne,
|
|
9421
|
-
other: labels.toolCallUsedToolsOther
|
|
9422
|
-
})
|
|
8954
|
+
className: cn("cpk-work-summary-label", isWorking && "cpk-shimmer"),
|
|
8955
|
+
children: text.label
|
|
9423
8956
|
}),
|
|
9424
|
-
|
|
9425
|
-
className: "cpk-work-summary-detail",
|
|
9426
|
-
children:
|
|
8957
|
+
text.detail !== null && /* @__PURE__ */ jsx("span", {
|
|
8958
|
+
className: cn("cpk-work-summary-detail", isWorking && "cpk-work-summary-timer"),
|
|
8959
|
+
children: text.detail
|
|
9427
8960
|
}),
|
|
9428
|
-
failed
|
|
8961
|
+
text.failed !== null && /* @__PURE__ */ jsx("span", {
|
|
9429
8962
|
className: "cpk-work-summary-failed",
|
|
9430
|
-
children:
|
|
8963
|
+
children: text.failed
|
|
8964
|
+
}),
|
|
8965
|
+
/* @__PURE__ */ jsx(CopilotIcon, {
|
|
8966
|
+
name: "ChevronRight",
|
|
8967
|
+
"aria-hidden": "true",
|
|
8968
|
+
className: cn("cpk-work-summary-chevron", isOpen && "cpk-work-summary-chevron-open")
|
|
9431
8969
|
})
|
|
9432
|
-
]
|
|
9433
|
-
name: "ChevronRight",
|
|
9434
|
-
"aria-hidden": "true",
|
|
9435
|
-
className: cn("cpk-work-summary-chevron", isOpen && "cpk-work-summary-chevron-open")
|
|
9436
|
-
})]
|
|
8970
|
+
]
|
|
9437
8971
|
});
|
|
9438
8972
|
}
|
|
9439
8973
|
|
|
@@ -10749,53 +10283,11 @@ function DocumentPreview({ attachment }) {
|
|
|
10749
10283
|
* @returns KeyboardState object with keyboard information
|
|
10750
10284
|
*/
|
|
10751
10285
|
function useKeyboardHeight() {
|
|
10752
|
-
const [keyboardState, setKeyboardState] = useState(
|
|
10753
|
-
|
|
10754
|
-
keyboardHeight: 0,
|
|
10755
|
-
availableHeight: typeof window !== "undefined" ? window.innerHeight : 0,
|
|
10756
|
-
viewportHeight: typeof window !== "undefined" ? window.innerHeight : 0
|
|
10757
|
-
});
|
|
10758
|
-
useEffect(() => {
|
|
10759
|
-
if (typeof window === "undefined") return;
|
|
10760
|
-
const visualViewport = window.visualViewport;
|
|
10761
|
-
if (!visualViewport) return;
|
|
10762
|
-
const updateKeyboardState = () => {
|
|
10763
|
-
const layoutHeight = window.innerHeight;
|
|
10764
|
-
const visualHeight = visualViewport.height;
|
|
10765
|
-
const keyboardHeight = Math.max(0, layoutHeight - visualHeight);
|
|
10766
|
-
setKeyboardState({
|
|
10767
|
-
isKeyboardOpen: keyboardHeight > 150,
|
|
10768
|
-
keyboardHeight,
|
|
10769
|
-
availableHeight: visualHeight,
|
|
10770
|
-
viewportHeight: layoutHeight
|
|
10771
|
-
});
|
|
10772
|
-
};
|
|
10773
|
-
updateKeyboardState();
|
|
10774
|
-
visualViewport.addEventListener("resize", updateKeyboardState);
|
|
10775
|
-
visualViewport.addEventListener("scroll", updateKeyboardState);
|
|
10776
|
-
return () => {
|
|
10777
|
-
visualViewport.removeEventListener("resize", updateKeyboardState);
|
|
10778
|
-
visualViewport.removeEventListener("scroll", updateKeyboardState);
|
|
10779
|
-
};
|
|
10780
|
-
}, []);
|
|
10286
|
+
const [keyboardState, setKeyboardState] = useState(ɵinitialKeyboardState$1);
|
|
10287
|
+
useEffect(() => ɵwatchKeyboardState$1(setKeyboardState), []);
|
|
10781
10288
|
return keyboardState;
|
|
10782
10289
|
}
|
|
10783
10290
|
|
|
10784
|
-
//#endregion
|
|
10785
|
-
//#region src/components/chat/normalize-auto-scroll.ts
|
|
10786
|
-
const VALID = [
|
|
10787
|
-
"pin-to-bottom",
|
|
10788
|
-
"pin-to-send",
|
|
10789
|
-
"none"
|
|
10790
|
-
];
|
|
10791
|
-
function normalizeAutoScroll(value) {
|
|
10792
|
-
if (value === void 0) return "pin-to-bottom";
|
|
10793
|
-
if (value === true) return "pin-to-bottom";
|
|
10794
|
-
if (value === false) return "none";
|
|
10795
|
-
if (VALID.includes(value)) return value;
|
|
10796
|
-
return "pin-to-bottom";
|
|
10797
|
-
}
|
|
10798
|
-
|
|
10799
10291
|
//#endregion
|
|
10800
10292
|
//#region src/components/chat/last-user-message-context.ts
|
|
10801
10293
|
const LastUserMessageContext = React.createContext({
|
|
@@ -10805,6 +10297,11 @@ const LastUserMessageContext = React.createContext({
|
|
|
10805
10297
|
|
|
10806
10298
|
//#endregion
|
|
10807
10299
|
//#region src/hooks/use-pin-to-send.ts
|
|
10300
|
+
/**
|
|
10301
|
+
* Pins the latest sent user message near the top of the chat while the reply
|
|
10302
|
+
* streams below it. Core's `ɵpinMessageToTop` does the measuring and
|
|
10303
|
+
* scrolling; this hook runs it once per send.
|
|
10304
|
+
*/
|
|
10808
10305
|
function usePinToSend({ scrollRef, contentRef, spacerRef, topOffset = 16 }) {
|
|
10809
10306
|
const { id, sendNonce } = useContext(LastUserMessageContext);
|
|
10810
10307
|
const lastNonceRef = useRef(-1);
|
|
@@ -10817,35 +10314,15 @@ function usePinToSend({ scrollRef, contentRef, spacerRef, topOffset = 16 }) {
|
|
|
10817
10314
|
const contentEl = contentRef.current;
|
|
10818
10315
|
const spacerEl = spacerRef.current;
|
|
10819
10316
|
if (!scrollEl || !contentEl || !spacerEl) return;
|
|
10820
|
-
const
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
const bubbleHeight = Math.max(0, userMessageHeight - paddingTop);
|
|
10827
|
-
const spacerHeight = Math.max(0, viewportHeight - bubbleHeight - topOffset);
|
|
10828
|
-
spacerEl.style.height = `${spacerHeight}px`;
|
|
10829
|
-
let pinned = false;
|
|
10830
|
-
const raf = requestAnimationFrame(() => {
|
|
10831
|
-
pinned = true;
|
|
10832
|
-
const targetTop = computeOffsetTop(targetEl, scrollEl) + paddingTop - topOffset;
|
|
10833
|
-
scrollEl.scrollTo({
|
|
10834
|
-
top: Math.max(0, targetTop),
|
|
10835
|
-
behavior: "smooth"
|
|
10836
|
-
});
|
|
10837
|
-
});
|
|
10838
|
-
const ro = new ResizeObserver(() => {
|
|
10839
|
-
if (!contentEl || !spacerEl || !scrollEl) return;
|
|
10840
|
-
const consumedBelow = contentEl.getBoundingClientRect().height - computeOffsetTop(targetEl, contentEl) - userMessageHeight;
|
|
10841
|
-
const remaining = Math.max(0, spacerHeight - consumedBelow);
|
|
10842
|
-
spacerEl.style.height = `${remaining}px`;
|
|
10317
|
+
const unpin = ɵpinMessageToTop$1({
|
|
10318
|
+
scrollEl,
|
|
10319
|
+
contentEl,
|
|
10320
|
+
spacerEl,
|
|
10321
|
+
messageId: id,
|
|
10322
|
+
topOffset
|
|
10843
10323
|
});
|
|
10844
|
-
ro.observe(contentEl);
|
|
10845
10324
|
return () => {
|
|
10846
|
-
|
|
10847
|
-
ro.disconnect();
|
|
10848
|
-
if (!pinned) lastNonceRef.current = previousNonce;
|
|
10325
|
+
if (!unpin()) lastNonceRef.current = previousNonce;
|
|
10849
10326
|
};
|
|
10850
10327
|
}, [
|
|
10851
10328
|
id,
|
|
@@ -10856,11 +10333,6 @@ function usePinToSend({ scrollRef, contentRef, spacerRef, topOffset = 16 }) {
|
|
|
10856
10333
|
topOffset
|
|
10857
10334
|
]);
|
|
10858
10335
|
}
|
|
10859
|
-
function computeOffsetTop(el, stopAt) {
|
|
10860
|
-
const elRect = el.getBoundingClientRect();
|
|
10861
|
-
const stopRect = stopAt.getBoundingClientRect();
|
|
10862
|
-
return elRect.top - stopRect.top + stopAt.scrollTop;
|
|
10863
|
-
}
|
|
10864
10336
|
|
|
10865
10337
|
//#endregion
|
|
10866
10338
|
//#region src/components/chat/CopilotChatView.tsx
|
|
@@ -12326,14 +11798,7 @@ function useModalOpenControl() {
|
|
|
12326
11798
|
*/
|
|
12327
11799
|
function useIsMobileViewport() {
|
|
12328
11800
|
const [isMobile, setIsMobile] = useState(false);
|
|
12329
|
-
useEffect(() =>
|
|
12330
|
-
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
12331
|
-
const mql = window.matchMedia("(max-width: 767px)");
|
|
12332
|
-
const update = () => setIsMobile(mql.matches);
|
|
12333
|
-
update();
|
|
12334
|
-
mql.addEventListener("change", update);
|
|
12335
|
-
return () => mql.removeEventListener("change", update);
|
|
12336
|
-
}, []);
|
|
11801
|
+
useEffect(() => ɵwatchMobileViewport$1(setIsMobile), []);
|
|
12337
11802
|
return isMobile;
|
|
12338
11803
|
}
|
|
12339
11804
|
function CopilotModalHeader({ title, titleContent, closeButton, drawerLauncher, children, className, ...rest }) {
|
|
@@ -13171,5 +12636,5 @@ const WildcardToolCallRender = defineToolCallRenderer({
|
|
|
13171
12636
|
});
|
|
13172
12637
|
|
|
13173
12638
|
//#endregion
|
|
13174
|
-
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, CompatibilityBoundary, ContentPartSchema, ContextSchema, ContextStore, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatDefaultLabels, 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, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, DataSourceSchema, DebugLogger, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventType, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FilterToolCallsMiddleware, FunctionCallSchema, FunctionMiddleware, GENERATE_SANDBOXED_UI_TOOL_NAME, 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, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, 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, TranscriptionError, TranscriptionErrorCode, 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, 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, useLicenseContext, useMarkdownRenderer, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, verifyEvents, withAuthoritativeActivityTypes, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵMAX_SOCKET_RETRIES, ɵOpenGenerativeUIController, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵcomposerButtonState, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵdeduplicateMessages, ɵextractCompleteStyles, ɵformatCountLabel, ɵformatLabel, ɵformatReasoningDuration, ɵformatToolNames, ɵformatWorkDuration, ɵgetAgentInterruptState, ɵgetArgumentPreview, ɵgetLatestTurnKey, ɵgetToolCallLayouts, ɵgetToolCallPreview, ɵgetToolCallRendererNames, ɵgetToolCallRowStatus, ɵgetToolResults, ɵgetTurnWork, ɵgetWorkOpenState, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisRetryableMemoryStatus, ɵisTurnWorkOpen, ɵisTurnWorking, ɵjoinPhoenixChannel$, ɵloadWebsandbox, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵmessagesFingerprint, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵpluralize, ɵprocessPartialHtml, ɵrecordWorkTime, ɵresolveActivityRenderer, ɵresolveComposerKey, ɵresolveCustomMessageRenderers, ɵresolveLicenseState, ɵresolveThreadsLicense, ɵresolveToolCallRenderer, ɵrunMcpFollowUp, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵstringifyToolCallPayload, ɵthreadAdapterEvents, ɵtranscribeAudio, ɵtranscriptionErrorMessageKey, ɵwithHeaderDefaults };
|
|
12639
|
+
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, CompatibilityBoundary, ContentPartSchema, ContextSchema, ContextStore, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatDefaultLabels, 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, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, DataSourceSchema, DebugLogger, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventType, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FilterToolCallsMiddleware, FunctionCallSchema, FunctionMiddleware, GENERATE_SANDBOXED_UI_TOOL_NAME, 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, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, 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, TranscriptionError, TranscriptionErrorCode, 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, 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, useLicenseContext, useMarkdownRenderer, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, verifyEvents, withAuthoritativeActivityTypes, ɵCOPILOTKIT_FEATURES, ɵCOPY_FEEDBACK_RESET_MS, ɵCopyFeedback, ɵFEEDBACK_COMMENT_CLOSE_DELAY_MS, ɵFeedbackCommentController, ɵHOVER_MENU_CLOSE_DELAY_MS, ɵHoverMenuController, ɵINLINE_FEATURE_WARNING_STYLE, ɵInterruptState, ɵKEYBOARD_OPEN_THRESHOLD_PX, ɵLICENSE_BANNER_OFFSET, ɵLICENSE_BANNER_STYLE, ɵMAX_SOCKET_RETRIES, ɵMESSAGE_FEEDBACK_EVENT_NAME, ɵMESSAGE_FEEDBACK_MAX_COMMENT_LENGTH, ɵMOBILE_MAX_WIDTH_QUERY, ɵOpenGenerativeUIController, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵcn, ɵcomposerButtonState, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵdeduplicateMessages, ɵextractCompleteStyles, ɵflattenUserMessageContent, ɵformatCountLabel, ɵformatLabel, ɵformatReasoningDuration, ɵformatReasoningDurationLabel, ɵformatToolNames, ɵformatWorkDuration, ɵgetAgentInterruptState, ɵgetArgumentPreview, ɵgetBranchNavState, ɵgetInlineFeatureWarningSpec, ɵgetLatestTurnKey, ɵgetLicenseBannerSpec, ɵgetMessageFeedback, ɵgetMessageFeedbackControls, ɵgetToolCallLayouts, ɵgetToolCallPreview, ɵgetToolCallRendererNames, ɵgetToolCallRowStatus, ɵgetToolResults, ɵgetTurnWork, ɵgetUserMessageMediaFilename, ɵgetUserMessageMediaParts, ɵgetWorkOpenState, ɵgetWorkSummaryText, ɵhasAssistantMessageText, ɵinitialKeyboardState, ɵinspectorKiteFill, ɵinspectorKiteIcon, ɵinspectorShortcuts, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisLearningFeedbackEnabled, ɵisMobileViewport, ɵisRetryableMemoryStatus, ɵisTurnWorkOpen, ɵisTurnWorking, ɵjoinPhoenixChannel$, ɵloadWebsandbox, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵmessagesFingerprint, ɵnormalizeAutoScroll, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵpinMessageToTop, ɵpluralize, ɵprocessPartialHtml, ɵreadKeyboardState, ɵrecordWorkTime, ɵreserveLicenseBannerOffset, ɵresetMessageFeedbackCache, ɵresolveActivityRenderer, ɵresolveComposerKey, ɵresolveCustomMessageRenderers, ɵresolveLicenseState, ɵresolveThreadsLicense, ɵresolveToolCallRenderer, ɵrunMcpFollowUp, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵsetMessageFeedback, ɵshallowEqualRecord, ɵshouldShowAssistantToolbar, ɵstringifyToolCallPayload, ɵsubscribeToLearningFeedbackEnabled, ɵsubscribeToMessageFeedback, ɵthreadAdapterEvents, ɵtranscribeAudio, ɵtranscriptionErrorMessageKey, ɵwatchKeyboardState, ɵwatchMobileViewport, ɵwithHeaderDefaults };
|
|
13175
12640
|
//# sourceMappingURL=index.mjs.map
|