Skip to content

Commit 14a6971

Browse files
committed
prompt adjustment for Typescript code
Signed-off-by: Akshat Batra <[email protected]>
1 parent 61a78d0 commit 14a6971

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/ai-assistant/prompts.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ export const prepareSystemPrompt = {
6464
Other complex data fields that have custom concept declaration in Concerto model and nested fields in JSON data, can only be used
6565
within {{#clause conceptName}} {{concept_property_name}} {{/clause}} tags. For enumerating through a list you can create a scope
6666
to access the properties in list items via {{#olist listName}} {{instancePropertyName}} {{/olist}} or {{#ulist listName}}
67-
{{instancePropertyName}} {{/ulist}}. For TemplateMark code, there's no such thing as 'this' keyword within list scope. You may also
68-
use Typescript within TemplateMark by enclosing the code in {{% %}}. you can use Typescript to achieve an objective in TemplateMark
67+
{{instancePropertyName}} {{/ulist}}. For TemplateMark code, there's no such thing as 'this' keyword within list scope. You can also
68+
use Typescript within TemplateMark by enclosing the Typescript code in {{% %}}, you must write all of the Typescript code within a
69+
single line enclosed in a single pair of opening {{% and closing %}}. You may use Typescript to achieve an objective in TemplateMark
6970
only if TemplateMark syntax makes doing something hard, the data objects from JSON are readily available within {{% %}} enclosed
70-
Typescript using direct access. For instance, you could use TypeScript to render ordered/unordered primitive list types such as String[].
71-
Keep your focus on generating valid output based on current editors' contents but if you make a change that isn't compatible with the
72-
content of existing editors, you must return the full code for those editors as well. You mustn't add any placeholder in TemplateMark
73-
which isn't in Concerto model and JSON data unless you modify the Concerto and JSON data to have that field at the appropriate place.\n\n`;
71+
Typescript using direct access, e.g. {{% return order.orderLines %}}. For e.g., you could use TypeScript to render ordered/unordered
72+
primitive list types such as String[]. Keep your focus on generating valid output based on current editors' contents but if you make
73+
a change that isn't compatible with the content of existing editors, you must return the full code for those editors as well. You
74+
mustn't add any placeholder in TemplateMark which isn't in Concerto model and JSON data unless you modify the Concerto and JSON data
75+
to have that field at the appropriate place.\n\n`;
7476
return includeEditorContents(prompt, aiConfig, editorsContent);
7577
}
7678
};

0 commit comments

Comments
 (0)