|
@@ -25,12 +25,14 @@ export async function getAvailableTools(workspaceId?: string): Promise<{ tools:
|
|
|
* @param toolCallId - Tool call ID from LLM response
|
|
* @param toolCallId - Tool call ID from LLM response
|
|
|
* @param toolName - Name of the tool to execute
|
|
* @param toolName - Name of the tool to execute
|
|
|
* @param args - Tool arguments (parsed JSON)
|
|
* @param args - Tool arguments (parsed JSON)
|
|
|
|
|
+ * @param workspaceId - Workspace ID for workspace-scoped tools
|
|
|
*/
|
|
*/
|
|
|
export async function executeTool(
|
|
export async function executeTool(
|
|
|
sessionId: string,
|
|
sessionId: string,
|
|
|
toolCallId: string,
|
|
toolCallId: string,
|
|
|
toolName: string,
|
|
toolName: string,
|
|
|
- args: Record<string, unknown>
|
|
|
|
|
|
|
+ args: Record<string, unknown>,
|
|
|
|
|
+ workspaceId?: string
|
|
|
): Promise<ExecuteToolResponse> {
|
|
): Promise<ExecuteToolResponse> {
|
|
|
return apiClient.post<ExecuteToolResponse>(
|
|
return apiClient.post<ExecuteToolResponse>(
|
|
|
`/llm/sessions/${sessionId}/tools/execute`,
|
|
`/llm/sessions/${sessionId}/tools/execute`,
|
|
@@ -38,6 +40,7 @@ export async function executeTool(
|
|
|
tool_call_id: toolCallId,
|
|
tool_call_id: toolCallId,
|
|
|
tool_name: toolName,
|
|
tool_name: toolName,
|
|
|
arguments: args,
|
|
arguments: args,
|
|
|
|
|
+ workspace_id: workspaceId,
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|