Skip to content

Commit

Permalink
Use getInstanceDir in getDefaultAppAgentProviders (#559)
Browse files Browse the repository at this point in the history
Got over zealous in PR #510
  • Loading branch information
curtisman authored Jan 16, 2025
1 parent 694ad25 commit dfe256c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ts/packages/dispatcher/src/utils/defaultAppProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
ActionSchemaFileCache,
createSchemaInfoProvider,
} from "../translation/actionSchemaFileCache.js";
import { getInstanceDir } from "./userData.js";

let builtinAppAgentProvider: AppAgentProvider | undefined;
export function getBuiltinAppAgentProvider(): AppAgentProvider {
Expand Down Expand Up @@ -64,14 +65,11 @@ function getExternalAppAgentProvider(instanceDir: string): AppAgentProvider {
return externalAppAgentProvider;
}

export function getDefaultAppAgentProviders(
instanceDir?: string,
): AppAgentProvider[] {
const providers = [getBuiltinAppAgentProvider()];
if (instanceDir) {
providers.push(getExternalAppAgentProvider(instanceDir));
}
return providers;
export function getDefaultAppAgentProviders(): AppAgentProvider[] {
return [
getBuiltinAppAgentProvider(),
getExternalAppAgentProvider(getInstanceDir()),
];
}

let appAgentConfigs: Map<string, AppAgentManifest> | undefined;
Expand Down

0 comments on commit dfe256c

Please sign in to comment.