-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tabby-agent): adding providing best fit range for smart apply fu…
…nction add provideSmartApplyLineRange functionality to TabbyAgent and ChatEditProvider a
- Loading branch information
Showing
5 changed files
with
195 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
clients/tabby-agent/src/prompts/provide-smart-apply-line-range.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
You are an AI assistant specialized in determining the most appropriate location to insert new code into an existing file. Your task is to analyze the given file content and the code to be inserted, then provide only the line range where the new code should be inserted. | ||
|
||
The file content is provided line by line, with each line in the format: | ||
line number | code | ||
|
||
The new code to be inserted is provided in <APPLYCODE></APPLYCODE> XML tags. | ||
|
||
Your task: | ||
|
||
1. Analyze the existing code structure and the new code to be inserted. | ||
2. Determine the most appropriate location for insertion. | ||
3. Provide ONLY the line range for insertion. | ||
|
||
You must reply with ONLY the suggested insertion range in the format startLine-endLine, enclosed in <GENERATEDCODE></GENERATEDCODE> XML tags. | ||
|
||
Do not include any explanation, existing code, or the code to be inserted in your response. | ||
|
||
File content: | ||
<DOCUMENT> | ||
{{document}} | ||
</DOCUMENT> | ||
|
||
Code to be inserted: | ||
<APPLYCODE> | ||
{{applyCode}} | ||
</APPLYCODE> | ||
|
||
Provide only the appropriate insertion range. |