@invergent/agent-chat-react 2.14.1 → 2.14.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.
- package/dist/index.cjs +276 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +276 -246
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1309,6 +1309,8 @@ var TOOL_ORB_STATES = {
|
|
|
1309
1309
|
kb_read_page: "searching",
|
|
1310
1310
|
search_files: "searching",
|
|
1311
1311
|
list_files: "searching",
|
|
1312
|
+
skill_view: "searching",
|
|
1313
|
+
skills_list: "searching",
|
|
1312
1314
|
research_memory: "searching",
|
|
1313
1315
|
fetch_channel_messages: "searching",
|
|
1314
1316
|
fetch_channel_file: "searching",
|
|
@@ -1387,7 +1389,6 @@ var SIMPLE_MODE_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1387
1389
|
"search_files",
|
|
1388
1390
|
"session_search",
|
|
1389
1391
|
"skills_list",
|
|
1390
|
-
"skill_view",
|
|
1391
1392
|
"skill_manage",
|
|
1392
1393
|
"process",
|
|
1393
1394
|
"memory",
|
|
@@ -4998,6 +4999,273 @@ function WebSearchGroupBlock({ tcs }) {
|
|
|
4998
4999
|
/* @__PURE__ */ jsx("ul", { className: "mt-1 ml-5 space-y-0.5", children: tcs.map((tc) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WebSearchRow, { tc }) }, tc.id)) })
|
|
4999
5000
|
] });
|
|
5000
5001
|
}
|
|
5002
|
+
|
|
5003
|
+
// src/components/chat/simple-labels.ts
|
|
5004
|
+
function stringField(args, key) {
|
|
5005
|
+
const value = args?.[key];
|
|
5006
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
5007
|
+
}
|
|
5008
|
+
function cancelledToolLabel(toolName) {
|
|
5009
|
+
const map = {
|
|
5010
|
+
terminal: "Command",
|
|
5011
|
+
execute_code: "Execute code",
|
|
5012
|
+
read_file: "Read",
|
|
5013
|
+
write_file: "Write",
|
|
5014
|
+
patch: "Patch",
|
|
5015
|
+
search_files: "Search files",
|
|
5016
|
+
list_files: "List files",
|
|
5017
|
+
web_search: "Web search",
|
|
5018
|
+
web_extract: "Web fetch",
|
|
5019
|
+
web_crawl: "Web crawl",
|
|
5020
|
+
session_search: "Session search",
|
|
5021
|
+
memory: "Memory",
|
|
5022
|
+
todo: "Todo",
|
|
5023
|
+
skills_list: "Skills",
|
|
5024
|
+
skill_view: "Skill",
|
|
5025
|
+
consult_expert: "Expert",
|
|
5026
|
+
delegate_task: "Delegate task",
|
|
5027
|
+
ask_user_question: "Ask User Question",
|
|
5028
|
+
process: "Process",
|
|
5029
|
+
create_artifact: "Create artifact",
|
|
5030
|
+
run_coding_agent: "Coding agent",
|
|
5031
|
+
code_run: "Coding agent",
|
|
5032
|
+
// ``Research memory`` reads as a noun ("memory of research") and
|
|
5033
|
+
// makes the shimmer awkward ("Running Research memory…"). The
|
|
5034
|
+
// one-liner renderer shows just ``Research`` as the label, so
|
|
5035
|
+
// mirror that here so the live shimmer matches the row that
|
|
5036
|
+
// replaces it on completion.
|
|
5037
|
+
research_memory: "Research",
|
|
5038
|
+
research_outline: "Research",
|
|
5039
|
+
generate_image: "image generation",
|
|
5040
|
+
generate_video: "video generation",
|
|
5041
|
+
// Arbor research-mission tools (the /auto-research coordinator loop).
|
|
5042
|
+
idea_tree: "Idea tree",
|
|
5043
|
+
dispatch_experiments: "Dispatch experiments",
|
|
5044
|
+
merge_experiment: "Merge experiment"
|
|
5045
|
+
};
|
|
5046
|
+
if (map[toolName]) return map[toolName];
|
|
5047
|
+
if (toolName.startsWith("mcp__")) return formatMcpToolLabel(toolName);
|
|
5048
|
+
return toolName;
|
|
5049
|
+
}
|
|
5050
|
+
function skillViewLabel(calls) {
|
|
5051
|
+
const args = calls.map((tc) => parseArgs(tc.args));
|
|
5052
|
+
const names = args.map((a) => stringField(a, "name") ?? stringField(a, "skill")).filter((name) => name !== null);
|
|
5053
|
+
if (names.length !== calls.length || names.length === 0) {
|
|
5054
|
+
return calls.length > 1 ? `Reading ${calls.length} skills` : "Reading a skill";
|
|
5055
|
+
}
|
|
5056
|
+
if (calls.length === 1) {
|
|
5057
|
+
const path = stringField(args[0] ?? null, "file_path");
|
|
5058
|
+
return path ? `Reading skill ${names[0]} \xB7 ${lastPathSegment(path)}` : `Reading skill ${names[0]}`;
|
|
5059
|
+
}
|
|
5060
|
+
return `Reading skills ${names.join(", ")}`;
|
|
5061
|
+
}
|
|
5062
|
+
function deriveSingleToolLabel(tc) {
|
|
5063
|
+
const name = cancelledToolLabel(tc.toolName);
|
|
5064
|
+
if (_HEADER_HIDES_DETAIL.has(tc.toolName)) {
|
|
5065
|
+
return _HEADER_GENERIC_VERB[tc.toolName] ?? name;
|
|
5066
|
+
}
|
|
5067
|
+
const detail = extractToolDetail(tc);
|
|
5068
|
+
return detail ? `${name} \xB7 ${detail}` : name;
|
|
5069
|
+
}
|
|
5070
|
+
var _HEADER_HIDES_DETAIL = /* @__PURE__ */ new Set([
|
|
5071
|
+
"terminal",
|
|
5072
|
+
"execute_code",
|
|
5073
|
+
"memory"
|
|
5074
|
+
]);
|
|
5075
|
+
var _HEADER_GENERIC_VERB = {
|
|
5076
|
+
terminal: "Ran a command",
|
|
5077
|
+
execute_code: "Executed code",
|
|
5078
|
+
memory: "Updated memory"
|
|
5079
|
+
};
|
|
5080
|
+
function extractToolDetail(tc) {
|
|
5081
|
+
const args = parseArgs(tc.args);
|
|
5082
|
+
if (!args) return null;
|
|
5083
|
+
const stringArg = (key) => stringField(args, key);
|
|
5084
|
+
switch (tc.toolName) {
|
|
5085
|
+
case "read_file":
|
|
5086
|
+
case "write_file":
|
|
5087
|
+
case "patch":
|
|
5088
|
+
case "list_files": {
|
|
5089
|
+
const path = stringArg("path") ?? stringArg("file_path");
|
|
5090
|
+
return path ? lastPathSegment(path) : null;
|
|
5091
|
+
}
|
|
5092
|
+
// ``pattern`` is the query; ``path`` is the optional root to search
|
|
5093
|
+
// under. Reading ``path`` here labelled the search *directory* as
|
|
5094
|
+
// the query, and dropped the label entirely for the common
|
|
5095
|
+
// whole-workspace search that omits it.
|
|
5096
|
+
case "search_files":
|
|
5097
|
+
return stringArg("pattern") ?? stringArg("query");
|
|
5098
|
+
case "terminal": {
|
|
5099
|
+
const cmd = stringArg("command");
|
|
5100
|
+
return cmd ? truncate3(cmd, 40) : null;
|
|
5101
|
+
}
|
|
5102
|
+
case "execute_code": {
|
|
5103
|
+
const code3 = stringArg("code");
|
|
5104
|
+
return code3 ? truncate3(code3.split("\n")[0] ?? "", 40) : null;
|
|
5105
|
+
}
|
|
5106
|
+
case "web_search":
|
|
5107
|
+
case "web_crawl":
|
|
5108
|
+
return stringArg("query");
|
|
5109
|
+
case "web_extract": {
|
|
5110
|
+
const url = stringArg("url");
|
|
5111
|
+
if (!url) return null;
|
|
5112
|
+
try {
|
|
5113
|
+
return new URL(url).hostname.replace(/^www\./, "");
|
|
5114
|
+
} catch {
|
|
5115
|
+
return truncate3(url, 40);
|
|
5116
|
+
}
|
|
5117
|
+
}
|
|
5118
|
+
case "skill_view":
|
|
5119
|
+
case "skill_manage":
|
|
5120
|
+
return stringArg("name") ?? stringArg("skill");
|
|
5121
|
+
case "create_artifact":
|
|
5122
|
+
case "consult_expert":
|
|
5123
|
+
case "delegate_task":
|
|
5124
|
+
return stringArg("name") ?? stringArg("task") ?? stringArg("title");
|
|
5125
|
+
case "run_coding_agent":
|
|
5126
|
+
case "code_run": {
|
|
5127
|
+
const prompt = stringArg("prompt");
|
|
5128
|
+
return prompt ? truncate3(prompt, 60) : null;
|
|
5129
|
+
}
|
|
5130
|
+
case "idea_tree":
|
|
5131
|
+
return stringArg("action");
|
|
5132
|
+
case "dispatch_experiments": {
|
|
5133
|
+
const keys = args.node_keys;
|
|
5134
|
+
if (Array.isArray(keys) && keys.length > 0) {
|
|
5135
|
+
return truncate3(keys.map((k) => String(k)).join(", "), 40);
|
|
5136
|
+
}
|
|
5137
|
+
return stringArg("action");
|
|
5138
|
+
}
|
|
5139
|
+
case "merge_experiment":
|
|
5140
|
+
return stringArg("node_key") ?? stringArg("action");
|
|
5141
|
+
case "memory":
|
|
5142
|
+
return stringArg("action") ?? stringArg("key");
|
|
5143
|
+
case "research_memory": {
|
|
5144
|
+
const action = stringArg("action");
|
|
5145
|
+
if (action === "add") {
|
|
5146
|
+
const title = stringArg("title");
|
|
5147
|
+
if (title) return truncate3(title, 60);
|
|
5148
|
+
const url = stringArg("url");
|
|
5149
|
+
if (url) {
|
|
5150
|
+
try {
|
|
5151
|
+
return new URL(url).hostname.replace(/^www\./, "");
|
|
5152
|
+
} catch {
|
|
5153
|
+
return truncate3(url, 40);
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
return null;
|
|
5157
|
+
}
|
|
5158
|
+
if (action === "retrieve") {
|
|
5159
|
+
return stringArg("query");
|
|
5160
|
+
}
|
|
5161
|
+
return action;
|
|
5162
|
+
}
|
|
5163
|
+
case "research_outline": {
|
|
5164
|
+
const action = stringArg("action");
|
|
5165
|
+
if (action === "set") {
|
|
5166
|
+
const outline = stringArg("outline");
|
|
5167
|
+
if (outline) {
|
|
5168
|
+
const sections = outline.split(/\r?\n/).filter((line) => /^#{2,6}\s+\S/.test(line)).length;
|
|
5169
|
+
if (sections > 0) {
|
|
5170
|
+
return `${sections} ${sections === 1 ? "section" : "sections"}`;
|
|
5171
|
+
}
|
|
5172
|
+
}
|
|
5173
|
+
return "outline";
|
|
5174
|
+
}
|
|
5175
|
+
return action;
|
|
5176
|
+
}
|
|
5177
|
+
default:
|
|
5178
|
+
return null;
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5181
|
+
function lastPathSegment(path) {
|
|
5182
|
+
const cleaned = path.replace(/\/+$/, "");
|
|
5183
|
+
const idx = cleaned.lastIndexOf("/");
|
|
5184
|
+
return idx >= 0 ? cleaned.slice(idx + 1) : cleaned;
|
|
5185
|
+
}
|
|
5186
|
+
function truncate3(s, max) {
|
|
5187
|
+
return s.length > max ? `${s.slice(0, max - 1)}\u2026` : s;
|
|
5188
|
+
}
|
|
5189
|
+
function toolRowLabel(tc) {
|
|
5190
|
+
const detail = extractToolDetail(tc);
|
|
5191
|
+
switch (tc.toolName) {
|
|
5192
|
+
case "read_file":
|
|
5193
|
+
return detail ? `Read ${detail}` : "Read a file";
|
|
5194
|
+
case "write_file":
|
|
5195
|
+
return detail ? `Wrote ${detail}` : "Wrote a file";
|
|
5196
|
+
case "patch":
|
|
5197
|
+
return detail ? `Edited ${detail}` : "Edited a file";
|
|
5198
|
+
case "list_files":
|
|
5199
|
+
return detail ? `Listed ${detail}` : "Listed files";
|
|
5200
|
+
case "search_files": {
|
|
5201
|
+
if (!detail) return "Searched files";
|
|
5202
|
+
const target = stringField(parseArgs(tc.args), "target");
|
|
5203
|
+
return target === "files" || target === "find" ? `Looked for files named "${detail}"` : `Searched files for "${detail}"`;
|
|
5204
|
+
}
|
|
5205
|
+
case "terminal":
|
|
5206
|
+
return "Ran a command";
|
|
5207
|
+
case "execute_code":
|
|
5208
|
+
return "Executed code";
|
|
5209
|
+
case "web_search":
|
|
5210
|
+
return detail ? `Searched the web for "${detail}"` : "Searched the web";
|
|
5211
|
+
case "web_crawl":
|
|
5212
|
+
return detail ? `Crawled "${detail}"` : "Crawled the web";
|
|
5213
|
+
case "web_extract":
|
|
5214
|
+
return detail ? `Fetched ${detail}` : "Fetched a page";
|
|
5215
|
+
case "session_search":
|
|
5216
|
+
return detail ? `Searched session for "${detail}"` : "Searched session";
|
|
5217
|
+
case "skill_view":
|
|
5218
|
+
return skillViewLabel([tc]);
|
|
5219
|
+
case "skills_list":
|
|
5220
|
+
return "Listed available skills";
|
|
5221
|
+
case "skill_manage":
|
|
5222
|
+
return detail ? `Updated skill ${detail}` : "Managed skills";
|
|
5223
|
+
case "consult_expert":
|
|
5224
|
+
return detail ? `Consulted ${detail} expert` : "Consulted an expert";
|
|
5225
|
+
case "delegate_task":
|
|
5226
|
+
return detail ? `Delegated: ${detail}` : "Delegated a task";
|
|
5227
|
+
case "create_artifact":
|
|
5228
|
+
return detail ? `Created artifact "${detail}"` : "Created an artifact";
|
|
5229
|
+
case "memory":
|
|
5230
|
+
return detail ? `Memory ${detail}` : "Updated memory";
|
|
5231
|
+
case "todo":
|
|
5232
|
+
return detail ? `Todo ${detail}` : "Updated todo list";
|
|
5233
|
+
case "run_coding_agent":
|
|
5234
|
+
case "code_run": {
|
|
5235
|
+
const a = parseArgs(tc.args);
|
|
5236
|
+
const agent = a?.agent ?? (a?.provider === "openai" ? "codex" : a?.provider === "anthropic" ? "claude" : void 0);
|
|
5237
|
+
const name = agent === "codex" ? "Codex" : agent === "claude" ? "Claude Code" : "coding agent";
|
|
5238
|
+
return detail ? `${name}: ${detail}` : `Ran ${name}`;
|
|
5239
|
+
}
|
|
5240
|
+
case "research_memory": {
|
|
5241
|
+
const args = parseArgs(tc.args);
|
|
5242
|
+
const action = args?.action;
|
|
5243
|
+
if (action === "add") {
|
|
5244
|
+
return detail ? `Stored source "${detail}"` : "Stored a source";
|
|
5245
|
+
}
|
|
5246
|
+
if (action === "retrieve") {
|
|
5247
|
+
return detail ? `Retrieved sources for "${detail}"` : "Retrieved sources";
|
|
5248
|
+
}
|
|
5249
|
+
if (action === "list") {
|
|
5250
|
+
return "Listed sources";
|
|
5251
|
+
}
|
|
5252
|
+
return "Updated research memory";
|
|
5253
|
+
}
|
|
5254
|
+
case "research_outline": {
|
|
5255
|
+
const args = parseArgs(tc.args);
|
|
5256
|
+
const action = args?.action;
|
|
5257
|
+
if (action === "set") {
|
|
5258
|
+
return detail ? `Updated outline (${detail})` : "Updated outline";
|
|
5259
|
+
}
|
|
5260
|
+
if (action === "get") {
|
|
5261
|
+
return "Read outline";
|
|
5262
|
+
}
|
|
5263
|
+
return "Touched outline";
|
|
5264
|
+
}
|
|
5265
|
+
default:
|
|
5266
|
+
return cancelledToolLabel(tc.toolName);
|
|
5267
|
+
}
|
|
5268
|
+
}
|
|
5001
5269
|
var COLLAPSED_MAX_HEIGHT_PX = 160;
|
|
5002
5270
|
var ChatMessage = memo(function ChatMessage2({
|
|
5003
5271
|
message,
|
|
@@ -11816,48 +12084,6 @@ function OrphanSystemMarker({
|
|
|
11816
12084
|
}
|
|
11817
12085
|
return null;
|
|
11818
12086
|
}
|
|
11819
|
-
function cancelledToolLabel(toolName) {
|
|
11820
|
-
const map = {
|
|
11821
|
-
terminal: "Command",
|
|
11822
|
-
execute_code: "Execute code",
|
|
11823
|
-
read_file: "Read",
|
|
11824
|
-
write_file: "Write",
|
|
11825
|
-
patch: "Patch",
|
|
11826
|
-
search_files: "Search files",
|
|
11827
|
-
list_files: "List files",
|
|
11828
|
-
web_search: "Web search",
|
|
11829
|
-
web_extract: "Web fetch",
|
|
11830
|
-
web_crawl: "Web crawl",
|
|
11831
|
-
session_search: "Session search",
|
|
11832
|
-
memory: "Memory",
|
|
11833
|
-
todo: "Todo",
|
|
11834
|
-
skills_list: "Skills",
|
|
11835
|
-
skill_view: "Skill",
|
|
11836
|
-
consult_expert: "Expert",
|
|
11837
|
-
delegate_task: "Delegate task",
|
|
11838
|
-
ask_user_question: "Ask User Question",
|
|
11839
|
-
process: "Process",
|
|
11840
|
-
create_artifact: "Create artifact",
|
|
11841
|
-
run_coding_agent: "Coding agent",
|
|
11842
|
-
code_run: "Coding agent",
|
|
11843
|
-
// ``Research memory`` reads as a noun ("memory of research") and
|
|
11844
|
-
// makes the shimmer awkward ("Running Research memory…"). The
|
|
11845
|
-
// one-liner renderer shows just ``Research`` as the label, so
|
|
11846
|
-
// mirror that here so the live shimmer matches the row that
|
|
11847
|
-
// replaces it on completion.
|
|
11848
|
-
research_memory: "Research",
|
|
11849
|
-
research_outline: "Research",
|
|
11850
|
-
generate_image: "image generation",
|
|
11851
|
-
generate_video: "video generation",
|
|
11852
|
-
// Arbor research-mission tools (the /auto-research coordinator loop).
|
|
11853
|
-
idea_tree: "Idea tree",
|
|
11854
|
-
dispatch_experiments: "Dispatch experiments",
|
|
11855
|
-
merge_experiment: "Merge experiment"
|
|
11856
|
-
};
|
|
11857
|
-
if (map[toolName]) return map[toolName];
|
|
11858
|
-
if (toolName.startsWith("mcp__")) return formatMcpToolLabel(toolName);
|
|
11859
|
-
return toolName;
|
|
11860
|
-
}
|
|
11861
12087
|
function CancelledToolRow({ tc }) {
|
|
11862
12088
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-sm", children: [
|
|
11863
12089
|
/* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground/60", children: cancelledToolLabel(tc.toolName) }),
|
|
@@ -12070,6 +12296,9 @@ function deriveIterationLabel(message) {
|
|
|
12070
12296
|
if (calls.length === 0) {
|
|
12071
12297
|
return message.reasoning ? "Thought through the problem" : null;
|
|
12072
12298
|
}
|
|
12299
|
+
if (calls.every((tc) => tc.toolName === "skill_view")) {
|
|
12300
|
+
return skillViewLabel(calls);
|
|
12301
|
+
}
|
|
12073
12302
|
if (calls.length === 1) {
|
|
12074
12303
|
const tc = calls[0];
|
|
12075
12304
|
return deriveSingleToolLabel(tc);
|
|
@@ -12082,131 +12311,6 @@ function deriveIterationLabel(message) {
|
|
|
12082
12311
|
}
|
|
12083
12312
|
return `Used ${calls.length} tools`;
|
|
12084
12313
|
}
|
|
12085
|
-
function deriveSingleToolLabel(tc) {
|
|
12086
|
-
const name = cancelledToolLabel(tc.toolName);
|
|
12087
|
-
if (_HEADER_HIDES_DETAIL.has(tc.toolName)) {
|
|
12088
|
-
return _HEADER_GENERIC_VERB[tc.toolName] ?? name;
|
|
12089
|
-
}
|
|
12090
|
-
const detail = extractToolDetail(tc);
|
|
12091
|
-
return detail ? `${name} \xB7 ${detail}` : name;
|
|
12092
|
-
}
|
|
12093
|
-
var _HEADER_HIDES_DETAIL = /* @__PURE__ */ new Set([
|
|
12094
|
-
"terminal",
|
|
12095
|
-
"execute_code",
|
|
12096
|
-
"memory"
|
|
12097
|
-
]);
|
|
12098
|
-
var _HEADER_GENERIC_VERB = {
|
|
12099
|
-
terminal: "Ran a command",
|
|
12100
|
-
execute_code: "Executed code",
|
|
12101
|
-
memory: "Updated memory"
|
|
12102
|
-
};
|
|
12103
|
-
function extractToolDetail(tc) {
|
|
12104
|
-
const args = parseArgs(tc.args);
|
|
12105
|
-
if (!args) return null;
|
|
12106
|
-
const stringArg = (key) => {
|
|
12107
|
-
const v = args[key];
|
|
12108
|
-
return typeof v === "string" && v.length > 0 ? v : null;
|
|
12109
|
-
};
|
|
12110
|
-
switch (tc.toolName) {
|
|
12111
|
-
case "read_file":
|
|
12112
|
-
case "write_file":
|
|
12113
|
-
case "patch":
|
|
12114
|
-
case "list_files":
|
|
12115
|
-
case "search_files": {
|
|
12116
|
-
const path = stringArg("path") ?? stringArg("file_path");
|
|
12117
|
-
return path ? lastPathSegment(path) : null;
|
|
12118
|
-
}
|
|
12119
|
-
case "terminal": {
|
|
12120
|
-
const cmd = stringArg("command");
|
|
12121
|
-
return cmd ? truncate3(cmd, 40) : null;
|
|
12122
|
-
}
|
|
12123
|
-
case "execute_code": {
|
|
12124
|
-
const code3 = stringArg("code");
|
|
12125
|
-
return code3 ? truncate3(code3.split("\n")[0] ?? "", 40) : null;
|
|
12126
|
-
}
|
|
12127
|
-
case "web_search":
|
|
12128
|
-
case "web_crawl":
|
|
12129
|
-
return stringArg("query");
|
|
12130
|
-
case "web_extract": {
|
|
12131
|
-
const url = stringArg("url");
|
|
12132
|
-
if (!url) return null;
|
|
12133
|
-
try {
|
|
12134
|
-
return new URL(url).hostname.replace(/^www\./, "");
|
|
12135
|
-
} catch {
|
|
12136
|
-
return truncate3(url, 40);
|
|
12137
|
-
}
|
|
12138
|
-
}
|
|
12139
|
-
case "skill_view":
|
|
12140
|
-
case "skill_manage":
|
|
12141
|
-
return stringArg("name") ?? stringArg("skill");
|
|
12142
|
-
case "create_artifact":
|
|
12143
|
-
case "consult_expert":
|
|
12144
|
-
case "delegate_task":
|
|
12145
|
-
return stringArg("name") ?? stringArg("task") ?? stringArg("title");
|
|
12146
|
-
case "run_coding_agent":
|
|
12147
|
-
case "code_run": {
|
|
12148
|
-
const prompt = stringArg("prompt");
|
|
12149
|
-
return prompt ? truncate3(prompt, 60) : null;
|
|
12150
|
-
}
|
|
12151
|
-
case "idea_tree":
|
|
12152
|
-
return stringArg("action");
|
|
12153
|
-
case "dispatch_experiments": {
|
|
12154
|
-
const keys = args.node_keys;
|
|
12155
|
-
if (Array.isArray(keys) && keys.length > 0) {
|
|
12156
|
-
return truncate3(keys.map((k) => String(k)).join(", "), 40);
|
|
12157
|
-
}
|
|
12158
|
-
return stringArg("action");
|
|
12159
|
-
}
|
|
12160
|
-
case "merge_experiment":
|
|
12161
|
-
return stringArg("node_key") ?? stringArg("action");
|
|
12162
|
-
case "memory":
|
|
12163
|
-
return stringArg("action") ?? stringArg("key");
|
|
12164
|
-
case "research_memory": {
|
|
12165
|
-
const action = stringArg("action");
|
|
12166
|
-
if (action === "add") {
|
|
12167
|
-
const title = stringArg("title");
|
|
12168
|
-
if (title) return truncate3(title, 60);
|
|
12169
|
-
const url = stringArg("url");
|
|
12170
|
-
if (url) {
|
|
12171
|
-
try {
|
|
12172
|
-
return new URL(url).hostname.replace(/^www\./, "");
|
|
12173
|
-
} catch {
|
|
12174
|
-
return truncate3(url, 40);
|
|
12175
|
-
}
|
|
12176
|
-
}
|
|
12177
|
-
return null;
|
|
12178
|
-
}
|
|
12179
|
-
if (action === "retrieve") {
|
|
12180
|
-
return stringArg("query");
|
|
12181
|
-
}
|
|
12182
|
-
return action;
|
|
12183
|
-
}
|
|
12184
|
-
case "research_outline": {
|
|
12185
|
-
const action = stringArg("action");
|
|
12186
|
-
if (action === "set") {
|
|
12187
|
-
const outline = stringArg("outline");
|
|
12188
|
-
if (outline) {
|
|
12189
|
-
const sections = outline.split(/\r?\n/).filter((line) => /^#{2,6}\s+\S/.test(line)).length;
|
|
12190
|
-
if (sections > 0) {
|
|
12191
|
-
return `${sections} ${sections === 1 ? "section" : "sections"}`;
|
|
12192
|
-
}
|
|
12193
|
-
}
|
|
12194
|
-
return "outline";
|
|
12195
|
-
}
|
|
12196
|
-
return action;
|
|
12197
|
-
}
|
|
12198
|
-
default:
|
|
12199
|
-
return null;
|
|
12200
|
-
}
|
|
12201
|
-
}
|
|
12202
|
-
function lastPathSegment(path) {
|
|
12203
|
-
const cleaned = path.replace(/\/+$/, "");
|
|
12204
|
-
const idx = cleaned.lastIndexOf("/");
|
|
12205
|
-
return idx >= 0 ? cleaned.slice(idx + 1) : cleaned;
|
|
12206
|
-
}
|
|
12207
|
-
function truncate3(s, max) {
|
|
12208
|
-
return s.length > max ? `${s.slice(0, max - 1)}\u2026` : s;
|
|
12209
|
-
}
|
|
12210
12314
|
function visibleToolCalls(message) {
|
|
12211
12315
|
return (message.toolCalls ?? []).filter((tc) => {
|
|
12212
12316
|
if (isHiddenSimpleTool(tc)) return false;
|
|
@@ -12227,6 +12331,9 @@ function liveIterationLabel(message) {
|
|
|
12227
12331
|
(tc) => tc.status === "running" && !isHiddenSimpleTool(tc)
|
|
12228
12332
|
);
|
|
12229
12333
|
if (running.length === 0) return "Thinking\u2026";
|
|
12334
|
+
if (running.every((tc) => tc.toolName === "skill_view")) {
|
|
12335
|
+
return `${skillViewLabel(running)}\u2026`;
|
|
12336
|
+
}
|
|
12230
12337
|
if (running.length === 1) {
|
|
12231
12338
|
const tc = running[0];
|
|
12232
12339
|
const name = cancelledToolLabel(tc.toolName);
|
|
@@ -12268,83 +12375,6 @@ var _TOOL_ROW_ICON = {
|
|
|
12268
12375
|
function _toolRowIcon(toolName) {
|
|
12269
12376
|
return _TOOL_ROW_ICON[toolName] ?? WrenchIcon;
|
|
12270
12377
|
}
|
|
12271
|
-
function _toolRowLabel(tc) {
|
|
12272
|
-
const detail = extractToolDetail(tc);
|
|
12273
|
-
switch (tc.toolName) {
|
|
12274
|
-
case "read_file":
|
|
12275
|
-
return detail ? `Read ${detail}` : "Read a file";
|
|
12276
|
-
case "write_file":
|
|
12277
|
-
return detail ? `Wrote ${detail}` : "Wrote a file";
|
|
12278
|
-
case "patch":
|
|
12279
|
-
return detail ? `Edited ${detail}` : "Edited a file";
|
|
12280
|
-
case "list_files":
|
|
12281
|
-
return detail ? `Listed ${detail}` : "Listed files";
|
|
12282
|
-
case "search_files":
|
|
12283
|
-
return detail ? `Searched files for "${detail}"` : "Searched files";
|
|
12284
|
-
case "terminal":
|
|
12285
|
-
return "Ran a command";
|
|
12286
|
-
case "execute_code":
|
|
12287
|
-
return "Executed code";
|
|
12288
|
-
case "web_search":
|
|
12289
|
-
return detail ? `Searched the web for "${detail}"` : "Searched the web";
|
|
12290
|
-
case "web_crawl":
|
|
12291
|
-
return detail ? `Crawled "${detail}"` : "Crawled the web";
|
|
12292
|
-
case "web_extract":
|
|
12293
|
-
return detail ? `Fetched ${detail}` : "Fetched a page";
|
|
12294
|
-
case "session_search":
|
|
12295
|
-
return detail ? `Searched session for "${detail}"` : "Searched session";
|
|
12296
|
-
case "skill_view":
|
|
12297
|
-
return detail ? `Read the ${detail} skill` : "Read a skill";
|
|
12298
|
-
case "skills_list":
|
|
12299
|
-
return "Listed available skills";
|
|
12300
|
-
case "skill_manage":
|
|
12301
|
-
return detail ? `Updated skill ${detail}` : "Managed skills";
|
|
12302
|
-
case "consult_expert":
|
|
12303
|
-
return detail ? `Consulted ${detail} expert` : "Consulted an expert";
|
|
12304
|
-
case "delegate_task":
|
|
12305
|
-
return detail ? `Delegated: ${detail}` : "Delegated a task";
|
|
12306
|
-
case "create_artifact":
|
|
12307
|
-
return detail ? `Created artifact "${detail}"` : "Created an artifact";
|
|
12308
|
-
case "memory":
|
|
12309
|
-
return detail ? `Memory ${detail}` : "Updated memory";
|
|
12310
|
-
case "todo":
|
|
12311
|
-
return detail ? `Todo ${detail}` : "Updated todo list";
|
|
12312
|
-
case "run_coding_agent":
|
|
12313
|
-
case "code_run": {
|
|
12314
|
-
const a = parseArgs(tc.args);
|
|
12315
|
-
const agent = a?.agent ?? (a?.provider === "openai" ? "codex" : a?.provider === "anthropic" ? "claude" : void 0);
|
|
12316
|
-
const name = agent === "codex" ? "Codex" : agent === "claude" ? "Claude Code" : "coding agent";
|
|
12317
|
-
return detail ? `${name}: ${detail}` : `Ran ${name}`;
|
|
12318
|
-
}
|
|
12319
|
-
case "research_memory": {
|
|
12320
|
-
const args = parseArgs(tc.args);
|
|
12321
|
-
const action = args?.action;
|
|
12322
|
-
if (action === "add") {
|
|
12323
|
-
return detail ? `Stored source "${detail}"` : "Stored a source";
|
|
12324
|
-
}
|
|
12325
|
-
if (action === "retrieve") {
|
|
12326
|
-
return detail ? `Retrieved sources for "${detail}"` : "Retrieved sources";
|
|
12327
|
-
}
|
|
12328
|
-
if (action === "list") {
|
|
12329
|
-
return "Listed sources";
|
|
12330
|
-
}
|
|
12331
|
-
return "Updated research memory";
|
|
12332
|
-
}
|
|
12333
|
-
case "research_outline": {
|
|
12334
|
-
const args = parseArgs(tc.args);
|
|
12335
|
-
const action = args?.action;
|
|
12336
|
-
if (action === "set") {
|
|
12337
|
-
return detail ? `Updated outline (${detail})` : "Updated outline";
|
|
12338
|
-
}
|
|
12339
|
-
if (action === "get") {
|
|
12340
|
-
return "Read outline";
|
|
12341
|
-
}
|
|
12342
|
-
return "Touched outline";
|
|
12343
|
-
}
|
|
12344
|
-
default:
|
|
12345
|
-
return cancelledToolLabel(tc.toolName);
|
|
12346
|
-
}
|
|
12347
|
-
}
|
|
12348
12378
|
function SimpleDetailRow({ icon: Icon, children }) {
|
|
12349
12379
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 text-sm", children: [
|
|
12350
12380
|
/* @__PURE__ */ jsx(
|
|
@@ -12402,7 +12432,7 @@ function IterationExpanded({
|
|
|
12402
12432
|
if (tc.toolName === "code_run") {
|
|
12403
12433
|
return /* @__PURE__ */ jsx("div", { className: "pr-1", children: /* @__PURE__ */ jsx(CodeRunToolBlock, { tc, defaultOpen: true }) }, tc.id);
|
|
12404
12434
|
}
|
|
12405
|
-
return /* @__PURE__ */ jsx(SimpleDetailRow, { icon: _toolRowIcon(tc.toolName), children: /* @__PURE__ */ jsx("span", { children:
|
|
12435
|
+
return /* @__PURE__ */ jsx(SimpleDetailRow, { icon: _toolRowIcon(tc.toolName), children: /* @__PURE__ */ jsx("span", { children: toolRowLabel(tc) }) }, tc.id);
|
|
12406
12436
|
}),
|
|
12407
12437
|
showDone && /* @__PURE__ */ jsx(SimpleDetailRow, { icon: CircleCheckIcon, children: /* @__PURE__ */ jsx("span", { className: "text-foreground", children: "Done" }) })
|
|
12408
12438
|
] });
|