mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 12:41:23 +00:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -65,7 +65,7 @@ function createStreamFnWithExtraParams(
|
||||
|
||||
const underlying = baseStreamFn ?? streamSimple;
|
||||
const wrappedStreamFn: StreamFn = (model, context, options) =>
|
||||
underlying(model as Model<Api>, context, {
|
||||
underlying(model, context, {
|
||||
...streamParams,
|
||||
...options,
|
||||
});
|
||||
|
||||
@@ -60,7 +60,7 @@ function sanitizeAntigravityThinkingBlocks(messages: AgentMessage[]): AgentMessa
|
||||
out.push(msg);
|
||||
continue;
|
||||
}
|
||||
const assistant = msg as Extract<AgentMessage, { role: "assistant" }>;
|
||||
const assistant = msg;
|
||||
if (!Array.isArray(assistant.content)) {
|
||||
out.push(msg);
|
||||
continue;
|
||||
|
||||
@@ -46,7 +46,7 @@ export function buildModelAliasLines(cfg?: OpenClawConfig) {
|
||||
entries.push({ alias, model });
|
||||
}
|
||||
return entries
|
||||
.sort((a, b) => a.alias.localeCompare(b.alias))
|
||||
.toSorted((a, b) => a.alias.localeCompare(b.alias))
|
||||
.map((entry) => `- ${entry.alias}: ${entry.model}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,11 +82,7 @@ vi.mock("../defaults.js", () => ({
|
||||
}));
|
||||
|
||||
vi.mock("../failover-error.js", () => ({
|
||||
FailoverError: class extends Error {
|
||||
constructor(msg: string) {
|
||||
super(msg);
|
||||
}
|
||||
},
|
||||
FailoverError: class extends Error {},
|
||||
resolveFailoverStatus: vi.fn(),
|
||||
}));
|
||||
|
||||
|
||||
@@ -854,7 +854,7 @@ export async function runEmbeddedAttempt(
|
||||
|
||||
const lastAssistant = messagesSnapshot
|
||||
.slice()
|
||||
.reverse()
|
||||
.toReversed()
|
||||
.find((m) => (m as AgentMessage)?.role === "assistant") as AssistantMessage | undefined;
|
||||
|
||||
const toolMetasNormalized = toolMetas
|
||||
|
||||
Reference in New Issue
Block a user