Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { TestBed } from "@angular/core/testing";
import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
import { throwError } from "rxjs";
import { AiAnalystService } from "./ai-analyst.service";
import { WorkflowActionService } from "../workflow-graph/model/workflow-action.service";
import { AppSettings } from "../../../common/app-setting";

describe("AiAnalystService", () => {
Expand All @@ -33,9 +32,7 @@ describe("AiAnalystService", () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
// WorkflowActionService is a constructor dependency but unused by the tested
// methods, so an empty stub avoids pulling in the workflow-graph module.
providers: [AiAnalystService, { provide: WorkflowActionService, useValue: {} }],
providers: [AiAnalystService],
});
service = TestBed.inject(AiAnalystService);
httpMock = TestBed.inject(HttpTestingController);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { catchError, Observable, of } from "rxjs";
import { map } from "rxjs/operators";
import { WorkflowActionService } from "../workflow-graph/model/workflow-action.service";
import { AppSettings } from "../../../common/app-setting";

const AI_ASSISTANT_API_BASE_URL = `${AppSettings.getApiEndpoint()}`;
Expand All @@ -46,10 +45,7 @@ const api_Url_Openai = `${AI_ASSISTANT_API_BASE_URL}/aiassistant/openai`;
*/
export class AiAnalystService {
private isAIAssistantEnabled: boolean | null = null;
constructor(
private http: HttpClient,
public workflowActionService: WorkflowActionService
) {}
constructor(private http: HttpClient) {}
/**
* Checks if the AI Assistant feature is enabled by sending a request to the API.
*
Expand Down
Loading