Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveAgentMentionTargetPresentation } from "./agentTargetPresentation";
|
|
|
|
describe("resolveAgentMentionTargetPresentation", () => {
|
|
it("prefers the exact workspace target over stale serialized metadata", () => {
|
|
expect(
|
|
resolveAgentMentionTargetPresentation({
|
|
agentTargetId: "extension:gemini",
|
|
agentTargets: [
|
|
{
|
|
agentTargetId: "extension:gemini",
|
|
iconUrl: "current-icon",
|
|
name: "Gemini CLI",
|
|
provider: "acp:gemini",
|
|
workspaceId: "workspace-1"
|
|
}
|
|
],
|
|
fallbackIconUrl: "stale-icon",
|
|
fallbackName: "Old Gemini",
|
|
fallbackProvider: "all-agents",
|
|
workspaceId: "workspace-1"
|
|
})
|
|
).toMatchObject({
|
|
iconUrl: "current-icon",
|
|
name: "Gemini CLI",
|
|
provider: "acp:gemini"
|
|
});
|
|
});
|
|
|
|
it("keeps the supplied provider fallback when the directory has no match", () => {
|
|
const presentation = resolveAgentMentionTargetPresentation({
|
|
agentTargetId: "local:codex",
|
|
agentTargets: [],
|
|
fallbackProvider: "codex"
|
|
});
|
|
|
|
expect(presentation.provider).toBe("codex");
|
|
expect(presentation.iconUrl).toContain("codex");
|
|
expect(presentation.target).toBeNull();
|
|
});
|
|
});
|