-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] aider integration #9
Conversation
|
||
const escapeDollarSigns = (text: string | undefined) => { | ||
if (!text) return "Aider response over"; | ||
return text.replace(/\$/g, "\\$"); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 4 months ago
To fix the problem, we need to ensure that backslashes are also escaped in the escapeDollarSigns
function. This can be achieved by first replacing backslashes with double backslashes and then replacing dollar signs with escaped dollar signs. This ensures that both backslashes and dollar signs are properly escaped.
- Modify the
escapeDollarSigns
function to handle backslashes by adding an additional replace operation. - Ensure that the function uses regular expressions with the
g
flag to replace all occurrences of the characters.
-
Copy modified line R346
@@ -345,3 +345,3 @@ | ||
if (!text) return "Aider response over"; | ||
return text.replace(/\$/g, "\\$"); | ||
return text.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); | ||
}; |
export const SERVER_URL = "https://stingray-app-gb2an.ondigitalocean.app/pearai-server-api2" | ||
// export const SERVER_URL = "http://localhost:8000"; | ||
// export const SERVER_URL = "https://stingray-app-gb2an.ondigitalocean.app/pearai-server-api2" | ||
export const SERVER_URL = "http://localhost:8000"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont forget!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yer
Description ✏️
Closes #xxx
What changed? Feel free to be brief.
Checklist ✅