rename methods
This commit is contained in:
parent
bdf43d34ab
commit
303da45ace
3 changed files with 7 additions and 7 deletions
|
|
@ -3,7 +3,7 @@ import { ChatCompletionMessageParam } from "openai/resources.mjs";
|
|||
import * as readlineSync from "readline-sync";
|
||||
import { ensureAuthenticated } from "../auth/ensureAuth.js";
|
||||
import { ensureOrganization, loadAuthConfig } from "../auth/workos.js";
|
||||
import { initializeAssistant } from "../config.js";
|
||||
import { initialize } from "../config.js";
|
||||
import { introMessage } from "../intro.js";
|
||||
import { configureLogger } from "../logger.js";
|
||||
import { loadSession, saveSession } from "../session.js";
|
||||
|
|
@ -34,7 +34,7 @@ async function initializeChat(options: ChatOptions) {
|
|||
);
|
||||
|
||||
// Initialize ContinueSDK and MCPService once
|
||||
const { config, llmApi, model, mcpService } = await initializeAssistant(
|
||||
const { config, llmApi, model, mcpService } = await initialize(
|
||||
authConfigWithOrg,
|
||||
options.config
|
||||
);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export function getLlmApi(
|
|||
return [llmApi, model.model];
|
||||
}
|
||||
|
||||
export async function loadAssistant(
|
||||
export async function loadConfig(
|
||||
accessToken: string | undefined,
|
||||
config: string | undefined,
|
||||
organizationId: string | undefined
|
||||
|
|
@ -105,7 +105,7 @@ export async function loadAssistant(
|
|||
}
|
||||
}
|
||||
|
||||
export async function initializeAssistant(
|
||||
export async function initialize(
|
||||
authConfig: AuthConfig,
|
||||
configPath: string | undefined
|
||||
): Promise<{
|
||||
|
|
@ -114,7 +114,7 @@ export async function initializeAssistant(
|
|||
model: string;
|
||||
mcpService: MCPService;
|
||||
}> {
|
||||
const config = await loadAssistant(
|
||||
const config = await loadConfig(
|
||||
authConfig.accessToken,
|
||||
configPath,
|
||||
authConfig.organizationId ?? undefined
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { AssistantUnrolled } from "@continuedev/config-yaml";
|
|||
import { BaseLlmApi } from "@continuedev/openai-adapters";
|
||||
import { useState } from "react";
|
||||
import { loadAuthConfig, saveAuthConfig } from "../../auth/workos.js";
|
||||
import { initializeAssistant } from "../../config.js";
|
||||
import { initialize } from "../../config.js";
|
||||
import { introMessage } from "../../intro.js";
|
||||
import { MCPService } from "../../mcp.js";
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ export function useOrganizationSelector({
|
|||
llmApi: newLlmApi,
|
||||
model: newModel,
|
||||
mcpService: newMcpService,
|
||||
} = await initializeAssistant(updatedConfig, configPath);
|
||||
} = await initialize(updatedConfig, configPath);
|
||||
|
||||
// Update assistant configuration
|
||||
onAssistantChange(config, newModel, newLlmApi, newMcpService);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue