mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 13:44:32 +00:00
fix: resolve ci type errors and reconnect test flake
This commit is contained in:
@@ -76,8 +76,15 @@ describe("buildWorkspaceSkillSnapshot", () => {
|
||||
config,
|
||||
managedSkillsDir: path.join(workspaceDir, ".managed"),
|
||||
bundledSkillsDir: path.join(workspaceDir, ".bundled"),
|
||||
eligibility: { remote: { note: "Remote note" } },
|
||||
} as const;
|
||||
eligibility: {
|
||||
remote: {
|
||||
platforms: ["linux"],
|
||||
hasBin: (_bin: string) => true,
|
||||
hasAnyBin: (_bins: string[]) => true,
|
||||
note: "Remote note",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const snapshot = buildWorkspaceSkillSnapshot(workspaceDir, opts);
|
||||
const prompt = buildWorkspaceSkillsPrompt(workspaceDir, opts);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import crypto from "node:crypto";
|
||||
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
|
||||
import {
|
||||
browserAct,
|
||||
browserArmDialog,
|
||||
@@ -54,14 +55,17 @@ function wrapBrowserExternalJson(params: {
|
||||
};
|
||||
}
|
||||
|
||||
function formatTabsToolResult(tabs: unknown[]) {
|
||||
function formatTabsToolResult(tabs: unknown[]): AgentToolResult<unknown> {
|
||||
const wrapped = wrapBrowserExternalJson({
|
||||
kind: "tabs",
|
||||
payload: { tabs },
|
||||
includeWarning: false,
|
||||
});
|
||||
const content: AgentToolResult<unknown>["content"] = [
|
||||
{ type: "text", text: wrapped.wrappedText },
|
||||
];
|
||||
return {
|
||||
content: [{ type: "text", text: wrapped.wrappedText }],
|
||||
content,
|
||||
details: { ...wrapped.safeDetails, tabCount: tabs.length },
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user