@steerable/agent-shell-web 0.6.27 → 0.6.28

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.
Files changed (49) hide show
  1. package/package.json +4 -4
  2. package/src/components/AgentSidebar.tsx +24 -24
  3. package/src/components/BrandLockup.tsx +1 -1
  4. package/src/components/ChatHeader.tsx +5 -15
  5. package/src/components/LocalLlmSettingsModal.tsx +5 -5
  6. package/src/components/TerminalPanel.tsx +1 -1
  7. package/src/components/chat/ApprovalModal.tsx +5 -5
  8. package/src/components/chat/AskUserQuestionMenu.tsx +13 -13
  9. package/src/components/chat/AssistantMessage.tsx +41 -13
  10. package/src/components/chat/ChatInput.tsx +24 -24
  11. package/src/components/chat/ExecPolicyPicker.tsx +4 -4
  12. package/src/components/chat/ExecutedActionsCard.tsx +10 -3
  13. package/src/components/chat/FilePathCode.tsx +2 -1
  14. package/src/components/chat/LocalChatPanel.tsx +39 -4
  15. package/src/components/chat/Markdown.tsx +15 -14
  16. package/src/components/chat/MessageList.tsx +16 -3
  17. package/src/components/chat/ModelPicker.tsx +6 -6
  18. package/src/components/chat/SessionTodoList.tsx +137 -0
  19. package/src/components/chat/SessionTreeModal.tsx +3 -3
  20. package/src/components/chat/SuggestedReplies.tsx +5 -4
  21. package/src/components/chat/TaskPanelModal.tsx +3 -3
  22. package/src/components/chat/TaskProcessPanel.tsx +5 -4
  23. package/src/components/chat/TurnFilesCard.tsx +2 -2
  24. package/src/components/chat/TurnProcessGroup.tsx +226 -99
  25. package/src/components/chat/UserMessage.tsx +4 -4
  26. package/src/components/chat/next-steps-tags.ts +28 -0
  27. package/src/components/chat/process-status.ts +125 -53
  28. package/src/components/chat/todo-list-model.ts +167 -0
  29. package/src/components/chat/turn-timeline.ts +100 -11
  30. package/src/components/settings/AgentsSettingsPanel.tsx +2 -2
  31. package/src/components/settings/AppearanceSettingsPanel.tsx +3 -3
  32. package/src/components/settings/DiagnoseSettingsPanel.tsx +2 -2
  33. package/src/components/settings/InsightsSettingsPanel.tsx +4 -4
  34. package/src/components/settings/LlmSettingsPanel.tsx +10 -10
  35. package/src/components/settings/McpSettingsPanel.tsx +3 -3
  36. package/src/components/settings/ModelIdCombobox.tsx +2 -2
  37. package/src/components/settings/SecuritySettingsPanel.tsx +1 -1
  38. package/src/components/settings/SettingsSaveButton.tsx +1 -1
  39. package/src/components/settings/SkillsSettingsPanel.tsx +2 -2
  40. package/src/components/settings/TelemetrySettingsPanel.tsx +2 -2
  41. package/src/components/settings/UsagePanel.tsx +14 -10
  42. package/src/components/settings/WebSearchSettingsPanel.tsx +2 -2
  43. package/src/layouts/AgentLayout.tsx +3 -3
  44. package/src/lib/chat-transport.ts +68 -12
  45. package/src/lib/show-thinking-content.ts +4 -4
  46. package/src/pages/AgentPage.tsx +56 -6
  47. package/src/pages/ChatPanelPreviewPage.tsx +26 -4
  48. package/src/pages/SettingsPage.tsx +39 -39
  49. package/src/styles/index.css +12 -2
@@ -59,8 +59,8 @@ export function SettingsPage() {
59
59
 
60
60
  return (
61
61
  <div className="flex h-full w-full flex-col overflow-hidden">
62
- <header className="flex h-12 flex-shrink-0 items-center justify-between gap-3 border-b border-agent-border px-5">
63
- <h1 className="text-sm font-semibold text-agent-foreground">{title}</h1>
62
+ <header className="flex h-9 flex-shrink-0 items-center justify-between gap-2 border-b border-agent-border px-2.5">
63
+ <h1 className="text-xs font-semibold text-agent-foreground">{title}</h1>
64
64
  {section === 'general' && (
65
65
  <SettingsSaveButton
66
66
  testId="settings-header-save"
@@ -73,7 +73,7 @@ export function SettingsPage() {
73
73
  </header>
74
74
 
75
75
  <div className="min-h-0 flex-1 overflow-y-auto">
76
- <div className="mx-auto max-w-3xl space-y-8 px-6 py-6">
76
+ <div className="mx-auto max-w-3xl space-y-4 px-3 py-3">
77
77
  {!isElectron() && (
78
78
  <p className="rounded-agent-md border border-agent-destructive/20 bg-agent-destructive/10 p-2.5 text-xs text-agent-destructive">
79
79
  浏览器预览模式 — 没有 Electron IPC 桥接,部分设置不可用。
@@ -81,9 +81,9 @@ export function SettingsPage() {
81
81
  )}
82
82
 
83
83
  {section === 'skills' && (
84
- <section className="space-y-3" data-testid="settings-section-skills">
85
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
86
- <LuBlocks className="h-4 w-4 text-agent-muted-foreground" />
84
+ <section className="space-y-2" data-testid="settings-section-skills">
85
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
86
+ <LuBlocks className="h-3.5 w-3.5 text-agent-muted-foreground" />
87
87
  本地技能
88
88
  </h2>
89
89
  <SkillsSettingsPanel />
@@ -91,9 +91,9 @@ export function SettingsPage() {
91
91
  )}
92
92
 
93
93
  {section === 'mcp' && (
94
- <section className="space-y-3" data-testid="settings-section-mcp">
95
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
96
- <LuPlug className="h-4 w-4 text-agent-muted-foreground" />
94
+ <section className="space-y-2" data-testid="settings-section-mcp">
95
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
96
+ <LuPlug className="h-3.5 w-3.5 text-agent-muted-foreground" />
97
97
  MCP 服务
98
98
  </h2>
99
99
  <McpSettingsPanel />
@@ -101,9 +101,9 @@ export function SettingsPage() {
101
101
  )}
102
102
 
103
103
  {section === 'agents' && (
104
- <section className="space-y-3" data-testid="settings-section-agents">
105
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
106
- <LuBot className="h-4 w-4 text-agent-muted-foreground" />
104
+ <section className="space-y-2" data-testid="settings-section-agents">
105
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
106
+ <LuBot className="h-3.5 w-3.5 text-agent-muted-foreground" />
107
107
  智能体
108
108
  </h2>
109
109
  <AgentsSettingsPanel onCatalogChange={catalog?.refreshAgents} />
@@ -112,17 +112,17 @@ export function SettingsPage() {
112
112
 
113
113
  {section === 'general' && (
114
114
  <>
115
- <section className="space-y-3" data-testid="settings-section-appearance">
116
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
117
- <LuMonitor className="h-4 w-4 text-agent-muted-foreground" />
115
+ <section className="space-y-2" data-testid="settings-section-appearance">
116
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
117
+ <LuMonitor className="h-3.5 w-3.5 text-agent-muted-foreground" />
118
118
  界面
119
119
  </h2>
120
120
  <AppearanceSettingsPanel />
121
121
  </section>
122
122
 
123
- <section className="space-y-3" data-testid="settings-section-llm">
124
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
125
- <LuSettings className="h-4 w-4 text-agent-muted-foreground" />
123
+ <section className="space-y-2" data-testid="settings-section-llm">
124
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
125
+ <LuSettings className="h-3.5 w-3.5 text-agent-muted-foreground" />
126
126
  本地模型设置
127
127
  </h2>
128
128
  <LlmSettingsPanel
@@ -132,49 +132,49 @@ export function SettingsPage() {
132
132
  />
133
133
  </section>
134
134
 
135
- <section className="space-y-3" data-testid="settings-section-web-search">
136
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
137
- <LuSearch className="h-4 w-4 text-agent-muted-foreground" />
135
+ <section className="space-y-2" data-testid="settings-section-web-search">
136
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
137
+ <LuSearch className="h-3.5 w-3.5 text-agent-muted-foreground" />
138
138
  网络搜索
139
139
  </h2>
140
140
  <WebSearchSettingsPanel />
141
141
  </section>
142
142
 
143
- <section className="space-y-3" data-testid="settings-section-usage">
144
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
145
- <LuChartBar className="h-4 w-4 text-agent-muted-foreground" />
143
+ <section className="space-y-2" data-testid="settings-section-usage">
144
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
145
+ <LuChartBar className="h-3.5 w-3.5 text-agent-muted-foreground" />
146
146
  用量与成本
147
147
  </h2>
148
148
  <UsagePanel />
149
149
  </section>
150
150
 
151
- <section className="space-y-3" data-testid="settings-section-diagnose">
152
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
153
- <LuNetwork className="h-4 w-4 text-agent-muted-foreground" />
151
+ <section className="space-y-2" data-testid="settings-section-diagnose">
152
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
153
+ <LuNetwork className="h-3.5 w-3.5 text-agent-muted-foreground" />
154
154
  链路诊断
155
155
  </h2>
156
156
  <DiagnoseSettingsPanel />
157
157
  </section>
158
158
 
159
- <section className="space-y-3" data-testid="settings-section-security">
160
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
161
- <LuShieldCheck className="h-4 w-4 text-agent-muted-foreground" />
159
+ <section className="space-y-2" data-testid="settings-section-security">
160
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
161
+ <LuShieldCheck className="h-3.5 w-3.5 text-agent-muted-foreground" />
162
162
  安全
163
163
  </h2>
164
164
  <SecuritySettingsPanel />
165
165
  </section>
166
166
 
167
- <section className="space-y-3" data-testid="settings-section-insights">
168
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
169
- <LuChartBar className="h-4 w-4 text-agent-muted-foreground" />
167
+ <section className="space-y-2" data-testid="settings-section-insights">
168
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
169
+ <LuChartBar className="h-3.5 w-3.5 text-agent-muted-foreground" />
170
170
  帮助改进产品
171
171
  </h2>
172
172
  <InsightsSettingsPanel />
173
173
  </section>
174
174
 
175
- <section className="space-y-3" data-testid="settings-section-telemetry">
176
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
177
- <LuActivity className="h-4 w-4 text-agent-muted-foreground" />
175
+ <section className="space-y-2" data-testid="settings-section-telemetry">
176
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
177
+ <LuActivity className="h-3.5 w-3.5 text-agent-muted-foreground" />
178
178
  遥测(OTLP)
179
179
  </h2>
180
180
  <TelemetrySettingsPanel />
@@ -185,12 +185,12 @@ export function SettingsPage() {
185
185
  {getPackSettingsPanels().map((panel) => (
186
186
  <section
187
187
  key={panel.panelId}
188
- className="space-y-3"
188
+ className="space-y-2"
189
189
  data-testid={`settings-section-${panel.panelId}`}
190
190
  >
191
- <h2 className="flex items-center gap-1.5 text-sm font-semibold text-agent-foreground">
191
+ <h2 className="flex items-center gap-1.5 text-xs font-semibold text-agent-foreground">
192
192
  {panel.Icon ? (
193
- <panel.Icon className="h-4 w-4 text-agent-muted-foreground" />
193
+ <panel.Icon className="h-3.5 w-3.5 text-agent-muted-foreground" />
194
194
  ) : null}
195
195
  {panel.title}
196
196
  </h2>
@@ -58,8 +58,8 @@ body {
58
58
  margin: 0;
59
59
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
60
60
  "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
61
- font-size: 14px;
62
- line-height: 1.5;
61
+ font-size: 12px;
62
+ line-height: 1.45;
63
63
  }
64
64
 
65
65
  /*
@@ -87,6 +87,16 @@ body {
87
87
  white-space: nowrap;
88
88
  }
89
89
 
90
+ /* 12px 字号下收紧工具行:框架卡默认还是 px-3 py-2。 */
91
+ .steerable-tool-execution > button {
92
+ gap: 0.375rem;
93
+ padding: 0.25rem 0.625rem;
94
+ }
95
+
96
+ .steerable-tool-execution > button + div {
97
+ padding: 0.375rem 0.625rem;
98
+ }
99
+
90
100
  /*
91
101
  * ChatInput overlay: the contenteditable must keep a real text fill.
92
102
  * macOS Pinyin inspects fill during the first letter's keydown — before