Skip to content

Commit

Permalink
Merge branch 'main' into dev/robgruen/smoke_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robgruen authored Jan 29, 2025
2 parents 6bae1da + d5565b8 commit c0844bf
Show file tree
Hide file tree
Showing 15 changed files with 1,070 additions and 778 deletions.
4 changes: 4 additions & 0 deletions ts/packages/defaultAgentProvider/test/data/translate-e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
{
"request": "get my top 50 favorite songs, filter the current list to Bach pieces, and create a playlist call test",
"action": ["player.getFavorites", "player.filterTracks", "player.createPlaylist"]
},
{
"request": "look up information about Oregon and write a poem using what you found",
"action": ["chat.lookupAndGenerateResponse", "dispatcher.pendingRequestAction"]
}
]
16 changes: 7 additions & 9 deletions ts/packages/dispatcher/src/context/commandHandlerContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ import {
ConstructionProvider,
} from "../agentProvider/agentProvider.js";
import { RequestMetricsManager } from "../utils/metrics.js";
import { getSchemaNamePrefix } from "../execute/actionHandlers.js";
import {
ActionContextWithClose,
getSchemaNamePrefix,
} from "../execute/actionHandlers.js";
import { displayError } from "@typeagent/agent-sdk/helpers/display";

import {
Expand All @@ -78,11 +81,6 @@ export interface ClientSettingsProvider {
set: SetSettingFunction | null;
}

type ActionContextWithClose = {
actionContext: ActionContext<unknown>;
closeActionContext: () => void;
};

// Command Handler Context definition.
export type CommandHandlerContext = {
agents: AppAgentManager;
Expand Down Expand Up @@ -133,7 +131,7 @@ export function getTranslatorForSchema(
context.agents,
getActiveTranslators(context),
config.switch.inline,
config.multipleActions,
config.multiple,
config.schema.generation,
config.model,
!config.schema.optimize.enabled,
Expand Down Expand Up @@ -171,7 +169,7 @@ export async function getTranslatorForSelectedActions(
context.agents,
getActiveTranslators(context),
config.switch.inline,
config.multipleActions,
config.multiple,
config.model,
);
}
Expand Down Expand Up @@ -540,7 +538,7 @@ export async function changeContextConfig(
translatorChanged ||
changed.translation?.model !== undefined ||
changed.translation?.switch?.inline !== undefined ||
changed.translation?.multipleActions !== undefined ||
changed.translation?.multiple !== undefined ||
changed.translation?.schema?.generation !== undefined ||
changed.translation?.schema?.optimize?.enabled !== undefined
) {
Expand Down
Loading

0 comments on commit c0844bf

Please sign in to comment.