feat: use new service

This commit is contained in:
Shivam Mishra
2025-12-17 16:57:32 +05:30
parent ffc621b6e6
commit 2f81fcee8c
3 changed files with 5 additions and 103 deletions
@@ -7,7 +7,6 @@ import {
import { useAlert, useTrack } from 'dashboard/composables';
import { useI18n } from 'vue-i18n';
import { OPEN_AI_EVENTS } from 'dashboard/helper/AnalyticsHelper/events';
import OpenAPI from 'dashboard/api/integrations/openapi';
import EditorAPI from 'dashboard/api/captain/editor';
/**
@@ -78,12 +77,6 @@ export function useAI() {
*/
const isFetchingAppIntegrations = computed(() => uiFlags.value.isFetching);
/**
* Computed property for the hook ID.
* @type {import('vue').ComputedRef<string|undefined>}
*/
const hookId = computed(() => aiIntegration.value?.id);
/**
* Computed property for the conversation ID.
* @type {import('vue').ComputedRef<string|undefined>}
@@ -140,9 +133,8 @@ export function useAI() {
if (!conversationId.value) return [];
try {
const result = await OpenAPI.processEvent({
const result = await EditorAPI.processEvent({
type: 'label_suggestion',
hookId: hookId.value,
conversationId: conversationId.value,
});