diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..3584c62 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + rules: { + // This plugin's Vue SFCs use the ` + + + + diff --git a/vue/src/components/ProviderCard.vue b/vue/src/components/ProviderCard.vue new file mode 100644 index 0000000..8f769b1 --- /dev/null +++ b/vue/src/components/ProviderCard.vue @@ -0,0 +1,388 @@ + + + + + + + diff --git a/vue/src/index.ts b/vue/src/index.ts new file mode 100644 index 0000000..41fbd81 --- /dev/null +++ b/vue/src/index.ts @@ -0,0 +1,8 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +export { default as ManageAIProviders } from './ManageAIProviders.vue'; diff --git a/vue/src/types.ts b/vue/src/types.ts new file mode 100644 index 0000000..0f40bac --- /dev/null +++ b/vue/src/types.ts @@ -0,0 +1,52 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +export interface ProviderConfiguration { + apiKey: string; + endpointUrl: string; + model: string; +} + +export interface Provider { + id: string; + name: string; + description: string; + supportsCustomEndpoint: boolean; + defaultModel: string; + configuration: { + hasApiKey: boolean; + endpointUrl: string; + model: string; + isUsable: boolean; + }; +} + +export interface CapabilityLevel { + label: string; + description: string; +} + +export interface Settings { + defaultProviderId: string; + defaultCapabilityLevel: string; + canEditProviderConfiguration: boolean; + canEditCapabilityLevel: boolean; + capabilityLevels: Record; + providers: Provider[]; +} + +export interface CapabilityLevelOption { + id: string; + label: string; + description: string; +} + +export interface TestConnectionResponse { + providerId: string; + providerName: string; + models: string[]; +}