-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathfusion-cli.config.ts
More file actions
27 lines (25 loc) · 1.02 KB
/
fusion-cli.config.ts
File metadata and controls
27 lines (25 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* Fusion CLI configuration for local monorepo development.
*
* This file is resolved from the repository root so the CLI workspace does not
* need direct dependencies on the AI plugin workspaces. Keeping the plugin
* wiring at the root avoids a cyclic workspace graph in Turborepo while still
* making the plugins available for local development commands.
*
* The chat and copilot plugins are loaded optionally so that CI environments
* (which only need `ai index create`) do not crash when those packages are
* not installed.
*/
import aiIndexPlugin from '@equinor/fusion-framework-cli-plugin-ai-index';
const optionalPlugins = await Promise.allSettled([
import('@equinor/fusion-framework-cli-plugin-ai-chat').then((m) => m.default),
import('@equinor/fusion-framework-cli-plugin-copilot').then((m) => m.default),
]);
export default {
plugins: [
aiIndexPlugin,
...optionalPlugins
.filter((r): r is PromiseFulfilledResult<typeof aiIndexPlugin> => r.status === 'fulfilled')
.map((r) => r.value),
],
};