You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: osa_tool/config/prompts/docstring_generation.toml
+57Lines changed: 57 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -355,3 +355,60 @@ Format you answer in a way you're writing README file for the module. Use such t
355
355
## Overview
356
356
## Purpose
357
357
Do not mention or describe any submodule or files! Rename snake_case names on meaningful names.Keep in mind that your audience is document readers, so use a deterministic tone to generate precise content and don't let them know you're provided with any information. AVOID ANY SPECULATION and inaccurate descriptions! Now, provide the summarized idea of the module based on it's components'''
358
+
359
+
class_generation_jsdoc = '''Generate a JSDoc comment for the following JavaScript/TypeScript class {class_name}. Include:
360
+
- Respond strictly in English.
361
+
- A short summary of what the class does.
362
+
- Keep it concise; do NOT list methods or attributes as separate sections.
363
+
- Do NOT use Python conventions: no self, __init__, Args:, Returns:, or Attributes: sections.
364
+
365
+
Return only the comment text, without quotation marks.'''
366
+
367
+
class_update_jsdoc = '''Update the provided description for the following JavaScript/TypeScript class {class_name} using the project's main idea as context.
368
+
Do not mention the project idea explicitly.
369
+
370
+
The main idea: {main_idea}
371
+
Old docstring description part: {old_description}
372
+
373
+
Return only the changed description, without code, other documentation parts, or quotation marks.'''
374
+
375
+
method_generation_jsdoc = '''Generate a JSDoc comment for the following JavaScript/TypeScript function.
376
+
- Respond strictly in English.
377
+
- Include a short summary.
378
+
- Include an @param {{type}} name line for every parameter; infer types from code and use * if unknown.
379
+
- Include an @returns {{type}} line when the function returns a value.
380
+
- Do NOT use Python conventions such as self, __init__, Args:, or Returns:.
381
+
- Do NOT document inner functions separately.
382
+
383
+
Method name: {method_name}
384
+
Source code:
385
+
```
386
+
{source_code}
387
+
```
388
+
Arguments: {arguments}
389
+
Decorators: {decorators}
390
+
Related context (for understanding only; do not document it):
391
+
{context}
392
+
393
+
Return only the JSDoc comment text.'''
394
+
395
+
method_update_jsdoc = '''Update the provided JSDoc comment for the following JavaScript/TypeScript function.
396
+
Preserve correct information and add missing details based on the source code.
397
+
- Use @param {{type}} name for each parameter and @returns {{type}} for a returned value.
398
+
- Do NOT use Python conventions such as self, __init__, Args:, or Returns:.
399
+
- Do NOT invent parameters or behaviour.
400
+
401
+
Original JSDoc:
402
+
{docstring}
403
+
404
+
Method name: {method_name}{class_location}
405
+
Decorators: {decorators}
406
+
Source code:
407
+
```
408
+
{source_code}
409
+
```
410
+
Related context (for understanding only; do not document it):
0 commit comments