generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use claude instead of chatgpt
- Loading branch information
Showing
6 changed files
with
89 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ static/dist | |
coverage | ||
junit.xml | ||
cypress/screenshots | ||
src/organizations/ | ||
src/organizations/ | ||
.swp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
export function renderPrompt(originalContent: string, instruction: string): string { | ||
return [ | ||
`You are to act as a YAML configuration editor. Your goal is to modify the provided YAML file according to the given instructions while ensuring that the syntax remains valid and no necessary formatting is lost. Be especially careful with list indicators (like hyphens) and ensure they are preserved appropriately.`, | ||
|
||
`**Important:** Do **not** remove any hyphens (\`-\`) that indicate items in a list (e.g., plugins). These hyphens are critical for YAML syntax and must be retained.`, | ||
|
||
`Additionally, correct any syntax errors present in the original YAML file. Do not remove comments intended for human readers; only remove commented-out YAML markup that is unnecessary for the file to function.`, | ||
|
||
`Here is the original YAML configuration file:`, | ||
export function renderPrompt(originalContent: string, instruction: string, parserCode: string): string { | ||
// eslint-disable-next-line sonarjs/prefer-immediate-return | ||
const prompt = [ | ||
` | ||
- You are to act as a YAML configuration editor. | ||
- Your goal is to modify the provided YAML file according to the user's instructions while ensuring that the syntax remains valid and no necessary formatting is lost. | ||
- Be especially careful with list indicators (like hyphens) and ensure they are preserved appropriately. | ||
- **Important:** Do **not** remove any hyphens (\`-\`) that indicate items in a list (e.g., plugins). These hyphens are critical for YAML syntax and must be retained. | ||
- Additionally, correct any syntax errors present in the original YAML file. | ||
- Do not remove comments intended for human readers; only remove commented-out YAML markup that is unnecessary for the file to function. | ||
- **Do not alter any URLs in the configuration file. Assume that all URLs provided are correct and must remain unchanged.** | ||
- Here is the original YAML configuration file:`, | ||
|
||
originalContent, | ||
|
||
`Modify this file according to the following instruction:`, | ||
`Provide the modified YAML file without any additional explanation or extraneous characters. Do not include any headers, footers, code block markers (like triple backticks), or language identifiers (like 'yaml'). **Only output the modified YAML content.** | ||
instruction, | ||
**Example of correct plugin formatting:** | ||
`Provide the modified YAML file without any additional explanation or extraneous characters. Do not include any headers, footers, code block markers (like triple backticks), or language identifiers (like 'yaml'). **Only output the modified YAML content.**`, | ||
- uses: | ||
- plugin: ubiquibot/issue-comment-embeddings@main | ||
`**Example of correct plugin formatting:** | ||
Ensure that the hyphens before each plugin are retained as shown above. **Remember, do not change any URLs in the configuration.** Finally, for additional context, here is the source code of the yml configuration parser for your reference:`, | ||
|
||
- uses: | ||
- plugin: ubiquibot/issue-comment-embeddings@main | ||
Ensure that the hyphens before each plugin are retained as shown above.`, | ||
parserCode, | ||
].join("\n\n===\n\n"); | ||
|
||
// console.trace(prompt); | ||
|
||
return prompt; | ||
} |
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 |
---|---|---|
@@ -1,19 +1,29 @@ | ||
const CONFIG_FILE_PATH = ".github/.ubiquibot-config.yml"; | ||
|
||
export const repositories = [ | ||
{ | ||
// https://github.com/ubiquity-os/ubiquity-os-kernel/blob/development/src/github/types/plugin-configuration.ts | ||
url: "https://github.com/ubiquity-os/ubiquity-os-kernel.git", | ||
filePath: "src/github/types/plugin-configuration.ts", | ||
localDir: "ubiquity-os-kernel", | ||
type: "parser", | ||
}, | ||
{ | ||
url: "https://github.com/ubiquity/ubiquibot-config.git", | ||
filePath: CONFIG_FILE_PATH, | ||
localDir: "ubiquity", | ||
type: "config", | ||
}, | ||
{ | ||
url: "https://github.com/ubiquity-os/ubiquibot-config.git", | ||
filePath: CONFIG_FILE_PATH, | ||
localDir: "ubiquity-os", | ||
type: "config", | ||
}, | ||
{ | ||
url: "https://github.com/ubiquity-os-marketplace/ubiquibot-config.git", | ||
filePath: CONFIG_FILE_PATH, | ||
localDir: "ubiquity-os-marketplace", | ||
type: "config", | ||
}, | ||
]; |
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