@meshagent/meshagent-tailwind 0.57.0 → 0.57.1
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.
- package/CHANGELOG.md +9 -0
- package/README.md +61 -0
- package/dist/cjs/chat/agent-thread.d.ts +4 -2
- package/dist/cjs/chat/agent-thread.js +79 -44
- package/dist/cjs/chat/chat-input.js +104 -74
- package/dist/cjs/chat/chat-thread-timeline.js +13 -4
- package/dist/cjs/chat/composer-action-button.js +10 -2
- package/dist/cjs/chat/tool-call-status-accumulator.js +57 -48
- package/dist/esm/chat/agent-thread.d.ts +4 -2
- package/dist/esm/chat/agent-thread.js +83 -45
- package/dist/esm/chat/chat-input.js +104 -74
- package/dist/esm/chat/chat-thread-timeline.js +13 -4
- package/dist/esm/chat/composer-action-button.js +10 -2
- package/dist/esm/chat/tool-call-status-accumulator.js +57 -48
- package/package.json +5 -5
|
@@ -108,62 +108,71 @@ class LiveToolCallAccumulator {
|
|
|
108
108
|
return applyPatchStatusInfo({ arguments: call.arguments, deltaText });
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
const maxArgumentDepth = 64;
|
|
112
|
+
const maxArgumentWork = 4096;
|
|
113
|
+
function searchToolArguments(value, pathOnly) {
|
|
114
|
+
const preferredKeys = pathOnly ? ["operation"] : ["patch", "input", "diff"];
|
|
115
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
116
|
+
let remaining = maxArgumentWork;
|
|
117
|
+
let exhausted = false;
|
|
118
|
+
const step = () => {
|
|
119
|
+
if (exhausted || remaining-- <= 0) {
|
|
120
|
+
exhausted = true;
|
|
121
|
+
return false;
|
|
121
122
|
}
|
|
122
|
-
return
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return text;
|
|
129
|
-
}
|
|
123
|
+
return true;
|
|
124
|
+
};
|
|
125
|
+
const find = (current, depth) => {
|
|
126
|
+
if (!step() || depth > maxArgumentDepth) {
|
|
127
|
+
exhausted = true;
|
|
128
|
+
return void 0;
|
|
130
129
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (text != null) {
|
|
134
|
-
return text;
|
|
135
|
-
}
|
|
130
|
+
if (typeof current === "string") {
|
|
131
|
+
return !pathOnly && current.trim() !== "" ? current : void 0;
|
|
136
132
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
if (!isRecord(current) && !Array.isArray(current)) {
|
|
134
|
+
return void 0;
|
|
135
|
+
}
|
|
136
|
+
if (seen.has(current)) {
|
|
137
|
+
return void 0;
|
|
138
|
+
}
|
|
139
|
+
seen.add(current);
|
|
140
|
+
if (Array.isArray(current)) {
|
|
141
|
+
for (const child of current) {
|
|
142
|
+
const result = find(child, depth + 1);
|
|
143
|
+
if (exhausted) return void 0;
|
|
144
|
+
if (result != null) return result;
|
|
146
145
|
}
|
|
146
|
+
return void 0;
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const path = value.path;
|
|
152
|
-
if (typeof path === "string" && path.trim() !== "") {
|
|
153
|
-
return path.trim();
|
|
148
|
+
if (pathOnly) {
|
|
149
|
+
const path = current.path;
|
|
150
|
+
if (typeof path === "string" && path.trim() !== "") return path.trim();
|
|
154
151
|
}
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
for (const key of preferredKeys) {
|
|
153
|
+
if (!step()) return void 0;
|
|
154
|
+
const child = current[key];
|
|
155
|
+
if (child == null) continue;
|
|
156
|
+
const result = find(child, depth + 1);
|
|
157
|
+
if (exhausted) return void 0;
|
|
158
|
+
if (result != null) return result;
|
|
158
159
|
}
|
|
159
|
-
for (const
|
|
160
|
-
|
|
161
|
-
if (
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
for (const key in current) {
|
|
161
|
+
if (!step()) return void 0;
|
|
162
|
+
if (!Object.prototype.hasOwnProperty.call(current, key) || preferredKeys.includes(key)) continue;
|
|
163
|
+
const result = find(current[key], depth + 1);
|
|
164
|
+
if (exhausted) return void 0;
|
|
165
|
+
if (result != null) return result;
|
|
164
166
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
return void 0;
|
|
168
|
+
};
|
|
169
|
+
return find(value, 0);
|
|
170
|
+
}
|
|
171
|
+
function applyPatchTextFromArguments(value) {
|
|
172
|
+
return searchToolArguments(value, false);
|
|
173
|
+
}
|
|
174
|
+
function applyPatchPathFromArguments(value) {
|
|
175
|
+
return searchToolArguments(value, true);
|
|
167
176
|
}
|
|
168
177
|
function applyPatchPathFromText(patch) {
|
|
169
178
|
const filePattern = /^\*\*\* (?:Update|Add|Delete) File: (.+)$/;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshagent/meshagent-tailwind",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.1",
|
|
4
4
|
"description": "Meshagent Tailwind Components",
|
|
5
5
|
"homepage": "https://github.com/meshagent/meshagent-tailwind",
|
|
6
6
|
"scripts": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"CHANGELOG.md"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@meshagent/meshagent": "^0.57.
|
|
39
|
-
"@meshagent/meshagent-agents": "^0.57.
|
|
40
|
-
"@meshagent/meshagent-react": "^0.57.
|
|
41
|
-
"@meshagent/meshagent-livekit": "^0.57.
|
|
38
|
+
"@meshagent/meshagent": "^0.57.1",
|
|
39
|
+
"@meshagent/meshagent-agents": "^0.57.1",
|
|
40
|
+
"@meshagent/meshagent-react": "^0.57.1",
|
|
41
|
+
"@meshagent/meshagent-livekit": "^0.57.1",
|
|
42
42
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
43
43
|
"@radix-ui/react-checkbox": "^1.3.2",
|
|
44
44
|
"@radix-ui/react-dialog": "^1.1.14",
|