mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 07:19:27 -05:00
ai chat: make it work with online models
This commit is contained in:
@@ -8,3 +8,10 @@ function getDomain(url) {
|
||||
const match = url.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/);
|
||||
return match ? match[1] : null;
|
||||
}
|
||||
|
||||
function shellSingleQuoteEscape(str) {
|
||||
// First escape backslashes, then escape single quotes
|
||||
return String(str)
|
||||
.replace(/\\/g, '\\\\')
|
||||
.replace(/'/g, "'\\''");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user