@molecule/app-ide-react 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/dist/components/ChatPanel.d.ts +3 -7
- package/dist/components/ChatPanel.d.ts.map +1 -1
- package/dist/components/ChatPanel.js +160 -102
- package/dist/components/ChatPanel.js.map +1 -1
- package/dist/types.d.ts +8 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-08-
|
|
6
|
+
Generated: 2026-08-18T16:06:01.076Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-ide-react
|
|
@@ -388,9 +388,14 @@ interface ChatPanelProps {
|
|
|
388
388
|
* Whether the current user is anonymous. The shared IDE no longer renders any
|
|
389
389
|
* built-in sign-up/guest card itself — guest reminders now arrive as a `custom`
|
|
390
390
|
* stream event the host registers via {@link registerCustomEventCard}, and upgrade
|
|
391
|
-
* call-to-actions come from {@link ChatPanelProps.buildUpgradeCta}
|
|
392
|
-
*
|
|
393
|
-
*
|
|
391
|
+
* call-to-actions come from {@link ChatPanelProps.buildUpgradeCta}, and the host's own
|
|
392
|
+
* `buildUpgradeCta` closure decides whether an anonymous user should sign up vs. upgrade.
|
|
393
|
+
*
|
|
394
|
+
* It IS read for one thing: a limit error the backend raised for an anonymous caller
|
|
395
|
+
* (`requiresSignup`) is dropped once this is explicitly `false` — the viewer signed in
|
|
396
|
+
* mid-session (the in-IDE auth modal never navigates, so the panel keeps running), and a
|
|
397
|
+
* "create a free account for more" banner with dead-end Sign up / Log in buttons is stale
|
|
398
|
+
* the moment they have an account. Leave it `undefined` and nothing is suppressed.
|
|
394
399
|
*/
|
|
395
400
|
isAnonymous?: boolean
|
|
396
401
|
/** When true, user has a paid plan and can use all models (drives locked-model display). */
|
|
@@ -1665,6 +1670,7 @@ function ChatPanel({
|
|
|
1665
1670
|
userEditedFile,
|
|
1666
1671
|
userEditedFileKey,
|
|
1667
1672
|
isPro,
|
|
1673
|
+
isAnonymous,
|
|
1668
1674
|
buildUpgradeCta,
|
|
1669
1675
|
buildHelpUpgradeSection,
|
|
1670
1676
|
userAvatar,
|
|
@@ -52,12 +52,6 @@ export declare function CommitCardItem({ card, onRevert, }: {
|
|
|
52
52
|
/** Props for the memoized per-message timeline row (see {@link MessageItem}). */
|
|
53
53
|
export interface MessageItemProps {
|
|
54
54
|
msg: ChatMessage;
|
|
55
|
-
editingQueuedId: string | null;
|
|
56
|
-
editingQueuedText: string;
|
|
57
|
-
setEditingQueuedId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
58
|
-
setEditingQueuedText: React.Dispatch<React.SetStateAction<string>>;
|
|
59
|
-
editQueuedMessage: (id: string, content: string) => void;
|
|
60
|
-
deleteQueuedMessage: (id: string) => void;
|
|
61
55
|
sendMessage: (msg: string) => void;
|
|
62
56
|
handleAskUserResponse: (response: string) => void;
|
|
63
57
|
isLoading: boolean;
|
|
@@ -99,6 +93,8 @@ export interface ChatInnerProps {
|
|
|
99
93
|
initialMessage?: string;
|
|
100
94
|
onInitialMessageSent?: () => void;
|
|
101
95
|
isPro?: boolean;
|
|
96
|
+
/** Whether the viewer is anonymous — see {@link ChatPanelProps.isAnonymous}. */
|
|
97
|
+
isAnonymous?: boolean;
|
|
102
98
|
/** Host-supplied upgrade/sign-in CTA builder — see {@link ChatPanelProps.buildUpgradeCta}. */
|
|
103
99
|
buildUpgradeCta?: ChatPanelProps['buildUpgradeCta'];
|
|
104
100
|
/** Host-supplied `/help` upgrade section builder — see {@link ChatPanelProps.buildHelpUpgradeSection}. */
|
|
@@ -178,7 +174,7 @@ export interface ChatInnerProps {
|
|
|
178
174
|
* @param props - Component props (see {@link MessageItemProps}).
|
|
179
175
|
* @returns The rendered chat panel element.
|
|
180
176
|
*/
|
|
181
|
-
export declare function ChatPanel({ projectId, endpoint, initialMessage, onInitialMessageSent, activeFile, openTabs, onFileOpen, onFileDoubleClick, onFileDiff, onFileRevert, onFileChange, onFileDeleted, onCommit, onActivityClick, onRenderError, onProfileClick, onReadyToBuild, awaitingSandboxBoot, onClientAction, onTurnComplete, onLoadingChange, onNavigatePreview, onRegisterPushHandler, autoSubmitSignal, initialInputValue, hideConversationMenu, renderConversationHeader, conversationId: controlledConversationId, chatKey: controlledChatKey, onConversationId: controlledOnConversationId, openShareSignal: controlledShareSignal, openReportSignal: controlledReportSignal, openSettingsSignal: controlledSettingsSignal, onManageCustomModels, gitStatusTick, pendingMessage, pendingMessageKey, pendingMessageSuppressUser, pendingMessageUserInitiated, userEditedFile, userEditedFileKey, isPro, buildUpgradeCta, buildHelpUpgradeSection, userAvatar, agentName, productName, version, feedbackUrl, className, }: ChatPanelProps): JSX.Element;
|
|
177
|
+
export declare function ChatPanel({ projectId, endpoint, initialMessage, onInitialMessageSent, activeFile, openTabs, onFileOpen, onFileDoubleClick, onFileDiff, onFileRevert, onFileChange, onFileDeleted, onCommit, onActivityClick, onRenderError, onProfileClick, onReadyToBuild, awaitingSandboxBoot, onClientAction, onTurnComplete, onLoadingChange, onNavigatePreview, onRegisterPushHandler, autoSubmitSignal, initialInputValue, hideConversationMenu, renderConversationHeader, conversationId: controlledConversationId, chatKey: controlledChatKey, onConversationId: controlledOnConversationId, openShareSignal: controlledShareSignal, openReportSignal: controlledReportSignal, openSettingsSignal: controlledSettingsSignal, onManageCustomModels, gitStatusTick, pendingMessage, pendingMessageKey, pendingMessageSuppressUser, pendingMessageUserInitiated, userEditedFile, userEditedFileKey, isPro, isAnonymous, buildUpgradeCta, buildHelpUpgradeSection, userAvatar, agentName, productName, version, feedbackUrl, className, }: ChatPanelProps): JSX.Element;
|
|
182
178
|
export declare namespace ChatPanel {
|
|
183
179
|
var displayName: string;
|
|
184
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatPanel.d.ts","sourceRoot":"","sources":["../../src/components/ChatPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,OAAO,CAAA;AAY3C,OAAO,KAAK,EAAa,WAAW,EAAmB,MAAM,uBAAuB,CAAA;AAuCpF,OAAO,KAAK,EAAE,cAAc,EAAoB,eAAe,EAAE,MAAM,aAAa,CAAA;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AA0BvD,OAAO,KAAK,EAAsB,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAqLnF,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAuND,UAAU,WAAW;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAm9BD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACzD,GAAG,GAAG,CAAC,OAAO,CAoPd;AAMD,iFAAiF;AACjF,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,WAAW,CAAA;IAChB,
|
|
1
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tB,yIAAyI;IACzI,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,8GAA8G;IAC9G,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAsxPD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACb,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,wBAA+B,EAC/B,cAAc,EAAE,wBAAwB,EACxC,OAAO,EAAE,iBAAiB,EAC1B,gBAAgB,EAAE,0BAA0B,EAC5C,eAAe,EAAE,qBAAqB,EACtC,gBAAgB,EAAE,sBAAsB,EACxC,kBAAkB,EAAE,wBAAwB,EAC5C,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,0BAA0B,EAC1B,2BAA2B,EAC3B,cAAc,EACd,iBAAiB,EACjB,KAAK,EACL,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,EACP,WAAW,EACX,SAAS,GACV,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CA6b9B;yBAjfe,SAAS"}
|
|
@@ -928,7 +928,7 @@ export function CommitCardItem({ card, onRevert, }) {
|
|
|
928
928
|
* @returns The rendered message item.
|
|
929
929
|
*/
|
|
930
930
|
const MessageItem = memo(function MessageItem(props) {
|
|
931
|
-
const { msg,
|
|
931
|
+
const { msg, sendMessage, handleAskUserResponse, isLoading, streamingStatus, onNavigatePreview, undoneTcIds, handleUndoToggle, onFileOpen, onFileDoubleClick, onFileDiff, handleFileRevert, setInputAndCursorEnd, setModelPicker, userAvatar, onAvatarClick, discovery, buildUpgradeCta, } = props;
|
|
932
932
|
const cm = getClassMap();
|
|
933
933
|
const themeMode = useThemeMode();
|
|
934
934
|
const isLight = themeMode === 'light';
|
|
@@ -984,101 +984,7 @@ const MessageItem = memo(function MessageItem(props) {
|
|
|
984
984
|
? '\uD83C\uDFB5'
|
|
985
985
|
: att.mediaType.startsWith('video/')
|
|
986
986
|
? '\uD83C\uDFA5'
|
|
987
|
-
: '\uD83D\uDCC4', ' ', att.filename, _jsxs("span", { style: { fontSize: 10, opacity: 0.7 }, children: ["(", formatSize(att.size), ")"] })] }, ai))) }))
|
|
988
|
-
if (e.key === 'Enter' && !e.shiftKey) {
|
|
989
|
-
e.preventDefault();
|
|
990
|
-
const trimmed = editingQueuedText.trim();
|
|
991
|
-
if (trimmed)
|
|
992
|
-
editQueuedMessage(msg.id, trimmed);
|
|
993
|
-
else
|
|
994
|
-
deleteQueuedMessage(msg.id);
|
|
995
|
-
setEditingQueuedId(null);
|
|
996
|
-
}
|
|
997
|
-
if (e.key === 'Escape')
|
|
998
|
-
setEditingQueuedId(null);
|
|
999
|
-
}, className: cm.cn(cm.surface, cm.textSize('sm')), style: {
|
|
1000
|
-
width: '100%',
|
|
1001
|
-
minHeight: '60px',
|
|
1002
|
-
padding: '8px 10px',
|
|
1003
|
-
border: `1px solid ${borderClr}`,
|
|
1004
|
-
borderRadius: '6px',
|
|
1005
|
-
resize: 'vertical',
|
|
1006
|
-
color: 'inherit',
|
|
1007
|
-
fontFamily: 'inherit',
|
|
1008
|
-
} }), _jsxs("div", { style: { display: 'flex', gap: 6, justifyContent: 'flex-end' }, children: [_jsx("button", { type: "button", onClick: () => setEditingQueuedId(null), className: cm.textSize('xs'), style: {
|
|
1009
|
-
padding: '4px 12px',
|
|
1010
|
-
border: `1px solid ${borderClr}`,
|
|
1011
|
-
borderRadius: '4px',
|
|
1012
|
-
background: 'transparent',
|
|
1013
|
-
color: 'inherit',
|
|
1014
|
-
cursor: 'pointer',
|
|
1015
|
-
}, children: t('common.cancel', undefined, { defaultValue: 'Cancel' }) }), _jsx("button", { type: "button", onClick: () => {
|
|
1016
|
-
const trimmed = editingQueuedText.trim();
|
|
1017
|
-
if (trimmed)
|
|
1018
|
-
editQueuedMessage(msg.id, trimmed);
|
|
1019
|
-
else
|
|
1020
|
-
deleteQueuedMessage(msg.id);
|
|
1021
|
-
setEditingQueuedId(null);
|
|
1022
|
-
}, className: cm.textSize('xs'), style: {
|
|
1023
|
-
padding: '4px 12px',
|
|
1024
|
-
border: `1px solid ${borderClr}`,
|
|
1025
|
-
borderRadius: '4px',
|
|
1026
|
-
background: 'rgba(128,128,128,0.1)',
|
|
1027
|
-
color: 'inherit',
|
|
1028
|
-
cursor: 'pointer',
|
|
1029
|
-
}, children: t('common.save', undefined, { defaultValue: 'Save' }) })] })] })) : (_jsxs("div", { style: {
|
|
1030
|
-
display: 'flex',
|
|
1031
|
-
alignItems: 'center',
|
|
1032
|
-
justifyContent: 'flex-end',
|
|
1033
|
-
gap: 6,
|
|
1034
|
-
paddingRight: 4,
|
|
1035
|
-
}, children: [_jsx("span", { className: cm.cn(cm.textMuted, cm.textSize('xs')), style: { fontStyle: 'italic', marginRight: 'auto' }, children: t('ide.chat.queued', undefined, { defaultValue: 'Queued' }) }), _jsx("button", { type: "button", onClick: () => {
|
|
1036
|
-
setEditingQueuedId(msg.id);
|
|
1037
|
-
setEditingQueuedText(msg.content);
|
|
1038
|
-
}, className: cm.textSize('xs'), style: {
|
|
1039
|
-
padding: '3px 10px',
|
|
1040
|
-
border: `1px solid ${borderClr}`,
|
|
1041
|
-
borderRadius: '4px',
|
|
1042
|
-
background: 'rgba(128,128,128,0.1)',
|
|
1043
|
-
color: 'inherit',
|
|
1044
|
-
cursor: 'pointer',
|
|
1045
|
-
fontWeight: 500,
|
|
1046
|
-
transition: 'background 100ms',
|
|
1047
|
-
}, onMouseEnter: (e) => {
|
|
1048
|
-
e.currentTarget.style.background = 'rgba(128,128,128,0.2)';
|
|
1049
|
-
}, onMouseLeave: (e) => {
|
|
1050
|
-
e.currentTarget.style.background = 'rgba(128,128,128,0.1)';
|
|
1051
|
-
}, children: t('ide.chat.editQueued', undefined, { defaultValue: 'Edit' }) }), _jsx("button", { type: "button", onClick: () => deleteQueuedMessage(msg.id), className: cm.textSize('xs'), style: {
|
|
1052
|
-
padding: '3px 10px',
|
|
1053
|
-
border: '1px solid rgba(220,38,38,0.3)',
|
|
1054
|
-
borderRadius: '4px',
|
|
1055
|
-
background: 'rgba(220,38,38,0.08)',
|
|
1056
|
-
color: isLight ? 'rgb(185,28,28)' : 'rgb(248,113,113)',
|
|
1057
|
-
cursor: 'pointer',
|
|
1058
|
-
fontWeight: 500,
|
|
1059
|
-
transition: 'background 100ms',
|
|
1060
|
-
}, onMouseEnter: (e) => {
|
|
1061
|
-
e.currentTarget.style.background = 'rgba(220,38,38,0.18)';
|
|
1062
|
-
}, onMouseLeave: (e) => {
|
|
1063
|
-
e.currentTarget.style.background = 'rgba(220,38,38,0.08)';
|
|
1064
|
-
}, children: t('ide.chat.deleteQueued', undefined, { defaultValue: 'Delete' }) }), !isLoading && (_jsx("button", { type: "button", onClick: () => {
|
|
1065
|
-
const content = msg.content;
|
|
1066
|
-
deleteQueuedMessage(msg.id);
|
|
1067
|
-
sendMessage(content);
|
|
1068
|
-
}, className: cm.textSize('xs'), style: {
|
|
1069
|
-
padding: '3px 10px',
|
|
1070
|
-
border: '1px solid rgba(34,197,94,0.4)',
|
|
1071
|
-
borderRadius: '4px',
|
|
1072
|
-
background: 'rgba(34,197,94,0.12)',
|
|
1073
|
-
color: isLight ? 'rgb(21,128,61)' : 'rgb(74,222,128)',
|
|
1074
|
-
cursor: 'pointer',
|
|
1075
|
-
fontWeight: 500,
|
|
1076
|
-
transition: 'background 100ms',
|
|
1077
|
-
}, onMouseEnter: (e) => {
|
|
1078
|
-
e.currentTarget.style.background = 'rgba(34,197,94,0.22)';
|
|
1079
|
-
}, onMouseLeave: (e) => {
|
|
1080
|
-
e.currentTarget.style.background = 'rgba(34,197,94,0.12)';
|
|
1081
|
-
}, children: t('ide.chat.sendQueued', undefined, { defaultValue: 'Send' }) }))] })) }))] })] })) : (_jsxs("div", { children: [msg.blocks && msg.blocks.length > 0 ? (msg.blocks.map((block, bi) => {
|
|
987
|
+
: '\uD83D\uDCC4', ' ', att.filename, _jsxs("span", { style: { fontSize: 10, opacity: 0.7 }, children: ["(", formatSize(att.size), ")"] })] }, ai))) }))] })] })) : (_jsxs("div", { children: [msg.blocks && msg.blocks.length > 0 ? (msg.blocks.map((block, bi) => {
|
|
1082
988
|
const blockType = block.type;
|
|
1083
989
|
if (blockType === 'thinking') {
|
|
1084
990
|
const isLastBlock = bi === (msg.blocks?.length ?? 0) - 1;
|
|
@@ -1246,7 +1152,7 @@ const MessageItem = memo(function MessageItem(props) {
|
|
|
1246
1152
|
* @param props - Component props (see {@link MessageItemProps}).
|
|
1247
1153
|
* @returns The rendered chat inner component.
|
|
1248
1154
|
*/
|
|
1249
|
-
function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent, isPro, buildUpgradeCta, buildHelpUpgradeSection, activeFile, openTabs, onFileOpen, onFileDoubleClick, onFileDiff, onFileRevert, onFileChange, onFileDeleted, onCommit, onConversationId, onActivityClick, onRenderError, onProfileClick, onReadyToBuild, awaitingSandboxBoot, onClientAction, onTurnComplete, onLoadingChange, onNavigatePreview, onRegisterPushHandler, autoSubmitSignal, openSettingsSignal, onManageCustomModels, openReportSignal, openShareSignal, initialInputValue, pendingMessage, pendingMessageKey, pendingMessageSuppressUser, pendingMessageUserInitiated, userEditedFile, userEditedFileKey, gitStatusTick: externalGitStatusTick, discovery, userAvatar, agentName = DEFAULT_AGENT_NAME, productName = DEFAULT_PRODUCT_NAME, version,
|
|
1155
|
+
function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent, isPro, isAnonymous, buildUpgradeCta, buildHelpUpgradeSection, activeFile, openTabs, onFileOpen, onFileDoubleClick, onFileDiff, onFileRevert, onFileChange, onFileDeleted, onCommit, onConversationId, onActivityClick, onRenderError, onProfileClick, onReadyToBuild, awaitingSandboxBoot, onClientAction, onTurnComplete, onLoadingChange, onNavigatePreview, onRegisterPushHandler, autoSubmitSignal, openSettingsSignal, onManageCustomModels, openReportSignal, openShareSignal, initialInputValue, pendingMessage, pendingMessageKey, pendingMessageSuppressUser, pendingMessageUserInitiated, userEditedFile, userEditedFileKey, gitStatusTick: externalGitStatusTick, discovery, userAvatar, agentName = DEFAULT_AGENT_NAME, productName = DEFAULT_PRODUCT_NAME, version,
|
|
1250
1156
|
// feedbackUrl: prop kept for back-compat (callers still pass it), but no longer
|
|
1251
1157
|
// consumed here — its only use was the command-menu footer link removed in P3-21.
|
|
1252
1158
|
}) {
|
|
@@ -4647,6 +4553,13 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
4647
4553
|
// already filters them on read, but guard here too so the client NEVER shows
|
|
4648
4554
|
// one — even an optimistic/in-flight hidden message.
|
|
4649
4555
|
const visibleMessages = useMemo(() => messages.filter((m) => !m.hidden), [messages]);
|
|
4556
|
+
// Queued messages (user/auto messages waiting to send while the agent works)
|
|
4557
|
+
// are NOT rendered inline in the scrolling timeline — they'd be pushed around
|
|
4558
|
+
// and reflow as the response streams. They render instead in an anchored bar
|
|
4559
|
+
// pinned above the composer (see "Queued messages" in the input area below),
|
|
4560
|
+
// the same fixed-position treatment as the commit bar. Split them out here so
|
|
4561
|
+
// the timeline never includes them.
|
|
4562
|
+
const queuedMessages = useMemo(() => visibleMessages.filter((m) => m.queued), [visibleMessages]);
|
|
4650
4563
|
// Build a renderable SystemCard from a card-message's raw CardEvent. This is the ONE
|
|
4651
4564
|
// construction, used IDENTICALLY for a live `card` event (now a card-message in `messages`)
|
|
4652
4565
|
// and for a card-message loaded on refresh — so the rendered card is the same in both, with
|
|
@@ -4725,6 +4638,15 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
4725
4638
|
return null;
|
|
4726
4639
|
}
|
|
4727
4640
|
}, [t, AVAILABLE_MODELS, effectiveModelRegion]);
|
|
4641
|
+
// A limit the backend raised for an ANONYMOUS caller — `requiresSignup`, whose
|
|
4642
|
+
// whole message is "…for guests … or create a free account for more" and whose
|
|
4643
|
+
// CTAs are Sign up / Log in — is STALE the moment the viewer signs in: they now
|
|
4644
|
+
// have an account, a different allowance, and two dead-end buttons. The error
|
|
4645
|
+
// state survives the in-place auth modal (nothing navigates, and useChat only
|
|
4646
|
+
// clears it on the next send), so without this the freshly-signed-up user keeps
|
|
4647
|
+
// reading the guest limit they just escaped. Same reasoning the host's
|
|
4648
|
+
// `upgrade_prompt` card factory already applies to the recorded guest card.
|
|
4649
|
+
const isStaleAnonymousLimit = errorMeta?.requiresSignup === true && isAnonymous === false;
|
|
4728
4650
|
const timeline = useMemo(() => {
|
|
4729
4651
|
const items = [];
|
|
4730
4652
|
// A card-message (role:'system' carrying a cardEvent) renders as a SYSTEM CARD, not a chat
|
|
@@ -4738,8 +4660,11 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
4738
4660
|
// clears). The banner stays: it is the refused send's only feedback, and its message
|
|
4739
4661
|
// can be the more specific one (platform capacity vs the user's own budget, same
|
|
4740
4662
|
// `limitType`). See {@link ChatEventCard.coversLimitType}.
|
|
4741
|
-
const liveLimitType = error ? errorMeta?.limitType : undefined;
|
|
4663
|
+
const liveLimitType = error && !isStaleAnonymousLimit ? errorMeta?.limitType : undefined;
|
|
4742
4664
|
for (const msg of visibleMessages) {
|
|
4665
|
+
// Queued messages render in the anchored bar above the composer, not inline.
|
|
4666
|
+
if (msg.queued)
|
|
4667
|
+
continue;
|
|
4743
4668
|
if (msg.cardEvent) {
|
|
4744
4669
|
const card = cardEventToSystemCard(msg.cardEvent, msg.id, msg.timestamp);
|
|
4745
4670
|
if (!card)
|
|
@@ -4769,6 +4694,7 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
4769
4694
|
tipCards,
|
|
4770
4695
|
error,
|
|
4771
4696
|
errorMeta,
|
|
4697
|
+
isStaleAnonymousLimit,
|
|
4772
4698
|
]);
|
|
4773
4699
|
// The live settings list for the /settings card. Shared by the closeable
|
|
4774
4700
|
// overlay and the legacy inline 'settings' branch (back-compat for any already
|
|
@@ -4995,8 +4921,9 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
4995
4921
|
hash,
|
|
4996
4922
|
}, onRevert: handleRevertCommit }, msg.id));
|
|
4997
4923
|
}
|
|
4998
|
-
return (_jsx(MessageItem, { msg: msg,
|
|
4924
|
+
return (_jsx(MessageItem, { msg: msg, sendMessage: sendMessage, handleAskUserResponse: handleAskUserResponse, isLoading: isLoading, streamingStatus: streamingStatus, onNavigatePreview: onNavigatePreview, undoneTcIds: undoneTcIds, handleUndoToggle: handleUndoToggle, onFileOpen: onFileOpen, onFileDoubleClick: onFileDoubleClick, onFileDiff: onFileDiff, handleFileRevert: handleFileRevert, setInputAndCursorEnd: setInputAndCursorEnd, setModelPicker: setModelPicker, userAvatar: userAvatar, onAvatarClick: onUserAvatarClick, discovery: discovery, buildUpgradeCta: buildUpgradeCta }, msg.id));
|
|
4999
4925
|
} }, item.kind === 'message' ? item.msg.id : item.card.id))), error &&
|
|
4926
|
+
!isStaleAnonymousLimit &&
|
|
5000
4927
|
(errorMeta?.limitType ? (_jsx(ResourceLimitBanner, { message: error, action: buildUpgradeCta?.({ requiresSignup: errorMeta.requiresSignup }) })) : (_jsx("div", { className: cm.cn(cm.textSize('sm'), cm.sp('p', 2), cm.sp('mb', 2), cm.bgErrorSubtle, cm.textError), style: { borderRadius: '6px' }, children: error }))), (() => {
|
|
5001
4928
|
const showActivity = isLoading || awaitingSandboxBoot;
|
|
5002
4929
|
const streamingMsg = isLoading
|
|
@@ -6063,7 +5990,138 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
6063
5990
|
? t('ide.chat.activeFile', undefined, { defaultValue: 'active' })
|
|
6064
5991
|
: t('ide.chat.openTab', undefined, { defaultValue: 'open' }) }))] }, entry.name));
|
|
6065
5992
|
}) }));
|
|
6066
|
-
})(),
|
|
5993
|
+
})(), queuedMessages.length > 0 && !commandMenu && !modelPicker && !panelOverlay && (_jsxs("div", { style: {
|
|
5994
|
+
borderTop: '1px solid rgba(128,128,128,0.15)',
|
|
5995
|
+
padding: '6px 8px 6px 10px',
|
|
5996
|
+
}, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: 3 }, children: [_jsx(Icon, { name: "clock", size: 11, "aria-hidden": "true", style: { opacity: 0.5, flexShrink: 0 } }), _jsx("span", { className: cm.cn(cm.textMuted, cm.textSize('xs')), style: { fontStyle: 'italic' }, children: t('ide.chat.queuedCount', { count: queuedMessages.length }, { defaultValue: '{{count}} queued' }) })] }), _jsx("div", { style: {
|
|
5997
|
+
maxHeight: 132,
|
|
5998
|
+
overflowY: 'auto',
|
|
5999
|
+
scrollbarWidth: 'thin',
|
|
6000
|
+
display: 'flex',
|
|
6001
|
+
flexDirection: 'column',
|
|
6002
|
+
gap: 2,
|
|
6003
|
+
}, children: queuedMessages.map((qm) => editingQueuedId === qm.id ? (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 6 }, children: [_jsx("textarea", { autoFocus: true, defaultValue: editingQueuedText, onChange: (e) => setEditingQueuedText(e.target.value), onKeyDown: (e) => {
|
|
6004
|
+
if (e.key === 'Enter' && !e.shiftKey) {
|
|
6005
|
+
e.preventDefault();
|
|
6006
|
+
const trimmed = editingQueuedText.trim();
|
|
6007
|
+
if (trimmed)
|
|
6008
|
+
editQueuedMessage(qm.id, trimmed);
|
|
6009
|
+
else
|
|
6010
|
+
deleteQueuedMessage(qm.id);
|
|
6011
|
+
setEditingQueuedId(null);
|
|
6012
|
+
}
|
|
6013
|
+
if (e.key === 'Escape')
|
|
6014
|
+
setEditingQueuedId(null);
|
|
6015
|
+
}, className: cm.cn(cm.surface, cm.textSize('sm')), style: {
|
|
6016
|
+
width: '100%',
|
|
6017
|
+
minHeight: '52px',
|
|
6018
|
+
padding: '6px 8px',
|
|
6019
|
+
border: `1px solid ${isLight ? '#d1d9e0' : 'rgba(255,255,255,0.1)'}`,
|
|
6020
|
+
borderRadius: '6px',
|
|
6021
|
+
resize: 'vertical',
|
|
6022
|
+
color: 'inherit',
|
|
6023
|
+
fontFamily: 'inherit',
|
|
6024
|
+
} }), _jsxs("div", { style: { display: 'flex', gap: 6, justifyContent: 'flex-end' }, children: [_jsx("button", { type: "button", onClick: () => setEditingQueuedId(null), className: cm.textSize('xs'), style: {
|
|
6025
|
+
padding: '4px 12px',
|
|
6026
|
+
border: `1px solid ${isLight ? '#d1d9e0' : 'rgba(255,255,255,0.1)'}`,
|
|
6027
|
+
borderRadius: '4px',
|
|
6028
|
+
background: 'transparent',
|
|
6029
|
+
color: 'inherit',
|
|
6030
|
+
cursor: 'pointer',
|
|
6031
|
+
...(isCoarse ? { minHeight: 32 } : {}),
|
|
6032
|
+
}, children: t('common.cancel', undefined, { defaultValue: 'Cancel' }) }), _jsx("button", { type: "button", onClick: () => {
|
|
6033
|
+
const trimmed = editingQueuedText.trim();
|
|
6034
|
+
if (trimmed)
|
|
6035
|
+
editQueuedMessage(qm.id, trimmed);
|
|
6036
|
+
else
|
|
6037
|
+
deleteQueuedMessage(qm.id);
|
|
6038
|
+
setEditingQueuedId(null);
|
|
6039
|
+
}, className: cm.textSize('xs'), style: {
|
|
6040
|
+
padding: '4px 12px',
|
|
6041
|
+
border: `1px solid ${isLight ? '#d1d9e0' : 'rgba(255,255,255,0.1)'}`,
|
|
6042
|
+
borderRadius: '4px',
|
|
6043
|
+
background: 'rgba(128,128,128,0.1)',
|
|
6044
|
+
color: 'inherit',
|
|
6045
|
+
cursor: 'pointer',
|
|
6046
|
+
...(isCoarse ? { minHeight: 32 } : {}),
|
|
6047
|
+
}, children: t('common.save', undefined, { defaultValue: 'Save' }) })] })] }, qm.id)) : (_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6, minWidth: 0 }, children: [_jsx("span", { title: qm.content, className: cm.textSize('sm'), style: {
|
|
6048
|
+
flex: 1,
|
|
6049
|
+
minWidth: 0,
|
|
6050
|
+
overflow: 'hidden',
|
|
6051
|
+
textOverflow: 'ellipsis',
|
|
6052
|
+
whiteSpace: 'nowrap',
|
|
6053
|
+
opacity: 0.8,
|
|
6054
|
+
}, children: qm.content }), _jsx("button", { type: "button", title: t('ide.chat.editQueued', undefined, { defaultValue: 'Edit' }), onClick: () => {
|
|
6055
|
+
setEditingQueuedId(qm.id);
|
|
6056
|
+
setEditingQueuedText(qm.content);
|
|
6057
|
+
}, style: {
|
|
6058
|
+
display: 'inline-flex',
|
|
6059
|
+
alignItems: 'center',
|
|
6060
|
+
justifyContent: 'center',
|
|
6061
|
+
width: isCoarse ? 32 : 22,
|
|
6062
|
+
height: isCoarse ? 32 : 22,
|
|
6063
|
+
flexShrink: 0,
|
|
6064
|
+
border: 'none',
|
|
6065
|
+
borderRadius: 4,
|
|
6066
|
+
background: 'none',
|
|
6067
|
+
color: 'inherit',
|
|
6068
|
+
opacity: 0.5,
|
|
6069
|
+
cursor: 'pointer',
|
|
6070
|
+
padding: 0,
|
|
6071
|
+
transition: 'opacity 100ms, background 100ms',
|
|
6072
|
+
}, onMouseEnter: (e) => {
|
|
6073
|
+
e.currentTarget.style.opacity = '1';
|
|
6074
|
+
e.currentTarget.style.background = 'rgba(128,128,128,0.15)';
|
|
6075
|
+
}, onMouseLeave: (e) => {
|
|
6076
|
+
e.currentTarget.style.opacity = '0.5';
|
|
6077
|
+
e.currentTarget.style.background = 'none';
|
|
6078
|
+
}, children: _jsx(Icon, { name: "pencil", size: 13, "aria-hidden": "true" }) }), _jsx("button", { type: "button", title: t('ide.chat.deleteQueued', undefined, { defaultValue: 'Delete' }), onClick: () => deleteQueuedMessage(qm.id), style: {
|
|
6079
|
+
display: 'inline-flex',
|
|
6080
|
+
alignItems: 'center',
|
|
6081
|
+
justifyContent: 'center',
|
|
6082
|
+
width: isCoarse ? 32 : 22,
|
|
6083
|
+
height: isCoarse ? 32 : 22,
|
|
6084
|
+
flexShrink: 0,
|
|
6085
|
+
border: 'none',
|
|
6086
|
+
borderRadius: 4,
|
|
6087
|
+
background: 'none',
|
|
6088
|
+
color: isLight ? 'rgb(185,28,28)' : 'rgb(248,113,113)',
|
|
6089
|
+
opacity: 0.6,
|
|
6090
|
+
cursor: 'pointer',
|
|
6091
|
+
padding: 0,
|
|
6092
|
+
transition: 'opacity 100ms, background 100ms',
|
|
6093
|
+
}, onMouseEnter: (e) => {
|
|
6094
|
+
e.currentTarget.style.opacity = '1';
|
|
6095
|
+
e.currentTarget.style.background = 'rgba(220,38,38,0.12)';
|
|
6096
|
+
}, onMouseLeave: (e) => {
|
|
6097
|
+
e.currentTarget.style.opacity = '0.6';
|
|
6098
|
+
e.currentTarget.style.background = 'none';
|
|
6099
|
+
}, children: _jsx(Icon, { name: "trash", size: 13, "aria-hidden": "true" }) }), !isLoading && (_jsx("button", { type: "button", title: t('ide.chat.sendQueued', undefined, { defaultValue: 'Send' }), onClick: () => {
|
|
6100
|
+
const content = qm.content;
|
|
6101
|
+
deleteQueuedMessage(qm.id);
|
|
6102
|
+
sendMessage(content);
|
|
6103
|
+
}, style: {
|
|
6104
|
+
display: 'inline-flex',
|
|
6105
|
+
alignItems: 'center',
|
|
6106
|
+
justifyContent: 'center',
|
|
6107
|
+
width: isCoarse ? 32 : 22,
|
|
6108
|
+
height: isCoarse ? 32 : 22,
|
|
6109
|
+
flexShrink: 0,
|
|
6110
|
+
border: 'none',
|
|
6111
|
+
borderRadius: 4,
|
|
6112
|
+
background: 'none',
|
|
6113
|
+
color: isLight ? 'rgb(21,128,61)' : 'rgb(74,222,128)',
|
|
6114
|
+
opacity: 0.7,
|
|
6115
|
+
cursor: 'pointer',
|
|
6116
|
+
padding: 0,
|
|
6117
|
+
transition: 'opacity 100ms, background 100ms',
|
|
6118
|
+
}, onMouseEnter: (e) => {
|
|
6119
|
+
e.currentTarget.style.opacity = '1';
|
|
6120
|
+
e.currentTarget.style.background = 'rgba(34,197,94,0.14)';
|
|
6121
|
+
}, onMouseLeave: (e) => {
|
|
6122
|
+
e.currentTarget.style.opacity = '0.7';
|
|
6123
|
+
e.currentTarget.style.background = 'none';
|
|
6124
|
+
}, children: _jsx("svg", { width: "13", height: "13", viewBox: "0 0 12 12", style: { display: 'block' }, children: _jsx("path", { d: "M 2.5,6.5 L 6,3 L 9.5,6.5 M 6,3.5 L 6,10", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }, qm.id))) })] })), pendingFiles != null &&
|
|
6067
6125
|
pendingFiles.length > 0 &&
|
|
6068
6126
|
!commandMenu &&
|
|
6069
6127
|
!modelPicker &&
|
|
@@ -6599,7 +6657,7 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
6599
6657
|
* @param props - Component props (see {@link MessageItemProps}).
|
|
6600
6658
|
* @returns The rendered chat panel element.
|
|
6601
6659
|
*/
|
|
6602
|
-
export function ChatPanel({ projectId, endpoint, initialMessage, onInitialMessageSent, activeFile, openTabs, onFileOpen, onFileDoubleClick, onFileDiff, onFileRevert, onFileChange, onFileDeleted, onCommit, onActivityClick, onRenderError, onProfileClick, onReadyToBuild, awaitingSandboxBoot, onClientAction, onTurnComplete, onLoadingChange, onNavigatePreview, onRegisterPushHandler, autoSubmitSignal, initialInputValue, hideConversationMenu, renderConversationHeader = true, conversationId: controlledConversationId, chatKey: controlledChatKey, onConversationId: controlledOnConversationId, openShareSignal: controlledShareSignal, openReportSignal: controlledReportSignal, openSettingsSignal: controlledSettingsSignal, onManageCustomModels, gitStatusTick, pendingMessage, pendingMessageKey, pendingMessageSuppressUser, pendingMessageUserInitiated, userEditedFile, userEditedFileKey, isPro, buildUpgradeCta, buildHelpUpgradeSection, userAvatar, agentName, productName, version, feedbackUrl, className, }) {
|
|
6660
|
+
export function ChatPanel({ projectId, endpoint, initialMessage, onInitialMessageSent, activeFile, openTabs, onFileOpen, onFileDoubleClick, onFileDiff, onFileRevert, onFileChange, onFileDeleted, onCommit, onActivityClick, onRenderError, onProfileClick, onReadyToBuild, awaitingSandboxBoot, onClientAction, onTurnComplete, onLoadingChange, onNavigatePreview, onRegisterPushHandler, autoSubmitSignal, initialInputValue, hideConversationMenu, renderConversationHeader = true, conversationId: controlledConversationId, chatKey: controlledChatKey, onConversationId: controlledOnConversationId, openShareSignal: controlledShareSignal, openReportSignal: controlledReportSignal, openSettingsSignal: controlledSettingsSignal, onManageCustomModels, gitStatusTick, pendingMessage, pendingMessageKey, pendingMessageSuppressUser, pendingMessageUserInitiated, userEditedFile, userEditedFileKey, isPro, isAnonymous, buildUpgradeCta, buildHelpUpgradeSection, userAvatar, agentName, productName, version, feedbackUrl, className, }) {
|
|
6603
6661
|
const cm = getClassMap();
|
|
6604
6662
|
const isNarrow = useNarrowViewport();
|
|
6605
6663
|
const isCoarse = useCoarsePointer();
|
|
@@ -6808,7 +6866,7 @@ export function ChatPanel({ projectId, endpoint, initialMessage, onInitialMessag
|
|
|
6808
6866
|
textOverflow: 'ellipsis',
|
|
6809
6867
|
whiteSpace: 'nowrap',
|
|
6810
6868
|
width: '100%',
|
|
6811
|
-
}, children: conv.preview ?? 'New conversation' }), _jsx("span", { className: cm.cn(cm.textMuted, cm.textSize('xs')), style: { opacity: 0.55 }, children: relativeTime(conv.updatedAt) })] }, conv.id)))] }))] })), _jsx(ChatInner, { projectId: projectId, endpoint: chatEndpoint, initialMessage: initialMessage, onInitialMessageSent: onInitialMessageSent, isPro: isPro, buildUpgradeCta: buildUpgradeCta, buildHelpUpgradeSection: buildHelpUpgradeSection, activeFile: activeFile, openTabs: openTabs, onFileOpen: onFileOpen, onFileDoubleClick: onFileDoubleClick, onFileDiff: onFileDiff, onFileRevert: onFileRevert, onFileChange: onFileChange, onFileDeleted: onFileDeleted, onCommit: onCommit, onConversationId: reportConversationId, onActivityClick: onActivityClick, onRenderError: onRenderError, onProfileClick: onProfileClick, onReadyToBuild: onReadyToBuild, awaitingSandboxBoot: awaitingSandboxBoot, onClientAction: onClientAction, onTurnComplete: onTurnComplete, onLoadingChange: onLoadingChange, onNavigatePreview: onNavigatePreview, onRegisterPushHandler: onRegisterPushHandler, autoSubmitSignal: autoSubmitSignal, openSettingsSignal: effectiveSettingsSignal, onManageCustomModels: onManageCustomModels, openReportSignal: effectiveReportSignal, openShareSignal: effectiveShareSignal, initialInputValue: initialInputValue, pendingMessage: pendingMessage, pendingMessageKey: pendingMessageKey, pendingMessageSuppressUser: pendingMessageSuppressUser, pendingMessageUserInitiated: pendingMessageUserInitiated, userEditedFile: userEditedFile, userEditedFileKey: userEditedFileKey, gitStatusTick: gitStatusTick, discovery: hideConversationMenu, userAvatar: userAvatar, agentName: agentName, productName: productName, version: version, feedbackUrl: feedbackUrl }, chatKey)] }));
|
|
6869
|
+
}, children: conv.preview ?? 'New conversation' }), _jsx("span", { className: cm.cn(cm.textMuted, cm.textSize('xs')), style: { opacity: 0.55 }, children: relativeTime(conv.updatedAt) })] }, conv.id)))] }))] })), _jsx(ChatInner, { projectId: projectId, endpoint: chatEndpoint, initialMessage: initialMessage, onInitialMessageSent: onInitialMessageSent, isPro: isPro, isAnonymous: isAnonymous, buildUpgradeCta: buildUpgradeCta, buildHelpUpgradeSection: buildHelpUpgradeSection, activeFile: activeFile, openTabs: openTabs, onFileOpen: onFileOpen, onFileDoubleClick: onFileDoubleClick, onFileDiff: onFileDiff, onFileRevert: onFileRevert, onFileChange: onFileChange, onFileDeleted: onFileDeleted, onCommit: onCommit, onConversationId: reportConversationId, onActivityClick: onActivityClick, onRenderError: onRenderError, onProfileClick: onProfileClick, onReadyToBuild: onReadyToBuild, awaitingSandboxBoot: awaitingSandboxBoot, onClientAction: onClientAction, onTurnComplete: onTurnComplete, onLoadingChange: onLoadingChange, onNavigatePreview: onNavigatePreview, onRegisterPushHandler: onRegisterPushHandler, autoSubmitSignal: autoSubmitSignal, openSettingsSignal: effectiveSettingsSignal, onManageCustomModels: onManageCustomModels, openReportSignal: effectiveReportSignal, openShareSignal: effectiveShareSignal, initialInputValue: initialInputValue, pendingMessage: pendingMessage, pendingMessageKey: pendingMessageKey, pendingMessageSuppressUser: pendingMessageSuppressUser, pendingMessageUserInitiated: pendingMessageUserInitiated, userEditedFile: userEditedFile, userEditedFileKey: userEditedFileKey, gitStatusTick: gitStatusTick, discovery: hideConversationMenu, userAvatar: userAvatar, agentName: agentName, productName: productName, version: version, feedbackUrl: feedbackUrl }, chatKey)] }));
|
|
6812
6870
|
}
|
|
6813
6871
|
ChatPanel.displayName = 'ChatPanel';
|
|
6814
6872
|
//# sourceMappingURL=ChatPanel.js.map
|