





















@@ -368,10 +368,11 @@ async function executeSend(params: {
368368toolOptions?: Partial<Parameters<typeof createMessageTool>[0]>;
369369toolCallId?: string;
370370}) {
371+const { config, getRuntimeConfig, ...toolOptions } = params.toolOptions ?? {};
371372const tool = createMessageTool({
372-config: {} as never,
373+getRuntimeConfig: getRuntimeConfig ?? (config ? () => config : mocks.getRuntimeConfig),
373374runMessageAction: mocks.runMessageAction as never,
374- ...params.toolOptions,
375+ ...toolOptions,
375376});
376377await tool.execute(params.toolCallId ?? "1", {
377378action: "send",
@@ -838,7 +839,7 @@ describe("message tool agent routing", () => {
838839839840const tool = createMessageTool({
840841agentSessionKey: "agent:alpha:main",
841-config: {} as never,
842+getRuntimeConfig: mocks.getRuntimeConfig,
842843runMessageAction: mocks.runMessageAction as never,
843844});
844845@@ -858,7 +859,7 @@ describe("message tool agent routing", () => {
858859859860const tool = createMessageTool({
860861agentSessionKey: "agent:main:slack:channel:c123:thread:111.222",
861-config: {} as never,
862+getRuntimeConfig: mocks.getRuntimeConfig,
862863currentChannelProvider: "slack",
863864currentChannelId: "channel:C123",
864865agentThreadId: "111.222",
@@ -881,7 +882,7 @@ describe("message tool agent routing", () => {
881882882883const tool = createMessageTool({
883884agentSessionKey: "agent:main:slack:channel:c123:thread:111.222",
884-config: {} as never,
885+getRuntimeConfig: mocks.getRuntimeConfig,
885886currentChannelProvider: "slack",
886887currentChannelId: "channel:C123",
887888agentThreadId: "111.222",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。