mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 06:48:34 +00:00
chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type {
|
||||
ExtensionAPI,
|
||||
ExtensionContext,
|
||||
} from "@mariozechner/pi-coding-agent";
|
||||
import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { setContextPruningRuntime } from "./context-pruning/runtime.js";
|
||||
@@ -21,13 +18,8 @@ function toolText(msg: AgentMessage): string {
|
||||
return first.text;
|
||||
}
|
||||
|
||||
function findToolResult(
|
||||
messages: AgentMessage[],
|
||||
toolCallId: string,
|
||||
): AgentMessage {
|
||||
const msg = messages.find(
|
||||
(m) => m.role === "toolResult" && m.toolCallId === toolCallId,
|
||||
);
|
||||
function findToolResult(messages: AgentMessage[], toolCallId: string): AgentMessage {
|
||||
const msg = messages.find((m) => m.role === "toolResult" && m.toolCallId === toolCallId);
|
||||
if (!msg) throw new Error(`missing toolResult: ${toolCallId}`);
|
||||
return msg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user