@steerable/agent-shell-web 0.14.1 → 0.14.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.
@@ -25,7 +25,7 @@ import type { LlmSpeedSnapshot } from './process-status';
25
25
  import { ComposerStatusStack } from './composer-status-stack';
26
26
  import { t } from '@/i18n';
27
27
  import { SessionTodoList } from './SessionTodoList';
28
- import { resolveLatestSessionTodos } from './todo-list-model';
28
+ import { resolveLatestSessionTodos, shouldShowComposerTodos } from './todo-list-model';
29
29
  import { SessionOrchestrationFlow } from './SessionOrchestrationFlow';
30
30
  import { resolveLatestSessionOrchestrationFlow } from './orchestration-flow-model';
31
31
  import {
@@ -465,7 +465,8 @@ export function LocalChatPanel({
465
465
  toolbarExtras={inputToolbarExtras}
466
466
  leadingChrome={inputLeadingChrome}
467
467
  trailingChrome={
468
- sessionOrchestrationFlow || sessionTodos ? (
468
+ sessionOrchestrationFlow ||
469
+ shouldShowComposerTodos(sessionTodos, isStreaming) ? (
469
470
  <ComposerStatusStack>
470
471
  {sessionOrchestrationFlow ? (
471
472
  <SessionOrchestrationFlow
@@ -474,7 +475,9 @@ export function LocalChatPanel({
474
475
  onInspectTask={onInspectTask}
475
476
  />
476
477
  ) : null}
477
- {sessionTodos ? <SessionTodoList todos={sessionTodos} /> : null}
478
+ {shouldShowComposerTodos(sessionTodos, isStreaming) ? (
479
+ <SessionTodoList todos={sessionTodos} />
480
+ ) : null}
478
481
  </ComposerStatusStack>
479
482
  ) : undefined
480
483
  }
@@ -122,7 +122,10 @@ export function ModelPicker({
122
122
  if (next && status !== 'live' && !loading) void refresh();
123
123
  }}
124
124
  disabled={disabled}
125
- className="inline-flex h-6 min-w-0 max-w-[160px] items-center gap-1 rounded-full border border-agent-border bg-agent-canvas px-1.5 text-[12px] leading-[1.45] text-agent-foreground transition-colors hover:bg-agent-foreground/5 disabled:cursor-not-allowed disabled:opacity-70 @sm:max-w-[220px]"
125
+ className={[
126
+ 'inline-flex h-6 min-w-0 max-w-[160px] items-center gap-1 rounded-full border border-transparent bg-transparent px-2 text-[12px] leading-[1.45] transition-colors hover:bg-agent-foreground/5 hover:text-agent-foreground disabled:cursor-not-allowed disabled:opacity-70 @sm:max-w-[220px]',
127
+ model != null ? 'font-medium text-agent-foreground' : 'text-agent-muted-foreground',
128
+ ].join(' ')}
126
129
  title={
127
130
  status === 'offline'
128
131
  ? catalog?.error
@@ -261,7 +264,7 @@ export function ModelPicker({
261
264
  setModelMenuOpen(false);
262
265
  }}
263
266
  disabled={disabled}
264
- className="inline-flex h-6 items-center gap-1 rounded-full border border-agent-border bg-agent-canvas px-1.5 text-[12px] leading-[1.45] text-agent-foreground transition-colors hover:bg-agent-foreground/5 disabled:cursor-not-allowed disabled:opacity-70"
267
+ className="inline-flex h-6 items-center gap-1 rounded-full border border-transparent bg-transparent px-1.5 text-[12px] leading-[1.45] text-agent-muted-foreground transition-colors hover:bg-agent-foreground/5 hover:text-agent-foreground disabled:cursor-not-allowed disabled:opacity-70"
265
268
  title={t('Reasoning level (sent with every request; an error appears if the model does not support it)')}
266
269
  aria-haspopup="menu"
267
270
  aria-expanded={effortMenuOpen}
@@ -3,7 +3,16 @@ import type { LocalChat, LocalChatAgent } from '@/lib/local-api';
3
3
  import type { ThinkingDisplayMode } from '@/lib/show-thinking-content';
4
4
  import { Markdown } from './Markdown';
5
5
  import { ToolsFlow } from './ExecutedActionsCard';
6
- import type { InspectTaskInput } from './executed-actions-model';
6
+ import { ImageRoundFoldStrip } from './rich-tool-views';
7
+ import {
8
+ classifyFoldableRoundAction,
9
+ expandRunCodeActions,
10
+ filterRedundantPresentFiles,
11
+ isActionRunning,
12
+ isInteractiveRunningAction,
13
+ isTerminalHousekeepingAction,
14
+ type InspectTaskInput,
15
+ } from './executed-actions-model';
7
16
  import type { ChildInfo } from './OrchestrationChildrenCard';
8
17
  import { OrchestrationChildrenCard } from './OrchestrationChildrenCard';
9
18
  import { TurnUsageLine } from './TurnUsageLine';
@@ -30,6 +39,7 @@ export { THINKING_PEEK_HEIGHT, THINKING_PEEK_LINES };
30
39
  export function TurnProcessGroup({
31
40
  blocks,
32
41
  isStreaming,
42
+ turnFailed,
33
43
  agents,
34
44
  chats,
35
45
  chatId,
@@ -45,10 +55,13 @@ export function TurnProcessGroup({
45
55
  thinkingDisplay,
46
56
  showThinkingContent,
47
57
  collapseWhenFinished = true,
58
+ deliveredFilePaths,
48
59
  renderAnswer,
49
60
  }: {
50
61
  blocks: TurnBlock[];
51
62
  isStreaming: boolean;
63
+ /** True only when the turn itself terminated in failure; suppresses self-healed tool error counts on succeeded turns. */
64
+ turnFailed?: boolean;
52
65
  agents: LocalChatAgent[];
53
66
  chats: LocalChat[];
54
67
  chatId?: string | null;
@@ -80,8 +93,20 @@ export function TurnProcessGroup({
80
93
  * Task inspector sets false so the replay stays open.
81
94
  */
82
95
  collapseWhenFinished?: boolean;
96
+ /** Settled deliverable file paths rendered in `TurnFilesCard` below the answer; deduplicates `present_files`. */
97
+ deliveredFilePaths?: ReadonlySet<string> | null;
83
98
  renderAnswer: (block: Extract<TurnBlock, { type: 'text' }>, isLast: boolean) => ReactNode;
84
99
  }) {
100
+ const effectiveBlocks: TurnBlock[] = blocks.flatMap((block): TurnBlock[] => {
101
+ if (block.type !== 'tools') return [block];
102
+ const expanded = expandRunCodeActions(block.actions);
103
+ const remaining =
104
+ deliveredFilePaths && deliveredFilePaths.size > 0
105
+ ? filterRedundantPresentFiles(expanded, deliveredFilePaths)
106
+ : expanded;
107
+ return remaining.length > 0 ? [{ ...block, actions: remaining }] : [];
108
+ });
109
+
85
110
  const hasChildrenCard = (orchestrationChildren?.length ?? 0) >= 2;
86
111
  const processFooter =
87
112
  hasChildrenCard || Boolean(turnUsage) ? (
@@ -101,13 +126,21 @@ export function TurnProcessGroup({
101
126
 
102
127
  return (
103
128
  <TurnProcessTimeline
104
- blocks={blocks}
129
+ blocks={effectiveBlocks}
105
130
  isStreaming={isStreaming}
131
+ turnFailed={turnFailed}
106
132
  startedAtMs={startedAtMs}
107
133
  durationMs={durationMs}
108
134
  thinkingDisplay={thinkingDisplay}
109
135
  showThinkingContent={showThinkingContent}
110
136
  collapseWhenFinished={collapseWhenFinished}
137
+ isToolRunning={isActionRunning}
138
+ isInteractiveRunningTool={isInteractiveRunningAction}
139
+ isTrailingHousekeepingTool={isTerminalHousekeepingAction}
140
+ classifyFoldableRoundAction={classifyFoldableRoundAction}
141
+ renderRoundFoldPreview={(actions, { expand }) => (
142
+ <ImageRoundFoldStrip actions={actions} chatId={chatId} onExpand={expand} />
143
+ )}
111
144
  emptyFallback={emptyFallback}
112
145
  streamingHint={streamingHint}
113
146
  processFooter={processFooter}
@@ -119,10 +152,11 @@ export function TurnProcessGroup({
119
152
  chatId={chatId}
120
153
  onInspectTask={onInspectTask}
121
154
  orchestrationChildren={orchestrationChildren}
155
+ deliveredFilePaths={deliveredFilePaths}
122
156
  />
123
157
  )}
124
158
  renderIntermediateText={(block, isLiveLast) => (
125
- <div>
159
+ <div className="px-1.5 py-0.5">
126
160
  <div className="markdown-content text-xs leading-relaxed text-agent-foreground">
127
161
  <Markdown agents={agents} chats={chats} chatId={chatId}>
128
162
  {block.content}