源码快照 @ 2026-09-02 (source-only, 剔除非源码素材)

This commit is contained in:
agent-radar committed 2026-09-02 01:05:41 +08:00
commit 04bac1f6e2
2200 files changed
+489415

No files matched your search

@@ -0,0 +1,29 @@
import { expect, test } from "bun:test";
import { renderToStaticMarkup } from "react-dom/server";
import type { DynamicToolUIPart } from "ai";
import { CapabilityCallLine } from "../src/components/chat/capability-call-line";
import {
buildConnectorToolIdentities,
resolveConnectorToolIdentity,
} from "../src/react-app/domains/connections/connector-tool-identity";
test("renders a connector logo beside a human-readable completed tool call", () => {
const part: DynamicToolUIPart = {
type: "dynamic-tool",
toolName: "openwork-cloud_execute_capability",
toolCallId: "call-google-calendar",
state: "output-available",
input: { name: "getCapabilitiesGoogleWorkspaceCalendarEvents", body: {} },
output: { events: [] },
};
const identity = resolveConnectorToolIdentity(
part,
buildConnectorToolIdentities({ mcpServers: [], orgConnections: [] }),
);
const html = renderToStaticMarkup(<CapabilityCallLine part={part} connector={identity} />);
expect(html).toContain('data-connector-name="Google Workspace"');
expect(html).toContain("ext-google-workspace.svg");
expect(html).toContain("Fetched Google Workspace Calendar Events");
});