@adminforth/agent 2.8.1 → 2.8.2
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.
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
class="flex gap-2"
|
|
20
20
|
>
|
|
21
21
|
<span class="mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-lightListTableHeadingText dark:bg-darkListTableHeadingText" />
|
|
22
|
-
<span class="min-w-0 break-words">{{ message }}</span>
|
|
22
|
+
<span class="min-w-0 whitespace-pre-line break-words">{{ message }}</span>
|
|
23
23
|
</li>
|
|
24
24
|
</ul>
|
|
25
25
|
<div class="mt-4 flex flex-wrap gap-2">
|
|
@@ -59,7 +59,9 @@ function formatRecord(record, resource) {
|
|
|
59
59
|
return `${(column === null || column === void 0 ? void 0 : column.label) || humanize(name)}: ${formatValue(value, column)}`;
|
|
60
60
|
});
|
|
61
61
|
const hidden = entries.length - shown.length;
|
|
62
|
-
|
|
62
|
+
const lines = hidden > 0 ? [...shown, `and ${hidden} more`] : shown;
|
|
63
|
+
// One field per line: a wide record is unreadable as a single run-on sentence.
|
|
64
|
+
return lines.join(",\n");
|
|
63
65
|
}
|
|
64
66
|
function actionLabel(resource, actionId) {
|
|
65
67
|
var _a, _b;
|
|
@@ -81,11 +83,11 @@ export function formatApprovalRequest(adminforth, request) {
|
|
|
81
83
|
switch (toolName) {
|
|
82
84
|
case "create_record": {
|
|
83
85
|
const fields = formatRecord(args.record, resource);
|
|
84
|
-
return `Create a new record in ${label}${fields ?
|
|
86
|
+
return `Create a new record in ${label}${fields ? `:\n${fields}` : ""}`;
|
|
85
87
|
}
|
|
86
88
|
case "update_record": {
|
|
87
89
|
const fields = formatRecord(args.record, resource);
|
|
88
|
-
return `Update record with id:${formatValue(args.recordId)} in ${label}${fields ?
|
|
90
|
+
return `Update record with id:${formatValue(args.recordId)} in ${label}${fields ? `, set:\n${fields}` : ""}`;
|
|
89
91
|
}
|
|
90
92
|
case "delete_record":
|
|
91
93
|
return `Delete record with id:${formatValue(args.primaryKey)} from ${label} — this cannot be undone`;
|
|
@@ -98,7 +100,7 @@ export function formatApprovalRequest(adminforth, request) {
|
|
|
98
100
|
}
|
|
99
101
|
default: {
|
|
100
102
|
const fields = formatRecord(args, resource);
|
|
101
|
-
return `${humanize(toolName)}${fields ?
|
|
103
|
+
return `${humanize(toolName)}${fields ? `:\n${fields}` : ""}`;
|
|
102
104
|
}
|
|
103
105
|
}
|
|
104
106
|
}
|