Skip to content

Commit d25c7fe

Browse files
committed
Improve
1 parent 168cd58 commit d25c7fe

3 files changed

Lines changed: 4 additions & 94 deletions

File tree

apps/sim/lib/copilot/client-sse/run-tool-execution.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ function buildResultData(result: unknown): Record<string, unknown> | undefined {
271271
return {
272272
success: r.success,
273273
output: r.output,
274+
logs: r.logs,
274275
error: r.error,
275276
}
276277
}
@@ -280,6 +281,7 @@ function buildResultData(result: unknown): Record<string, unknown> | undefined {
280281
return {
281282
success: exec.success,
282283
output: exec.output,
284+
logs: exec.logs,
283285
error: exec.error,
284286
}
285287
}

apps/sim/lib/copilot/orchestrator/tool-executor/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,8 @@ const SIM_WORKFLOW_TOOL_HANDLERS: Record<
10231023
/**
10241024
* Check whether a tool can be executed on the Sim (TypeScript) side.
10251025
*
1026-
* Tools that are only available on the Go backend (e.g. search_patterns,
1027-
* search_errors, remember_debug) will return false. The subagent tool_call
1026+
* Tools that are only available on the Go backend (e.g. search_patterns)
1027+
* will return false. The subagent tool_call
10281028
* handler uses this to decide whether to execute a tool locally or let the
10291029
* Go backend's own tool_result SSE event handle it.
10301030
*/

apps/sim/lib/copilot/tools/client/tool-display-registry.ts

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,63 +1318,7 @@ const META_redeploy: ToolMetadata = {
13181318
interrupt: undefined,
13191319
}
13201320

1321-
const META_remember_debug: ToolMetadata = {
1322-
displayNames: {
1323-
[ClientToolCallState.generating]: { text: 'Validating fix', icon: Loader2 },
1324-
[ClientToolCallState.pending]: { text: 'Validating fix', icon: Loader2 },
1325-
[ClientToolCallState.executing]: { text: 'Validating fix', icon: Loader2 },
1326-
[ClientToolCallState.success]: { text: 'Validated fix', icon: CheckCircle2 },
1327-
[ClientToolCallState.error]: { text: 'Failed to validate', icon: XCircle },
1328-
[ClientToolCallState.aborted]: { text: 'Aborted validation', icon: MinusCircle },
1329-
[ClientToolCallState.rejected]: { text: 'Skipped validation', icon: MinusCircle },
1330-
},
1331-
interrupt: undefined,
1332-
getDynamicText: (params, state) => {
1333-
const operation = params?.operation
13341321

1335-
if (operation === 'add' || operation === 'edit') {
1336-
// For add/edit, show from problem or solution
1337-
const text = params?.problem || params?.solution
1338-
if (text && typeof text === 'string') {
1339-
switch (state) {
1340-
case ClientToolCallState.success:
1341-
return `Validated fix ${text}`
1342-
case ClientToolCallState.executing:
1343-
case ClientToolCallState.generating:
1344-
case ClientToolCallState.pending:
1345-
return `Validating fix ${text}`
1346-
case ClientToolCallState.error:
1347-
return `Failed to validate fix ${text}`
1348-
case ClientToolCallState.aborted:
1349-
return `Aborted validating fix ${text}`
1350-
case ClientToolCallState.rejected:
1351-
return `Skipped validating fix ${text}`
1352-
}
1353-
}
1354-
} else if (operation === 'delete') {
1355-
// For delete, show from problem or solution (or id as fallback)
1356-
const text = params?.problem || params?.solution || params?.id
1357-
if (text && typeof text === 'string') {
1358-
switch (state) {
1359-
case ClientToolCallState.success:
1360-
return `Adjusted fix ${text}`
1361-
case ClientToolCallState.executing:
1362-
case ClientToolCallState.generating:
1363-
case ClientToolCallState.pending:
1364-
return `Adjusting fix ${text}`
1365-
case ClientToolCallState.error:
1366-
return `Failed to adjust fix ${text}`
1367-
case ClientToolCallState.aborted:
1368-
return `Aborted adjusting fix ${text}`
1369-
case ClientToolCallState.rejected:
1370-
return `Skipped adjusting fix ${text}`
1371-
}
1372-
}
1373-
}
1374-
1375-
return undefined
1376-
},
1377-
}
13781322

13791323
const META_research: ToolMetadata = {
13801324
displayNames: {
@@ -1784,40 +1728,6 @@ const META_search_documentation: ToolMetadata = {
17841728
},
17851729
}
17861730

1787-
const META_search_errors: ToolMetadata = {
1788-
displayNames: {
1789-
[ClientToolCallState.generating]: { text: 'Debugging', icon: Loader2 },
1790-
[ClientToolCallState.pending]: { text: 'Debugging', icon: Loader2 },
1791-
[ClientToolCallState.executing]: { text: 'Debugging', icon: Loader2 },
1792-
[ClientToolCallState.success]: { text: 'Debugged', icon: Bug },
1793-
[ClientToolCallState.error]: { text: 'Failed to debug', icon: XCircle },
1794-
[ClientToolCallState.aborted]: { text: 'Aborted debugging', icon: MinusCircle },
1795-
[ClientToolCallState.rejected]: { text: 'Skipped debugging', icon: MinusCircle },
1796-
},
1797-
interrupt: undefined,
1798-
getDynamicText: (params, state) => {
1799-
if (params?.query && typeof params.query === 'string') {
1800-
const query = params.query
1801-
1802-
switch (state) {
1803-
case ClientToolCallState.success:
1804-
return `Debugged ${query}`
1805-
case ClientToolCallState.executing:
1806-
case ClientToolCallState.generating:
1807-
case ClientToolCallState.pending:
1808-
return `Debugging ${query}`
1809-
case ClientToolCallState.error:
1810-
return `Failed to debug ${query}`
1811-
case ClientToolCallState.aborted:
1812-
return `Aborted debugging ${query}`
1813-
case ClientToolCallState.rejected:
1814-
return `Skipped debugging ${query}`
1815-
}
1816-
}
1817-
return undefined
1818-
},
1819-
}
1820-
18211731
const META_search_library_docs: ToolMetadata = {
18221732
displayNames: {
18231733
[ClientToolCallState.generating]: { text: 'Reading docs', icon: Loader2 },
@@ -2466,7 +2376,6 @@ const TOOL_METADATA_BY_ID: Record<string, ToolMetadata> = {
24662376
read: META_read,
24672377
redeploy: META_redeploy,
24682378
rename_workflow: META_rename_workflow,
2469-
remember_debug: META_remember_debug,
24702379
research: META_research,
24712380
run: META_run,
24722381
run_block: META_run_block,
@@ -2475,7 +2384,6 @@ const TOOL_METADATA_BY_ID: Record<string, ToolMetadata> = {
24752384
run_workflow_until_block: META_run_workflow_until_block,
24762385
scrape_page: META_scrape_page,
24772386
search_documentation: META_search_documentation,
2478-
search_errors: META_search_errors,
24792387
search_library_docs: META_search_library_docs,
24802388
search_online: META_search_online,
24812389
search_patterns: META_search_patterns,

0 commit comments

Comments
 (0)