mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-26 04:25:46 +02:00
* feat(chat): add explicit context picker Co-authored-by: multica-agent <github@multica.ai> * fix(chat): address context picker review Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: multica-agent <github@multica.ai>
23 lines
728 B
TypeScript
23 lines
728 B
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
|
|
vi.mock("../../common/actor-avatar", () => ({
|
|
ActorAvatar: () => null,
|
|
}));
|
|
|
|
import { buildOutgoingChatContent } from "./chat-window";
|
|
|
|
describe("buildOutgoingChatContent", () => {
|
|
it("prepends the stored selected context to the sent message", () => {
|
|
expect(buildOutgoingChatContent("Ship it", {
|
|
type: "issue",
|
|
id: "issue-1",
|
|
label: "MUL-2959",
|
|
subtitle: "Chat context behavior",
|
|
})).toBe('Context: [MUL-2959](mention://issue/issue-1) — "Chat context behavior"\n\nShip it');
|
|
});
|
|
|
|
it("sends plain content after the selected context is cleared", () => {
|
|
expect(buildOutgoingChatContent("Ship it", null)).toBe("Ship it");
|
|
});
|
|
});
|