@townco/ui 0.1.125 → 0.1.126

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.
@@ -349,8 +349,9 @@ export function ChatView({ client, initialSessionId, error: initError, debuggerU
349
349
  _jsx(MessageContent, { message: message, thinkingDisplayStyle: "collapsible" }), (() => {
350
350
  const isLastAssistantMessage = index ===
351
351
  messages.findLastIndex((m) => m.role === "assistant");
352
- // Hide actions for the last assistant message while streaming.
353
- if (isLastAssistantMessage &&
352
+ // Only show MessageActions for the last assistant message,
353
+ // and never while it's streaming.
354
+ if (!isLastAssistantMessage ||
354
355
  message.isStreaming) {
355
356
  return null;
356
357
  }
@@ -241,7 +241,7 @@ export function ToolOperation({ toolCalls, isGrouped = false, autoMinimize = tru
241
241
  const displayText = getDisplayText();
242
242
  // For preliminary/selecting states, show simple non-expandable text
243
243
  if (isSelecting && !isGrouped) {
244
- return (_jsx("div", { className: "flex flex-col rounded-md px-1 -mx-1 w-fit", children: _jsxs("div", { className: "flex items-center gap-1.5", children: [
244
+ return (_jsx("div", { className: "flex flex-col my-4 rounded-md px-1 -mx-1 w-fit", children: _jsxs("div", { className: "flex items-center gap-1.5", children: [
245
245
  _jsx("div", { className: "text-text-secondary/70", children: _jsx(IconComponent, { className: "h-3 w-3" }) }), _jsxs("span", { className: "text-paragraph-xs text-text-muted", children: [displayText, singleToolCall?.startedAt && (_jsx(RunningDuration, { startTime: singleToolCall.startedAt, isRunning: !singleToolCall.subagentCompleted }))] })
246
246
  ] }) }));
247
247
  }
@@ -258,14 +258,14 @@ export function ToolOperation({ toolCalls, isGrouped = false, autoMinimize = tru
258
258
  })();
259
259
  // Check if all tool calls in the group are completed
260
260
  const allCompleted = toolCalls.every((tc) => tc.subagentCompleted);
261
- return (_jsxs("div", { className: "flex flex-col rounded-md px-1 -mx-1 w-fit", children: [
261
+ return (_jsxs("div", { className: "flex flex-col my-4 rounded-md px-1 -mx-1 w-fit", children: [
262
262
  _jsxs("div", { className: "flex items-center gap-1.5", children: [
263
263
  _jsx("div", { className: "text-text-secondary/70", children: _jsx(ListVideo, { className: "h-3 w-3" }) }), _jsx("span", { className: "text-paragraph-sm text-text-secondary/70", children: "Selecting tools" }), selectingStartTime && (_jsx(RunningDuration, { startTime: selectingStartTime, isRunning: !allCompleted })), _jsx("span", { className: "text-[10px] bg-muted px-1.5 py-0.5 rounded text-text-secondary/70", children: toolCalls.length })
264
264
  ] }), _jsx("span", { className: "text-paragraph-sm text-text-secondary/70 pl-4.5", children: displayText })
265
265
  ] }));
266
266
  }
267
267
  // Full display (for single tool call or expanded group, includes minimized state)
268
- return (_jsxs("div", { className: "flex flex-col", children: [
268
+ return (_jsxs("div", { className: "flex flex-col my-4", children: [
269
269
  _jsxs("button", { type: "button", className: "flex flex-col items-start gap-0.5 cursor-pointer bg-transparent border-none p-0 text-left group w-fit rounded-md px-1 -mx-1", onClick: handleHeaderClick, "aria-expanded": isTodoWrite ? undefined : isExpanded, children: [
270
270
  _jsxs("div", { className: "flex items-center gap-1.5", children: [
271
271
  _jsx("div", { className: "text-text-secondary/70 group-hover:text-text-secondary transition-colors", children: _jsx(IconComponent, { className: "h-3 w-3" }) }), _jsxs("span", { className: "text-paragraph-sm text-text-secondary/70 group-hover:text-text-secondary transition-colors", children: [isGrouped && _jsx("span", { className: "mr-1", children: "Parallel operation" }), !isGrouped && displayText] }), isSubagentCall && (_jsx(ContextUsageIndicator, { contextSize: subagentHeaderContextSize, size: 12, className: "text-text-secondary/70 group-hover:text-text-secondary transition-colors" })), !isGrouped &&
@@ -331,7 +331,7 @@ export function ToolOperation({ toolCalls, isGrouped = false, autoMinimize = tru
331
331
  return null;
332
332
  })()] }), !isTodoWrite && isSubagentCall && singleToolCall && (_jsx("div", { className: "pl-4.5 mt-2", children: _jsx(SubAgentDetails, { parentStatus: singleToolCall.status, agentName: singleToolCall.rawInput?.agentName, query: singleToolCall.rawInput?.query, isExpanded: isSubagentExpanded, onExpandChange: setIsSubagentExpanded, storedMessages: singleToolCall.subagentMessages }) })), !isTodoWrite && isExpanded && (_jsx("div", { className: "mt-1", children: isGrouped ? (
333
333
  // Render individual tool calls in group
334
- _jsx("div", { className: "flex flex-col gap-2 mt-1", children: toolCalls.map((toolCall) => {
334
+ _jsx("div", { className: "flex flex-col gap-4 mt-2", children: toolCalls.map((toolCall) => {
335
335
  const hookNotification = hookNotifications.find((n) => n.toolCallId === toolCall.id);
336
336
  return (_jsx(GroupedToolCallItem, { toolCall: toolCall, ...(hookNotification ? { hookNotification } : {}) }, toolCall.id));
337
337
  }) })) : (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@townco/ui",
3
- "version": "0.1.125",
3
+ "version": "0.1.126",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "@radix-ui/react-slot": "^1.2.4",
50
50
  "@radix-ui/react-tabs": "^1.1.13",
51
51
  "@radix-ui/react-tooltip": "^1.2.8",
52
- "@townco/core": "0.0.103",
52
+ "@townco/core": "0.0.104",
53
53
  "@types/mdast": "^4.0.4",
54
54
  "@uiw/react-json-view": "^2.0.0-alpha.39",
55
55
  "class-variance-authority": "^0.7.1",
@@ -67,7 +67,7 @@
67
67
  "zustand": "^5.0.8"
68
68
  },
69
69
  "devDependencies": {
70
- "@townco/tsconfig": "0.1.122",
70
+ "@townco/tsconfig": "0.1.123",
71
71
  "@types/node": "^24.10.0",
72
72
  "@types/react": "^19.2.2",
73
73
  "@types/unist": "^3.0.3",