@frontera-sdk/chat-ui 1.53.7 → 1.53.9
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/chat.js +79 -17
- package/dist/{chunk-G6A5DWFP.js → chunk-CEJINF3B.js} +602 -58
- package/dist/{chunk-VB2YKQGZ.js → chunk-FGA7PLPZ.js} +2 -2
- package/dist/{chunk-DPCAFZ2S.js → chunk-MQEJNYKF.js} +1 -1
- package/dist/{chunk-G4V3YKMK.js → chunk-OLSP24UB.js} +4 -2
- package/dist/{chunk-NOJWGKB4.js → chunk-WKKMCJ6V.js} +1 -1
- package/dist/{chunk-KKOK22CN.js → chunk-ZM6XUTCT.js} +1 -1
- package/dist/header.js +3 -3
- package/dist/message.js +3 -3
- package/dist/new-session.js +2 -2
- package/dist/{pdf-deck-view-inner-UEMN324J.js → pdf-deck-view-inner-ECZU3KQW.js} +2 -2
- package/dist/{pdf-document-view-inner-SH2HOPGD.js → pdf-document-view-inner-JTIOESN4.js} +2 -2
- package/package.json +3 -3
package/dist/chat.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { offset, flip, autoUpdate, computePosition } from './chunk-I7SXWUAN.js';
|
|
3
3
|
import { isFullscreenHotkey, DeckNotesCard, deckOwnsArrowKeys } from './chunk-4FRTPVJT.js';
|
|
4
|
-
import { ArtifactSkeleton, resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb } from './chunk-
|
|
5
|
-
import { NewSessionPrompt, keepCaretOnTap } from './chunk-
|
|
4
|
+
import { ArtifactSkeleton, resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb } from './chunk-MQEJNYKF.js';
|
|
5
|
+
import { NewSessionPrompt, keepCaretOnTap } from './chunk-WKKMCJ6V.js';
|
|
6
6
|
import { PendingCards } from './chunk-GRRSYZQZ.js';
|
|
7
7
|
import { themeToStyle } from './chunk-6HYPVNVA.js';
|
|
8
8
|
import { useChatAgents } from './chunk-NDU6ERVT.js';
|
|
9
9
|
import { subjectOfChatToken, capabilitiesOfChatToken } from './chunk-CCVPZVFK.js';
|
|
10
10
|
import { useChatCredential } from './chunk-6BCUAPW3.js';
|
|
11
11
|
import './chunk-WDYCLC4F.js';
|
|
12
|
-
import { chatSidePanelSessionKey, Chart1Icon, useTemplatePreviewStore, useHasTemplatePreviewHost, useChatSidePanelStore, ChatHeader, ChatHeaderActions, useRightPane, getChatOverviewAgentStatus, useChatOverviewVisible, useConversationArtifacts, PENDING_CHART_TAB_PREFIX, CHART_TAB_PREFIX, AGENT_WORK_TAB_ID, AGENT_ROUTINES_TAB_ID, SOURCES_TAB_ID, TEMPLATE_TAB_ID, OutputsSection, ChainLink1Icon, ChatOverviewContent, COMPUTER_TAB_PREFIX, SourceRow, motion, MAX_CHAT_SIDE_PANEL_SESSIONS, DEFAULT_CHAT_SIDE_PANEL_SIZE, TableIcon } from './chunk-
|
|
13
|
-
import { dynamic, useChatStreamStore, useComposerStore, Message, Thinking, setPendingFiles, usePersonConfirmations, unshownPendingConfirmations, ConversationConfirmationCard, useLivePreviewUrl, ArrowRotateClockwiseIcon, useComputerFiles, useUploadComputerFile, CanvasWidget, isPlainTextLanguage, useUploadFile, COMPOSER_ID_MAIN, useContextWindowInfo, useIsCompacting, useQueuedMessages, VolumeFullIcon, WarningSignIcon, useComputer, csvTextToWorkbookJson, CSV_PREVIEW_MAX_ROWS, CopyButton, COMPOSER_ID_COPILOT, ModelIcon, modeToBrandRow, useBackDismiss, PdfViewer, brandLabel, Spinner } from './chunk-
|
|
14
|
-
import { Textarea, resolveChatHost, artifactFormatIcon, BookIcon, useAgentRoster, ShieldCheckIcon, useArtifactStore, useCanvasStore, useChatOverviewStore, setSdkConversationPath, setSdkDarkMode, AgentsProvider, PluginProvider, WorkspaceProvider, TooltipProvider, ChatHostProvider, getPersonConfirmation, isToolPart, getToolState, getToolName, getToolInput, sourceKind, extractDomain, CitationViewerContext, MarkdownRenderer, ConnectRunnerContext, usePathname, useChatSurfaceProvider, usePaneFocusStore, useAgentPanelStore, Tooltip, TooltipTrigger, TooltipContent, StudioDisplayIcon, WorldIcon, SlidesWideIcon, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, ArrowsShowIcon, useKeyboardInset, ExclamationCircleIcon, getToolOutput, useArtifact, useUpdateArtifact, useArtifactFileObjectUrl, resolveArtifactIconFormat, useSourcesEnrichment, LoaderIcon, FileDownloadIcon, Label, Input, renderPluginBlock, useArtifactVersion, useChatCapabilities, useChatCapabilityEnabled, useChatOptInEnabled, useChatHost, useSessionPendingApprovals, tableToCsv, tableToXlsx, tableToMarkdown, DropdownMenu, DropdownMenuTrigger, StyledDropdownMenuContent, StyledDropdownMenuItem, useArtifactVersions, useClient, unwrapData, authFetch, getBearerHeadersForApi, EyeOpenIcon, EyeSlashIcon, useRestoreArtifactVersion, ZoomableImage, ChatImageLightbox, useDownloadArtifact, useArtifactFileBytes, useArtifactPreviewFileObjectUrl, useArtifactVersionPreviewFileObjectUrl, errorText, SpreadsheetIcon, FilePdfIcon, useOptionalWorkspaceContext, useAgentConnectionStatus, useArtifacts, useSession, useWorkspaceContext, useConversationDesktopStatus, isRequestHumanTool, appsKeys, unwrapDataDeep, useRouter, Images1Icon, ArrowUpIcon, VideoIcon, AudioIcon, useBrand, resolveBearerHeaders, subscribeSdkDarkMode, getSdkDarkMode, unwrap, useConnectRunner, useStartUserConnect, useUpsertGrant, useRevokeGrant, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, LayoutGrid1Icon, useCatalog, useInstalls, useWorkspaceSlug, buildTenantUrlAbsolute } from './chunk-
|
|
12
|
+
import { chatSidePanelSessionKey, Chart1Icon, useTemplatePreviewStore, useHasTemplatePreviewHost, useChatSidePanelStore, ChatHeader, ChatHeaderActions, useRightPane, getChatOverviewAgentStatus, useChatOverviewVisible, useConversationArtifacts, PENDING_CHART_TAB_PREFIX, CHART_TAB_PREFIX, AGENT_WORK_TAB_ID, AGENT_ROUTINES_TAB_ID, SOURCES_TAB_ID, TEMPLATE_TAB_ID, OutputsSection, ChainLink1Icon, ChatOverviewContent, COMPUTER_TAB_PREFIX, SourceRow, motion, MAX_CHAT_SIDE_PANEL_SESSIONS, DEFAULT_CHAT_SIDE_PANEL_SIZE, TableIcon } from './chunk-FGA7PLPZ.js';
|
|
13
|
+
import { dynamic, useChatStreamStore, useComposerStore, Message, Thinking, setPendingFiles, usePersonConfirmations, unshownPendingConfirmations, ConversationConfirmationCard, useLivePreviewUrl, ArrowRotateClockwiseIcon, useComputerFiles, useUploadComputerFile, CanvasWidget, isPlainTextLanguage, useUploadFile, COMPOSER_ID_MAIN, useContextWindowInfo, useIsCompacting, useQueuedMessages, VolumeFullIcon, WarningSignIcon, useComputer, csvTextToWorkbookJson, CSV_PREVIEW_MAX_ROWS, CopyButton, COMPOSER_ID_COPILOT, ModelIcon, modeToBrandRow, useBackDismiss, PdfViewer, brandLabel, Spinner } from './chunk-OLSP24UB.js';
|
|
14
|
+
import { Textarea, resolveChatHost, artifactFormatIcon, BookIcon, useAgentRoster, ShieldCheckIcon, useArtifactStore, useCanvasStore, useChatOverviewStore, setSdkConversationPath, setSdkDarkMode, AgentsProvider, PluginProvider, WorkspaceProvider, TooltipProvider, ChatHostProvider, getPersonConfirmation, isToolPart, getToolState, getToolName, getToolInput, sourceKind, extractDomain, CitationViewerContext, MarkdownRenderer, ConnectRunnerContext, usePathname, useChatSurfaceProvider, usePaneFocusStore, useAgentPanelStore, Tooltip, TooltipTrigger, TooltipContent, StudioDisplayIcon, WorldIcon, SlidesWideIcon, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, ArrowsShowIcon, useKeyboardInset, ExclamationCircleIcon, getToolOutput, useArtifact, useUpdateArtifact, useArtifactFileObjectUrl, resolveArtifactIconFormat, useSourcesEnrichment, LoaderIcon, FileDownloadIcon, Label, Input, renderPluginBlock, useArtifactVersion, useChatCapabilities, useChatCapabilityEnabled, useChatOptInEnabled, useChatHost, useSessionPendingApprovals, tableToCsv, tableToXlsx, tableToMarkdown, DropdownMenu, DropdownMenuTrigger, StyledDropdownMenuContent, StyledDropdownMenuItem, useArtifactVersions, useClient, unwrapData, authFetch, getBearerHeadersForApi, EyeOpenIcon, EyeSlashIcon, useRestoreArtifactVersion, ZoomableImage, ChatImageLightbox, useDownloadArtifact, useArtifactFileBytes, useArtifactPreviewFileObjectUrl, useArtifactVersionPreviewFileObjectUrl, errorText, SpreadsheetIcon, FilePdfIcon, useOptionalWorkspaceContext, useAgentConnectionStatus, useArtifacts, useSession, useWorkspaceContext, useConversationDesktopStatus, isRequestHumanTool, appsKeys, unwrapDataDeep, useRouter, Images1Icon, ArrowUpIcon, VideoIcon, AudioIcon, useBrand, resolveBearerHeaders, subscribeSdkDarkMode, getSdkDarkMode, unwrap, useConnectRunner, useStartUserConnect, useUpsertGrant, useRevokeGrant, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, LayoutGrid1Icon, useCatalog, useInstalls, useWorkspaceSlug, buildTenantUrlAbsolute } from './chunk-ZM6XUTCT.js';
|
|
15
15
|
import { ChevronLeftIcon } from './chunk-CWAOLMFS.js';
|
|
16
16
|
import { Popover, PopoverTrigger, PopoverContent, Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription } from './chunk-FZ3VSITY.js';
|
|
17
|
-
import { MOBILE_BREAKPOINT, useIsMobile, I18nProvider, useTranslation } from './chunk-
|
|
17
|
+
import { MOBILE_BREAKPOINT, useIsMobile, I18nProvider, useTranslation } from './chunk-CEJINF3B.js';
|
|
18
18
|
import './chunk-DJ2Q5U3E.js';
|
|
19
19
|
import { AppIcon, frontera_icon_default, PhotoIcon, Folder1Icon, FileTextIcon, describeToolRow, SquareArrowTopRightIcon, ClipboardIcon, getToolMeta, useStreamdownPlugins, AppIconFrame, MessageResponse } from './chunk-RQPL7ZTX.js';
|
|
20
20
|
import { Skeleton, Button, ScrollArea, ChevronDownMediumIcon, buttonVariants } from './chunk-UWKO24VT.js';
|
|
@@ -42397,7 +42397,7 @@ function SheetEditor({ content, onSave, readOnly = false }) {
|
|
|
42397
42397
|
);
|
|
42398
42398
|
}
|
|
42399
42399
|
var PdfDocumentViewInner = dynamic(
|
|
42400
|
-
() => import('./pdf-document-view-inner-
|
|
42400
|
+
() => import('./pdf-document-view-inner-JTIOESN4.js'),
|
|
42401
42401
|
{
|
|
42402
42402
|
ssr: false,
|
|
42403
42403
|
loading: () => /* @__PURE__ */ jsx(ArtifactSkeleton, { format: "pdf" })
|
|
@@ -43216,7 +43216,7 @@ function HtmlDeckView({ content, inChat = false, versionSlot }) {
|
|
|
43216
43216
|
!present && inChat && /* @__PURE__ */ jsx(DeckEditPanel, { currentIndex: sel, currentHtml: slides[sel]?.html ?? "" })
|
|
43217
43217
|
] });
|
|
43218
43218
|
}
|
|
43219
|
-
var Inner = dynamic(() => import('./pdf-deck-view-inner-
|
|
43219
|
+
var Inner = dynamic(() => import('./pdf-deck-view-inner-ECZU3KQW.js'), {
|
|
43220
43220
|
ssr: false,
|
|
43221
43221
|
loading: () => /* @__PURE__ */ jsx(ArtifactSkeleton, { format: "htmldeck" })
|
|
43222
43222
|
});
|
|
@@ -63539,8 +63539,22 @@ function MentionPill({
|
|
|
63539
63539
|
iconUrl,
|
|
63540
63540
|
color,
|
|
63541
63541
|
className,
|
|
63542
|
+
command: command5 = false,
|
|
63542
63543
|
onActivate
|
|
63543
63544
|
}) {
|
|
63545
|
+
if (command5) {
|
|
63546
|
+
return /* @__PURE__ */ jsxs(
|
|
63547
|
+
"span",
|
|
63548
|
+
{
|
|
63549
|
+
"data-mention-kind": mention.kind,
|
|
63550
|
+
className: cn("inline whitespace-nowrap font-medium text-info", className),
|
|
63551
|
+
children: [
|
|
63552
|
+
"/",
|
|
63553
|
+
mention.label
|
|
63554
|
+
]
|
|
63555
|
+
}
|
|
63556
|
+
);
|
|
63557
|
+
}
|
|
63544
63558
|
return /* @__PURE__ */ jsxs(
|
|
63545
63559
|
"span",
|
|
63546
63560
|
{
|
|
@@ -63595,7 +63609,7 @@ function mentionAttrsToRef(attrs2) {
|
|
|
63595
63609
|
...attrs2.hint ? { hint: attrs2.hint } : {}
|
|
63596
63610
|
};
|
|
63597
63611
|
}
|
|
63598
|
-
function MentionNodeView({ node }) {
|
|
63612
|
+
function MentionNodeView({ node, extension: extension2 }) {
|
|
63599
63613
|
const attrs2 = node.attrs;
|
|
63600
63614
|
const openPreview = useTemplatePreviewStore((s) => s.open);
|
|
63601
63615
|
const canPreview = useHasTemplatePreviewHost();
|
|
@@ -63606,6 +63620,7 @@ function MentionNodeView({ node }) {
|
|
|
63606
63620
|
mention: mentionAttrsToRef(attrs2),
|
|
63607
63621
|
iconUrl: attrs2.iconUrl,
|
|
63608
63622
|
color: attrs2.color,
|
|
63623
|
+
command: attrs2.slash && Boolean(extension2.options.slashCommands),
|
|
63609
63624
|
onActivate: activate
|
|
63610
63625
|
}
|
|
63611
63626
|
) });
|
|
@@ -64802,6 +64817,7 @@ var MENTION_KIND_LABEL = {
|
|
|
64802
64817
|
};
|
|
64803
64818
|
function MentionRow({
|
|
64804
64819
|
item,
|
|
64820
|
+
asCommand = false,
|
|
64805
64821
|
isActive: isActive2,
|
|
64806
64822
|
activeRef,
|
|
64807
64823
|
onHover,
|
|
@@ -64831,7 +64847,7 @@ function MentionRow({
|
|
|
64831
64847
|
// row visibly predicts its own result rather than looking like one
|
|
64832
64848
|
// more resource to reference.
|
|
64833
64849
|
/* @__PURE__ */ jsx(item.output.Icon, { className: cn("size-4 shrink-0", item.output.color) })
|
|
64834
|
-
) : item.command ? (
|
|
64850
|
+
) : item.command || asCommand ? (
|
|
64835
64851
|
// A command row is also an ACTION and carries no `ref` — the glyph
|
|
64836
64852
|
// below dereferences one, so it must not reach it. The slash is the
|
|
64837
64853
|
// mark: it says "this runs" rather than "this gets referenced".
|
|
@@ -64875,7 +64891,7 @@ function MentionEmpty({ query }) {
|
|
|
64875
64891
|
] });
|
|
64876
64892
|
}
|
|
64877
64893
|
var MentionMenu = forwardRef(
|
|
64878
|
-
function MentionMenu2({ rawGroups, query, kinds, commands, command: command5, showGroupTitles }, ref) {
|
|
64894
|
+
function MentionMenu2({ rawGroups, query, kinds, commands, asCommands, command: command5, showGroupTitles }, ref) {
|
|
64879
64895
|
const [selectedIdx, setSelectedIdx] = useState(0);
|
|
64880
64896
|
const activeRef = useRef(null);
|
|
64881
64897
|
const scrollRef = useRef(null);
|
|
@@ -64959,6 +64975,7 @@ var MentionMenu = forwardRef(
|
|
|
64959
64975
|
MentionRow,
|
|
64960
64976
|
{
|
|
64961
64977
|
item,
|
|
64978
|
+
asCommand: asCommands && item.ref?.kind === "skill",
|
|
64962
64979
|
isActive: idx >= 0 && idx === selectedIdx,
|
|
64963
64980
|
activeRef: idx === selectedIdx ? activeRef : void 0,
|
|
64964
64981
|
onHover: () => idx >= 0 && setSelectedIdx(idx),
|
|
@@ -65015,6 +65032,9 @@ function visualViewportBox() {
|
|
|
65015
65032
|
return { top: vv.offsetTop, bottom: vv.offsetTop + vv.height };
|
|
65016
65033
|
}
|
|
65017
65034
|
var ComposerMention = Mention.extend({
|
|
65035
|
+
addOptions() {
|
|
65036
|
+
return { ...this.parent(), slashCommands: false };
|
|
65037
|
+
},
|
|
65018
65038
|
addAttributes() {
|
|
65019
65039
|
const attr = (name, fallback = null) => ({
|
|
65020
65040
|
default: fallback,
|
|
@@ -65145,6 +65165,7 @@ function buildSuggestion(spec, getGroups, onQueryChange, onInserted, onOutput, o
|
|
|
65145
65165
|
query: props.query ?? "",
|
|
65146
65166
|
...spec.kinds ? { kinds: spec.kinds } : {},
|
|
65147
65167
|
...spec.commands === false ? { commands: false } : {},
|
|
65168
|
+
...spec.asCommands ? { asCommands: true } : {},
|
|
65148
65169
|
showGroupTitles: spec.char === "@",
|
|
65149
65170
|
command: (item) => props.command(item)
|
|
65150
65171
|
});
|
|
@@ -65321,6 +65342,7 @@ var ComposerEditor = forwardRef(function ComposerEditor2({
|
|
|
65321
65342
|
firstLineIndentPx = 0,
|
|
65322
65343
|
mentionGroups,
|
|
65323
65344
|
atKinds,
|
|
65345
|
+
slashCommands = false,
|
|
65324
65346
|
oneAgentReason,
|
|
65325
65347
|
onMentionQueryChange,
|
|
65326
65348
|
onMentionInserted,
|
|
@@ -65397,6 +65419,7 @@ var ComposerEditor = forwardRef(function ComposerEditor2({
|
|
|
65397
65419
|
showOnlyCurrent: false
|
|
65398
65420
|
}),
|
|
65399
65421
|
ComposerMention.configure({
|
|
65422
|
+
slashCommands,
|
|
65400
65423
|
suggestions: [
|
|
65401
65424
|
buildSuggestion(
|
|
65402
65425
|
{ char: "@", pluginKey: AT_PLUGIN_KEY, ...atKinds ? { kinds: atKinds, commands: false } : {} },
|
|
@@ -65414,8 +65437,9 @@ var ComposerEditor = forwardRef(function ComposerEditor2({
|
|
|
65414
65437
|
char: "/",
|
|
65415
65438
|
pluginKey: SLASH_PLUGIN_KEY,
|
|
65416
65439
|
kinds: ["skill"],
|
|
65417
|
-
startOfLine:
|
|
65418
|
-
slash: true
|
|
65440
|
+
startOfLine: !slashCommands,
|
|
65441
|
+
slash: true,
|
|
65442
|
+
asCommands: slashCommands
|
|
65419
65443
|
},
|
|
65420
65444
|
readGroups,
|
|
65421
65445
|
(q) => onMentionQueryChangeRef.current?.(q),
|
|
@@ -65911,6 +65935,20 @@ function isChatGptModeKey(key2) {
|
|
|
65911
65935
|
function chatGptModelId(key2) {
|
|
65912
65936
|
return isChatGptModeKey(key2) ? key2.slice(CHATGPT_MODE_PREFIX.length) : "";
|
|
65913
65937
|
}
|
|
65938
|
+
function chatGptModeFromKey(key2) {
|
|
65939
|
+
const modelId = chatGptModelId(key2);
|
|
65940
|
+
if (!modelId) return void 0;
|
|
65941
|
+
const [family, version, ...rest] = modelId.split("-");
|
|
65942
|
+
const words = rest.map((word) => word.charAt(0).toUpperCase() + word.slice(1));
|
|
65943
|
+
const name = family === "gpt" && version ? [`GPT-${version}`, ...words].join(" ") : modelId;
|
|
65944
|
+
return { key: key2, name, provider: "openai-codex", modelId, model: modelId };
|
|
65945
|
+
}
|
|
65946
|
+
function areEffortOptionsSettled(chatGpt) {
|
|
65947
|
+
if (!chatGpt.offered) return true;
|
|
65948
|
+
if (chatGpt.statusPending || chatGpt.statusFailed) return false;
|
|
65949
|
+
if (!chatGpt.connected) return true;
|
|
65950
|
+
return !chatGpt.modelsPending && !chatGpt.modelsFailed;
|
|
65951
|
+
}
|
|
65914
65952
|
var EFFORT_LABELS = {
|
|
65915
65953
|
minimal: "Minimal",
|
|
65916
65954
|
low: "Light",
|
|
@@ -66586,6 +66624,7 @@ function ModelSelector({
|
|
|
66586
66624
|
defaultMode,
|
|
66587
66625
|
automatic = false,
|
|
66588
66626
|
pending = false,
|
|
66627
|
+
effortOptionsSettled = false,
|
|
66589
66628
|
variant = "default",
|
|
66590
66629
|
codexConnect,
|
|
66591
66630
|
chatGptSubscriptionConnected = false,
|
|
@@ -66624,12 +66663,17 @@ function ModelSelector({
|
|
|
66624
66663
|
const isMobile = useIsMobile();
|
|
66625
66664
|
const onAutomatic = automatic && currentMode === AUTOMATIC_MODE;
|
|
66626
66665
|
const waiting = pending && !automatic && currentMode === AUTOMATIC_MODE;
|
|
66627
|
-
const
|
|
66666
|
+
const pendingChatGpt = modeMap.has(currentMode) ? void 0 : chatGptModeFromKey(currentMode);
|
|
66667
|
+
const current = onAutomatic || waiting ? void 0 : modeMap.get(currentMode) ?? pendingChatGpt ?? visibleModes[0];
|
|
66628
66668
|
const effortOptions = getModeEffortOptions(current);
|
|
66629
66669
|
const defaultEffort = current?.reasoning?.defaultEffort ?? effortOptions[0];
|
|
66630
66670
|
const activeEffort = reasoningEffort ?? defaultEffort;
|
|
66631
66671
|
const showModelSelector = visibleModes.length > 1;
|
|
66632
66672
|
const showEffort = effortOptions.length > 0;
|
|
66673
|
+
const unofferedEffort = effortOptionsSettled && modeMap.has(currentMode) && showEffort && !!reasoningEffort && !effortOptions.includes(reasoningEffort);
|
|
66674
|
+
useEffect(() => {
|
|
66675
|
+
if (unofferedEffort) setReasoningEffort(sessionKey, null);
|
|
66676
|
+
}, [unofferedEffort, sessionKey, setReasoningEffort]);
|
|
66633
66677
|
const handleOpenChange = (next) => {
|
|
66634
66678
|
if (next) {
|
|
66635
66679
|
setOpenWidth(triggerRef.current?.offsetWidth);
|
|
@@ -66639,7 +66683,8 @@ function ModelSelector({
|
|
|
66639
66683
|
};
|
|
66640
66684
|
if (!showModelSelector && !showEffort) return null;
|
|
66641
66685
|
const isRail = variant === "rail";
|
|
66642
|
-
const
|
|
66686
|
+
const shownEffort = pendingChatGpt ? reasoningEffort : showEffort ? activeEffort : void 0;
|
|
66687
|
+
const effortLabel = shownEffort ? EFFORT_LABELS[shownEffort] ?? shownEffort : null;
|
|
66643
66688
|
const modelLabel = onAutomatic ? "Auto" : waiting ? "Model" : current ? getShortDisplayName(current) : currentMode;
|
|
66644
66689
|
const defaultModeEntry = (defaultMode ? modeMap.get(defaultMode) : void 0) ?? visibleModes[0];
|
|
66645
66690
|
const selectedModeKey = current?.key ?? currentMode;
|
|
@@ -70659,10 +70704,26 @@ function ChatInputBar({
|
|
|
70659
70704
|
const hasSubscriptionMode = Boolean(
|
|
70660
70705
|
manifestModeEntries?.some((m) => m.provider === "openai-codex")
|
|
70661
70706
|
);
|
|
70662
|
-
const {
|
|
70663
|
-
|
|
70707
|
+
const {
|
|
70708
|
+
data: subscriptionStatus,
|
|
70709
|
+
isPending: subscriptionStatusPending,
|
|
70710
|
+
isError: subscriptionStatusError
|
|
70711
|
+
} = useChatGptSubscriptionStatus(hasSubscriptionMode);
|
|
70712
|
+
const {
|
|
70713
|
+
data: subscriptionModels,
|
|
70714
|
+
isError: subscriptionModelsError,
|
|
70715
|
+
isPending: subscriptionModelsPending
|
|
70716
|
+
} = useChatGptSubscriptionModels(
|
|
70664
70717
|
hasSubscriptionMode && !!subscriptionStatus?.connected
|
|
70665
70718
|
);
|
|
70719
|
+
const effortOptionsSettled = areEffortOptionsSettled({
|
|
70720
|
+
offered: hasSubscriptionMode,
|
|
70721
|
+
statusPending: subscriptionStatusPending,
|
|
70722
|
+
statusFailed: subscriptionStatusError,
|
|
70723
|
+
connected: !!subscriptionStatus?.connected,
|
|
70724
|
+
modelsPending: subscriptionModelsPending,
|
|
70725
|
+
modelsFailed: subscriptionModelsError
|
|
70726
|
+
});
|
|
70666
70727
|
const modeEntries = useMemo(() => {
|
|
70667
70728
|
if (!manifestModeEntries || !subscriptionStatus?.connected || !subscriptionModels) {
|
|
70668
70729
|
return manifestModeEntries;
|
|
@@ -70773,6 +70834,7 @@ function ChatInputBar({
|
|
|
70773
70834
|
defaultMode,
|
|
70774
70835
|
automatic: automaticRouting,
|
|
70775
70836
|
pending: modelChoicePending,
|
|
70837
|
+
effortOptionsSettled,
|
|
70776
70838
|
variant: "rail",
|
|
70777
70839
|
codexConnect: hasCodexMode ? {
|
|
70778
70840
|
connected: codexConnected,
|