Agents: add generic poll-vote action support

This commit is contained in:
Gustavo Madeira Santana
2026-03-04 11:34:29 -05:00
parent c8ebd48e0f
commit 76bfd9b5e6
4 changed files with 36 additions and 3 deletions

View File

@@ -148,7 +148,7 @@ describe("message tool schema scoping", () => {
label: "Discord",
docsPath: "/channels/discord",
blurb: "Discord test plugin.",
actions: ["send", "poll"],
actions: ["send", "poll", "poll-vote"],
});
afterEach(() => {
@@ -161,14 +161,14 @@ describe("message tool schema scoping", () => {
expectComponents: false,
expectButtons: true,
expectButtonStyle: true,
expectedActions: ["send", "react", "poll"],
expectedActions: ["send", "react", "poll", "poll-vote"],
},
{
provider: "discord",
expectComponents: true,
expectButtons: false,
expectButtonStyle: false,
expectedActions: ["send", "poll", "react"],
expectedActions: ["send", "poll", "poll-vote", "react"],
},
])(
"scopes schema fields for $provider",
@@ -209,6 +209,9 @@ describe("message tool schema scoping", () => {
for (const action of expectedActions) {
expect(actionEnum).toContain(action);
}
expect(properties.pollId).toBeDefined();
expect(properties.pollOptionIndex).toBeDefined();
expect(properties.pollOptionId).toBeDefined();
},
);
});