@townco/ui 0.1.126 → 0.1.127
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.
|
@@ -347,8 +347,13 @@ export function ChatView({ client, initialSessionId, error: initError, debuggerU
|
|
|
347
347
|
setEditingMessageIndex(isEditing ? index : null);
|
|
348
348
|
} })) : (_jsxs(_Fragment, { children: [
|
|
349
349
|
_jsx(MessageContent, { message: message, thinkingDisplayStyle: "collapsible" }), (() => {
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
// "Last assistant message" for actions should mean the last
|
|
351
|
+
// assistant message that actually has text content.
|
|
352
|
+
// (Tool-only assistant messages exist and should not steal the
|
|
353
|
+
// action row from the last text response.)
|
|
354
|
+
const lastTextAssistantIndex = messages.findLastIndex((m) => m.role === "assistant" &&
|
|
355
|
+
Boolean(m.content?.trim()));
|
|
356
|
+
const isLastAssistantMessage = index === lastTextAssistantIndex;
|
|
352
357
|
// Only show MessageActions for the last assistant message,
|
|
353
358
|
// and never while it's streaming.
|
|
354
359
|
if (!isLastAssistantMessage ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.127",
|
|
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.
|
|
52
|
+
"@townco/core": "0.0.105",
|
|
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.
|
|
70
|
+
"@townco/tsconfig": "0.1.124",
|
|
71
71
|
"@types/node": "^24.10.0",
|
|
72
72
|
"@types/react": "^19.2.2",
|
|
73
73
|
"@types/unist": "^3.0.3",
|