mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
Address greptile review feedback
This commit is contained in:
parent
81b96c6021
commit
b5e177df7e
4 changed files with 208 additions and 14 deletions
|
|
@ -170,6 +170,29 @@ describe("buildAssistantPartsFromTranscript", () => {
|
|||
]);
|
||||
expect(result.notices).toEqual([]);
|
||||
});
|
||||
|
||||
it("preserves diff transcript output as a fenced diff block", () => {
|
||||
const result = buildAssistantPartsFromTranscript([
|
||||
{ kind: "assistant", ts: "2026-04-06T12:00:00.000Z", text: "Applied the patch." },
|
||||
{ kind: "diff", ts: "2026-04-06T12:00:01.000Z", changeType: "file_header", text: "ui/src/lib/issue-chat-messages.ts" },
|
||||
{ kind: "diff", ts: "2026-04-06T12:00:02.000Z", changeType: "add", text: "+function formatDiffBlock(lines: string[]) {" },
|
||||
{ kind: "diff", ts: "2026-04-06T12:00:03.000Z", changeType: "add", text: "+ return ````diff`;" },
|
||||
]);
|
||||
|
||||
expect(result.parts).toMatchObject([
|
||||
{ type: "text", text: "Applied the patch." },
|
||||
{
|
||||
type: "text",
|
||||
text: [
|
||||
"```diff",
|
||||
"ui/src/lib/issue-chat-messages.ts",
|
||||
"+function formatDiffBlock(lines: string[]) {",
|
||||
"+ return ````diff`;",
|
||||
"```",
|
||||
].join("\n"),
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildIssueChatMessages", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue