7d667fecbf
Incomplete Flash generations were billed as completed consultations. Fail those runs, keep the partial text, and reuse the rectification like/copy/rerun bar on ordinary chat replies. Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
499 B
TypeScript
12 lines
499 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { toggleChatMessageFeedback } from "../src/components/chat-message-actions.tsx";
|
|
|
|
test("message feedback is mutually exclusive and can be cleared", () => {
|
|
assert.equal(toggleChatMessageFeedback(undefined, "up"), "up");
|
|
assert.equal(toggleChatMessageFeedback("up", "up"), undefined);
|
|
assert.equal(toggleChatMessageFeedback("up", "down"), "down");
|
|
assert.equal(toggleChatMessageFeedback("down", "up"), "up");
|
|
});
|