mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
96885b5959
Flatten all packages from packages/v1/* and packages/v2/* into packages/* — every package now lives directly under the @copilotkit/ scope with no v1/v2 subdirectories. - Move all v1 packages (react-core, react-ui, runtime, shared, etc.) from packages/v1/* to packages/* - Absorb v2 react code into packages/react-core/src/v2/ (exported via /v2 subpath) - Absorb v2 agent code into packages/runtime/src/agent/ (exported via /v2 subpath) - Move v2 packages (core, angular, demo-agents, etc.) to packages/* - Replace all @copilotkitnext/* imports with @copilotkit/* equivalents - Keep @copilotkitnext/angular as the sole exception (angular remains on next) - Update CI workflows, renovate config, release scripts for flat structure - No public API surface changes — all exports fields are preserved Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
119 lines
3.3 KiB
TypeScript
119 lines
3.3 KiB
TypeScript
import { defineConfig } from "tsdown";
|
|
|
|
export default defineConfig([
|
|
{
|
|
entry: ["src/index.tsx", "src/v2/index.ts"],
|
|
format: ["esm", "cjs"],
|
|
dts: true,
|
|
sourcemap: true,
|
|
target: "es2022",
|
|
outDir: "dist",
|
|
external: [
|
|
"react",
|
|
"react-dom",
|
|
"@copilotkit/core",
|
|
"@copilotkit/shared",
|
|
"@copilotkit/web-inspector",
|
|
"@copilotkit/a2ui-renderer",
|
|
"rxjs",
|
|
/\.css$/,
|
|
],
|
|
exports: {
|
|
customExports: (exports) => ({
|
|
...exports,
|
|
"./v2/styles.css": "./dist/v2/index.css",
|
|
}),
|
|
},
|
|
},
|
|
{
|
|
entry: ["src/index.tsx"],
|
|
format: ["umd"],
|
|
globalName: "CopilotKitReactCore",
|
|
sourcemap: true,
|
|
target: "es2018",
|
|
outDir: "dist",
|
|
external: [
|
|
"react",
|
|
"react-dom",
|
|
"@copilotkit/core",
|
|
"@copilotkit/shared",
|
|
"@copilotkit/runtime-client-gql",
|
|
"@copilotkit/web-inspector",
|
|
"@copilotkit/a2ui-renderer",
|
|
"@ag-ui/client",
|
|
"zod",
|
|
/\.css$/,
|
|
],
|
|
codeSplitting: false,
|
|
outputOptions(options) {
|
|
options.entryFileNames = "[name].umd.js";
|
|
options.globals = {
|
|
react: "React",
|
|
"react-dom": "ReactDOM",
|
|
"react/jsx-runtime": "ReactJsxRuntime",
|
|
"@copilotkit/core": "CopilotKitCore",
|
|
"@copilotkit/shared": "CopilotKitShared",
|
|
"@copilotkit/runtime-client-gql": "CopilotKitRuntimeClientGQL",
|
|
"@copilotkit/web-inspector": "CopilotKitWebInspector",
|
|
"@copilotkit/a2ui-renderer": "CopilotKitA2UIRenderer",
|
|
"@ag-ui/client": "AgUIClient",
|
|
"react-markdown": "ReactMarkdown",
|
|
zod: "Zod",
|
|
};
|
|
return options;
|
|
},
|
|
},
|
|
{
|
|
entry: ["src/v2/index.ts"],
|
|
format: ["umd"],
|
|
globalName: "CopilotKitReactCoreV2",
|
|
sourcemap: true,
|
|
target: "es2018",
|
|
outDir: "dist/v2",
|
|
external: [
|
|
"react",
|
|
"react-dom",
|
|
"@copilotkit/core",
|
|
"@copilotkit/shared",
|
|
"@copilotkit/runtime-client-gql",
|
|
"@copilotkit/web-inspector",
|
|
"@copilotkit/a2ui-renderer",
|
|
"@ag-ui/client",
|
|
"@ag-ui/core",
|
|
"zod",
|
|
/\.css$/,
|
|
],
|
|
codeSplitting: false,
|
|
outputOptions(options) {
|
|
options.entryFileNames = "[name].umd.js";
|
|
options.globals = {
|
|
react: "React",
|
|
"react-dom": "ReactDOM",
|
|
"react/jsx-runtime": "ReactJsxRuntime",
|
|
"@copilotkit/core": "CopilotKitCore",
|
|
"@copilotkit/shared": "CopilotKitShared",
|
|
"@copilotkit/runtime-client-gql": "CopilotKitRuntimeClientGQL",
|
|
"@copilotkit/web-inspector": "CopilotKitWebInspector",
|
|
"@copilotkit/a2ui-renderer": "CopilotKitA2UIRenderer",
|
|
"@ag-ui/client": "AgUIClient",
|
|
"@ag-ui/core": "AgUICore",
|
|
"react-markdown": "ReactMarkdown",
|
|
zod: "Zod",
|
|
"tailwind-merge": "tailwindMerge",
|
|
"lucide-react": "lucideReact",
|
|
"@radix-ui/react-slot": "RadixReactSlot",
|
|
"class-variance-authority": "classVarianceAuthority",
|
|
clsx: "clsx",
|
|
"@radix-ui/react-tooltip": "RadixReactTooltip",
|
|
"@radix-ui/react-dropdown-menu": "RadixReactDropdownMenu",
|
|
"katex/dist/katex.min.css": "katexCss",
|
|
streamdown: "streamdown",
|
|
"@lit-labs/react": "LitLabsReact",
|
|
"use-stick-to-bottom": "useStickToBottom",
|
|
"ts-deepmerge": "tsDeepmerge",
|
|
};
|
|
return options;
|
|
},
|
|
},
|
|
]);
|