mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 06:21:35 +00:00
* fix(ai): preserve streamed tool-call identity * fix(computer): bind actions to current tool authority * fix(macos): serialize computer control lifecycle * docs(computer): document hardened control contract * chore: follow release-owned changelog policy * test(agents): cover node list cancellation
22 lines
766 B
TypeScript
22 lines
766 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { createOpenClawTools } from "./openclaw-tools.js";
|
|
|
|
function computerTool(modelHasVision?: boolean) {
|
|
return createOpenClawTools({ modelHasVision }).find((tool) => tool.name === "computer");
|
|
}
|
|
|
|
describe("computer tool vision gating", () => {
|
|
it("omits desktop input for models that cannot see the reference frame", () => {
|
|
expect(computerTool(false)).toBeUndefined();
|
|
});
|
|
|
|
it("keeps the tool when vision is supported or not yet resolved", () => {
|
|
expect(computerTool(true)).toBeDefined();
|
|
expect(computerTool()).toBeDefined();
|
|
});
|
|
|
|
it("keeps screenshot results on the direct model-visible tool surface", () => {
|
|
expect(computerTool(true)?.catalogMode).toBe("direct-only");
|
|
});
|
|
});
|