Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,12 @@ describe("plugin tools", () => {
);
});

test("an unconnected Linear still answers from the task mirror", async () => {
await runSlackAgent({ ...params, prompt: "what linear tickets are open?" });
expect(contextualSystemText()).toContain("Superset tasks mirror");
expect(contextualSystemText()).toContain("Linear is not connected");
});

test("says nothing about a plugin that is neither connected nor asked for", async () => {
const result = await runSlackAgent(params);
expect(contextualSystemText()).not.toContain("connected");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ export interface SlackPlugin {
name: string;
displayName: string;
capability: string;
/** What still works without a connection, so a read question is not refused. */
fallback?: string;
}

export const SLACK_PLUGINS: readonly SlackPlugin[] = [
Expand All @@ -485,6 +487,8 @@ export const SLACK_PLUGINS: readonly SlackPlugin[] = [
displayName: "Linear",
capability:
"search and read issues, file issues, comment, and look up teams, projects, users, statuses and labels",
fallback:
"Superset tasks mirror this organization's Linear issues, so answer questions about Linear issues from the superset_tasks_* tools and say the answer comes from Superset's copy.",
},
{
name: "github",
Expand Down Expand Up @@ -865,7 +869,7 @@ export async function runSlackAgent(
}
if (mentionsPlugin(params.prompt, plugin)) {
return [
`- ${plugin.displayName} is not connected to this user's Superset account, so there are no ${plugin.name}_* tools. If the request needs ${plugin.displayName}, say it is not connected instead of guessing; they can connect it from the Plugins page in Superset.`,
`- ${plugin.displayName} is not connected to this user's Superset account, so there are no ${plugin.name}_* tools.${plugin.fallback ? ` ${plugin.fallback}` : ""} For anything that needs ${plugin.displayName} itself, say it is not connected instead of guessing; they can connect it from the Plugins page in Superset.`,
];
}
return [];
Expand Down
Loading