-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple.yaml
More file actions
44 lines (39 loc) · 1.23 KB
/
simple.yaml
File metadata and controls
44 lines (39 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
code_actions:
- name: 'Add Struct Comments'
triggers:
- kind: struct_item
relation: findup # findup | exact
context:
kind: struct_item
relation: findup # findup | exact
hints:
- name: FUNCTION_CONTEXT
query: ((struct_item) @function)
placement_strategies:
- query: ((field_declaration_list) @body)
position: replace_exact
prompt_template: |
Human: Write a rust docstring for a given function. Here is an example
for
pub struct FrameInfo {
pub frame: Frame,
pub category_pair: CategoryPairHandle,
pub flags: FrameFlags,
}
how it can look like
{
/// The absolute address or label of this frame.
pub frame: Frame,
/// The category pair of this frame.
pub category_pair: CategoryPairHandle,
/// The flags of this frame. Use `FrameFlags::empty()` if unsure.
pub flags: FrameFlags,
}
JUST write back the initial code with comments itself. Output only the
content within the brackets {...} and the brackets. Do not output
anything else.
Here is the task:
<task>
<<<FUNCTION_CONTEXT>>>
</task>
Assistant: