mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 01:31:08 +00:00
style: apply oxfmt cleanup
This commit is contained in:
@@ -407,9 +407,7 @@ describe("DiscordVoiceManager", () => {
|
||||
|
||||
await manager.join({ guildId: "g1", channelId: "1001" });
|
||||
|
||||
const entry = (manager as unknown as { sessions: Map<string, unknown> }).sessions.get(
|
||||
"g1",
|
||||
) as
|
||||
const entry = (manager as unknown as { sessions: Map<string, unknown> }).sessions.get("g1") as
|
||||
| {
|
||||
guildId: string;
|
||||
channelId: string;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
export function resolveMemorySearchPreflight(params: {
|
||||
query: string;
|
||||
hasIndexedContent: boolean;
|
||||
}):
|
||||
export function resolveMemorySearchPreflight(params: { query: string; hasIndexedContent: boolean }):
|
||||
| {
|
||||
normalizedQuery: string;
|
||||
shouldInitializeProvider: boolean;
|
||||
|
||||
@@ -490,28 +490,31 @@ export async function sendMSTeamsMessages(params: {
|
||||
messageIndex: number,
|
||||
): Promise<string> => {
|
||||
let pendingUploadId: string | undefined;
|
||||
const response = await sendWithRetry(async () => {
|
||||
const activity = await buildActivity(
|
||||
message,
|
||||
params.conversationRef,
|
||||
params.tokenProvider,
|
||||
params.sharePointSiteId,
|
||||
params.mediaMaxBytes,
|
||||
{ feedbackLoopEnabled: params.feedbackLoopEnabled },
|
||||
);
|
||||
const response = await sendWithRetry(
|
||||
async () => {
|
||||
const activity = await buildActivity(
|
||||
message,
|
||||
params.conversationRef,
|
||||
params.tokenProvider,
|
||||
params.sharePointSiteId,
|
||||
params.mediaMaxBytes,
|
||||
{ feedbackLoopEnabled: params.feedbackLoopEnabled },
|
||||
);
|
||||
|
||||
// Extract and strip the internal-only pending upload tag before sending.
|
||||
pendingUploadId =
|
||||
typeof activity._pendingUploadId === "string" ? activity._pendingUploadId : undefined;
|
||||
if (pendingUploadId) {
|
||||
delete activity._pendingUploadId;
|
||||
}
|
||||
// Extract and strip the internal-only pending upload tag before sending.
|
||||
pendingUploadId =
|
||||
typeof activity._pendingUploadId === "string" ? activity._pendingUploadId : undefined;
|
||||
if (pendingUploadId) {
|
||||
delete activity._pendingUploadId;
|
||||
}
|
||||
|
||||
return await ctx.sendActivity(activity);
|
||||
}, {
|
||||
messageIndex,
|
||||
messageCount: messages.length,
|
||||
});
|
||||
return await ctx.sendActivity(activity);
|
||||
},
|
||||
{
|
||||
messageIndex,
|
||||
messageCount: messages.length,
|
||||
},
|
||||
);
|
||||
const messageId = extractMessageId(response) ?? "unknown";
|
||||
|
||||
// Store the activity ID so the accept handler can replace the consent card in-place
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name: taskflow-inbox-triage
|
||||
description: Example TaskFlow authoring pattern for inbox triage. Use when messages need different treatment based on intent, with some routes notifying immediately, some waiting on outside answers, and others rolling into a later summary.
|
||||
metadata: { "openclaw": { "emoji": "📥" } }
|
||||
|
||||
---
|
||||
|
||||
# TaskFlow inbox triage
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name: taskflow
|
||||
description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
|
||||
metadata: { "openclaw": { "emoji": "🪝" } }
|
||||
|
||||
---
|
||||
|
||||
# TaskFlow
|
||||
|
||||
@@ -226,10 +226,9 @@ export async function readDockerContainerEnvVar(
|
||||
}
|
||||
|
||||
export async function readDockerNetworkDriver(network: string): Promise<string | null> {
|
||||
const result = await execDocker(
|
||||
["network", "inspect", "-f", "{{.Driver}}", network],
|
||||
{ allowFailure: true },
|
||||
);
|
||||
const result = await execDocker(["network", "inspect", "-f", "{{.Driver}}", network], {
|
||||
allowFailure: true,
|
||||
});
|
||||
if (result.code !== 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1377,9 +1377,9 @@ export function createNestedChannelParsedAllowFromPrompt(params: {
|
||||
getExistingAllowFrom: ({ cfg }: { cfg: OpenClawConfig }) =>
|
||||
params.getExistingAllowFrom?.(cfg) ??
|
||||
(
|
||||
(cfg.channels?.[params.channel] as Record<string, unknown> | undefined)?.[
|
||||
params.section
|
||||
] as { allowFrom?: Array<string | number> } | undefined
|
||||
(cfg.channels?.[params.channel] as Record<string, unknown> | undefined)?.[params.section] as
|
||||
| { allowFrom?: Array<string | number> }
|
||||
| undefined
|
||||
)?.allowFrom ??
|
||||
[],
|
||||
...(params.mergeEntries ? { mergeEntries: params.mergeEntries } : {}),
|
||||
|
||||
@@ -2534,9 +2534,7 @@ describe("gateway server sessions", () => {
|
||||
expect(deleted.ok).toBe(true);
|
||||
expect(deleted.payload?.deleted).toBe(true);
|
||||
expect(subagentLifecycleHookMocks.runSubagentEnded).toHaveBeenCalledTimes(1);
|
||||
const event = (
|
||||
subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][]
|
||||
)[0]?.[0] as
|
||||
const event = (subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][])[0]?.[0] as
|
||||
| { targetKind?: string; targetSessionKey?: string; reason?: string; outcome?: string }
|
||||
| undefined;
|
||||
expect(event).toMatchObject({
|
||||
@@ -2852,9 +2850,7 @@ describe("gateway server sessions", () => {
|
||||
expect(reset.payload?.key).toBe("agent:main:subagent:worker");
|
||||
expect(reset.payload?.entry.sessionId).not.toBe("sess-subagent");
|
||||
expect(subagentLifecycleHookMocks.runSubagentEnded).toHaveBeenCalledTimes(1);
|
||||
const event = (
|
||||
subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][]
|
||||
)[0]?.[0] as
|
||||
const event = (subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][])[0]?.[0] as
|
||||
| { targetKind?: string; targetSessionKey?: string; reason?: string; outcome?: string }
|
||||
| undefined;
|
||||
expect(event).toMatchObject({
|
||||
|
||||
@@ -159,7 +159,7 @@ function createStartupConfig(params: {
|
||||
},
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
: {}),
|
||||
...(params.providerIds?.length
|
||||
? {
|
||||
models: {
|
||||
|
||||
@@ -49,9 +49,7 @@ function resolveGatewayStartupDreamingPluginIds(config: OpenClawConfig): Set<str
|
||||
return new Set(["memory-core", resolveMemoryDreamingPluginId(config)]);
|
||||
}
|
||||
|
||||
function resolveExplicitMemorySlotStartupPluginId(
|
||||
config: OpenClawConfig,
|
||||
): string | undefined {
|
||||
function resolveExplicitMemorySlotStartupPluginId(config: OpenClawConfig): string | undefined {
|
||||
const configuredSlot = config.plugins?.slots?.memory?.trim();
|
||||
if (!configuredSlot || configuredSlot.toLowerCase() === "none") {
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user