fix: honor send path/filePath inputs (#1444) (thanks @hopyky)
This commit is contained in:
@@ -341,15 +341,6 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool {
|
||||
required: true,
|
||||
}) as ChannelMessageActionName;
|
||||
|
||||
// Handle path and filePath parameters: convert to media with file:// URL
|
||||
if (action === "send" && !params.media) {
|
||||
const filePath =
|
||||
(params.path as string | undefined) || (params.filePath as string | undefined);
|
||||
if (filePath) {
|
||||
params.media = filePath.startsWith("file://") ? filePath : `file://${filePath}`;
|
||||
}
|
||||
}
|
||||
|
||||
const accountId = readStringParam(params, "accountId") ?? agentAccountId;
|
||||
|
||||
const gateway = {
|
||||
|
||||
Reference in New Issue
Block a user