@molecule/app-ide-react 1.20.1 → 1.20.2
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/BackgroundTasksStrip.d.ts +6 -3
- package/dist/components/BackgroundTasksStrip.d.ts.map +1 -1
- package/dist/components/BackgroundTasksStrip.js +18 -10
- package/dist/components/BackgroundTasksStrip.js.map +1 -1
- package/dist/components/ChatPanel.d.ts.map +1 -1
- package/dist/components/ChatPanel.js +111 -131
- package/dist/components/ChatPanel.js.map +1 -1
- package/dist/components/DockStrip.d.ts +55 -0
- package/dist/components/DockStrip.d.ts.map +1 -0
- package/dist/components/DockStrip.js +90 -0
- package/dist/components/DockStrip.js.map +1 -0
- package/dist/components/PlanCard.d.ts +26 -0
- package/dist/components/PlanCard.d.ts.map +1 -0
- package/dist/components/PlanCard.js +58 -0
- package/dist/components/PlanCard.js.map +1 -0
- package/dist/components/TestStatusBar.d.ts.map +1 -1
- package/dist/components/TestStatusBar.js +13 -42
- package/dist/components/TestStatusBar.js.map +1 -1
- package/dist/components/ToolCallCard.d.ts.map +1 -1
- package/dist/components/ToolCallCard.js +22 -47
- package/dist/components/ToolCallCard.js.map +1 -1
- package/dist/components/tool-call-utilities.d.ts.map +1 -1
- package/dist/components/tool-call-utilities.js +7 -0
- package/dist/components/tool-call-utilities.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The strips stacked above the composer — working plan, background tasks, tests,
|
|
3
|
+
* uncommitted files — are one family. {@link DockStrip} is their shared chrome
|
|
4
|
+
* (hairline top border, chevron, muted label, right-hand actions, indented
|
|
5
|
+
* detail) and {@link StatusMark} is their shared status icon, so they cannot
|
|
6
|
+
* drift apart.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { JSX, ReactNode } from 'react';
|
|
11
|
+
/** The states a strip row can be in. */
|
|
12
|
+
export type StatusMarkState = 'done' | 'active' | 'todo' | 'failed';
|
|
13
|
+
/**
|
|
14
|
+
* One status icon for every strip row: the landing page's green check circle
|
|
15
|
+
* when done, the platform's molecule spinner while active, a red crossed circle
|
|
16
|
+
* when failed, an empty ring when still to do.
|
|
17
|
+
* @param props - Component props.
|
|
18
|
+
* @param props.state - The row's state.
|
|
19
|
+
* @param props.size - Pixel size (default 16).
|
|
20
|
+
* @returns The icon.
|
|
21
|
+
*/
|
|
22
|
+
export declare function StatusMark({ state, size, }: {
|
|
23
|
+
state: StatusMarkState;
|
|
24
|
+
size?: number;
|
|
25
|
+
}): JSX.Element;
|
|
26
|
+
/** Props for {@link DockStrip}. */
|
|
27
|
+
export interface DockStripProps {
|
|
28
|
+
/** `data-mol-id` of the strip root. */
|
|
29
|
+
molId: string;
|
|
30
|
+
/** `data-mol-id` of the clickable header row. */
|
|
31
|
+
toggleMolId?: string;
|
|
32
|
+
/** Whether the detail is shown. */
|
|
33
|
+
expanded: boolean;
|
|
34
|
+
/** Toggle the detail. */
|
|
35
|
+
onToggle: () => void;
|
|
36
|
+
/** Leading icon, before the label. */
|
|
37
|
+
icon?: ReactNode;
|
|
38
|
+
/** The strip's one-line summary. */
|
|
39
|
+
label: ReactNode;
|
|
40
|
+
/** Quieter text after the label (the thing in flight). */
|
|
41
|
+
hint?: ReactNode;
|
|
42
|
+
/** Right-hand readout and action buttons; clicks must stop propagation. */
|
|
43
|
+
actions?: ReactNode;
|
|
44
|
+
/** Extra attributes for the root (e.g. a tone `data-*`). */
|
|
45
|
+
rootProps?: Record<string, string>;
|
|
46
|
+
/** The detail shown when expanded. */
|
|
47
|
+
children?: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Shared chrome for the strips above the composer.
|
|
51
|
+
* @param props - See {@link DockStripProps}.
|
|
52
|
+
* @returns The strip.
|
|
53
|
+
*/
|
|
54
|
+
export declare function DockStrip({ molId, toggleMolId, expanded, onToggle, icon, label, hint, actions, rootProps, children, }: DockStripProps): JSX.Element;
|
|
55
|
+
//# sourceMappingURL=DockStrip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockStrip.d.ts","sourceRoot":"","sources":["../../src/components/DockStrip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAS3C,wCAAwC;AACxC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEnE;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAgB,GACjB,EAAE;IACD,KAAK,EAAE,eAAe,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,GAAG,CAAC,OAAO,CAoEd;AAED,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAA;IACjB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,sCAAsC;IACtC,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,oCAAoC;IACpC,KAAK,EAAE,SAAS,CAAA;IAChB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,sCAAsC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,GACT,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAsF9B"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { useThemeMode } from '@molecule/app-react';
|
|
4
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
5
|
+
import { moleculeSpinnerMarkSvg } from '@molecule/app-ui';
|
|
6
|
+
const MARK_SIZE = 16;
|
|
7
|
+
/**
|
|
8
|
+
* One status icon for every strip row: the landing page's green check circle
|
|
9
|
+
* when done, the platform's molecule spinner while active, a red crossed circle
|
|
10
|
+
* when failed, an empty ring when still to do.
|
|
11
|
+
* @param props - Component props.
|
|
12
|
+
* @param props.state - The row's state.
|
|
13
|
+
* @param props.size - Pixel size (default 16).
|
|
14
|
+
* @returns The icon.
|
|
15
|
+
*/
|
|
16
|
+
export function StatusMark({ state, size = MARK_SIZE, }) {
|
|
17
|
+
const isLight = useThemeMode() === 'light';
|
|
18
|
+
const gradientId = `mol-mark-spinner-${useId().replace(/[:]/g, '')}`;
|
|
19
|
+
if (state === 'active') {
|
|
20
|
+
return (_jsx("span", { "aria-hidden": true, style: { display: 'inline-flex', flexShrink: 0 }, dangerouslySetInnerHTML: { __html: moleculeSpinnerMarkSvg({ size, gradientId }) } }));
|
|
21
|
+
}
|
|
22
|
+
if (state === 'todo') {
|
|
23
|
+
return (_jsx("span", { "aria-hidden": true, style: {
|
|
24
|
+
display: 'inline-block',
|
|
25
|
+
flexShrink: 0,
|
|
26
|
+
boxSizing: 'border-box',
|
|
27
|
+
width: size,
|
|
28
|
+
height: size,
|
|
29
|
+
borderRadius: '50%',
|
|
30
|
+
border: `1.5px solid ${isLight ? '#afb8c1' : '#6e7681'}`,
|
|
31
|
+
} }));
|
|
32
|
+
}
|
|
33
|
+
const failed = state === 'failed';
|
|
34
|
+
const ink = failed ? (isLight ? '#cf222e' : '#f47067') : isLight ? '#1e7a00' : '#5bb98c';
|
|
35
|
+
const tint = failed
|
|
36
|
+
? isLight
|
|
37
|
+
? 'rgba(207, 34, 46, 0.1)'
|
|
38
|
+
: 'rgba(244, 112, 103, 0.16)'
|
|
39
|
+
: isLight
|
|
40
|
+
? 'rgba(30, 122, 0, 0.12)'
|
|
41
|
+
: 'rgba(91, 185, 140, 0.16)';
|
|
42
|
+
return (_jsx("span", { "aria-hidden": true, style: {
|
|
43
|
+
display: 'inline-flex',
|
|
44
|
+
flexShrink: 0,
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
boxSizing: 'border-box',
|
|
48
|
+
width: size,
|
|
49
|
+
height: size,
|
|
50
|
+
borderRadius: '50%',
|
|
51
|
+
border: `1px solid ${ink}`,
|
|
52
|
+
color: ink,
|
|
53
|
+
background: tint,
|
|
54
|
+
}, children: _jsx("svg", { width: size * 0.56, height: size * 0.56, viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: failed ? 'M2.5 2.5 7.5 7.5M7.5 2.5 2.5 7.5' : 'M2 5.2 4 7.2 8 3' }) }) }));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Shared chrome for the strips above the composer.
|
|
58
|
+
* @param props - See {@link DockStripProps}.
|
|
59
|
+
* @returns The strip.
|
|
60
|
+
*/
|
|
61
|
+
export function DockStrip({ molId, toggleMolId, expanded, onToggle, icon, label, hint, actions, rootProps, children, }) {
|
|
62
|
+
const cm = getClassMap();
|
|
63
|
+
return (_jsxs("div", { "data-mol-id": molId, ...rootProps, style: { borderTop: '1px solid rgba(128,128,128,0.15)', padding: '8px 8px 8px 10px' }, children: [_jsxs("div", { role: "button", tabIndex: 0, "data-mol-id": toggleMolId, "aria-expanded": expanded, onClick: onToggle, onKeyDown: (e) => {
|
|
64
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
onToggle();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
/* mol-bespoke-button: the strip's HEADER ROW — chevron, label and
|
|
70
|
+
actions on one disclosure line; its real buttons are the actions. */
|
|
71
|
+
style: {
|
|
72
|
+
display: 'flex',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
justifyContent: 'space-between',
|
|
75
|
+
gap: 8,
|
|
76
|
+
cursor: 'pointer',
|
|
77
|
+
}, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6, minWidth: 0 }, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", width: "12", height: "12", "aria-hidden": true, style: {
|
|
78
|
+
transform: expanded ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
79
|
+
transition: 'transform 120ms',
|
|
80
|
+
opacity: 0.5,
|
|
81
|
+
flexShrink: 0,
|
|
82
|
+
}, children: _jsx("path", { d: "M6 4l4 4-4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), icon, _jsx("span", { className: cm.cn(cm.textMuted, cm.textSize('xs')), style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }, children: label }), hint ? (_jsx("span", { className: cm.cn(cm.textMuted, cm.textSize('xs')), style: {
|
|
83
|
+
opacity: 0.75,
|
|
84
|
+
whiteSpace: 'nowrap',
|
|
85
|
+
overflow: 'hidden',
|
|
86
|
+
textOverflow: 'ellipsis',
|
|
87
|
+
minWidth: 0,
|
|
88
|
+
}, children: hint })) : null] }), actions ? (_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 6, flexShrink: 0 }, children: actions })) : null] }), expanded && children ? (_jsx("div", { style: { marginTop: 6, paddingLeft: 18 }, children: children })) : null] }));
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=DockStrip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACjD,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,YAE5E,KAAK,GACD,EACN,IAAI,CAAC,CAAC,CAAC,CACN,eACE,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACjD,KAAK,EAAE;oCACL,OAAO,EAAE,IAAI;oCACb,UAAU,EAAE,QAAQ;oCACpB,QAAQ,EAAE,QAAQ;oCAClB,YAAY,EAAE,UAAU;oCACxB,QAAQ,EAAE,CAAC;iCACZ,YAEA,IAAI,GACA,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,CAAC,CAAC,CAAC,CACT,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,YACzE,OAAO,GACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CACtB,cAAK,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,YAAG,QAAQ,GAAO,CAChE,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import { type TaskListRow } from './tool-call-utilities.js';
|
|
3
|
+
/**
|
|
4
|
+
* The working plan, one of the strips above the composer. It is not part of the
|
|
5
|
+
* transcript: every `update_task_list` call re-draws this one strip instead of
|
|
6
|
+
* adding a new card to the chat.
|
|
7
|
+
* @param props - Component props.
|
|
8
|
+
* @param props.todos - The latest task list.
|
|
9
|
+
* @returns The plan strip, or nothing when the list is empty.
|
|
10
|
+
*/
|
|
11
|
+
export declare function PlanCard({ todos }: {
|
|
12
|
+
todos: ReadonlyArray<TaskListRow>;
|
|
13
|
+
}): JSX.Element | null;
|
|
14
|
+
/**
|
|
15
|
+
* The latest plan in a transcript: the most recent `update_task_list` call's
|
|
16
|
+
* task list, which replaces the earlier ones.
|
|
17
|
+
* @param messages - The transcript's messages (only their tool calls are read).
|
|
18
|
+
* @returns The latest task list, or an empty list when there is none.
|
|
19
|
+
*/
|
|
20
|
+
export declare function latestPlan(messages: ReadonlyArray<{
|
|
21
|
+
toolCalls?: ReadonlyArray<{
|
|
22
|
+
name?: string;
|
|
23
|
+
input?: unknown;
|
|
24
|
+
}>;
|
|
25
|
+
}>): TaskListRow[];
|
|
26
|
+
//# sourceMappingURL=PlanCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanCard.d.ts","sourceRoot":"","sources":["../../src/components/PlanCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAOhC,OAAO,EAA0B,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAQnF;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAyD7F;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAC9D,CAAC,GACD,WAAW,EAAE,CAUf"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { t } from '@molecule/app-i18n';
|
|
4
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
5
|
+
import { DockStrip, StatusMark } from './DockStrip.js';
|
|
6
|
+
import { normalizeTaskListInput } from './tool-call-utilities.js';
|
|
7
|
+
const MARK = {
|
|
8
|
+
completed: 'done',
|
|
9
|
+
in_progress: 'active',
|
|
10
|
+
pending: 'todo',
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The working plan, one of the strips above the composer. It is not part of the
|
|
14
|
+
* transcript: every `update_task_list` call re-draws this one strip instead of
|
|
15
|
+
* adding a new card to the chat.
|
|
16
|
+
* @param props - Component props.
|
|
17
|
+
* @param props.todos - The latest task list.
|
|
18
|
+
* @returns The plan strip, or nothing when the list is empty.
|
|
19
|
+
*/
|
|
20
|
+
export function PlanCard({ todos }) {
|
|
21
|
+
const cm = getClassMap();
|
|
22
|
+
const [expanded, setExpanded] = useState(true);
|
|
23
|
+
if (todos.length === 0)
|
|
24
|
+
return null;
|
|
25
|
+
const completed = todos.filter((todo) => todo.status === 'completed').length;
|
|
26
|
+
const current = todos.find((todo) => todo.status === 'in_progress');
|
|
27
|
+
return (_jsx(DockStrip, { molId: "task-list-card", toggleMolId: "task-list-toggle", expanded: expanded, onToggle: () => setExpanded((open) => !open), label: t('ide.chat.taskListTitle', undefined, { defaultValue: 'Working plan' }), hint: !expanded && current ? `· ${current.content}` : undefined, actions: _jsx("span", { className: cm.cn(cm.textMuted, cm.textSize('xs')), style: { whiteSpace: 'nowrap' }, children: t('ide.chat.taskListProgress', { done: completed, total: todos.length }, { defaultValue: '{{done}} of {{total}} done' }) }), children: _jsx("div", { style: { maxHeight: '168px', overflowY: 'auto' }, children: todos.map((todo, i) => (_jsxs("div", { "data-mol-id": "task-list-row", className: cm.textSize('xs'), style: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
alignItems: 'flex-start',
|
|
30
|
+
gap: 8,
|
|
31
|
+
padding: '3px 0',
|
|
32
|
+
...(todo.status === 'completed' ? { opacity: 0.55 } : {}),
|
|
33
|
+
}, children: [_jsx("span", { style: { flexShrink: 0, display: 'inline-flex', paddingTop: 1 }, children: _jsx(StatusMark, { state: MARK[todo.status] }) }), _jsx("span", { style: {
|
|
34
|
+
flex: 1,
|
|
35
|
+
minWidth: 0,
|
|
36
|
+
...(todo.status === 'completed' ? { textDecoration: 'line-through' } : {}),
|
|
37
|
+
}, children: todo.content })] }, i))) }) }));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The latest plan in a transcript: the most recent `update_task_list` call's
|
|
41
|
+
* task list, which replaces the earlier ones.
|
|
42
|
+
* @param messages - The transcript's messages (only their tool calls are read).
|
|
43
|
+
* @returns The latest task list, or an empty list when there is none.
|
|
44
|
+
*/
|
|
45
|
+
export function latestPlan(messages) {
|
|
46
|
+
for (let m = messages.length - 1; m >= 0; m--) {
|
|
47
|
+
const calls = messages[m].toolCalls ?? [];
|
|
48
|
+
for (let c = calls.length - 1; c >= 0; c--) {
|
|
49
|
+
if (calls[c].name !== 'update_task_list')
|
|
50
|
+
continue;
|
|
51
|
+
const rows = normalizeTaskListInput(calls[c].input);
|
|
52
|
+
if (rows.length > 0)
|
|
53
|
+
return rows;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=PlanCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanCard.js","sourceRoot":"","sources":["../../src/components/PlanCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAoB,MAAM,0BAA0B,CAAA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C,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAA;QACzC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3C,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,kBAAkB;gBAAE,SAAQ;YAClD,MAAM,IAAI,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;YACnD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,IAAI,CAAA;QAClC,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestStatusBar.d.ts","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAKhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"TestStatusBar.d.ts","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAKhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,0BAA0B,CAAA;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAY9D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA0C9D;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,GAAG,EAAE,aAAa,CAAA;IAClB,iEAAiE;IACjE,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,sCAAsC;IACtC,QAAQ,EAAE,OAAO,CAAA;IACjB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,mDAAmD;IACnD,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAuHlC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { t } from '@molecule/app-i18n';
|
|
3
3
|
import { getClassMap } from '@molecule/app-ui';
|
|
4
|
+
import { DockStrip } from './DockStrip.js';
|
|
4
5
|
import { summariseTestsBar } from './tests-bar-utilities.js';
|
|
5
6
|
/** The theme token each tone paints its dot and figures with. */
|
|
6
7
|
const TONE_COLOR = {
|
|
@@ -55,46 +56,16 @@ export function TestStatusBar({ run, tests, expanded, onToggle, onOpen, onStop,
|
|
|
55
56
|
const summary = summariseTestsBar(run, tests);
|
|
56
57
|
const hasResults = summary.passed + summary.failed + summary.skipped > 0;
|
|
57
58
|
const label = testsBarLabel(summary);
|
|
58
|
-
return (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
justifyContent: 'space-between',
|
|
70
|
-
cursor: 'pointer',
|
|
71
|
-
}, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4, minWidth: 0 }, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", width: "12", height: "12", style: {
|
|
72
|
-
transform: expanded ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
73
|
-
transition: 'transform 120ms',
|
|
74
|
-
opacity: 0.5,
|
|
75
|
-
flexShrink: 0,
|
|
76
|
-
}, children: _jsx("path", { d: "M6 4l4 4-4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), _jsx("span", { "data-mol-id": "tests-bar-label", className: cm.cn(cm.textMuted, cm.textSize('xs')), style: {
|
|
77
|
-
whiteSpace: 'nowrap',
|
|
78
|
-
overflow: 'hidden',
|
|
79
|
-
textOverflow: 'ellipsis',
|
|
80
|
-
}, children: label }), summary.tone === 'running' && (summary.currentTest ?? summary.currentFile) ? (_jsx("span", { "data-mol-id": "tests-bar-current", className: cm.cn(cm.textMuted, cm.textSize('xs')), style: {
|
|
81
|
-
opacity: 0.75,
|
|
82
|
-
whiteSpace: 'nowrap',
|
|
83
|
-
overflow: 'hidden',
|
|
84
|
-
textOverflow: 'ellipsis',
|
|
85
|
-
minWidth: 0,
|
|
86
|
-
}, children: `· ${summary.currentTest ?? summary.currentFile}` })) : null] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6, flexShrink: 0 }, children: [hasResults ? (_jsxs("span", { "data-mol-id": "tests-bar-counts", className: cm.textSize('xs'), role: "img", "aria-label": t('ide.testsBar.counts', { passed: summary.passed, failed: summary.failed, skipped: summary.skipped }, { defaultValue: '{{passed}} passing, {{failed}} failing, {{skipped}} skipped' }), style: { fontWeight: 600, whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums' }, children: [_jsx("span", { style: { color: TONE_COLOR.passing }, children: summary.passed }), _jsx("span", { style: { opacity: 0.4 }, children: ' / ' }), _jsx("span", { style: { color: TONE_COLOR.failing }, children: summary.failed }), _jsx("span", { style: { opacity: 0.4 }, children: ' / ' }), _jsx("span", { style: { color: TONE_COLOR.stopped }, children: summary.skipped })] })) : null, run.running && onStop ? (_jsx("button", { type: "button", "data-mol-id": "tests-bar-stop", className: cm.cn(cm.button({ variant: 'solid', color: 'error', size: 'xs' }), cm.touchTargetCompact), onClick: (e) => {
|
|
87
|
-
e.stopPropagation();
|
|
88
|
-
onStop();
|
|
89
|
-
}, children: t('ide.testsBar.stop', undefined, { defaultValue: 'Stop' }) })) : (_jsx("button", { type: "button", "data-mol-id": "tests-bar-open", className: cm.cn(cm.button({ variant: 'solid', color: 'primary', size: 'xs' }), cm.touchTargetCompact), onClick: (e) => {
|
|
90
|
-
e.stopPropagation();
|
|
91
|
-
onOpen();
|
|
92
|
-
}, children: t('ide.testsBar.open', undefined, { defaultValue: 'Tests' }) }))] })] }), expanded ? (_jsxs("div", { "data-mol-id": "tests-bar-detail", className: cm.cn(cm.textMuted, cm.textSize('xs')), style: {
|
|
93
|
-
marginTop: 6,
|
|
94
|
-
paddingLeft: 16,
|
|
95
|
-
display: 'flex',
|
|
96
|
-
flexDirection: 'column',
|
|
97
|
-
gap: 2,
|
|
98
|
-
}, children: [_jsxs("div", { style: { display: 'flex', gap: 12, flexWrap: 'wrap' }, children: [_jsxs("span", { "data-mol-id": "tests-bar-passed", children: [_jsx("span", { style: { color: TONE_COLOR.passing, fontWeight: 600 }, children: summary.passed }), ' ', t('ide.testsBar.passedLabel', undefined, { defaultValue: 'passing' })] }), _jsxs("span", { "data-mol-id": "tests-bar-failed", children: [_jsx("span", { style: { color: TONE_COLOR.failing, fontWeight: 600 }, children: summary.failed }), ' ', t('ide.testsBar.failedLabel', undefined, { defaultValue: 'failing' })] }), _jsxs("span", { "data-mol-id": "tests-bar-skipped", children: [_jsx("span", { style: { color: TONE_COLOR.stopped, fontWeight: 600 }, children: summary.skipped }), ' ', t('ide.testsBar.skippedLabel', undefined, { defaultValue: 'skipped' })] }), summary.tone === 'running' ? (_jsxs("span", { "data-mol-id": "tests-bar-remaining", children: [_jsx("span", { style: { color: TONE_COLOR.running, fontWeight: 600 }, children: summary.remaining }), ' ', t('ide.testsBar.remainingLabel', undefined, { defaultValue: 'to go' })] })) : null] }), summary.currentFile ? (_jsxs("div", { "data-mol-id": "tests-bar-current-file", children: [t('ide.testsBar.currentFile', { file: summary.currentFile }, { defaultValue: 'Running {{file}}' }), summary.currentTest ? ` › ${summary.currentTest}` : ''] })) : null, run.error ? _jsx("div", { "data-mol-id": "tests-bar-error", children: run.error }) : null] })) : null] }));
|
|
59
|
+
return (_jsx(DockStrip, { molId: "tests-bar", toggleMolId: "tests-bar-toggle", rootProps: { 'data-tests-tone': summary.tone }, expanded: expanded, onToggle: onToggle, label: _jsx("span", { "data-mol-id": "tests-bar-label", children: label }), hint: summary.tone === 'running' && (summary.currentTest ?? summary.currentFile) ? (_jsx("span", { "data-mol-id": "tests-bar-current", children: `· ${summary.currentTest ?? summary.currentFile}` })) : undefined, actions: _jsxs(_Fragment, { children: [hasResults ? (_jsxs("span", { "data-mol-id": "tests-bar-counts", className: cm.textSize('xs'), role: "img", "aria-label": t('ide.testsBar.counts', { passed: summary.passed, failed: summary.failed, skipped: summary.skipped }, { defaultValue: '{{passed}} passing, {{failed}} failing, {{skipped}} skipped' }), style: { fontWeight: 600, whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums' }, children: [_jsx("span", { style: { color: TONE_COLOR.passing }, children: summary.passed }), _jsx("span", { style: { opacity: 0.4 }, children: ' / ' }), _jsx("span", { style: { color: TONE_COLOR.failing }, children: summary.failed }), _jsx("span", { style: { opacity: 0.4 }, children: ' / ' }), _jsx("span", { style: { color: TONE_COLOR.stopped }, children: summary.skipped })] })) : null, run.running && onStop ? (_jsx("button", { type: "button", "data-mol-id": "tests-bar-stop", className: cm.cn(cm.button({ variant: 'solid', color: 'error', size: 'xs' }), cm.touchTargetCompact), onClick: (e) => {
|
|
60
|
+
e.stopPropagation();
|
|
61
|
+
onStop();
|
|
62
|
+
}, children: t('ide.testsBar.stop', undefined, { defaultValue: 'Stop' }) })) : (_jsx("button", { type: "button", "data-mol-id": "tests-bar-open", className: cm.cn(cm.button({ variant: 'solid', color: 'primary', size: 'xs' }), cm.touchTargetCompact), onClick: (e) => {
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
onOpen();
|
|
65
|
+
}, children: t('ide.testsBar.open', undefined, { defaultValue: 'Tests' }) }))] }), children: _jsxs("div", { "data-mol-id": "tests-bar-detail", className: cm.cn(cm.textMuted, cm.textSize('xs')), style: {
|
|
66
|
+
display: 'flex',
|
|
67
|
+
flexDirection: 'column',
|
|
68
|
+
gap: 2,
|
|
69
|
+
}, children: [_jsxs("div", { style: { display: 'flex', gap: 12, flexWrap: 'wrap' }, children: [_jsxs("span", { "data-mol-id": "tests-bar-passed", children: [_jsx("span", { style: { color: TONE_COLOR.passing, fontWeight: 600 }, children: summary.passed }), ' ', t('ide.testsBar.passedLabel', undefined, { defaultValue: 'passing' })] }), _jsxs("span", { "data-mol-id": "tests-bar-failed", children: [_jsx("span", { style: { color: TONE_COLOR.failing, fontWeight: 600 }, children: summary.failed }), ' ', t('ide.testsBar.failedLabel', undefined, { defaultValue: 'failing' })] }), _jsxs("span", { "data-mol-id": "tests-bar-skipped", children: [_jsx("span", { style: { color: TONE_COLOR.stopped, fontWeight: 600 }, children: summary.skipped }), ' ', t('ide.testsBar.skippedLabel', undefined, { defaultValue: 'skipped' })] }), summary.tone === 'running' ? (_jsxs("span", { "data-mol-id": "tests-bar-remaining", children: [_jsx("span", { style: { color: TONE_COLOR.running, fontWeight: 600 }, children: summary.remaining }), ' ', t('ide.testsBar.remainingLabel', undefined, { defaultValue: 'to go' })] })) : null] }), summary.currentFile ? (_jsxs("div", { "data-mol-id": "tests-bar-current-file", children: [t('ide.testsBar.currentFile', { file: summary.currentFile }, { defaultValue: 'Running {{file}}' }), summary.currentTest ? ` › ${summary.currentTest}` : ''] })) : null, run.error ? _jsx("div", { "data-mol-id": "tests-bar-error", children: run.error }) : null] }) }));
|
|
99
70
|
}
|
|
100
71
|
//# sourceMappingURL=TestStatusBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestStatusBar.js","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"TestStatusBar.js","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAG5D,iEAAiE;AACjE,MAAM,UAAU,GAAiC;IAC/C,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,mCAAmC;IAC5C,OAAO,EAAE,iCAAiC;IAC1C,OAAO,EAAE,mCAAmC;IAC5C,KAAK,EAAE,iCAAiC;CACzC,CAAA;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,OAAwB;IACpD,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;IACjD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,OAAO,CAAC,SAAS,GAAG,CAAC;YAC1B,CAAC,CAAC,CAAC,CACC,sBAAsB,EACtB,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,EAChC,EAAE,YAAY,EAAE,qCAAqC,EAAE,CACxD;YACH,CAAC,CAAC,CAAC,C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,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAC5B,+BAAkB,qBAAqB,aACrC,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,YACxD,OAAO,CAAC,SAAS,GACb,EAAC,GAAG,EACV,CAAC,CAAC,6BAA6B,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,IAClE,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CACrB,8BAAiB,wBAAwB,aACtC,CAAC,CACA,0BAA0B,EAC1B,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,EAC7B,EAAE,YAAY,EAAE,kBAAkB,EAAE,CACrC,EACA,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,IACnD,CACP,CAAC,CAAC,CAAC,IAAI,EACP,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,6BAAiB,iBAAiB,YAAE,GAAG,CAAC,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,IACpE,GACI,CACb,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallCard.d.ts","sourceRoot":"","sources":["../../src/components/ToolCallCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,OAAO,CAAA;AAQ3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"ToolCallCard.d.ts","sourceRoot":"","sources":["../../src/components/ToolCallCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,OAAO,CAAA;AAQ3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAyoBpD;;;;GAIG;AACH,eAAO,MAAM,YAAY,gPAiBtB,iBAAiB,KAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAk7CvC,CAAA"}
|
|
@@ -6,8 +6,7 @@ import { getClassMap } from '@molecule/app-ui';
|
|
|
6
6
|
import { useCoarsePointer, useNarrowViewport } from '../hooks/useViewport.js';
|
|
7
7
|
import { BackgroundTaskCommandsContext } from './background-task-context.js';
|
|
8
8
|
import { MarkdownContent } from './MarkdownContent.js';
|
|
9
|
-
import {
|
|
10
|
-
import { basename, extractFilePath, fileDiffStats, interruptedByRestartLine, isInterruptedByRestart, isSkippedByUser, moleculeDocPath, normalizeAskUserInput, normalizeTaskListInput, num, parseJudgeVerdict, readFileLabelEntries, str, subagentErrorLine, toolLabel, toolSummary, } from './tool-call-utilities.js';
|
|
9
|
+
import { basename, extractFilePath, fileDiffStats, interruptedByRestartLine, isInterruptedByRestart, isSkippedByUser, moleculeDocPath, normalizeAskUserInput, num, parseJudgeVerdict, readFileLabelEntries, str, subagentErrorLine, toolLabel, toolSummary, } from './tool-call-utilities.js';
|
|
11
10
|
/**
|
|
12
11
|
* Normalize a model-authored string for display: models sometimes double-escape
|
|
13
12
|
* tool arguments, so a literal "\n"/"\t"/"\r" (backslash + letter) ends up in
|
|
@@ -157,6 +156,15 @@ const PRE = {
|
|
|
157
156
|
fontSize: '11px',
|
|
158
157
|
lineHeight: 1.5,
|
|
159
158
|
};
|
|
159
|
+
// A shell command or its output is read whole: wrap it instead of scrolling sideways,
|
|
160
|
+
// and cap tall output with a vertical scroll.
|
|
161
|
+
const WRAP_PRE = {
|
|
162
|
+
...PRE,
|
|
163
|
+
whiteSpace: 'pre-wrap',
|
|
164
|
+
overflowWrap: 'anywhere',
|
|
165
|
+
overflowX: 'visible',
|
|
166
|
+
};
|
|
167
|
+
const OUTPUT_PRE = { ...WRAP_PRE, maxHeight: '320px', overflowY: 'auto' };
|
|
160
168
|
/**
|
|
161
169
|
* Render the input section for a tool call.
|
|
162
170
|
* @param name - The tool name.
|
|
@@ -167,7 +175,7 @@ function renderIn(name, input) {
|
|
|
167
175
|
const inp = (input ?? {});
|
|
168
176
|
switch (name) {
|
|
169
177
|
case 'exec_command':
|
|
170
|
-
return (_jsxs("pre", { style:
|
|
178
|
+
return (_jsxs("pre", { style: WRAP_PRE, children: [_jsx("span", { style: { opacity: 0.5 }, children: "$ " }), str(inp.command) ?? ''] }));
|
|
171
179
|
case 'write_file':
|
|
172
180
|
// Full file content is too noisy — show only the path
|
|
173
181
|
return _jsx("pre", { style: PRE, children: str(inp.path) ?? '' });
|
|
@@ -238,7 +246,7 @@ function renderOut(name, output) {
|
|
|
238
246
|
const stdout = (str(out.stdout) ?? '').trimEnd();
|
|
239
247
|
const stderr = (str(out.stderr) ?? '').trimEnd();
|
|
240
248
|
const exitCode = num(out.exitCode);
|
|
241
|
-
return (_jsxs("div", { children: [stdout && _jsx("pre", { style:
|
|
249
|
+
return (_jsxs("div", { children: [stdout && _jsx("pre", { style: OUTPUT_PRE, children: stdout }), stderr && (_jsx("pre", { style: { ...OUTPUT_PRE, color: '#f47067', marginTop: stdout ? '4px' : 0 }, children: stderr })), exitCode != null && exitCode !== 0 && (_jsxs("div", { style: { marginTop: '4px', color: '#f47067', fontSize: '10px' }, children: ["exit code ", exitCode] })), !stdout && !stderr && (_jsx("span", { style: { opacity: 0.5 }, children: t('ide.toolCall.noOutput', undefined, { defaultValue: '(no output)' }) }))] }));
|
|
242
250
|
}
|
|
243
251
|
case 'write_file': {
|
|
244
252
|
const diff = out.diff;
|
|
@@ -465,47 +473,10 @@ export const ToolCallCard = memo(function ToolCallCard({ id, name, input, output
|
|
|
465
473
|
setExpanded((e) => !e);
|
|
466
474
|
}
|
|
467
475
|
: undefined;
|
|
468
|
-
// ── update_task_list:
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
const borderClr = isLight ? '#d0d7de' : '#3d444d';
|
|
473
|
-
return (_jsxs("div", { className: className, "data-mol-id": "task-list-card", style: {
|
|
474
|
-
marginBottom: '8px',
|
|
475
|
-
marginTop: '8px',
|
|
476
|
-
borderRadius: '8px',
|
|
477
|
-
border: `1px solid ${borderClr}`,
|
|
478
|
-
background: isLight ? '#f6f8fa' : 'rgba(255,255,255,0.04)',
|
|
479
|
-
overflow: 'hidden',
|
|
480
|
-
}, children: [_jsxs("div", { style: {
|
|
481
|
-
display: 'flex',
|
|
482
|
-
alignItems: 'center',
|
|
483
|
-
justifyContent: 'space-between',
|
|
484
|
-
gap: '8px',
|
|
485
|
-
padding: '6px 12px',
|
|
486
|
-
borderBottom: todos.length > 0 ? `1px solid ${borderClr}` : 'none',
|
|
487
|
-
fontSize: '12px',
|
|
488
|
-
fontWeight: 600,
|
|
489
|
-
}, children: [_jsx("span", { children: t('ide.chat.taskListTitle', undefined, { defaultValue: 'Working plan' }) }), todos.length > 0 && (_jsx("span", { style: { fontWeight: 400, opacity: 0.65 }, children: t('ide.chat.taskListProgress', { done: completed, total: todos.length }, {
|
|
490
|
-
defaultValue: '{{done}} of {{total}} done',
|
|
491
|
-
}) }))] }), todos.map((todo, i) => (_jsxs("div", { style: {
|
|
492
|
-
display: 'flex',
|
|
493
|
-
alignItems: 'flex-start',
|
|
494
|
-
gap: '8px',
|
|
495
|
-
padding: '4px 12px',
|
|
496
|
-
borderTop: i > 0 ? `1px solid ${isLight ? '#eaeef2' : 'rgba(255,255,255,0.06)'}` : 'none',
|
|
497
|
-
fontSize: '12.5px',
|
|
498
|
-
...(todo.status === 'completed'
|
|
499
|
-
? { opacity: 0.55, textDecoration: 'line-through' }
|
|
500
|
-
: {}),
|
|
501
|
-
}, children: [_jsx("span", { style: {
|
|
502
|
-
flexShrink: 0,
|
|
503
|
-
width: 16,
|
|
504
|
-
height: 17,
|
|
505
|
-
display: 'inline-flex',
|
|
506
|
-
alignItems: 'center',
|
|
507
|
-
}, children: _jsx(PlanStatusIcon, { status: todo.status, isLight: isLight }) }), _jsx("span", { style: { flex: 1, minWidth: 0 }, children: todo.content })] }, i)))] }));
|
|
508
|
-
}
|
|
476
|
+
// ── update_task_list: drawn once, pinned above the composer (PlanCard) — not
|
|
477
|
+
// repeated in the transcript on every update.
|
|
478
|
+
if (name === 'update_task_list')
|
|
479
|
+
return null;
|
|
509
480
|
// ── spawn_agent: subagent card — explore report / judge verdict / build summary ──
|
|
510
481
|
if (name === 'spawn_agent') {
|
|
511
482
|
const inp = (input ?? {});
|
|
@@ -1166,7 +1137,9 @@ export const ToolCallCard = memo(function ToolCallCard({ id, name, input, output
|
|
|
1166
1137
|
letterSpacing: '0.6px',
|
|
1167
1138
|
marginBottom: '4px',
|
|
1168
1139
|
fontWeight: 600,
|
|
1169
|
-
}, children:
|
|
1140
|
+
}, children: name === 'exec_command'
|
|
1141
|
+
? t('ide.toolCall.command', undefined, { defaultValue: 'Command' })
|
|
1142
|
+
: t('ide.toolCall.request', undefined, { defaultValue: 'Request' }) }), inContent] })), outContent && (_jsxs("div", { style: {
|
|
1170
1143
|
padding: '6px 10px',
|
|
1171
1144
|
borderTop: inContent ? '1px solid rgba(128,128,128,0.15)' : undefined,
|
|
1172
1145
|
}, children: [_jsx("div", { className: cm.textMuted, style: {
|
|
@@ -1175,7 +1148,9 @@ export const ToolCallCard = memo(function ToolCallCard({ id, name, input, output
|
|
|
1175
1148
|
letterSpacing: '0.6px',
|
|
1176
1149
|
marginBottom: '4px',
|
|
1177
1150
|
fontWeight: 600,
|
|
1178
|
-
}, children:
|
|
1151
|
+
}, children: name === 'exec_command'
|
|
1152
|
+
? t('ide.toolCall.output', undefined, { defaultValue: 'Output' })
|
|
1153
|
+
: t('ide.toolCall.response', undefined, { defaultValue: 'Response' }) }), outContent] }))] })) : (_jsxs("div", { style: { padding: '6px 10px' }, children: [name === 'rename_file' && (_jsxs("pre", { style: PRE, children: [str((input ?? {}).old_path) ?? '', ' → ', str((input ?? {}).new_path) ?? ''] })), (name === 'list_files' || name === 'find_files' || name === 'search_files') &&
|
|
1179
1154
|
output !== undefined &&
|
|
1180
1155
|
renderOut(name, output), name === 'find_package' && output !== undefined && (_jsx(PackageResultRows, { results: packageResults(output), onFileOpen: onFileOpen }))] })) }))] }));
|
|
1181
1156
|
});
|