@molecule/app-ide-react 1.19.12 → 1.20.0

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.
@@ -41,6 +41,29 @@ interface ModelPicker {
41
41
  */
42
42
  mode?: ModelMode;
43
43
  }
44
+ /**
45
+ * Derive a real current-activity label for the streaming indicator from the
46
+ * in-flight assistant message's latest block, so the user sees what's actually
47
+ * happening (e.g. "Reading App.tsx", "Writing the plan") instead of a generic
48
+ * spinner. Returns undefined when there's nothing specific to show (the
49
+ * indicator then falls back to its rotating generic messages).
50
+ *
51
+ * @param msg - The streaming assistant message.
52
+ * @param msg.blocks - The ordered stream blocks (thinking / tool_use / text).
53
+ * @param msg.toolCalls - The message's tool calls, looked up by block id.
54
+ * @returns A short activity label, or undefined.
55
+ */
56
+ export declare function streamingActivityLabel(msg: {
57
+ blocks?: Array<{
58
+ type: string;
59
+ id?: string;
60
+ }>;
61
+ toolCalls?: Array<{
62
+ id: string;
63
+ name: string;
64
+ input?: unknown;
65
+ }>;
66
+ }): string | undefined;
44
67
  /**
45
68
  * Expandable tool-call-style card displaying a commit with its files.
46
69
  * @param props - Component props (see {@link MessageItemProps}).
@@ -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;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,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ACV,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,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,OAAc,EACd,QAAQ,EACR,eAAe,EACf,uBAAuB,EACvB,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,EACP,aAAa,EACb,WAAW,EACX,SAAS,EACT,QAAQ,EACR,WAAW,EACX,cAAc,EACd,YAAY,EACZ,SAAS,GACV,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAkd9B;yBAhhBe,SAAS"}
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,K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Y,EACZ,SAAS,GACV,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAkd9B;yBAhhBe,SAAS"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Fragment, memo, useCallback, useEffect, useMemo, useReducer, useRef, useState, } from 'react';
2
+ import { Fragment, memo, useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, } from 'react';
3
3
  import { formatTokenCount, isDeprecated, partitionByDeprecation, PROVIDER_BRAND_COLORS, } from '@molecule/app-ai-models';
4
4
  import { getProvider as getVoiceProvider, listVoiceEngines, selectVoiceEngine, voiceEngineCoversLanguage, } from '@molecule/app-ai-voice';
5
5
  import { getCountryFlag } from '@molecule/app-country-flags';
@@ -52,7 +52,7 @@ import { applyTestRunEvent, buildTestFixMessage, EMPTY_RUN_STATE, failRun, markS
52
52
  import { TestsCard } from './TestsCard.js';
53
53
  import { TestStatusBar } from './TestStatusBar.js';
54
54
  import { TipCard } from './TipCard.js';
55
- import { readFilePaths } from './tool-call-utilities.js';
55
+ import { readFilePaths, str } from './tool-call-utilities.js';
56
56
  import { ToolCallCard } from './ToolCallCard.js';
57
57
  import { UserAvatar } from './UserAvatar.js';
58
58
  const logger = getLogger('chat-panel');
@@ -416,7 +416,7 @@ function formatThinkingDuration(ms) {
416
416
  * @param msg.toolCalls - The message's tool calls, looked up by block id.
417
417
  * @returns A short activity label, or undefined.
418
418
  */
419
- function streamingActivityLabel(msg) {
419
+ export function streamingActivityLabel(msg) {
420
420
  const blocks = msg.blocks;
421
421
  if (!blocks || blocks.length === 0)
422
422
  return undefined;
@@ -428,6 +428,11 @@ function streamingActivityLabel(msg) {
428
428
  const tc = msg.toolCalls?.find((c) => c.id === last.id);
429
429
  if (!tc)
430
430
  return undefined;
431
+ // `tc.input` is model-authored, so each field is read through `str()` rather
432
+ // than trusted from the cast: a field the schema declares `string` can arrive
433
+ // as a number or object (the shape that blanked production on 2026-08-14 —
434
+ // see `str()`'s docs), and `base()` calls `.split` on it, which throws a
435
+ // TypeError from inside this render — taking the whole IDE down, not one row.
431
436
  const inp = (tc.input ?? {});
432
437
  const base = (p) => (p ? (p.split('/').filter(Boolean).pop() ?? p) : '');
433
438
  const clip = (s, n = 48) => (s && s.length > n ? `${s.slice(0, n)}…` : (s ?? ''));
@@ -438,20 +443,20 @@ function streamingActivityLabel(msg) {
438
443
  return `${t('ide.chat.activity.reading', undefined, { defaultValue: 'Reading' })} ${base(files[0])}${more}`;
439
444
  }
440
445
  case 'write_file':
441
- return `${t('ide.chat.activity.writing', undefined, { defaultValue: 'Writing' })} ${base(inp.path)}`;
446
+ return `${t('ide.chat.activity.writing', undefined, { defaultValue: 'Writing' })} ${base(str(inp.path))}`;
442
447
  case 'edit_file':
443
- return `${t('ide.chat.activity.editing', undefined, { defaultValue: 'Editing' })} ${base(inp.path)}`;
448
+ return `${t('ide.chat.activity.editing', undefined, { defaultValue: 'Editing' })} ${base(str(inp.path))}`;
444
449
  case 'search_files':
445
- return `${t('ide.chat.activity.searching', undefined, { defaultValue: 'Searching' })} ${clip(inp.query)}`;
450
+ return `${t('ide.chat.activity.searching', undefined, { defaultValue: 'Searching' })} ${clip(str(inp.query))}`;
446
451
  case 'list_files':
447
452
  case 'find_files':
448
453
  return t('ide.chat.activity.exploring', undefined, { defaultValue: 'Exploring files' });
449
454
  case 'exec_command':
450
- return `${t('ide.chat.activity.running', undefined, { defaultValue: 'Running' })} ${clip(inp.command)}`;
455
+ return `${t('ide.chat.activity.running', undefined, { defaultValue: 'Running' })} ${clip(str(inp.command))}`;
451
456
  case 'save_plan':
452
457
  return t('ide.chat.activity.writingPlan', undefined, { defaultValue: 'Writing the plan' });
453
458
  case 'sandbox_fetch':
454
- return `${t('ide.chat.activity.fetching', undefined, { defaultValue: 'Fetching' })} ${clip(inp.url)}`;
459
+ return `${t('ide.chat.activity.fetching', undefined, { defaultValue: 'Fetching' })} ${clip(str(inp.url))}`;
455
460
  case 'set_mode':
456
461
  return t('ide.chat.activity.switching', undefined, { defaultValue: 'Switching mode' });
457
462
  default:
@@ -517,6 +522,13 @@ function ThinkingBlock({ content, durationMs, isStreaming, }) {
517
522
  // ---------------------------------------------------------------------------
518
523
  /** Height threshold (px) above which user messages get collapsed. */
519
524
  const USER_MSG_COLLAPSE_HEIGHT = 150;
525
+ /**
526
+ * Distance from the top (px) at which scrolling up pages in older timeline
527
+ * items. Same idea as the 80px bottom threshold of the stick-to-bottom
528
+ * detector: a margin, so the trigger fires while the user is still moving,
529
+ * not only pinned exactly at scrollTop 0.
530
+ */
531
+ const LOAD_EARLIER_THRESHOLD_PX = 120;
520
532
  // ---------------------------------------------------------------------------
521
533
  // App version (P4-08)
522
534
  // ---------------------------------------------------------------------------
@@ -1688,7 +1700,11 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
1688
1700
  // The tests strip sits above the commit bar and starts collapsed, like it.
1689
1701
  const [testsBarExpanded, setTestsBarExpanded] = useState(false);
1690
1702
  const [commitCards, setCommitCards] = useState([]);
1691
- /** Number of timeline items rendered in the DOM. Increases when user clicks "Show earlier". */
1703
+ /**
1704
+ * Number of timeline items rendered in the DOM. Starts at the most recent
1705
+ * page and grows as the user scrolls toward the top of the conversation
1706
+ * (auto-load of earlier history — no button to click).
1707
+ */
1692
1708
  const [maxVisibleItems, setMaxVisibleItems] = useState(60);
1693
1709
  // ── Undo tracking ───────────────────────────────────────────────────────────
1694
1710
  // Tracks which tool calls are currently in the "undone" state so /undo can
@@ -3194,6 +3210,33 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
3194
3210
  const messagesContainerRef = useRef(null);
3195
3211
  const userScrolledUpRef = useRef(false);
3196
3212
  const sentInitialRef = useRef(null);
3213
+ // ── Auto-load earlier history on scroll-up ─────────────────────────────────
3214
+ // The timeline only mounts the most recent `maxVisibleItems` items; when the
3215
+ // user scrolls near the top, the next older page is mounted in and the scroll
3216
+ // position is anchored (see the layout effect below) so the reading place
3217
+ // stays put across the prepend. Replaces the old "Show earlier messages"
3218
+ // button (2026-10-11): paging happens as you approach the top, not on click.
3219
+ //
3220
+ // The once-registered `scroll` listener reads both values through refs —
3221
+ // `timeline` does not exist yet where the listener is declared, and the
3222
+ // listener must not re-register on every streamed item.
3223
+ /** scrollHeight captured when a page load was triggered; consumed by the anchor effect. */
3224
+ const pendingAnchorHeightRef = useRef(null);
3225
+ /** Whether older items are currently held back (assigned during render). */
3226
+ const hasHiddenEarlierRef = useRef(false);
3227
+ // Keeps the viewport still across a prepend. Native scroll anchoring is
3228
+ // disabled on the container (overflowAnchor: 'none') so this is the only
3229
+ // mechanism adjusting the offset — otherwise both would fire and double-jump.
3230
+ useLayoutEffect(() => {
3231
+ const anchor = pendingAnchorHeightRef.current;
3232
+ if (anchor === null)
3233
+ return;
3234
+ pendingAnchorHeightRef.current = null;
3235
+ const el = messagesContainerRef.current;
3236
+ if (!el)
3237
+ return;
3238
+ el.scrollTop += el.scrollHeight - anchor;
3239
+ }, [maxVisibleItems]);
3197
3240
  // "Should we stick to the bottom?" — derived ONLY from the actual scroll
3198
3241
  // position after a scroll event, never from touch direction or content size.
3199
3242
  //
@@ -3214,6 +3257,12 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
3214
3257
  return;
3215
3258
  const onScroll = () => {
3216
3259
  userScrolledUpRef.current = el.scrollHeight - el.scrollTop - el.clientHeight > 80;
3260
+ // Near the top with older history held back: mount the next page in. The
3261
+ // anchor effect above keeps the viewport still across the prepend.
3262
+ if (el.scrollTop <= LOAD_EARLIER_THRESHOLD_PX && hasHiddenEarlierRef.current) {
3263
+ pendingAnchorHeightRef.current = el.scrollHeight;
3264
+ setMaxVisibleItems((n) => n + 40);
3265
+ }
3217
3266
  };
3218
3267
  el.addEventListener('scroll', onScroll, { passive: true });
3219
3268
  return () => el.removeEventListener('scroll', onScroll);
@@ -5858,6 +5907,10 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
5858
5907
  });
5859
5908
  };
5860
5909
  const renderedTimeline = timeline.length > maxVisibleItems ? timeline.slice(-maxVisibleItems) : timeline;
5910
+ // Read by the once-registered scroll listener (declared with the other scroll
5911
+ // refs, before `timeline` exists) to decide whether scrolling near the top
5912
+ // should mount the next older page.
5913
+ hasHiddenEarlierRef.current = timeline.length > maxVisibleItems;
5861
5914
  /**
5862
5915
  * Where (if anywhere) a timeline item carries its time. Typed user messages and
5863
5916
  * team notes carry it in their header row and always qualify; Synthase replies
@@ -5976,7 +6029,15 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
5976
6029
  // is gone. No scrollbar-gutter:stable reservation (it made the right padding
5977
6030
  // visibly larger than the left); the thin scrollbar just overlays when the
5978
6031
  // timeline overflows.
5979
- style: { flex: 1, overflowY: 'auto', scrollbarWidth: 'thin' }, children: [timeline.length === 0 &&
6032
+ // overflowAnchor off: prepending an older page above the viewport is
6033
+ // compensated by ChatPanel's own anchor effect — native scroll anchoring
6034
+ // must not adjust the offset on top of it (double correction = jump).
6035
+ style: {
6036
+ flex: 1,
6037
+ overflowY: 'auto',
6038
+ scrollbarWidth: 'thin',
6039
+ overflowAnchor: 'none',
6040
+ }, children: [timeline.length === 0 &&
5980
6041
  !isLoading &&
5981
6042
  !isRemoteStreaming &&
5982
6043
  !awaitingSandboxBoot &&
@@ -5991,14 +6052,7 @@ function ChatInner({ projectId, endpoint, initialMessage, onInitialMessageSent,
5991
6052
  textAlign: 'center',
5992
6053
  }, children: [_jsx(Icon, { name: "logo-mark", size: 28, "aria-hidden": "true", style: { opacity: 0.5 } }), _jsx("span", { style: { maxWidth: 320 }, children: t('ide.chat.emptyState', undefined, {
5993
6054
  defaultValue: 'Describe what you want to build...',
5994
- }) })] })), timeline.length > maxVisibleItems && (_jsx("div", { style: { textAlign: 'center', padding: '8px 0' }, children: _jsx("button", { type: "button", "data-mol-id": "chat-show-earlier", onClick: () => setMaxVisibleItems((n) => n + 40),
5995
- // A quiet, non-committal timeline action — SECONDARY, the semantic
5996
- // DESIGN.md reserves for what sits beside the real CTAs. Box model,
5997
- // type scale and hover come from the ClassMap instead of the
5998
- // hand-rolled 4px-radius currentColor frame this used to be.
5999
- className: cm.cn(cm.button({ variant: 'solid', color: 'secondary', size: 'xs' }), cm.touchTargetCompact), children: t('ide.chat.showEarlier', undefined, {
6000
- defaultValue: 'Show earlier messages',
6001
- }) }) })), renderedTimeline.map((item) => (_jsx(ChatItemBoundary, { onError: onRenderError, render: () => withTimelineTimestamp(item, (() => {
6055
+ }) })] })), renderedTimeline.map((item) => (_jsx(ChatItemBoundary, { onError: onRenderError, render: () => withTimelineTimestamp(item, (() => {
6002
6056
  if (item.kind === 'commit')
6003
6057
  return (_jsx(CommitCardItem, { card: item.card, onRevert: canEdit === false ? undefined : handleRevertCommit }, item.card.id));
6004
6058
  if (item.kind === 'activity')