mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
b394f06fdc
Renames the Bots SDK to the Channels SDK. Names only — no behavior change. - 8 packages @copilotkit/bot* -> @copilotkit/channels* (git mv dirs, names, workspace: cross-deps). Now includes @copilotkit/bot-intelligence -> @copilotkit/channels-intelligence (landed on main via #5761; unpublished, so renamed fresh with the family). - release.config.json scope keys + versionSource; ReleaseScope union; canary/stable-release/publish-release scope dropdowns; verify script - examples/slack (Kite) + examples/teams: deps, jsxImportSource, imports - showcase/shell-docs: content dirs docs/bots->docs/channels and reference/bot->reference/channels, nav registry, redirects createBot and other API names unchanged. Old @copilotkit/bot* to be deprecated after the new packages publish (bot-intelligence was never published). Re-derived onto latest main (was conflicting after #5761 landed). Refs OSS-438
59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
/**
|
|
* App-specific frontend tools — anything that's bot-specific, not
|
|
* universal-Slack. Universal-Slack stuff (tagging, formatting,
|
|
* conversation model) lives in the SDK and is auto-included by
|
|
* `defaultSlackTools` (spread in `app/index.ts`).
|
|
*
|
|
* Add new tools here and re-export them through `appTools`. Wire the
|
|
* array into `createBot({tools: [...defaultSlackTools, ...appTools]})`
|
|
* in `app/index.ts`.
|
|
*/
|
|
import { readThreadTool } from "./read-thread.js";
|
|
import { renderChartTool } from "./render-chart.js";
|
|
import { renderDiagramTool } from "./render-diagram.js";
|
|
import { renderTableTool } from "./render-table.js";
|
|
import { issueCardTool, issueListTool, pageListTool } from "./render-tools.js";
|
|
import {
|
|
showIncidentTool,
|
|
showStatusTool,
|
|
showLinksTool,
|
|
} from "./showcase-tools.js";
|
|
import { confirmWriteTool } from "../human-in-the-loop/index.js";
|
|
import type { BotTool } from "@copilotkit/channels";
|
|
|
|
/**
|
|
* Every tool is a plain `BotTool`: its handler receives the generic
|
|
* `BotToolContext` (`{ thread, message?, user?, signal?, platform }`) the
|
|
* adapter supplies at call time. Platform power (post/stream/postFile,
|
|
* `thread.getMessages()`, `thread.lookupUser()`, …) is reached via the
|
|
* `thread` methods, so there's no per-adapter context and no cast needed —
|
|
* the array assigns straight into `createBot({ tools })`.
|
|
*/
|
|
export const appTools: BotTool[] = [
|
|
readThreadTool,
|
|
renderChartTool,
|
|
renderDiagramTool,
|
|
renderTableTool,
|
|
issueCardTool,
|
|
issueListTool,
|
|
pageListTool,
|
|
showIncidentTool,
|
|
showStatusTool,
|
|
showLinksTool,
|
|
confirmWriteTool,
|
|
];
|
|
|
|
export {
|
|
readThreadTool,
|
|
renderChartTool,
|
|
renderDiagramTool,
|
|
renderTableTool,
|
|
issueCardTool,
|
|
issueListTool,
|
|
pageListTool,
|
|
showIncidentTool,
|
|
showStatusTool,
|
|
showLinksTool,
|
|
confirmWriteTool,
|
|
};
|