@iota-uz/sdk 0.4.30 → 0.4.32

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.
@@ -321,7 +321,7 @@ interface QuestionOption {
321
321
  interface QuestionAnswerData {
322
322
  /** Selected predefined options (option IDs) */
323
323
  options: string[];
324
- /** Custom text entered when user selects "Other" option */
324
+ /** Custom text entered for an "Other" answer; mutually exclusive with options */
325
325
  customText?: string;
326
326
  }
327
327
  /**
@@ -530,6 +530,7 @@ interface SendMessageOptions {
530
530
  debugMode?: boolean;
531
531
  replaceFromMessageID?: string;
532
532
  reasoningEffort?: string;
533
+ model?: string;
533
534
  }
534
535
  interface SessionListResult$1 {
535
536
  sessions: Session$1[];
@@ -655,9 +656,11 @@ interface ChatSessionStateValue {
655
656
  debugLimits: DebugLimits | null;
656
657
  reasoningEffort: string | undefined;
657
658
  reasoningEffortOptions: string[] | undefined;
659
+ model: string | undefined;
658
660
  setError: (error: string | null) => void;
659
661
  retryFetchSession: () => void;
660
662
  setReasoningEffort: (effort: string) => void;
663
+ setModel: (model: string | undefined) => void;
661
664
  }
662
665
  interface ChatMessagingStateValue {
663
666
  turns: ConversationTurn$1[];
@@ -770,6 +773,8 @@ interface ChatSessionProps {
770
773
  logoSlot?: ReactNode;
771
774
  /** Custom action buttons for the header */
772
775
  actionsSlot?: ReactNode;
776
+ /** Custom content rendered above the message input (e.g., model selector) */
777
+ inputHeaderSlot?: ReactNode;
773
778
  /** Callback when user navigates back */
774
779
  onBack?: () => void;
775
780
  /** Custom verbs for the typing indicator (e.g. ['Thinking', 'Analyzing', ...]) */
@@ -785,6 +790,8 @@ interface ChatSessionProps {
785
790
  }
786
791
  declare function ChatSession(props: ChatSessionProps): react_jsx_runtime.JSX.Element;
787
792
 
793
+ declare function ModelSelector(): react_jsx_runtime.JSX.Element | null;
794
+
788
795
  interface SessionArtifactsPanelProps {
789
796
  dataSource: ChatDataSource;
790
797
  sessionId: string;
@@ -3680,6 +3687,11 @@ interface Extensions {
3680
3687
  provider?: string;
3681
3688
  apiKeyConfigured?: boolean;
3682
3689
  reasoningEffortOptions?: string[];
3690
+ models?: Array<{
3691
+ id: string;
3692
+ label: string;
3693
+ default?: boolean;
3694
+ }>;
3683
3695
  };
3684
3696
  debug?: {
3685
3697
  limits?: {
@@ -3874,9 +3886,11 @@ interface SessionSnapshot {
3874
3886
  debugLimits: DebugLimits | null;
3875
3887
  reasoningEffort: string | undefined;
3876
3888
  reasoningEffortOptions: string[] | undefined;
3889
+ model: string | undefined;
3877
3890
  setError: (error: string | null) => void;
3878
3891
  retryFetchSession: () => void;
3879
3892
  setReasoningEffort: (effort: string) => void;
3893
+ setModel: (model: string | undefined) => void;
3880
3894
  }
3881
3895
  /** Superset of ChatMessagingStateValue used internally by the state machine; includes internal-only fields such as generationInProgress. */
3882
3896
  interface MessagingSnapshot {
@@ -3997,6 +4011,7 @@ declare class ChatMachine {
3997
4011
  readonly removeQueueItem: (index: number) => void;
3998
4012
  readonly updateQueueItem: (index: number, content: string) => void;
3999
4013
  readonly setReasoningEffort: (effort: string) => void;
4014
+ readonly setModel: (model: string | undefined) => void;
4000
4015
  constructor(config: ChatMachineConfig);
4001
4016
  private buildReasoningEffortOptions;
4002
4017
  private sanitizeReasoningEffort;
@@ -4027,6 +4042,7 @@ declare class ChatMachine {
4027
4042
  private _setDebugModeForSession;
4028
4043
  private _hydrateDebugModeForSession;
4029
4044
  private _setReasoningEffort;
4045
+ private _setModel;
4030
4046
  private _fetchSessionIfNeeded;
4031
4047
  /**
4032
4048
  * Sets turns from fetch, preserving pending user-only turns if server hasn't caught up.
@@ -4232,4 +4248,4 @@ declare function isPermissionDeniedError(error: unknown): boolean;
4232
4248
  */
4233
4249
  declare function toErrorDisplay(error: unknown, fallbackTitle: string): RPCErrorDisplay;
4234
4250
 
4235
- export { ATTACHMENT_ACCEPT_ATTRIBUTE, ActionButton, type ActionButtonIconProps, type ActionButtonLabelProps, type ActionButtonRootProps, type ActionButtonTooltipProps, type ActivityStep, ActivityTrace, type ActivityTraceProps, type AdminStore, _default$1 as Alert, AllChatsList, type AppConfig, _default as ArchiveBanner, ArchivedChatList, type Artifact$1 as Artifact, type ArtifactStore, type AsChildProps, AssistantMessage, type AssistantMessageActionsSlotProps, type AssistantMessageArtifactsSlotProps, type AssistantMessageAvatarSlotProps, type AssistantMessageChartsSlotProps, type AssistantMessageClassNames, type AssistantMessageCodeOutputsSlotProps, type AssistantMessageContentSlotProps, type AssistantMessageExplanationSlotProps, type AssistantMessageProps, type AssistantMessageSlots, type AssistantMessageSourcesSlotProps, type AssistantMessageTablesSlotProps, type AssistantTurn$1 as AssistantTurn, AssistantTurnView, type AssistantTurnViewProps, type Attachment$1 as Attachment, MemoizedAttachmentGrid as AttachmentGrid, AttachmentPreview, AttachmentUpload, Avatar, type AvatarFallbackProps, type AvatarImageProps, type AvatarRootProps, AvatarStack, type AvatarStackProps, type BiChatConfig, BiChatLayout, type BiChatLayoutProps, type BichatRPC, Bubble, type BubbleContentProps, type BubbleFooterProps, type BubbleHeaderProps, type BubbleMetadataProps, type BubbleRootProps, type BubbleVariant, CHART_VISUAL, ChartCard, type ChartCardHost, type ChartData, type ChartSeries, type ChatDataSource, ChatHeader, type ChatInputStateValue, ChatMachine, type ChatMachineConfig, type ChatMessagingStateValue, ChatSession, type ChatSessionContextValue, ChatSessionProvider, type ChatSessionProviderProps, type ChatSessionStateValue, type Citation$1 as Citation, MemoizedCodeBlock as CodeBlock, type CodeOutput$1 as CodeOutput, CodeOutputsPanel, type ColumnMeta, type ColumnStats, type ColumnType, CompactionDoodle, ConfigProvider, ConfirmModal, type ConfirmModalProps, ConfirmationStep, type ConversationTurn$1 as ConversationTurn, type DataTableOptions, DateGroupHeader, DebugPanel, type DebugPanelProps, DefaultErrorContent, DownloadCard, MemoizedEditableText as EditableText, type EditableTextProps, type EditableTextRef, MemoizedEmptyState as EmptyState, type EmptyStateProps, ErrorBoundary, type FileValidationError, type FileVisual, type FormattedCell, HttpDataSource, type HttpDataSourceConfig, type ImageAttachment, type ImageLoadingStatus, ImageModal, InlineQuestionForm, InteractiveTableCard, type IotaContext, IotaContextProvider, ListItemSkeleton, MemoizedLoadingSpinner as LoadingSpinner, type LocaleContext, MemoizedMarkdownRenderer as MarkdownRenderer, MessageActions, MessageInput, type MessageInputProps, type MessageInputRef, MessageList, MessageRole, type MessageTransport, type PendingQuestion$1 as PendingQuestion, PermissionGuard, type PermissionGuardProps, type Question, type QuestionAnswerData, type QuestionAnswers, QuestionForm, type QuestionOption, QuestionStep, type QueuedMessage, type RPCErrorDisplay, RateLimiter, type RateLimiterConfig, type RenderTableData, type RenderTableExport, RetryActionArea, ScreenReaderAnnouncer, ScrollToBottomButton, MemoizedSearchInput as SearchInput, type SearchInputProps, type Session$1 as Session, type SessionAccess$1 as SessionAccess, type SessionArtifact, SessionArtifactList, SessionArtifactPreview, SessionArtifactsPanel, type SessionGroup, SessionItem, type SessionListResult$1 as SessionListResult, type SessionMember$1 as SessionMember, SessionMembersModal, type SessionMembersModalProps, SessionSkeleton, type SessionStore, type SessionUser$1 as SessionUser, type ShortcutConfig, Sidebar, type SidebarDrawerProps, type SidebarProps, MemoizedSkeleton as Skeleton, SkeletonAvatar, SkeletonCard, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, SkeletonText, SkipLink, Slot, type SlotProps, type SortState, SourcesPanel, type StreamChunk, StreamError, type StreamEvent, StreamingCursor, SystemMessage, TabbedChartGroup, type TabbedChartGroupProps, TabbedTableGroup, type TabbedTableGroupProps, type TableCardHost, TableExportButton, TableWithExport, type TenantContext, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeSpacing, Toast, type ToastAction, ToastContainer, type ToastItem, type ToastProps, type ToastType, type ToolCall$1 as ToolCall, TouchContextMenu, Turn, type TurnActionsProps, type TurnAssistantProps, TurnBubble, type TurnBubbleClassNames, type TurnBubbleProps, type TurnRootProps, type TurnTimestampProps, type TurnUserProps, MemoizedTypingIndicator as TypingIndicator, type TypingIndicatorProps, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseAutoScrollOptions, type UseAutoScrollReturn, type UseBichatRouterParams, type UseBichatRouterReturn, type UseDataTableReturn, type UseImageGalleryOptions, type UseImageGalleryReturn, type UseMarkdownCopyOptions, type UseMarkdownCopyReturn, type UseMessageActionsOptions, type UseMessageActionsReturn, type UseSidebarStateReturn, type UseToastReturn, MemoizedUserAvatar as UserAvatar, type UserAvatarProps, type UserContext, MemoizedUserFilter as UserFilter, UserMessage, type UserMessageActionsSlotProps, type UserMessageAttachmentsSlotProps, type UserMessageAvatarSlotProps, type UserMessageClassNames, type UserMessageContentSlotProps, type UserMessageProps, type UserMessageSlots, type UserTurn$1 as UserTurn, UserTurnView, type UserTurnViewProps, WelcomeContent, addCSRFHeader, backdropVariants, buttonVariants, convertToBase64, createDataUrl, createHeadersWithCSRF, createHttpDataSource, darkTheme, dropdownVariants, errorMessageVariants, fadeInUpVariants, fadeInVariants, floatingButtonVariants, formatFileSize, getCSRFToken, getFileVisual, getToolLabel, getValidChildren, groupSessionsByDate, groupSteps, hasPermission, isImageMimeType, isPermissionDeniedError, lightTheme, listItemVariants, messageContainerVariants, messageVariants, parseBichatStream, parseBichatStreamEvents, parseSSEStream, scaleFadeVariants, sessionItemVariants, staggerContainerVariants, toErrorDisplay, typingDotVariants, useActionButtonContext, useAttachments, useAutoScroll, useAvatarContext, useBichatRouter, useBubbleContext, useChatInput, useChatMessaging, useChatSession, useConfig, useDataTable, useFocusTrap, useHttpDataSourceConfigFromApplet, useImageGallery, useIotaContext, useKeyboardShortcuts, useLongPress, useMarkdownCopy, useMessageActions, useModalLock, useOptionalChatMessaging, useRequiredConfig, useScrollToBottom, useSidebarState, useStreaming, useTheme, useToast, useTranslation, useTurnContext, validateAttachmentFile, validateFileCount, validateImageFile, verbTransitionVariants };
4251
+ export { ATTACHMENT_ACCEPT_ATTRIBUTE, ActionButton, type ActionButtonIconProps, type ActionButtonLabelProps, type ActionButtonRootProps, type ActionButtonTooltipProps, type ActivityStep, ActivityTrace, type ActivityTraceProps, type AdminStore, _default$1 as Alert, AllChatsList, type AppConfig, _default as ArchiveBanner, ArchivedChatList, type Artifact$1 as Artifact, type ArtifactStore, type AsChildProps, AssistantMessage, type AssistantMessageActionsSlotProps, type AssistantMessageArtifactsSlotProps, type AssistantMessageAvatarSlotProps, type AssistantMessageChartsSlotProps, type AssistantMessageClassNames, type AssistantMessageCodeOutputsSlotProps, type AssistantMessageContentSlotProps, type AssistantMessageExplanationSlotProps, type AssistantMessageProps, type AssistantMessageSlots, type AssistantMessageSourcesSlotProps, type AssistantMessageTablesSlotProps, type AssistantTurn$1 as AssistantTurn, AssistantTurnView, type AssistantTurnViewProps, type Attachment$1 as Attachment, MemoizedAttachmentGrid as AttachmentGrid, AttachmentPreview, AttachmentUpload, Avatar, type AvatarFallbackProps, type AvatarImageProps, type AvatarRootProps, AvatarStack, type AvatarStackProps, type BiChatConfig, BiChatLayout, type BiChatLayoutProps, type BichatRPC, Bubble, type BubbleContentProps, type BubbleFooterProps, type BubbleHeaderProps, type BubbleMetadataProps, type BubbleRootProps, type BubbleVariant, CHART_VISUAL, ChartCard, type ChartCardHost, type ChartData, type ChartSeries, type ChatDataSource, ChatHeader, type ChatInputStateValue, ChatMachine, type ChatMachineConfig, type ChatMessagingStateValue, ChatSession, type ChatSessionContextValue, type ChatSessionProps, ChatSessionProvider, type ChatSessionProviderProps, type ChatSessionStateValue, type Citation$1 as Citation, MemoizedCodeBlock as CodeBlock, type CodeOutput$1 as CodeOutput, CodeOutputsPanel, type ColumnMeta, type ColumnStats, type ColumnType, CompactionDoodle, ConfigProvider, ConfirmModal, type ConfirmModalProps, ConfirmationStep, type ConversationTurn$1 as ConversationTurn, type DataTableOptions, DateGroupHeader, DebugPanel, type DebugPanelProps, DefaultErrorContent, DownloadCard, MemoizedEditableText as EditableText, type EditableTextProps, type EditableTextRef, MemoizedEmptyState as EmptyState, type EmptyStateProps, ErrorBoundary, type FileValidationError, type FileVisual, type FormattedCell, HttpDataSource, type HttpDataSourceConfig, type ImageAttachment, type ImageLoadingStatus, ImageModal, InlineQuestionForm, InteractiveTableCard, type IotaContext, IotaContextProvider, ListItemSkeleton, MemoizedLoadingSpinner as LoadingSpinner, type LocaleContext, MemoizedMarkdownRenderer as MarkdownRenderer, MessageActions, MessageInput, type MessageInputProps, type MessageInputRef, MessageList, MessageRole, type MessageTransport, ModelSelector, type PendingQuestion$1 as PendingQuestion, PermissionGuard, type PermissionGuardProps, type Question, type QuestionAnswerData, type QuestionAnswers, QuestionForm, type QuestionOption, QuestionStep, type QueuedMessage, type RPCErrorDisplay, RateLimiter, type RateLimiterConfig, type RenderTableData, type RenderTableExport, RetryActionArea, ScreenReaderAnnouncer, ScrollToBottomButton, MemoizedSearchInput as SearchInput, type SearchInputProps, type Session$1 as Session, type SessionAccess$1 as SessionAccess, type SessionArtifact, SessionArtifactList, SessionArtifactPreview, SessionArtifactsPanel, type SessionGroup, SessionItem, type SessionListResult$1 as SessionListResult, type SessionMember$1 as SessionMember, SessionMembersModal, type SessionMembersModalProps, SessionSkeleton, type SessionStore, type SessionUser$1 as SessionUser, type ShortcutConfig, Sidebar, type SidebarDrawerProps, type SidebarProps, MemoizedSkeleton as Skeleton, SkeletonAvatar, SkeletonCard, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, SkeletonText, SkipLink, Slot, type SlotProps, type SortState, SourcesPanel, type StreamChunk, StreamError, type StreamEvent, StreamingCursor, SystemMessage, TabbedChartGroup, type TabbedChartGroupProps, TabbedTableGroup, type TabbedTableGroupProps, type TableCardHost, TableExportButton, TableWithExport, type TenantContext, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeSpacing, Toast, type ToastAction, ToastContainer, type ToastItem, type ToastProps, type ToastType, type ToolCall$1 as ToolCall, TouchContextMenu, Turn, type TurnActionsProps, type TurnAssistantProps, TurnBubble, type TurnBubbleClassNames, type TurnBubbleProps, type TurnRootProps, type TurnTimestampProps, type TurnUserProps, MemoizedTypingIndicator as TypingIndicator, type TypingIndicatorProps, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseAutoScrollOptions, type UseAutoScrollReturn, type UseBichatRouterParams, type UseBichatRouterReturn, type UseDataTableReturn, type UseImageGalleryOptions, type UseImageGalleryReturn, type UseMarkdownCopyOptions, type UseMarkdownCopyReturn, type UseMessageActionsOptions, type UseMessageActionsReturn, type UseSidebarStateReturn, type UseToastReturn, MemoizedUserAvatar as UserAvatar, type UserAvatarProps, type UserContext, MemoizedUserFilter as UserFilter, UserMessage, type UserMessageActionsSlotProps, type UserMessageAttachmentsSlotProps, type UserMessageAvatarSlotProps, type UserMessageClassNames, type UserMessageContentSlotProps, type UserMessageProps, type UserMessageSlots, type UserTurn$1 as UserTurn, UserTurnView, type UserTurnViewProps, WelcomeContent, addCSRFHeader, backdropVariants, buttonVariants, convertToBase64, createDataUrl, createHeadersWithCSRF, createHttpDataSource, darkTheme, dropdownVariants, errorMessageVariants, fadeInUpVariants, fadeInVariants, floatingButtonVariants, formatFileSize, getCSRFToken, getFileVisual, getToolLabel, getValidChildren, groupSessionsByDate, groupSteps, hasPermission, isImageMimeType, isPermissionDeniedError, lightTheme, listItemVariants, messageContainerVariants, messageVariants, parseBichatStream, parseBichatStreamEvents, parseSSEStream, scaleFadeVariants, sessionItemVariants, staggerContainerVariants, toErrorDisplay, typingDotVariants, useActionButtonContext, useAttachments, useAutoScroll, useAvatarContext, useBichatRouter, useBubbleContext, useChatInput, useChatMessaging, useChatSession, useConfig, useDataTable, useFocusTrap, useHttpDataSourceConfigFromApplet, useImageGallery, useIotaContext, useKeyboardShortcuts, useLongPress, useMarkdownCopy, useMessageActions, useModalLock, useOptionalChatMessaging, useRequiredConfig, useScrollToBottom, useSidebarState, useStreaming, useTheme, useToast, useTranslation, useTurnContext, validateAttachmentFile, validateFileCount, validateImageFile, verbTransitionVariants };
@@ -321,7 +321,7 @@ interface QuestionOption {
321
321
  interface QuestionAnswerData {
322
322
  /** Selected predefined options (option IDs) */
323
323
  options: string[];
324
- /** Custom text entered when user selects "Other" option */
324
+ /** Custom text entered for an "Other" answer; mutually exclusive with options */
325
325
  customText?: string;
326
326
  }
327
327
  /**
@@ -530,6 +530,7 @@ interface SendMessageOptions {
530
530
  debugMode?: boolean;
531
531
  replaceFromMessageID?: string;
532
532
  reasoningEffort?: string;
533
+ model?: string;
533
534
  }
534
535
  interface SessionListResult$1 {
535
536
  sessions: Session$1[];
@@ -655,9 +656,11 @@ interface ChatSessionStateValue {
655
656
  debugLimits: DebugLimits | null;
656
657
  reasoningEffort: string | undefined;
657
658
  reasoningEffortOptions: string[] | undefined;
659
+ model: string | undefined;
658
660
  setError: (error: string | null) => void;
659
661
  retryFetchSession: () => void;
660
662
  setReasoningEffort: (effort: string) => void;
663
+ setModel: (model: string | undefined) => void;
661
664
  }
662
665
  interface ChatMessagingStateValue {
663
666
  turns: ConversationTurn$1[];
@@ -770,6 +773,8 @@ interface ChatSessionProps {
770
773
  logoSlot?: ReactNode;
771
774
  /** Custom action buttons for the header */
772
775
  actionsSlot?: ReactNode;
776
+ /** Custom content rendered above the message input (e.g., model selector) */
777
+ inputHeaderSlot?: ReactNode;
773
778
  /** Callback when user navigates back */
774
779
  onBack?: () => void;
775
780
  /** Custom verbs for the typing indicator (e.g. ['Thinking', 'Analyzing', ...]) */
@@ -785,6 +790,8 @@ interface ChatSessionProps {
785
790
  }
786
791
  declare function ChatSession(props: ChatSessionProps): react_jsx_runtime.JSX.Element;
787
792
 
793
+ declare function ModelSelector(): react_jsx_runtime.JSX.Element | null;
794
+
788
795
  interface SessionArtifactsPanelProps {
789
796
  dataSource: ChatDataSource;
790
797
  sessionId: string;
@@ -3680,6 +3687,11 @@ interface Extensions {
3680
3687
  provider?: string;
3681
3688
  apiKeyConfigured?: boolean;
3682
3689
  reasoningEffortOptions?: string[];
3690
+ models?: Array<{
3691
+ id: string;
3692
+ label: string;
3693
+ default?: boolean;
3694
+ }>;
3683
3695
  };
3684
3696
  debug?: {
3685
3697
  limits?: {
@@ -3874,9 +3886,11 @@ interface SessionSnapshot {
3874
3886
  debugLimits: DebugLimits | null;
3875
3887
  reasoningEffort: string | undefined;
3876
3888
  reasoningEffortOptions: string[] | undefined;
3889
+ model: string | undefined;
3877
3890
  setError: (error: string | null) => void;
3878
3891
  retryFetchSession: () => void;
3879
3892
  setReasoningEffort: (effort: string) => void;
3893
+ setModel: (model: string | undefined) => void;
3880
3894
  }
3881
3895
  /** Superset of ChatMessagingStateValue used internally by the state machine; includes internal-only fields such as generationInProgress. */
3882
3896
  interface MessagingSnapshot {
@@ -3997,6 +4011,7 @@ declare class ChatMachine {
3997
4011
  readonly removeQueueItem: (index: number) => void;
3998
4012
  readonly updateQueueItem: (index: number, content: string) => void;
3999
4013
  readonly setReasoningEffort: (effort: string) => void;
4014
+ readonly setModel: (model: string | undefined) => void;
4000
4015
  constructor(config: ChatMachineConfig);
4001
4016
  private buildReasoningEffortOptions;
4002
4017
  private sanitizeReasoningEffort;
@@ -4027,6 +4042,7 @@ declare class ChatMachine {
4027
4042
  private _setDebugModeForSession;
4028
4043
  private _hydrateDebugModeForSession;
4029
4044
  private _setReasoningEffort;
4045
+ private _setModel;
4030
4046
  private _fetchSessionIfNeeded;
4031
4047
  /**
4032
4048
  * Sets turns from fetch, preserving pending user-only turns if server hasn't caught up.
@@ -4232,4 +4248,4 @@ declare function isPermissionDeniedError(error: unknown): boolean;
4232
4248
  */
4233
4249
  declare function toErrorDisplay(error: unknown, fallbackTitle: string): RPCErrorDisplay;
4234
4250
 
4235
- export { ATTACHMENT_ACCEPT_ATTRIBUTE, ActionButton, type ActionButtonIconProps, type ActionButtonLabelProps, type ActionButtonRootProps, type ActionButtonTooltipProps, type ActivityStep, ActivityTrace, type ActivityTraceProps, type AdminStore, _default$1 as Alert, AllChatsList, type AppConfig, _default as ArchiveBanner, ArchivedChatList, type Artifact$1 as Artifact, type ArtifactStore, type AsChildProps, AssistantMessage, type AssistantMessageActionsSlotProps, type AssistantMessageArtifactsSlotProps, type AssistantMessageAvatarSlotProps, type AssistantMessageChartsSlotProps, type AssistantMessageClassNames, type AssistantMessageCodeOutputsSlotProps, type AssistantMessageContentSlotProps, type AssistantMessageExplanationSlotProps, type AssistantMessageProps, type AssistantMessageSlots, type AssistantMessageSourcesSlotProps, type AssistantMessageTablesSlotProps, type AssistantTurn$1 as AssistantTurn, AssistantTurnView, type AssistantTurnViewProps, type Attachment$1 as Attachment, MemoizedAttachmentGrid as AttachmentGrid, AttachmentPreview, AttachmentUpload, Avatar, type AvatarFallbackProps, type AvatarImageProps, type AvatarRootProps, AvatarStack, type AvatarStackProps, type BiChatConfig, BiChatLayout, type BiChatLayoutProps, type BichatRPC, Bubble, type BubbleContentProps, type BubbleFooterProps, type BubbleHeaderProps, type BubbleMetadataProps, type BubbleRootProps, type BubbleVariant, CHART_VISUAL, ChartCard, type ChartCardHost, type ChartData, type ChartSeries, type ChatDataSource, ChatHeader, type ChatInputStateValue, ChatMachine, type ChatMachineConfig, type ChatMessagingStateValue, ChatSession, type ChatSessionContextValue, ChatSessionProvider, type ChatSessionProviderProps, type ChatSessionStateValue, type Citation$1 as Citation, MemoizedCodeBlock as CodeBlock, type CodeOutput$1 as CodeOutput, CodeOutputsPanel, type ColumnMeta, type ColumnStats, type ColumnType, CompactionDoodle, ConfigProvider, ConfirmModal, type ConfirmModalProps, ConfirmationStep, type ConversationTurn$1 as ConversationTurn, type DataTableOptions, DateGroupHeader, DebugPanel, type DebugPanelProps, DefaultErrorContent, DownloadCard, MemoizedEditableText as EditableText, type EditableTextProps, type EditableTextRef, MemoizedEmptyState as EmptyState, type EmptyStateProps, ErrorBoundary, type FileValidationError, type FileVisual, type FormattedCell, HttpDataSource, type HttpDataSourceConfig, type ImageAttachment, type ImageLoadingStatus, ImageModal, InlineQuestionForm, InteractiveTableCard, type IotaContext, IotaContextProvider, ListItemSkeleton, MemoizedLoadingSpinner as LoadingSpinner, type LocaleContext, MemoizedMarkdownRenderer as MarkdownRenderer, MessageActions, MessageInput, type MessageInputProps, type MessageInputRef, MessageList, MessageRole, type MessageTransport, type PendingQuestion$1 as PendingQuestion, PermissionGuard, type PermissionGuardProps, type Question, type QuestionAnswerData, type QuestionAnswers, QuestionForm, type QuestionOption, QuestionStep, type QueuedMessage, type RPCErrorDisplay, RateLimiter, type RateLimiterConfig, type RenderTableData, type RenderTableExport, RetryActionArea, ScreenReaderAnnouncer, ScrollToBottomButton, MemoizedSearchInput as SearchInput, type SearchInputProps, type Session$1 as Session, type SessionAccess$1 as SessionAccess, type SessionArtifact, SessionArtifactList, SessionArtifactPreview, SessionArtifactsPanel, type SessionGroup, SessionItem, type SessionListResult$1 as SessionListResult, type SessionMember$1 as SessionMember, SessionMembersModal, type SessionMembersModalProps, SessionSkeleton, type SessionStore, type SessionUser$1 as SessionUser, type ShortcutConfig, Sidebar, type SidebarDrawerProps, type SidebarProps, MemoizedSkeleton as Skeleton, SkeletonAvatar, SkeletonCard, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, SkeletonText, SkipLink, Slot, type SlotProps, type SortState, SourcesPanel, type StreamChunk, StreamError, type StreamEvent, StreamingCursor, SystemMessage, TabbedChartGroup, type TabbedChartGroupProps, TabbedTableGroup, type TabbedTableGroupProps, type TableCardHost, TableExportButton, TableWithExport, type TenantContext, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeSpacing, Toast, type ToastAction, ToastContainer, type ToastItem, type ToastProps, type ToastType, type ToolCall$1 as ToolCall, TouchContextMenu, Turn, type TurnActionsProps, type TurnAssistantProps, TurnBubble, type TurnBubbleClassNames, type TurnBubbleProps, type TurnRootProps, type TurnTimestampProps, type TurnUserProps, MemoizedTypingIndicator as TypingIndicator, type TypingIndicatorProps, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseAutoScrollOptions, type UseAutoScrollReturn, type UseBichatRouterParams, type UseBichatRouterReturn, type UseDataTableReturn, type UseImageGalleryOptions, type UseImageGalleryReturn, type UseMarkdownCopyOptions, type UseMarkdownCopyReturn, type UseMessageActionsOptions, type UseMessageActionsReturn, type UseSidebarStateReturn, type UseToastReturn, MemoizedUserAvatar as UserAvatar, type UserAvatarProps, type UserContext, MemoizedUserFilter as UserFilter, UserMessage, type UserMessageActionsSlotProps, type UserMessageAttachmentsSlotProps, type UserMessageAvatarSlotProps, type UserMessageClassNames, type UserMessageContentSlotProps, type UserMessageProps, type UserMessageSlots, type UserTurn$1 as UserTurn, UserTurnView, type UserTurnViewProps, WelcomeContent, addCSRFHeader, backdropVariants, buttonVariants, convertToBase64, createDataUrl, createHeadersWithCSRF, createHttpDataSource, darkTheme, dropdownVariants, errorMessageVariants, fadeInUpVariants, fadeInVariants, floatingButtonVariants, formatFileSize, getCSRFToken, getFileVisual, getToolLabel, getValidChildren, groupSessionsByDate, groupSteps, hasPermission, isImageMimeType, isPermissionDeniedError, lightTheme, listItemVariants, messageContainerVariants, messageVariants, parseBichatStream, parseBichatStreamEvents, parseSSEStream, scaleFadeVariants, sessionItemVariants, staggerContainerVariants, toErrorDisplay, typingDotVariants, useActionButtonContext, useAttachments, useAutoScroll, useAvatarContext, useBichatRouter, useBubbleContext, useChatInput, useChatMessaging, useChatSession, useConfig, useDataTable, useFocusTrap, useHttpDataSourceConfigFromApplet, useImageGallery, useIotaContext, useKeyboardShortcuts, useLongPress, useMarkdownCopy, useMessageActions, useModalLock, useOptionalChatMessaging, useRequiredConfig, useScrollToBottom, useSidebarState, useStreaming, useTheme, useToast, useTranslation, useTurnContext, validateAttachmentFile, validateFileCount, validateImageFile, verbTransitionVariants };
4251
+ export { ATTACHMENT_ACCEPT_ATTRIBUTE, ActionButton, type ActionButtonIconProps, type ActionButtonLabelProps, type ActionButtonRootProps, type ActionButtonTooltipProps, type ActivityStep, ActivityTrace, type ActivityTraceProps, type AdminStore, _default$1 as Alert, AllChatsList, type AppConfig, _default as ArchiveBanner, ArchivedChatList, type Artifact$1 as Artifact, type ArtifactStore, type AsChildProps, AssistantMessage, type AssistantMessageActionsSlotProps, type AssistantMessageArtifactsSlotProps, type AssistantMessageAvatarSlotProps, type AssistantMessageChartsSlotProps, type AssistantMessageClassNames, type AssistantMessageCodeOutputsSlotProps, type AssistantMessageContentSlotProps, type AssistantMessageExplanationSlotProps, type AssistantMessageProps, type AssistantMessageSlots, type AssistantMessageSourcesSlotProps, type AssistantMessageTablesSlotProps, type AssistantTurn$1 as AssistantTurn, AssistantTurnView, type AssistantTurnViewProps, type Attachment$1 as Attachment, MemoizedAttachmentGrid as AttachmentGrid, AttachmentPreview, AttachmentUpload, Avatar, type AvatarFallbackProps, type AvatarImageProps, type AvatarRootProps, AvatarStack, type AvatarStackProps, type BiChatConfig, BiChatLayout, type BiChatLayoutProps, type BichatRPC, Bubble, type BubbleContentProps, type BubbleFooterProps, type BubbleHeaderProps, type BubbleMetadataProps, type BubbleRootProps, type BubbleVariant, CHART_VISUAL, ChartCard, type ChartCardHost, type ChartData, type ChartSeries, type ChatDataSource, ChatHeader, type ChatInputStateValue, ChatMachine, type ChatMachineConfig, type ChatMessagingStateValue, ChatSession, type ChatSessionContextValue, type ChatSessionProps, ChatSessionProvider, type ChatSessionProviderProps, type ChatSessionStateValue, type Citation$1 as Citation, MemoizedCodeBlock as CodeBlock, type CodeOutput$1 as CodeOutput, CodeOutputsPanel, type ColumnMeta, type ColumnStats, type ColumnType, CompactionDoodle, ConfigProvider, ConfirmModal, type ConfirmModalProps, ConfirmationStep, type ConversationTurn$1 as ConversationTurn, type DataTableOptions, DateGroupHeader, DebugPanel, type DebugPanelProps, DefaultErrorContent, DownloadCard, MemoizedEditableText as EditableText, type EditableTextProps, type EditableTextRef, MemoizedEmptyState as EmptyState, type EmptyStateProps, ErrorBoundary, type FileValidationError, type FileVisual, type FormattedCell, HttpDataSource, type HttpDataSourceConfig, type ImageAttachment, type ImageLoadingStatus, ImageModal, InlineQuestionForm, InteractiveTableCard, type IotaContext, IotaContextProvider, ListItemSkeleton, MemoizedLoadingSpinner as LoadingSpinner, type LocaleContext, MemoizedMarkdownRenderer as MarkdownRenderer, MessageActions, MessageInput, type MessageInputProps, type MessageInputRef, MessageList, MessageRole, type MessageTransport, ModelSelector, type PendingQuestion$1 as PendingQuestion, PermissionGuard, type PermissionGuardProps, type Question, type QuestionAnswerData, type QuestionAnswers, QuestionForm, type QuestionOption, QuestionStep, type QueuedMessage, type RPCErrorDisplay, RateLimiter, type RateLimiterConfig, type RenderTableData, type RenderTableExport, RetryActionArea, ScreenReaderAnnouncer, ScrollToBottomButton, MemoizedSearchInput as SearchInput, type SearchInputProps, type Session$1 as Session, type SessionAccess$1 as SessionAccess, type SessionArtifact, SessionArtifactList, SessionArtifactPreview, SessionArtifactsPanel, type SessionGroup, SessionItem, type SessionListResult$1 as SessionListResult, type SessionMember$1 as SessionMember, SessionMembersModal, type SessionMembersModalProps, SessionSkeleton, type SessionStore, type SessionUser$1 as SessionUser, type ShortcutConfig, Sidebar, type SidebarDrawerProps, type SidebarProps, MemoizedSkeleton as Skeleton, SkeletonAvatar, SkeletonCard, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, SkeletonText, SkipLink, Slot, type SlotProps, type SortState, SourcesPanel, type StreamChunk, StreamError, type StreamEvent, StreamingCursor, SystemMessage, TabbedChartGroup, type TabbedChartGroupProps, TabbedTableGroup, type TabbedTableGroupProps, type TableCardHost, TableExportButton, TableWithExport, type TenantContext, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeSpacing, Toast, type ToastAction, ToastContainer, type ToastItem, type ToastProps, type ToastType, type ToolCall$1 as ToolCall, TouchContextMenu, Turn, type TurnActionsProps, type TurnAssistantProps, TurnBubble, type TurnBubbleClassNames, type TurnBubbleProps, type TurnRootProps, type TurnTimestampProps, type TurnUserProps, MemoizedTypingIndicator as TypingIndicator, type TypingIndicatorProps, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseAutoScrollOptions, type UseAutoScrollReturn, type UseBichatRouterParams, type UseBichatRouterReturn, type UseDataTableReturn, type UseImageGalleryOptions, type UseImageGalleryReturn, type UseMarkdownCopyOptions, type UseMarkdownCopyReturn, type UseMessageActionsOptions, type UseMessageActionsReturn, type UseSidebarStateReturn, type UseToastReturn, MemoizedUserAvatar as UserAvatar, type UserAvatarProps, type UserContext, MemoizedUserFilter as UserFilter, UserMessage, type UserMessageActionsSlotProps, type UserMessageAttachmentsSlotProps, type UserMessageAvatarSlotProps, type UserMessageClassNames, type UserMessageContentSlotProps, type UserMessageProps, type UserMessageSlots, type UserTurn$1 as UserTurn, UserTurnView, type UserTurnViewProps, WelcomeContent, addCSRFHeader, backdropVariants, buttonVariants, convertToBase64, createDataUrl, createHeadersWithCSRF, createHttpDataSource, darkTheme, dropdownVariants, errorMessageVariants, fadeInUpVariants, fadeInVariants, floatingButtonVariants, formatFileSize, getCSRFToken, getFileVisual, getToolLabel, getValidChildren, groupSessionsByDate, groupSteps, hasPermission, isImageMimeType, isPermissionDeniedError, lightTheme, listItemVariants, messageContainerVariants, messageVariants, parseBichatStream, parseBichatStreamEvents, parseSSEStream, scaleFadeVariants, sessionItemVariants, staggerContainerVariants, toErrorDisplay, typingDotVariants, useActionButtonContext, useAttachments, useAutoScroll, useAvatarContext, useBichatRouter, useBubbleContext, useChatInput, useChatMessaging, useChatSession, useConfig, useDataTable, useFocusTrap, useHttpDataSourceConfigFromApplet, useImageGallery, useIotaContext, useKeyboardShortcuts, useLongPress, useMarkdownCopy, useMessageActions, useModalLock, useOptionalChatMessaging, useRequiredConfig, useScrollToBottom, useSidebarState, useStreaming, useTheme, useToast, useTranslation, useTurnContext, validateAttachmentFile, validateFileCount, validateImageFile, verbTransitionVariants };
@@ -1842,9 +1842,11 @@ function deriveSessionSnapshot(state, methods) {
1842
1842
  debugLimits: state.session.debugLimits,
1843
1843
  reasoningEffort: state.session.reasoningEffort,
1844
1844
  reasoningEffortOptions: state.session.reasoningEffortOptions,
1845
+ model: state.session.model,
1845
1846
  setError: methods.setError,
1846
1847
  retryFetchSession: methods.retryFetchSession,
1847
- setReasoningEffort: methods.setReasoningEffort
1848
+ setReasoningEffort: methods.setReasoningEffort,
1849
+ setModel: methods.setModel
1848
1850
  };
1849
1851
  }
1850
1852
  function deriveMessagingSnapshot(state, methods) {
@@ -2125,7 +2127,8 @@ var ChatMachine = class {
2125
2127
  this.cachedSessionSnapshot = deriveSessionSnapshot(this.state, {
2126
2128
  setError: this.setError,
2127
2129
  retryFetchSession: this.retryFetchSession,
2128
- setReasoningEffort: this.setReasoningEffort
2130
+ setReasoningEffort: this.setReasoningEffort,
2131
+ setModel: this.setModel
2129
2132
  });
2130
2133
  this.lastSessionSnapshotVersion = this.sessionSnapshotVersion;
2131
2134
  }
@@ -2197,7 +2200,8 @@ var ChatMachine = class {
2197
2200
  debugModeBySession: {},
2198
2201
  debugLimits: readDebugLimitsFromGlobalContext(),
2199
2202
  reasoningEffort: initialReasoningEffort,
2200
- reasoningEffortOptions: this.reasoningEffortOptions ?? void 0
2203
+ reasoningEffortOptions: this.reasoningEffortOptions ?? void 0,
2204
+ model: void 0
2201
2205
  },
2202
2206
  messaging: {
2203
2207
  turns: [],
@@ -2240,6 +2244,7 @@ var ChatMachine = class {
2240
2244
  this.removeQueueItem = this._removeQueueItem.bind(this);
2241
2245
  this.updateQueueItem = this._updateQueueItem.bind(this);
2242
2246
  this.setReasoningEffort = this._setReasoningEffort.bind(this);
2247
+ this.setModel = this._setModel.bind(this);
2243
2248
  }
2244
2249
  buildReasoningEffortOptions() {
2245
2250
  const options = readReasoningEffortOptionsFromGlobalContext();
@@ -2383,6 +2388,9 @@ var ChatMachine = class {
2383
2388
  }
2384
2389
  clearReasoningEffort();
2385
2390
  }
2391
+ _setModel(model) {
2392
+ this._updateSession({ model });
2393
+ }
2386
2394
  // =====================================================================
2387
2395
  // Private — session fetch
2388
2396
  // =====================================================================
@@ -2857,6 +2865,7 @@ var ChatMachine = class {
2857
2865
  debugMode,
2858
2866
  replaceFromMessageID,
2859
2867
  reasoningEffort,
2868
+ model,
2860
2869
  tempTurnId
2861
2870
  } = params;
2862
2871
  let accumulatedContent = "";
@@ -2872,7 +2881,8 @@ var ChatMachine = class {
2872
2881
  {
2873
2882
  debugMode,
2874
2883
  replaceFromMessageID,
2875
- reasoningEffort
2884
+ reasoningEffort,
2885
+ model
2876
2886
  }
2877
2887
  )) {
2878
2888
  if (this.abortController?.signal.aborted) {
@@ -3022,7 +3032,7 @@ var ChatMachine = class {
3022
3032
  if (this.disposed) {
3023
3033
  return;
3024
3034
  }
3025
- if (!content.trim() || this.state.messaging.loading) {
3035
+ if (!content.trim() || this.state.messaging.loading || isOpenQuestionStatus(this.state.messaging.pendingQuestion?.status)) {
3026
3036
  return;
3027
3037
  }
3028
3038
  const trimmedContent = content.trim();
@@ -3079,6 +3089,7 @@ var ChatMachine = class {
3079
3089
  reasoningEffort: this.sanitizeReasoningEffort(
3080
3090
  this.state.session.reasoningEffort
3081
3091
  ),
3092
+ model: this.state.session.model,
3082
3093
  tempTurnId: tempTurn.id
3083
3094
  });
3084
3095
  if (stopped) {
@@ -3117,7 +3128,7 @@ var ChatMachine = class {
3117
3128
  this.sendingSessionId = null;
3118
3129
  if (shouldDrainQueue) {
3119
3130
  const queue = this.state.input.messageQueue;
3120
- if (queue.length > 0) {
3131
+ if (queue.length > 0 && !isOpenQuestionStatus(this.state.messaging.pendingQuestion?.status)) {
3121
3132
  const next = queue[0];
3122
3133
  this._updateInput({ messageQueue: queue.slice(1) });
3123
3134
  setTimeout(() => {
@@ -8026,6 +8037,7 @@ function AssistantMessage({
8026
8037
  actionsSlotProps,
8027
8038
  /* @__PURE__ */ jsxs(Fragment, { children: [
8028
8039
  !hideTimestamp && /* @__PURE__ */ jsx("span", { className: classes.timestamp, children: timestamp }),
8040
+ showDebug && turn.debug?.attempts?.[0]?.model && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center gap-0.5 rounded px-1 py-0.5 text-[10px] font-medium leading-none text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800", children: turn.debug.attempts[0].model }),
8029
8041
  /* @__PURE__ */ jsx(
8030
8042
  "button",
8031
8043
  {
@@ -12129,6 +12141,7 @@ function ChatSessionCore({
12129
12141
  welcomeSlot,
12130
12142
  logoSlot,
12131
12143
  actionsSlot,
12144
+ inputHeaderSlot,
12132
12145
  onBack,
12133
12146
  thinkingVerbs,
12134
12147
  onSessionRestored,
@@ -12161,7 +12174,8 @@ function ChatSessionCore({
12161
12174
  streamErrorRetryable,
12162
12175
  isCompacting,
12163
12176
  retryLastMessage,
12164
- clearStreamError
12177
+ clearStreamError,
12178
+ pendingQuestion
12165
12179
  } = useChatMessaging();
12166
12180
  const {
12167
12181
  inputError,
@@ -12177,6 +12191,7 @@ function ChatSessionCore({
12177
12191
  const isArchived = session?.status === "archived";
12178
12192
  const accessReadOnly = session?.access ? !session.access.canWrite : false;
12179
12193
  const effectiveReadOnly = Boolean(readOnly ?? isReadOnly) || isArchived || accessReadOnly;
12194
+ const composerDisabled = isOpenQuestionStatus(pendingQuestion?.status);
12180
12195
  const [restoring, setRestoring] = useState(false);
12181
12196
  const handleRestore = useCallback(async () => {
12182
12197
  if (!session?.id) {
@@ -12415,7 +12430,7 @@ function ChatSessionCore({
12415
12430
  className: "relative flex min-h-0 flex-1 overflow-hidden",
12416
12431
  children: [
12417
12432
  /* @__PURE__ */ jsx("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: showWelcome ? /* @__PURE__ */ jsx("div", { className: "flex flex-1 flex-col overflow-auto", children: /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center justify-center px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-5xl", children: [
12418
- welcomeSlot || /* @__PURE__ */ jsx(WelcomeContent_default, { onPromptSelect: handlePromptSelect, disabled: loading }),
12433
+ welcomeSlot || /* @__PURE__ */ jsx(WelcomeContent_default, { onPromptSelect: handlePromptSelect, disabled: loading || composerDisabled }),
12419
12434
  streamError && /* @__PURE__ */ jsx("div", { className: "px-6 pt-4", children: /* @__PURE__ */ jsx(
12420
12435
  StreamError,
12421
12436
  {
@@ -12425,6 +12440,7 @@ function ChatSessionCore({
12425
12440
  onDismiss: clearStreamError
12426
12441
  }
12427
12442
  ) }),
12443
+ !effectiveReadOnly && inputHeaderSlot,
12428
12444
  !effectiveReadOnly && /* @__PURE__ */ jsx(
12429
12445
  MessageInput,
12430
12446
  {
@@ -12446,6 +12462,7 @@ function ChatSessionCore({
12446
12462
  onCancelStreaming: cancel,
12447
12463
  containerClassName: "pt-6 px-6",
12448
12464
  formClassName: "mx-auto",
12465
+ disabled: composerDisabled,
12449
12466
  reasoningEffortOptions,
12450
12467
  reasoningEffort,
12451
12468
  onReasoningEffortChange: setReasoningEffort
@@ -12486,6 +12503,7 @@ function ChatSessionCore({
12486
12503
  onDismiss: clearStreamError
12487
12504
  }
12488
12505
  ) }),
12506
+ !effectiveReadOnly && inputHeaderSlot,
12489
12507
  !effectiveReadOnly && /* @__PURE__ */ jsx(
12490
12508
  MessageInput,
12491
12509
  {
@@ -12505,6 +12523,7 @@ function ChatSessionCore({
12505
12523
  onRemoveQueueItem: removeQueueItem,
12506
12524
  onUpdateQueueItem: updateQueueItem,
12507
12525
  onCancelStreaming: cancel,
12526
+ disabled: composerDisabled,
12508
12527
  reasoningEffortOptions,
12509
12528
  reasoningEffort,
12510
12529
  onReasoningEffortChange: setReasoningEffort
@@ -12625,6 +12644,67 @@ function ChatSession(props) {
12625
12644
  }
12626
12645
  );
12627
12646
  }
12647
+ init_IotaContext();
12648
+ function ModelSelector() {
12649
+ const { model, setModel } = useChatSession();
12650
+ const context = useIotaContext();
12651
+ const models = useMemo(
12652
+ () => context.extensions?.llm?.models ?? [],
12653
+ [context.extensions?.llm?.models]
12654
+ );
12655
+ const defaultModel = models.find((m) => m.default) ?? models[0];
12656
+ const currentModel = model ?? defaultModel?.id;
12657
+ useEffect(() => {
12658
+ if (!model && defaultModel) {
12659
+ setModel(defaultModel.id);
12660
+ }
12661
+ }, [model, defaultModel, setModel]);
12662
+ const rotateModel = useCallback(() => {
12663
+ const currentIndex = models.findIndex((m) => m.id === currentModel);
12664
+ const nextIndex = (currentIndex + 1) % models.length;
12665
+ setModel(models[nextIndex].id);
12666
+ }, [currentModel, models, setModel]);
12667
+ useEffect(() => {
12668
+ const handler = (e) => {
12669
+ if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.key === "m") {
12670
+ e.preventDefault();
12671
+ rotateModel();
12672
+ }
12673
+ };
12674
+ document.addEventListener("keydown", handler);
12675
+ return () => document.removeEventListener("keydown", handler);
12676
+ }, [rotateModel]);
12677
+ if (models.length < 2) {
12678
+ return null;
12679
+ }
12680
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 pt-3 pb-1", children: [
12681
+ /* @__PURE__ */ jsx("div", { className: "inline-flex rounded-lg bg-gray-100 p-0.5 dark:bg-gray-800", children: models.map((m) => {
12682
+ const isActive = m.id === currentModel;
12683
+ const isFast = m.label === "Fast";
12684
+ return /* @__PURE__ */ jsxs(
12685
+ "button",
12686
+ {
12687
+ type: "button",
12688
+ onClick: () => setModel(m.id),
12689
+ className: `
12690
+ flex items-center gap-1 rounded-md px-2.5 py-1 text-xs font-medium transition-all duration-150
12691
+ ${isActive ? isFast ? "bg-white text-amber-600 shadow-sm dark:bg-gray-700 dark:text-amber-400" : "bg-white text-blue-600 shadow-sm dark:bg-gray-700 dark:text-blue-400" : "text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}
12692
+ `,
12693
+ children: [
12694
+ isFast ? /* @__PURE__ */ jsx(Lightning, { size: 13, weight: "fill" }) : /* @__PURE__ */ jsx(Brain, { size: 13, weight: "fill" }),
12695
+ /* @__PURE__ */ jsx("span", { children: m.label })
12696
+ ]
12697
+ },
12698
+ m.id
12699
+ );
12700
+ }) }),
12701
+ /* @__PURE__ */ jsxs("span", { className: "hidden select-none text-[10px] text-gray-400 sm:block dark:text-gray-500", children: [
12702
+ navigator.platform.includes("Mac") ? "\u2318" : "Ctrl",
12703
+ "\u21E7",
12704
+ "M"
12705
+ ] })
12706
+ ] });
12707
+ }
12628
12708
 
12629
12709
  // ui/src/bichat/index.ts
12630
12710
  init_MarkdownRenderer();
@@ -16093,17 +16173,18 @@ function QuestionStep({
16093
16173
  setOtherText(data.customText || "");
16094
16174
  }, [question.id]);
16095
16175
  const handleOptionClick = (optionID) => {
16176
+ setOtherText("");
16096
16177
  if (isMultiSelect) {
16097
16178
  const newOptions = selectedOptions.includes(optionID) ? selectedOptions.filter((a) => a !== optionID) : [...selectedOptions, optionID];
16098
- onAnswer({ options: newOptions, customText: otherText || void 0 });
16179
+ onAnswer({ options: newOptions, customText: void 0 });
16099
16180
  } else {
16100
- onAnswer({ options: [optionID], customText: otherText || void 0 });
16181
+ onAnswer({ options: [optionID], customText: void 0 });
16101
16182
  }
16102
16183
  };
16103
16184
  const handleOtherTextChange = (text) => {
16104
16185
  setOtherText(text);
16105
16186
  onAnswer({
16106
- options: selectedOptions,
16187
+ options: [],
16107
16188
  customText: text || void 0
16108
16189
  });
16109
16190
  };
@@ -19143,6 +19224,9 @@ async function* sendMessage(deps, sessionId, content, attachments = [], signal,
19143
19224
  if (options?.reasoningEffort) {
19144
19225
  payload.reasoningEffort = options.reasoningEffort;
19145
19226
  }
19227
+ if (options?.model) {
19228
+ payload.model = options.model;
19229
+ }
19146
19230
  const timeoutMs = deps.streamConnectTimeoutMs ?? 0;
19147
19231
  if (timeoutMs > 0) {
19148
19232
  connectionTimeoutID = setTimeout(() => {
@@ -19644,6 +19728,6 @@ function createHttpDataSource(config) {
19644
19728
  return new HttpDataSource(config);
19645
19729
  }
19646
19730
 
19647
- export { ATTACHMENT_ACCEPT_ATTRIBUTE, ActionButton, ActivityTrace, Alert_default as Alert, AllChatsList, ArchiveBanner_default as ArchiveBanner, ArchivedChatList, AssistantMessage, AssistantTurnView, MemoizedAttachmentGrid as AttachmentGrid, AttachmentPreview_default as AttachmentPreview, AttachmentUpload_default as AttachmentUpload, Avatar, AvatarStack, BiChatLayout, Bubble, CHART_VISUAL, ChartCard, ChatHeader, ChatMachine, ChatSession, ChatSessionProvider, MemoizedCodeBlock as CodeBlock, CodeOutputsPanel, CompactionDoodle, ConfigProvider, ConfirmModal, ConfirmationStep, DateGroupHeader, DebugPanel, DefaultErrorContent, DownloadCard, MemoizedEditableText as EditableText, MemoizedEmptyState as EmptyState, ErrorBoundary, HttpDataSource, ImageModal, InlineQuestionForm, InteractiveTableCard, IotaContextProvider, ListItemSkeleton, MemoizedLoadingSpinner as LoadingSpinner, MemoizedMarkdownRenderer as MarkdownRenderer, MessageActions, MessageInput, MessageList, MessageRole, PermissionGuard, QuestionForm, QuestionStep, RateLimiter, RetryActionArea, ScreenReaderAnnouncer, ScrollToBottomButton, MemoizedSearchInput as SearchInput, SessionArtifactList, SessionArtifactPreview, SessionArtifactsPanel, SessionItem_default as SessionItem, SessionMembersModal, SessionSkeleton, Sidebar2 as Sidebar, MemoizedSkeleton as Skeleton, SkeletonAvatar, SkeletonCard, SkeletonGroup, SkeletonText, SkipLink, Slot, SourcesPanel, StreamError, StreamingCursor, SystemMessage, TabbedChartGroup, TabbedTableGroup, TableExportButton, TableWithExport, ThemeProvider, Toast, ToastContainer, TouchContextMenu, Turn, TurnBubble, MemoizedTypingIndicator as TypingIndicator, MemoizedUserAvatar as UserAvatar, MemoizedUserFilter as UserFilter, UserMessage, UserTurnView, WelcomeContent, addCSRFHeader, backdropVariants, buttonVariants, convertToBase64, createDataUrl, createHeadersWithCSRF, createHttpDataSource, darkTheme, dropdownVariants, errorMessageVariants, fadeInUpVariants, fadeInVariants, floatingButtonVariants, formatFileSize, getCSRFToken, getFileVisual, getToolLabel, getValidChildren, groupSessionsByDate, groupSteps, hasPermission, isImageMimeType, isPermissionDeniedError, lightTheme, listItemVariants, messageContainerVariants, messageVariants, parseBichatStream, parseBichatStreamEvents, parseSSEStream, scaleFadeVariants, sessionItemVariants, staggerContainerVariants, toErrorDisplay, typingDotVariants, useActionButtonContext, useAttachments, useAutoScroll, useAvatarContext, useBichatRouter, useBubbleContext, useChatInput, useChatMessaging, useChatSession, useConfig, useDataTable, useFocusTrap, useHttpDataSourceConfigFromApplet, useImageGallery, useIotaContext, useKeyboardShortcuts, useLongPress, useMarkdownCopy, useMessageActions, useModalLock, useOptionalChatMessaging, useRequiredConfig, useScrollToBottom, useSidebarState, useStreaming2 as useStreaming, useTheme, useToast, useTranslation, useTurnContext, validateAttachmentFile, validateFileCount, validateImageFile, verbTransitionVariants };
19731
+ export { ATTACHMENT_ACCEPT_ATTRIBUTE, ActionButton, ActivityTrace, Alert_default as Alert, AllChatsList, ArchiveBanner_default as ArchiveBanner, ArchivedChatList, AssistantMessage, AssistantTurnView, MemoizedAttachmentGrid as AttachmentGrid, AttachmentPreview_default as AttachmentPreview, AttachmentUpload_default as AttachmentUpload, Avatar, AvatarStack, BiChatLayout, Bubble, CHART_VISUAL, ChartCard, ChatHeader, ChatMachine, ChatSession, ChatSessionProvider, MemoizedCodeBlock as CodeBlock, CodeOutputsPanel, CompactionDoodle, ConfigProvider, ConfirmModal, ConfirmationStep, DateGroupHeader, DebugPanel, DefaultErrorContent, DownloadCard, MemoizedEditableText as EditableText, MemoizedEmptyState as EmptyState, ErrorBoundary, HttpDataSource, ImageModal, InlineQuestionForm, InteractiveTableCard, IotaContextProvider, ListItemSkeleton, MemoizedLoadingSpinner as LoadingSpinner, MemoizedMarkdownRenderer as MarkdownRenderer, MessageActions, MessageInput, MessageList, MessageRole, ModelSelector, PermissionGuard, QuestionForm, QuestionStep, RateLimiter, RetryActionArea, ScreenReaderAnnouncer, ScrollToBottomButton, MemoizedSearchInput as SearchInput, SessionArtifactList, SessionArtifactPreview, SessionArtifactsPanel, SessionItem_default as SessionItem, SessionMembersModal, SessionSkeleton, Sidebar2 as Sidebar, MemoizedSkeleton as Skeleton, SkeletonAvatar, SkeletonCard, SkeletonGroup, SkeletonText, SkipLink, Slot, SourcesPanel, StreamError, StreamingCursor, SystemMessage, TabbedChartGroup, TabbedTableGroup, TableExportButton, TableWithExport, ThemeProvider, Toast, ToastContainer, TouchContextMenu, Turn, TurnBubble, MemoizedTypingIndicator as TypingIndicator, MemoizedUserAvatar as UserAvatar, MemoizedUserFilter as UserFilter, UserMessage, UserTurnView, WelcomeContent, addCSRFHeader, backdropVariants, buttonVariants, convertToBase64, createDataUrl, createHeadersWithCSRF, createHttpDataSource, darkTheme, dropdownVariants, errorMessageVariants, fadeInUpVariants, fadeInVariants, floatingButtonVariants, formatFileSize, getCSRFToken, getFileVisual, getToolLabel, getValidChildren, groupSessionsByDate, groupSteps, hasPermission, isImageMimeType, isPermissionDeniedError, lightTheme, listItemVariants, messageContainerVariants, messageVariants, parseBichatStream, parseBichatStreamEvents, parseSSEStream, scaleFadeVariants, sessionItemVariants, staggerContainerVariants, toErrorDisplay, typingDotVariants, useActionButtonContext, useAttachments, useAutoScroll, useAvatarContext, useBichatRouter, useBubbleContext, useChatInput, useChatMessaging, useChatSession, useConfig, useDataTable, useFocusTrap, useHttpDataSourceConfigFromApplet, useImageGallery, useIotaContext, useKeyboardShortcuts, useLongPress, useMarkdownCopy, useMessageActions, useModalLock, useOptionalChatMessaging, useRequiredConfig, useScrollToBottom, useSidebarState, useStreaming2 as useStreaming, useTheme, useToast, useTranslation, useTurnContext, validateAttachmentFile, validateFileCount, validateImageFile, verbTransitionVariants };
19648
19732
  //# sourceMappingURL=index.mjs.map
19649
19733
  //# sourceMappingURL=index.mjs.map