@molecule/app-ide-react 1.20.2 → 1.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ChatPanel.d.ts.map +1 -1
- package/dist/components/ChatPanel.js +118 -118
- package/dist/components/ChatPanel.js.map +1 -1
- package/dist/components/WorkCard.d.ts +14 -0
- package/dist/components/WorkCard.d.ts.map +1 -0
- package/dist/components/WorkCard.js +23 -0
- package/dist/components/WorkCard.js.map +1 -0
- package/package.json +1 -1
|
@@ -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;AAa3C,OAAO,KAAK,EAAa,WAAW,EAAmB,MAAM,uBAAuB,CAAA;AAyCpF,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,EAIhB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAiBvD,OAAO,EAEL,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAA;AAY3B,OAAO,KAAK,EAAsB,SAAS,EAAE,MAAM,gCAAgC,CAAA;
|
|
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;AAa3C,OAAO,KAAK,EAAa,WAAW,EAAmB,MAAM,uBAAuB,CAAA;AAyCpF,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,EAIhB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAiBvD,OAAO,EA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,YAAY,EACZ,SAAS,GACV,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAkd9B;yBAhhBe,SAAS"}
|
|
@@ -57,6 +57,7 @@ import { TipCard } from './TipCard.js';
|
|
|
57
57
|
import { readFilePaths, str } from './tool-call-utilities.js';
|
|
58
58
|
import { ToolCallCard } from './ToolCallCard.js';
|
|
59
59
|
import { UserAvatar } from './UserAvatar.js';
|
|
60
|
+
import { WorkCard } from './WorkCard.js';
|
|
60
61
|
const logger = getLogger('chat-panel');
|
|
61
62
|
// Every region the picker can offer: the flag's country code (resolved via the
|
|
62
63
|
// bonded @molecule/app-country-flags set) + the English fallback for its i18n
|
|
@@ -5995,6 +5996,16 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
5995
5996
|
};
|
|
5996
5997
|
const bgCommands = useMemo(() => backgroundTaskCommands(messages), [messages]);
|
|
5997
5998
|
const plan = useMemo(() => latestPlan(messages), [messages]);
|
|
5999
|
+
// Everything about the work in flight shares one card above the composer. The
|
|
6000
|
+
// tests strip also shows for a read-only viewer (watching is not editing); the
|
|
6001
|
+
// files strip does not (committing is editor work). Popups hide the card.
|
|
6002
|
+
const showTests = testsBarVisible && shouldShowTestsBar(testsRun, testsList);
|
|
6003
|
+
const showFiles = canEdit !== false && pendingFiles != null && pendingFiles.length > 0;
|
|
6004
|
+
const workVisible = !commandMenu &&
|
|
6005
|
+
!modelPicker &&
|
|
6006
|
+
!effortPicker &&
|
|
6007
|
+
!panelOverlay &&
|
|
6008
|
+
(plan.length > 0 || backgroundTasks.length > 0 || showTests || showFiles);
|
|
5998
6009
|
// ── Render ─────────────────────────────────────────────────────────────────
|
|
5999
6010
|
const root = (_jsxs("div", { style: {
|
|
6000
6011
|
display: 'flex',
|
|
@@ -6247,7 +6258,7 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
6247
6258
|
pointerEvents: showActivity ? 'auto' : 'none',
|
|
6248
6259
|
transition: 'opacity 0.18s ease-out',
|
|
6249
6260
|
}, children: showActivity && (_jsx(StreamingIndicator, { label: label, tokens: streamingLike ? turnTokens : undefined, startedAt: streamingLike ? turnStartedAt : undefined })) }));
|
|
6250
|
-
})(), _jsx("div", { ref: messagesEndRef })] }),
|
|
6261
|
+
})(), _jsx("div", { ref: messagesEndRef })] }), autoFixCountdown && (_jsxs("div", { className: cm.cn(cm.shrink0, cm.borderT), style: {
|
|
6251
6262
|
display: 'flex',
|
|
6252
6263
|
alignItems: 'center',
|
|
6253
6264
|
gap: 8,
|
|
@@ -7531,127 +7542,116 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
|
|
|
7531
7542
|
}, onMouseLeave: (e) => {
|
|
7532
7543
|
e.currentTarget.style.opacity = '0.7';
|
|
7533
7544
|
e.currentTarget.style.background = 'none';
|
|
7534
|
-
}, 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))) })] })),
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
textAlign: 'left',
|
|
7600
|
-
width: '100%',
|
|
7601
|
-
overflow: 'hidden',
|
|
7602
|
-
whiteSpace: 'nowrap',
|
|
7603
|
-
}, className: cm.textMuted, children: [_jsx("span", { style: { overflow: 'hidden', textOverflow: 'ellipsis' }, children: f.path }), (!!f.additions || !!f.deletions) && (_jsxs("span", { style: { marginLeft: 'auto', flexShrink: 0, fontSize: 10, opacity: 0.8 }, children: [!!f.additions && _jsxs("span", { style: { color: '#3fb950' }, children: ["+", f.additions] }), !!f.additions && !!f.deletions && ' ', !!f.deletions && _jsxs("span", { style: { color: '#f85149' }, children: ["-", f.deletions] })] })), onFileRevert && (_jsx("span", {
|
|
7604
|
-
/* mol-bespoke-button: icon-only per-file revert affordance — 18px (32px coarse) hit box on a dense file row */
|
|
7605
|
-
role: "button", tabIndex: 0, title: t('ide.chat.revertFile', undefined, {
|
|
7606
|
-
defaultValue: 'Revert to last commit',
|
|
7607
|
-
}), onClick: (e) => {
|
|
7608
|
-
e.stopPropagation();
|
|
7609
|
-
// Revert file to last committed state (handles modified, new, and deleted files)
|
|
7610
|
-
http
|
|
7611
|
-
.post(`/projects/${projectId}/git-revert`, { path: f.path })
|
|
7612
|
-
.then(() => {
|
|
7613
|
-
refreshGitStatus();
|
|
7614
|
-
// Refresh editor if the file is open — fetch fresh content for modified/restored,
|
|
7615
|
-
// or close if it was a new file that got deleted
|
|
7616
|
-
if (f.status === 'untracked' || f.status === 'added') {
|
|
7617
|
-
onFileDeleted?.(f.path);
|
|
7618
|
-
}
|
|
7619
|
-
else {
|
|
7620
|
-
// Re-fetch file content from sandbox to update editor
|
|
7545
|
+
}, 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))) })] })), workVisible && (_jsxs(WorkCard, { children: [_jsx(PlanCard, { todos: plan }), _jsx(BackgroundTasksStrip, { tasks: backgroundTasks }), showTests && (_jsx(TestStatusBar, { run: testsRun, tests: testsList, expanded: testsBarExpanded, onToggle: () => setTestsBarExpanded((v) => !v), onOpen: () => openTestsBrowser(''), onStop: testsRun.running ? cancelTestsRun : undefined })), showFiles && pendingFiles != null && (_jsx(DockStrip, { molId: "chat-commit-bar", toggleMolId: "chat-commit-toggle", expanded: commitBarExpanded, onToggle: () => setCommitBarExpanded((v) => !v), label: commitState?.status === 'committed'
|
|
7546
|
+
? stripCommitCoauthorTrailer(commitState.message ?? '')
|
|
7547
|
+
: commitState?.status === 'error'
|
|
7548
|
+
? t('ide.chat.commitFailed')
|
|
7549
|
+
: t('ide.chat.uncommittedFileCount', { count: pendingFiles.length }, { defaultValue: '{{count}} uncommitted files' }), actions: _jsx(_Fragment, { children: isAutoCommitEnabled(autoCommit) &&
|
|
7550
|
+
commitState?.status !== 'committing' &&
|
|
7551
|
+
commitState?.status !== 'committed' ? (_jsx(AutoCommitBadge, { state: autoCommit, disabled: autoCommitHeld, onCommitNow: () => {
|
|
7552
|
+
// Pause the countdown before committing so a due auto-fire
|
|
7553
|
+
// doesn't race the manual commit onto a freshly clean tree
|
|
7554
|
+
// (which would drop a noisy "No changes to commit" card).
|
|
7555
|
+
dispatchAutoCommit({ type: 'fired' });
|
|
7556
|
+
void handleCommit();
|
|
7557
|
+
}, inline: true })) : ((() => {
|
|
7558
|
+
const commitBusy = commitState?.status === 'committing' ||
|
|
7559
|
+
commitState?.status === 'committed' ||
|
|
7560
|
+
autoCommitHeld;
|
|
7561
|
+
return (_jsx("button", { type: "button", "data-mol-id": "chat-commit-button", onClick: (e) => {
|
|
7562
|
+
e.stopPropagation();
|
|
7563
|
+
if (commitBusy)
|
|
7564
|
+
return;
|
|
7565
|
+
handleCommit();
|
|
7566
|
+
}, disabled: commitBusy,
|
|
7567
|
+
// The SAME design-system button as the tests bar's action
|
|
7568
|
+
// one strip above (and as the green AutoCommitBadge that
|
|
7569
|
+
// replaces this one when auto-commit is on) — only the
|
|
7570
|
+
// semantic colour differs. The CVA owns hover/active/focus
|
|
7571
|
+
// and the disabled look, so there is nothing to hand-roll:
|
|
7572
|
+
// this used to be an inline 12px/6px-radius button with
|
|
7573
|
+
// hardcoded rgba(64,112,224,*) and hand-written hover, and
|
|
7574
|
+
// it visibly mismatched the 13px/3px tests-bar button.
|
|
7575
|
+
className: cm.cn(cm.button({ variant: 'solid', color: 'primary', size: 'xs' }), cm.touchTargetCompact), children: commitState?.status === 'committing'
|
|
7576
|
+
? t('ide.chat.committing')
|
|
7577
|
+
: t('ide.chat.commit') }));
|
|
7578
|
+
})()) }), children: _jsx("div", { style: { maxHeight: 200, overflowY: 'auto' }, children: pendingFiles.map((f) => (_jsxs("button", { type: "button", onClick: () => onFileDiff?.(f.path), onMouseEnter: (e) => {
|
|
7579
|
+
// Theme PRIMARY token, not a literal blue — the row sits in
|
|
7580
|
+
// the same bar as the commit button, which is now primary.
|
|
7581
|
+
e.currentTarget.style.color = 'var(--mol-color-primary, #4070e0)';
|
|
7582
|
+
}, onMouseLeave: (e) => {
|
|
7583
|
+
e.currentTarget.style.color = '';
|
|
7584
|
+
}, style: {
|
|
7585
|
+
display: 'flex',
|
|
7586
|
+
alignItems: 'center',
|
|
7587
|
+
gap: 6,
|
|
7588
|
+
background: 'none',
|
|
7589
|
+
border: 'none',
|
|
7590
|
+
padding: '1px 0',
|
|
7591
|
+
// Touch: ~15px rows are untappable — 32px is the floor for
|
|
7592
|
+
// these dense file rows.
|
|
7593
|
+
...(isCoarse ? { minHeight: 32 } : {}),
|
|
7594
|
+
cursor: onFileDiff ? 'pointer' : 'default',
|
|
7595
|
+
fontFamily: "'SF Mono', 'Fira Code', monospace",
|
|
7596
|
+
fontSize: 11,
|
|
7597
|
+
color: 'inherit',
|
|
7598
|
+
opacity: 0.7,
|
|
7599
|
+
textAlign: 'left',
|
|
7600
|
+
width: '100%',
|
|
7601
|
+
overflow: 'hidden',
|
|
7602
|
+
whiteSpace: 'nowrap',
|
|
7603
|
+
}, className: cm.textMuted, children: [_jsx("span", { style: { overflow: 'hidden', textOverflow: 'ellipsis' }, children: f.path }), (!!f.additions || !!f.deletions) && (_jsxs("span", { style: { marginLeft: 'auto', flexShrink: 0, fontSize: 10, opacity: 0.8 }, children: [!!f.additions && (_jsxs("span", { style: { color: '#3fb950' }, children: ["+", f.additions] })), !!f.additions && !!f.deletions && ' ', !!f.deletions && (_jsxs("span", { style: { color: '#f85149' }, children: ["-", f.deletions] }))] })), onFileRevert && (_jsx("span", {
|
|
7604
|
+
/* mol-bespoke-button: icon-only per-file revert affordance — 18px (32px coarse) hit box on a dense file row */
|
|
7605
|
+
role: "button", tabIndex: 0, title: t('ide.chat.revertFile', undefined, {
|
|
7606
|
+
defaultValue: 'Revert to last commit',
|
|
7607
|
+
}), onClick: (e) => {
|
|
7608
|
+
e.stopPropagation();
|
|
7609
|
+
// Revert file to last committed state (handles modified, new, and deleted files)
|
|
7621
7610
|
http
|
|
7622
|
-
.
|
|
7623
|
-
.then((
|
|
7611
|
+
.post(`/projects/${projectId}/git-revert`, { path: f.path })
|
|
7612
|
+
.then(() => {
|
|
7613
|
+
refreshGitStatus();
|
|
7614
|
+
// Refresh editor if the file is open — fetch fresh content for modified/restored,
|
|
7615
|
+
// or close if it was a new file that got deleted
|
|
7616
|
+
if (f.status === 'untracked' || f.status === 'added') {
|
|
7617
|
+
onFileDeleted?.(f.path);
|
|
7618
|
+
}
|
|
7619
|
+
else {
|
|
7620
|
+
// Re-fetch file content from sandbox to update editor
|
|
7621
|
+
http
|
|
7622
|
+
.get(`/projects/${projectId}/files/${f.path}`)
|
|
7623
|
+
.then((res) => onFileChange?.(f.path, res.data.content))
|
|
7624
|
+
.catch(() => {
|
|
7625
|
+
/* ignore */
|
|
7626
|
+
});
|
|
7627
|
+
}
|
|
7628
|
+
})
|
|
7624
7629
|
.catch(() => {
|
|
7625
7630
|
/* ignore */
|
|
7626
7631
|
});
|
|
7627
|
-
}
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
cursor: 'pointer',
|
|
7651
|
-
opacity: 0.5,
|
|
7652
|
-
transition: 'opacity 100ms, background 100ms',
|
|
7653
|
-
...(!(f.additions || f.deletions) ? { marginLeft: 'auto' } : {}),
|
|
7654
|
-
}, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", width: "12", height: "12", fill: "currentColor", children: _jsx("path", { d: "M1.22 6.28a.749.749 0 0 1 0-1.06l3.5-3.5a.749.749 0 1 1 1.06 1.06L3.561 5h7.188l.001.007L10.749 5c.058 0 .116.007.171.019A4.501 4.501 0 0 1 10.5 14H8.796a.75.75 0 0 1 0-1.5H10.5a3 3 0 1 0 0-6H3.561L5.78 8.72a.749.749 0 1 1-1.06 1.06l-3.5-3.5Z" }) }) }))] }, f.path))) }) })), _jsxs("div", { className: cm.surfaceSecondary, ...(canEdit === false ? { 'data-mol-viewer': '' } : {}), style: {
|
|
7632
|
+
}, onKeyDown: (e) => {
|
|
7633
|
+
if (e.key === 'Enter' || e.key === ' ')
|
|
7634
|
+
e.currentTarget.click();
|
|
7635
|
+
}, onMouseEnter: (e) => {
|
|
7636
|
+
e.currentTarget.style.background = 'rgba(128,128,128,0.2)';
|
|
7637
|
+
e.currentTarget.style.opacity = '1';
|
|
7638
|
+
}, onMouseLeave: (e) => {
|
|
7639
|
+
e.currentTarget.style.background = 'transparent';
|
|
7640
|
+
e.currentTarget.style.opacity = '0.5';
|
|
7641
|
+
}, style: {
|
|
7642
|
+
display: 'inline-flex',
|
|
7643
|
+
alignItems: 'center',
|
|
7644
|
+
justifyContent: 'center',
|
|
7645
|
+
// Touch: 32px hit box (dense-row floor); glyph unchanged.
|
|
7646
|
+
width: isCoarse ? 32 : 18,
|
|
7647
|
+
height: isCoarse ? 32 : 18,
|
|
7648
|
+
borderRadius: 3,
|
|
7649
|
+
flexShrink: 0,
|
|
7650
|
+
cursor: 'pointer',
|
|
7651
|
+
opacity: 0.5,
|
|
7652
|
+
transition: 'opacity 100ms, background 100ms',
|
|
7653
|
+
...(!(f.additions || f.deletions) ? { marginLeft: 'auto' } : {}),
|
|
7654
|
+
}, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", width: "12", height: "12", fill: "currentColor", children: _jsx("path", { d: "M1.22 6.28a.749.749 0 0 1 0-1.06l3.5-3.5a.749.749 0 1 1 1.06 1.06L3.561 5h7.188l.001.007L10.749 5c.058 0 .116.007.171.019A4.501 4.501 0 0 1 10.5 14H8.796a.75.75 0 0 1 0-1.5H10.5a3 3 0 1 0 0-6H3.561L5.78 8.72a.749.749 0 1 1-1.06 1.06l-3.5-3.5Z" }) }) }))] }, f.path))) }) }))] })), _jsxs("div", { className: cm.surfaceSecondary, ...(canEdit === false ? { 'data-mol-viewer': '' } : {}), style: {
|
|
7655
7655
|
// Round the TOP corners only (8px) so the composer reads as a self-contained
|
|
7656
7656
|
// input with its own border on all sides, flush at the bottom-left/right with
|
|
7657
7657
|
// the panel's bottom edge. Discovery rounds ALL FOUR corners (the centered
|