Skip to content

Commit ff193b2

Browse files
committed
Update prompt
1 parent 4c5ca42 commit ff193b2

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Core/Sources/ChatService/ChatService.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ You reply should be concise, clear, informative and logical.
99
You MUST reply in the format of markdown.
1010
You MUST embed every code you provide in a markdown code block.
1111
You MUST add the programming language name at the start of the markdown code block.
12-
If you are asked to help perform a task, think step-by-step.
12+
If you are asked to help perform a task, you MUST think step-by-step, then describe each step concisely.
13+
If you are asked to explain code, you MUST explain it step-by-step in a ordered list.
14+
Make your answer short and structured.
1315
"""
1416

1517
public final class ChatService: ObservableObject {

Core/Sources/ChatService/DynamicContextController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ final class DynamicContextController {
2929
Selection Range End: \
3030
Line \(selectionRange.end.line) \
3131
Character \(selectionRange.end.character)
32-
Cursor Position: Same as selection range end
32+
Cursor Position: \
33+
Line \(selectionRange.end.line) \
34+
Character \(selectionRange.end.character)
3335
Selected Code (start from line \(selectionRange.end.line)):```\(content.language.rawValue)
3436
\(content.selectedContent)
3537
```
@@ -38,7 +40,6 @@ final class DynamicContextController {
3840
\(content.editorContent?.lineAnnotations.map { "- \($0)" }.joined(separator: "\n") ?? "N/A")
3941
###
4042
"""
41-
print(contextualSystemPrompt)
4243
await chatGPTService.mutateSystemPrompt(contextualSystemPrompt)
4344
}
4445
}

0 commit comments

Comments
 (0)