mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-11 09:11:13 +00:00
style: normalize import ordering and wrapping
This commit is contained in:
@@ -89,7 +89,9 @@ describe("acpx plugin config parsing", () => {
|
||||
fs.writeFileSync(path.join(workspacePluginRoot, "package.json"), "{}\n", "utf8");
|
||||
fs.writeFileSync(path.join(workspacePluginRoot, "openclaw.plugin.json"), "{}\n", "utf8");
|
||||
|
||||
const moduleUrl = pathToFileURL(path.join(repoRoot, "dist-runtime", "register.runtime.js")).href;
|
||||
const moduleUrl = pathToFileURL(
|
||||
path.join(repoRoot, "dist-runtime", "register.runtime.js"),
|
||||
).href;
|
||||
expect(resolveAcpxPluginRoot(moduleUrl)).toBe(workspacePluginRoot);
|
||||
} finally {
|
||||
fs.rmSync(repoRoot, { recursive: true, force: true });
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { StreamFn } from "@mariozechner/pi-agent-core";
|
||||
import type { Context, Model } from "@mariozechner/pi-ai";
|
||||
import type {
|
||||
ProviderReplaySessionEntry,
|
||||
ProviderSanitizeReplayHistoryContext,
|
||||
} from "openclaw/plugin-sdk/plugin-entry";
|
||||
import type { StreamFn } from "@mariozechner/pi-agent-core";
|
||||
import type { Context, Model } from "@mariozechner/pi-ai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
registerProviderPlugin,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { StreamFn } from "@mariozechner/pi-agent-core";
|
||||
import { buildProviderStreamFamilyHooks } from "openclaw/plugin-sdk/provider-stream";
|
||||
import type { ProviderWrapStreamFnContext } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { buildProviderStreamFamilyHooks } from "openclaw/plugin-sdk/provider-stream";
|
||||
|
||||
const OPENROUTER_THINKING_STREAM_HOOKS = buildProviderStreamFamilyHooks("openrouter-thinking");
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@ describe("xai provider plugin", () => {
|
||||
expect(capturedModelId).toBe("grok-4-fast");
|
||||
expect(capturedPayload).toMatchObject({ tool_stream: true });
|
||||
expect(capturedPayload).not.toHaveProperty("reasoning");
|
||||
expect((capturedPayload?.tools as Array<{ function?: Record<string, unknown> }>)[0]?.function)
|
||||
.not.toHaveProperty("strict");
|
||||
expect(
|
||||
(capturedPayload?.tools as Array<{ function?: Record<string, unknown> }>)[0]?.function,
|
||||
).not.toHaveProperty("strict");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -433,8 +433,12 @@ describe("tool descriptions", () => {
|
||||
expect(execTool.description).not.toContain("use cron instead");
|
||||
expect(processTool.description).not.toContain("scheduled follow-ups");
|
||||
expect(execTool.description).toContain("otherwise use process to confirm completion");
|
||||
expect(processTool.description).toContain("completion confirmation when automatic completion wake is unavailable");
|
||||
expect(processTool.description).toContain("Use write/send-keys/submit/paste/kill for input or intervention.");
|
||||
expect(processTool.description).toContain(
|
||||
"completion confirmation when automatic completion wake is unavailable",
|
||||
);
|
||||
expect(processTool.description).toContain(
|
||||
"Use write/send-keys/submit/paste/kill for input or intervention.",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -152,10 +152,11 @@ function resolveBundledSessionConversationFallback(params: {
|
||||
}
|
||||
let resolveSessionConversation: BundledSessionKeyModule["resolveSessionConversation"];
|
||||
try {
|
||||
resolveSessionConversation = tryLoadActivatedBundledPluginPublicSurfaceModuleSync<BundledSessionKeyModule>({
|
||||
dirName,
|
||||
artifactBasename: SESSION_KEY_API_ARTIFACT_BASENAME,
|
||||
})?.resolveSessionConversation;
|
||||
resolveSessionConversation =
|
||||
tryLoadActivatedBundledPluginPublicSurfaceModuleSync<BundledSessionKeyModule>({
|
||||
dirName,
|
||||
artifactBasename: SESSION_KEY_API_ARTIFACT_BASENAME,
|
||||
})?.resolveSessionConversation;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ vi.mock("./program-context.js", () => ({
|
||||
describe("buildProgram", () => {
|
||||
function mockProcessOutput() {
|
||||
vi.spyOn(process.stdout, "write").mockImplementation(
|
||||
((() => true) as unknown) as typeof process.stdout.write,
|
||||
(() => true) as unknown as typeof process.stdout.write,
|
||||
);
|
||||
vi.spyOn(process.stderr, "write").mockImplementation(
|
||||
((() => true) as unknown) as typeof process.stderr.write,
|
||||
(() => true) as unknown as typeof process.stderr.write,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { isDeepStrictEqual } from "node:util";
|
||||
import { migrateVoiceCallLegacyConfigInput } from "../../extensions/voice-call/config-api.js";
|
||||
import { normalizeProviderId } from "../agents/model-selection.js";
|
||||
import { isDeepStrictEqual } from "node:util";
|
||||
import { shouldMoveSingleAccountChannelKey } from "../channels/plugins/setup-helpers.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { resolveNormalizedProviderModelMaxTokens } from "../config/defaults.js";
|
||||
|
||||
Reference in New Issue
Block a user