feat(web): copy original run prompt
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
EMPTY_OUTPUT_MESSAGE,
|
||||
EMPTY_TIMELINE_MESSAGE,
|
||||
NO_STAGE_DETAILS_MESSAGE,
|
||||
originalRunPrompt,
|
||||
STAGE_SESSION_TITLE,
|
||||
STAGE_EVIDENCE_TITLE,
|
||||
STAGE_DEFINITION_TITLE,
|
||||
@@ -99,6 +100,19 @@ test("the empty-state strings are exactly the app's wording", () => {
|
||||
assert.equal(STAGE_DEFINITION_TITLE, "Stage definition");
|
||||
});
|
||||
|
||||
test("originalRunPrompt returns only the recorded string, including an empty prompt", () => {
|
||||
const prompt = "\n original prompt\nwith lines \n";
|
||||
assert.equal(originalRunPrompt({
|
||||
input: { prompt },
|
||||
title: "different title",
|
||||
output: { markdown: "different output" },
|
||||
}), prompt);
|
||||
assert.equal(originalRunPrompt({ input: { prompt: "" }, title: "not a prompt" }), "");
|
||||
assert.equal(originalRunPrompt({ input: {}, title: "not a prompt", output: { prompt: "also not" } }), undefined);
|
||||
assert.equal(originalRunPrompt({ title: "not a prompt" }), undefined);
|
||||
assert.equal(originalRunPrompt({ input: { prompt: null } }), undefined);
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Field display text
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user