Prompt builder for DIF-007 conversational test editing.
When a chat request arrives with context.mode === "test_edit", the
standard workspace-aware system prompt is swapped out for a dedicated
test-edit prompt that instructs the model to return a short summary plus
exactly one fenced JavaScript code block containing the full updated
Playwright test. Keeping this isolated from chat.js avoids bloating
that file and makes the test-edit contract easy to unit test.
- Source:
Methods
(static) buildTestEditPrompt(context, lastMessage) → {Object}
Build the system + user prompt for a test-edit chat turn.
Parameters:
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | Chat context object from the request body. Properties
|
||||||||||||||||
lastMessage |
Object | The latest user message. |
- Source:
Returns:
- Type
- Object