Add .git to jsconfig ignore
| @@ -59,15 +59,18 @@ module.exports = { | |||
| 59 | }, | 59 | }, |
| 60 | }, | 60 | }, |
| 61 | ], | 61 | ], |
| 62 | // There are various vendored libraries that shouldn't be linted | ||
| 63 | ignorePatterns: [ | 62 | ignorePatterns: [ |
| 64 | 'public/lib/**/*', | 63 | '**/node_modules/**', |
| 65 | '*.min.js', | 64 | '**/dist/**', |
| 66 | 'src/ai_horde/**/*', | 65 | '**/.git/**', |
| 67 | 'plugins/**/*', | 66 | 'public/lib/**', |
| 68 | 'data/**/*', | 67 | 'backups/**', |
| 69 | 'backups/**/*', | 68 | 'data/**', |
| 70 | 'node_modules/**/*', | 69 | 'cache/**', |
| 70 | 'src/tokenizers/**', | ||
| 71 | 'docker/**', | ||
| 72 | 'plugins/**', | ||
| 73 | '**/*.min.js', | ||
| 71 | ], | 74 | ], |
| 72 | rules: { | 75 | rules: { |
| 73 | 'no-unused-vars': ['error', { args: 'none' }], | 76 | 'no-unused-vars': ['error', { args: 'none' }], |
| @@ -11,15 +11,14 @@ | |||
| 11 | "resolveJsonModule": true | 11 | "resolveJsonModule": true |
| 12 | }, | 12 | }, |
| 13 | "exclude": [ | 13 | "exclude": [ |
| 14 | "node_modules", | 14 | "**/node_modules/**", |
| 15 | "**/node_modules/*", | 15 | "**/dist/**", |
| 16 | "public/lib", | 16 | "**/.git/**", |
| 17 | "backups/*", | 17 | "public/lib/**", |
| 18 | "data/*", | 18 | "backups/**", |
| 19 | "**/dist/*", | 19 | "data/**", |
| 20 | "dist/*", | 20 | "cache/**", |
| 21 | "cache/*", | 21 | "src/tokenizers/**", |
| 22 | "src/tokenizers/*", | 22 | "docker/**" |
| 23 | "docker/*", | ||
| 24 | ] | 23 | ] |
| 25 | } | 24 | } |
| @@ -2029,7 +2029,7 @@ export function messageFormatting(mes, ch_name, isSystem, isUser, messageId, san | |||
| 2029 | // Return the original match if no quotes are found | 2029 | // Return the original match if no quotes are found |
| 2030 | return match; | 2030 | return match; |
| 2031 | } | 2031 | } |
| 2032 | } | 2032 | }, |
| 2033 | ); | 2033 | ); |
| 2034 | 2034 | ||
| 2035 | // Restore double quotes in tags | 2035 | // Restore double quotes in tags |
| @@ -554,11 +554,9 @@ export function formatInstructModePrompt(name, isImpersonate, promptBias, name1, | |||
| 554 | * @param {string} name Preset name. | 554 | * @param {string} name Preset name. |
| 555 | */ | 555 | */ |
| 556 | function selectMatchingContextTemplate(name) { | 556 | function selectMatchingContextTemplate(name) { |
| 557 | let foundMatch = false; | ||
| 558 | for (const context_preset of context_presets) { | 557 | for (const context_preset of context_presets) { |
| 559 | // If context template matches the instruct preset | 558 | // If context template matches the instruct preset |
| 560 | if (context_preset.name === name) { | 559 | if (context_preset.name === name) { |
| 561 | foundMatch = true; | ||
| 562 | selectContextPreset(context_preset.name, { isAuto: true }); | 560 | selectContextPreset(context_preset.name, { isAuto: true }); |
| 563 | break; | 561 | break; |
| 564 | } | 562 | } |
| @@ -1715,7 +1715,6 @@ async function sendOpenAIRequest(type, messages, signal) { | |||
| 1715 | messages = messages.filter(msg => msg && typeof msg === 'object'); | 1715 | messages = messages.filter(msg => msg && typeof msg === 'object'); |
| 1716 | 1716 | ||
| 1717 | let logit_bias = {}; | 1717 | let logit_bias = {}; |
| 1718 | const messageId = getNextMessageId(type); | ||
| 1719 | const isClaude = oai_settings.chat_completion_source == chat_completion_sources.CLAUDE; | 1718 | const isClaude = oai_settings.chat_completion_source == chat_completion_sources.CLAUDE; |
| 1720 | const isOpenRouter = oai_settings.chat_completion_source == chat_completion_sources.OPENROUTER; | 1719 | const isOpenRouter = oai_settings.chat_completion_source == chat_completion_sources.OPENROUTER; |
| 1721 | const isScale = oai_settings.chat_completion_source == chat_completion_sources.SCALE; | 1720 | const isScale = oai_settings.chat_completion_source == chat_completion_sources.SCALE; |
| @@ -51,7 +51,7 @@ const eratoRepPenWhitelist = [ | |||
| 51 | 6, 1, 11, 13, 25, 198, 12, 9, 8, 279, 264, 459, 323, 477, 539, 912, 374, 574, 1051, 1550, 1587, 4536, 5828, 15058, | 51 | 6, 1, 11, 13, 25, 198, 12, 9, 8, 279, 264, 459, 323, 477, 539, 912, 374, 574, 1051, 1550, 1587, 4536, 5828, 15058, |
| 52 | 3287, 3250, 1461, 1077, 813, 11074, 872, 1202, 1436, 7846, 1288, 13434, 1053, 8434, 617, 9167, 1047, 19117, 706, | 52 | 3287, 3250, 1461, 1077, 813, 11074, 872, 1202, 1436, 7846, 1288, 13434, 1053, 8434, 617, 9167, 1047, 19117, 706, |
| 53 | 12775, 649, 4250, 527, 7784, 690, 2834, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1210, 1359, 608, 220, 596, 956, | 53 | 12775, 649, 4250, 527, 7784, 690, 2834, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1210, 1359, 608, 220, 596, 956, |
| 54 | 3077, 44886, 4265, 3358, 2351, 2846, 311, 389, 315, 304, 520, 505, 430 | 54 | 3077, 44886, 4265, 3358, 2351, 2846, 311, 389, 315, 304, 520, 505, 430, |
| 55 | ]; | 55 | ]; |
| 56 | 56 | ||
| 57 | // Ban the dinkus and asterism | 57 | // Ban the dinkus and asterism |
| @@ -563,7 +563,7 @@ function convertMistralMessages(messages, charName = '', userName = '') { | |||
| 563 | } | 563 | } |
| 564 | }); | 564 | }); |
| 565 | } | 565 | } |
| 566 | } | 566 | }; |
| 567 | fixToolMessages(); | 567 | fixToolMessages(); |
| 568 | 568 | ||
| 569 | // If system role message immediately follows an assistant message, change its role to user | 569 | // If system role message immediately follows an assistant message, change its role to user |