[Observability] Rename coPilot settings to aiAssistant (#160144)

This commit is contained in:
Dario Gieselaar 2023-06-21 17:33:07 +02:00 committed by GitHub
parent 53dc6d28fe
commit c5dace2e3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 10 deletions

View file

@ -264,7 +264,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
'xpack.upgrade_assistant.featureSet.mlSnapshots (boolean)',
'xpack.upgrade_assistant.featureSet.reindexCorrectiveActions (boolean)',
'xpack.upgrade_assistant.ui.enabled (boolean)',
'xpack.observability.coPilot.enabled (boolean)',
'xpack.observability.aiAssistant.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.metrics.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.logs.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.uptime.enabled (boolean)',

View file

@ -129,7 +129,7 @@ export default function CoPilotPrompt<TPromptId extends CoPilotPromptId>({
}
const tooltipContent = i18n.translate('xpack.observability.coPilotPrompt.askCoPilot', {
defaultMessage: 'Ask Observability Co-Pilot for assistence',
defaultMessage: 'Ask Observability AI Assistent for help',
});
return (

View file

@ -88,7 +88,7 @@ const withCore = makeDecorator({
thresholdRule: { enabled: false },
},
compositeSlo: { enabled: false },
coPilot: {
aiAssistant: {
enabled: false,
},
};

View file

@ -83,7 +83,7 @@ export interface ConfigSchema {
};
};
compositeSlo: { enabled: boolean };
coPilot?: {
aiAssistant?: {
enabled?: boolean;
};
}
@ -330,7 +330,7 @@ export class Plugin
);
this.coPilotService = createCoPilotService({
enabled: !!config.coPilot?.enabled,
enabled: !!config.aiAssistant?.enabled,
http: coreSetup.http,
});

View file

@ -35,7 +35,7 @@ export function KibanaReactStorybookDecorator(Story: ComponentType) {
thresholdRule: { enabled: false },
},
compositeSlo: { enabled: false },
coPilot: {
aiAssistant: {
enabled: false,
},
};

View file

@ -39,7 +39,7 @@ const defaultConfig: ConfigSchema = {
thresholdRule: { enabled: false },
},
compositeSlo: { enabled: false },
coPilot: {
aiAssistant: {
enabled: false,
},
};

View file

@ -51,7 +51,7 @@ const configSchema = schema.object({
groupByPageSize: schema.number({ defaultValue: 10_000 }),
}),
enabled: schema.boolean({ defaultValue: true }),
coPilot: schema.maybe(observabilityCoPilotConfig),
aiAssistant: schema.maybe(observabilityCoPilotConfig),
compositeSlo: schema.object({
enabled: schema.boolean({ defaultValue: false }),
}),
@ -60,7 +60,7 @@ const configSchema = schema.object({
export const config: PluginConfigDescriptor = {
exposeToBrowser: {
unsafe: true,
coPilot: {
aiAssistant: {
enabled: true,
},
},

View file

@ -242,7 +242,9 @@ export class ObservabilityPlugin implements Plugin<ObservabilityPluginSetup> {
);
registerSloUsageCollector(plugins.usageCollection);
const openAIService = config.coPilot?.enabled ? new OpenAIService(config.coPilot) : undefined;
const openAIService = config.aiAssistant?.enabled
? new OpenAIService(config.aiAssistant)
: undefined;
core.getStartServices().then(([coreStart, pluginStart]) => {
registerRoutes({